[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] tools/libxc: disable x2APIC when using nested virtualization



commit 7b3c5b70a32303b46d0d051e695f18d72cce5ed0
Author:     Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Fri Jan 3 18:29:35 2020 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Fri Jan 3 18:37:25 2020 +0000

    tools/libxc: disable x2APIC when using nested virtualization
    
    There are issues as reported by osstest when Xen is running nested on
    itself and the L1 Xen is using x2APIC. While those are being
    investigated, disable announcing the x2APIC feature in CPUID when nested
    HVM mode is enabled.
    
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Wei Liu <wl@xxxxxxx>
---
 tools/libxc/xc_cpuid_x86.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index 2540aa1e1c..ac38c1406e 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -653,6 +653,17 @@ int xc_cpuid_apply_policy(xc_interface *xch, uint32_t 
domid,
         p->extd.itsc = true;
         p->basic.vmx = true;
         p->extd.svm = true;
+
+        /*
+         * BODGE: don't announce x2APIC mode when using nested virtualization,
+         * as it doesn't work properly. This should be removed once the
+         * underlying bug(s) are fixed.
+         */
+        rc = xc_hvm_param_get(xch, domid, HVM_PARAM_NESTEDHVM, &val);
+        if ( rc )
+            goto out;
+        if ( val )
+            p->basic.x2apic = false;
     }
 
     rc = x86_cpuid_copy_to_buffer(p, leaves, &nr_leaves);
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.