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

[Xen-changelog] [xen stable-4.10] x86/guest: use the vcpu_info area from shared_info



commit 69f4d872e524932d392acd80989c5b776baa4522
Author:     Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Wed Jan 17 10:57:02 2018 +0000
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Wed Jan 17 16:14:16 2018 +0000

    x86/guest: use the vcpu_info area from shared_info
    
    If using less than 32 vCPUs (XEN_LEGACY_MAX_VCPUS).
    
    This is a workaround that should allow to boot the shim on hypervisors
    without commit "x86/upcall: inject a spurious event after setting
    upcall vector" as long as less than 32 vCPUs are assigned to the
    shim.
    
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Acked-by: Jan Beulich <JBeulich@xxxxxxxx>
---
 xen/arch/x86/guest/xen.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/guest/xen.c b/xen/arch/x86/guest/xen.c
index 2a5554ab26..ed8b8c8c7b 100644
--- a/xen/arch/x86/guest/xen.c
+++ b/xen/arch/x86/guest/xen.c
@@ -257,7 +257,8 @@ void __init hypervisor_setup(void)
     map_shared_info();
 
     set_vcpu_id();
-    vcpu_info = xzalloc_array(struct vcpu_info, nr_cpu_ids);
+    if ( nr_cpu_ids > XEN_LEGACY_MAX_VCPUS )
+        vcpu_info = xzalloc_array(struct vcpu_info, nr_cpu_ids);
     if ( map_vcpuinfo() )
     {
         xfree(vcpu_info);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.10

_______________________________________________
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®.