qemu-kvm/kvm-i386-kvm-add-a-comment-...

49 lines
1.9 KiB
Diff

From 61470c276a7785f3615da564f15a5c2368354638 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Fri, 18 Jan 2019 11:57:05 +0000
Subject: [PATCH 2/2] i386/kvm: add a comment explaining why .feat_names are
commented out for Hyper-V feature bits
RH-Author: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-id: <20190118115705.19731-3-vkuznets@redhat.com>
Patchwork-id: 84048
O-Subject: [RHEL8 qemu-kvm PATCH 2/2] i386/kvm: add a comment explaining why .feat_names are commented out for Hyper-V feature bits
Bugzilla: 1653511
RH-Acked-by: Mohammed Gamal <mgamal@redhat.com>
RH-Acked-by: Eduardo Otubo <otubo@redhat.com>
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
Hyper-V .feat_names are, unlike hardware features, commented out and it is
not obvious why we do that. Document the current status quo.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20181221141604.16935-1-vkuznets@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
(cherry picked from commit abd5fc4c862d033a989552914149f01c9476bb16)
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
---
target/i386/cpu.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 460fe06..8570b25 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -929,6 +929,13 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] = {
*/
.no_autoenable_flags = ~0U,
},
+ /*
+ * .feat_names are commented out for Hyper-V enlightenments because we
+ * don't want to have two different ways for enabling them on QEMU command
+ * line. Some features (e.g. "hyperv_time", "hyperv_vapic", ...) require
+ * enabling several feature bits simultaneously, exposing these bits
+ * individually may just confuse guests.
+ */
[FEAT_HYPERV_EAX] = {
.type = CPUID_FEATURE_WORD,
.feat_names = {
--
1.8.3.1