From patchwork Fri Mar 29 14:18:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Kuznetsov X-Patchwork-Id: 10877207 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 721291575 for ; Fri, 29 Mar 2019 14:29:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AE40287E9 for ; Fri, 29 Mar 2019 14:29:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E8142882E; Fri, 29 Mar 2019 14:29: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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI 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 089C7287E9 for ; Fri, 29 Mar 2019 14:29:26 +0000 (UTC) Received: from localhost ([127.0.0.1]:54485 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9sVZ-0008Qc-Bi for patchwork-qemu-devel@patchwork.kernel.org; Fri, 29 Mar 2019 10:29:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9sUI-0006sP-RV for qemu-devel@nongnu.org; Fri, 29 Mar 2019 10:28:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h9sUI-0007zB-04 for qemu-devel@nongnu.org; Fri, 29 Mar 2019 10:28:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34196) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h9sUH-0007yw-Oq for qemu-devel@nongnu.org; Fri, 29 Mar 2019 10:28:05 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A94FA308402A; Fri, 29 Mar 2019 14:18:47 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E0FC91001DD6; Fri, 29 Mar 2019 14:18:45 +0000 (UTC) From: Vitaly Kuznetsov To: qemu-devel@nongnu.org Date: Fri, 29 Mar 2019 15:18:29 +0100 Message-Id: <20190329141832.22882-6-vkuznets@redhat.com> In-Reply-To: <20190329141832.22882-1-vkuznets@redhat.com> References: <20190329141832.22882-1-vkuznets@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 29 Mar 2019 14:18:47 +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 5/8] i386/kvm: hv-evmcs requires hv-vapic 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: 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 Enlightened VMCS is enabled by writing to a field in VP assist page and these require virtual APIC. Signed-off-by: Vitaly Kuznetsov --- target/i386/kvm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index af45241adb..9edf76e473 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -1083,7 +1083,7 @@ static int hv_report_missing_dep(X86CPU *cpu, const char *name, return 1; } - if (cpu->hyperv_all) { + if (cpu->hyperv_all && strcmp(name, "hv-evmcs")) { fprintf(stderr, "Hyper-V %s (requested by 'hv-all' cpu flag) " "requires %s (is not supported by kernel)\n", kvm_hyperv_properties[i].desc, kvm_hyperv_properties[j].desc); @@ -1183,6 +1183,9 @@ static int hyperv_handle_properties(CPUState *cs, if (cpu->hyperv_synic && !cpu->hyperv_synic_kvm_only && !cpu->hyperv_vpindex) r |= hv_report_missing_dep(cpu, "hv-synic", "hv-vpindex"); + if (cpu->hyperv_evmcs && !cpu->hyperv_vapic) { + r |= hv_report_missing_dep(cpu, "hv-evmcs", "hv-vapic"); + } /* Not exposed by KVM but needed to make CPU hotplug in Windows work */ env->features[FEAT_HYPERV_EDX] |= HV_CPU_DYNAMIC_PARTITIONING_AVAILABLE;