From patchwork Fri May 17 14:19:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Kuznetsov X-Patchwork-Id: 10948023 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 59C071395 for ; Fri, 17 May 2019 14:21:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AAB127FA3 for ; Fri, 17 May 2019 14:21:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EA1C27FA9; Fri, 17 May 2019 14:21:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D7BE627FAC for ; Fri, 17 May 2019 14:21:25 +0000 (UTC) Received: from localhost ([127.0.0.1]:49343 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRdjg-0006vF-SW for patchwork-qemu-devel@patchwork.kernel.org; Fri, 17 May 2019 10:21:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRdiB-0005ii-Pg for qemu-devel@nongnu.org; Fri, 17 May 2019 10:19:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRdiA-00066K-RL for qemu-devel@nongnu.org; Fri, 17 May 2019 10:19:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50274) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hRdiA-0005j5-LC for qemu-devel@nongnu.org; Fri, 17 May 2019 10:19:50 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 383B97572A; Fri, 17 May 2019 14:19:28 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 728B97857B; Fri, 17 May 2019 14:19:26 +0000 (UTC) From: Vitaly Kuznetsov To: qemu-devel@nongnu.org Date: Fri, 17 May 2019 16:19:15 +0200 Message-Id: <20190517141924.19024-1-vkuznets@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 17 May 2019 14:19:33 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 0/9] i386/kvm/hyper-v: refactor and implement 'hv-stimer-direct' and 'hv-passthrough' enlightenments X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Eduardo Habkost , Marcelo Tosatti , "Dr . David Alan Gilbert" , Roman Kagan , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP It has been a while since my 'v1' and I (again) apologize for that. Changes since v1: - Existing Hyper-V properties are converted from BOOL to BIT64, this allows us to express dependencies between them in a more natural way as well as simplifies search in kvm_hyperv_properties [Roman Kagan] (hope I got the idea right, but in any case this should be an improvement). PATCH1 added to the series. - 'hv-all' renamed to 'hv-passthrough' [Roman Kagan] - minor changes mostly related to support the addition of PATCH1. Original description: The recently introduced Direct Mode for Hyper-V synthetic timers enlightenment is only exposed through KVM_GET_SUPPORTED_HV_CPUID ioctl. Take the opportunity and re-implement the way we handle Hyper-V enlightenments in QEMU, add support for hv-stimer-direct and 'hv-all' pass-through mode, add missing dependencies between enlightenments. Vitaly Kuznetsov (9): i386/kvm: convert hyperv enlightenments properties from bools to bits i386/kvm: add support for KVM_GET_SUPPORTED_HV_CPUID i386/kvm: move Hyper-V CPUID filling to hyperv_handle_properties() i386/kvm: document existing Hyper-V enlightenments i386/kvm: implement 'hv-passthrough' mode i386/kvm: hv-stimer requires hv-time and hv-synic i386/kvm: hv-tlbflush/ipi require hv-vpindex i386/kvm: hv-evmcs requires hv-vapic i386/kvm: add support for Direct Mode for Hyper-V synthetic timers docs/hyperv.txt | 201 ++++++++++ hw/i386/pc.c | 3 +- target/i386/cpu.c | 47 ++- target/i386/cpu.h | 39 +- target/i386/hyperv-proto.h | 1 + target/i386/hyperv.c | 2 +- target/i386/kvm.c | 770 ++++++++++++++++++++++++++----------- target/i386/machine.c | 2 +- 8 files changed, 813 insertions(+), 252 deletions(-) create mode 100644 docs/hyperv.txt