From patchwork Fri Jan 25 11:41:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Kuznetsov X-Patchwork-Id: 10781283 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 D99ED13B5 for ; Fri, 25 Jan 2019 11:53:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C40A32F4FA for ; Fri, 25 Jan 2019 11:53:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B833D2F501; Fri, 25 Jan 2019 11:53:40 +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 673852F4FA for ; Fri, 25 Jan 2019 11:53:40 +0000 (UTC) Received: from localhost ([127.0.0.1]:43113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn03G-0002zB-Kp for patchwork-qemu-devel@patchwork.kernel.org; Fri, 25 Jan 2019 06:53:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmzsD-00031r-AX for qemu-devel@nongnu.org; Fri, 25 Jan 2019 06:42:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmzsC-0007Ht-Dd for qemu-devel@nongnu.org; Fri, 25 Jan 2019 06:42:13 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:45479) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gmzsC-0007H7-6Z for qemu-devel@nongnu.org; Fri, 25 Jan 2019 06:42:12 -0500 Received: by mail-wr1-f65.google.com with SMTP id t6so9906239wrr.12 for ; Fri, 25 Jan 2019 03:42:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=g959jyOADC2kCE2zdR1XtIs967UBpn4T4zd6qi1/j94=; b=hKc5mvWatCXvKAiVNoaYVmDD9GvYySxZJulJ/+zrp3Wj2U7ZX38tlUPPYwXkTYT1N4 /F9XVeos1lkt5nnLgoJTW5N0pXIIxnfF9FI2uz7duQzKhnW/FJoggDVWP/9BU2jtBMQi rZbRkcYDkBETXZYr5BPcLOk3wFNfz4svsSC/Wi0x5Onre8GdMHzEqW4A66tvDgDjcaxS RT0ortF5CWkkLWf9HjW4rZ8nH8OA/vCt/NuSv7gXJ66ECPrcIUnmDiHQJqVZx+sRTE1e QUuber8Zg6N+FOBjxOq/qCBwgvPDMb+Z5xny2NEmDKK1e8l398zyDuVImm6e9X4cX9ui 5QGw== X-Gm-Message-State: AJcUukfytQxffNY/hjYAJyLxFFDnqrk1H3Uo6O4WCbSmogknnISY5bxG BqL8oYL1+1357TZqmcGh8GUbA3iuL1cYtA== X-Google-Smtp-Source: ALg8bN6Vf0KrjwelooCoBGXDMu3FLwN0j4l10KblCn65sYHP/CYI27jolFLXSFik5rrXD4BHEXOHKA== X-Received: by 2002:a5d:68c3:: with SMTP id p3mr11386625wrw.34.1548416530997; Fri, 25 Jan 2019 03:42:10 -0800 (PST) Received: from vitty.brq.redhat.com.cz ([147.229.117.36]) by smtp.gmail.com with ESMTPSA id x81sm64944415wmg.17.2019.01.25.03.42.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 03:42:09 -0800 (PST) From: Vitaly Kuznetsov To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 12:41:52 +0100 Message-Id: <20190125114155.32062-6-vkuznets@redhat.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190125114155.32062-1-vkuznets@redhat.com> References: <20190125114155.32062-1-vkuznets@redhat.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.221.65 Subject: [Qemu-devel] [PATCH RFC 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: Paolo Bonzini , Marcelo Tosatti , Roman Kagan , Eduardo Habkost , 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 b373b4ac06..674c5dc185 100644 --- a/target/i386/kvm.c +++ b/target/i386/kvm.c @@ -1074,7 +1074,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); @@ -1174,6 +1174,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;