]> xenbits.xensource.com Git - xen.git/commitdiff
VMX/Viridian: suppress MSR-based APIC suggestion when having APIC-V
authorJan Beulich <jbeulich@suse.com>
Tue, 25 Jun 2013 13:57:44 +0000 (15:57 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 25 Jun 2013 13:57:44 +0000 (15:57 +0200)
When the CPU has the necessary capabilities, having Windows use
synthetic MSR reads/writes is bogus, as this still requires emulation
(which is pretty much guaranteed to be slower than having the hardware
carry out the operation).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/arch/x86/hvm/viridian.c

index 1ee0f7fec8c48b6dfccef93d72ccedd727731f61..46492cbb3293c11826225d18d2140e9156b80c33 100644 (file)
@@ -87,8 +87,9 @@ int cpuid_viridian_leaves(unsigned int leaf, unsigned int *eax,
         if ( (d->arch.hvm_domain.viridian.guest_os_id.raw == 0) ||
              (d->arch.hvm_domain.viridian.guest_os_id.fields.os < 4) )
             break;
-        *eax = (CPUID4A_MSR_BASED_APIC |
-                CPUID4A_RELAX_TIMER_INT);
+        *eax = CPUID4A_RELAX_TIMER_INT;
+        if ( !cpu_has_vmx_apic_reg_virt )
+            *eax |= CPUID4A_MSR_BASED_APIC;
         *ebx = 2047; /* long spin count */
         break;
     }