| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 10/11] pvh: Send an SCI on VCPU hotplug event
 .. and update GPE0 registers.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
---
Changes in v2:
* Use has_ioreq_cpuhp() instead of ioreq_gmfn.mask==0 as check 
  for PVH guest
 xen/arch/x86/domctl.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index b736d4c..07c8247 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -1443,6 +1443,18 @@ long arch_do_domctl(
             break;
 
         d->arch.avail_vcpus = num;
+
+        /*
+         * For PVH guests we need to send an SCI and set enable/status
+         * bits in GPE block (DSDT specifies _E02, so it's bit 2).
+         */
+        if ( is_hvm_domain(d) && !has_ioreq_cpuhp(d) )
+        {
+            d->arch.hvm_domain.acpi_io.gpe[2] =
+                d->arch.hvm_domain.acpi_io.gpe[0] = 4;
+            send_guest_vcpu_virq(d->vcpu[0], VIRQ_SCI);
+        }
+
         ret = 0;
         break;
     }
-- 
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
 
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |