Skip to contentSkip to conversation

kvm: do not force hypervisor flag in guest`s CPUID

PATCH New Vladislav Yarmak 1 participant 1 message Apr 23, 2015 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 kvm: do not force hypervisor flag in guest`s CPUID

Do not force hypervisor flag in guests` CPUID - let invoker decide this. It is needed for hidding hypervisor from guest and aimed to run Hyper-V nested in KVM.

---
 target-i386/kvm.c | 4 ----
 1 file changed, 4 deletions(-)
target-i386/kvm.c +0 -4
index 41d09e5..63026cc 100644
@@ -213,10 +213,6 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *s, uint32_t function,
         /* KVM before 2.6.30 misreports the following features */
         ret |= CPUID_MTRR | CPUID_PAT | CPUID_MCE | CPUID_MCA;
     } else if (function == 1 && reg == R_ECX) {
-        /* We can set the hypervisor flag, even if KVM does not return it on
-         * GET_SUPPORTED_CPUID
-         */
-        ret |= CPUID_EXT_HYPERVISOR;
         /* tsc-deadline flag is not returned by GET_SUPPORTED_CPUID, but it
          * can be enabled if the kernel has KVM_CAP_TSC_DEADLINE_TIMER,
          * and the irqchip is in the kernel.
Signature · 1 line
2.1.4