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

Re: [Xen-devel] [PATCH] make HVM PIC emulation code SMP-safe




Well, that would make it behave like a *real* PIC, wired through to CPU0's INT pin, right? So it sounds good to me, especially if we are currently spraying PIC interrupts across all VCPUs. And it's even better if it avoids requiring locking on the vmentry path.

 -- Keir

On 16 May 2006, at 06:20, Dong, Eddie wrote:

 For the PIC I/O access, do we need lock protect? But for IRQ generation, i.e. cpu_get_interrupt, how about following for simplicity (not tested)?
 
diff -r 1e3977e029fd xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Mon May 08 19:21:41 2006 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Tue May 16 13:18:04 2006 +0800
@@ -248,7 +248,7 @@ int cpu_get_interrupt(struct vcpu *v, in
         return intno;
     }
     /* read the irq from the PIC */
-    if ( (intno = cpu_get_pic_interrupt(v, type)) != -1 )
+    if ( v->vcpu_id == 0 && (intno = cpu_get_pic_interrupt(v, type)) != -1 )
         return intno;
 
     return -1;


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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