In both i386 and x86-64 Linux, using a static variable (and thus having the potential of missing synchronization there, as I suspect exists in native Linux) is not needed with the hypercall approach. In the hypervisor, the patch adds the needed synchronization. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 13 Apr 2006, at 15:59, Jan Beulich wrote:> In both i386 and x86-64 Linux, using a static variable (and thus > having the potential of missing synchronization there, > as I suspect exists in native Linux) is not needed with the hypercall > approach. In the hypervisor, the patch adds the > needed synchronization.1. Should you not assign to irq_vector[] and vector_irq[] in Xen with the lock held? Otherwise you may double-allocate if two requests are made concurrently to assign for the same irq (unlikely, but...) 2. Since that''ll need a re-send, please also add a Signed-off-by line. Thanks, Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
>> In both i386 and x86-64 Linux, using a static variable (and thus >> having the potential of missing synchronization there, >> as I suspect exists in native Linux) is not needed with the hypercall >> approach. In the hypervisor, the patch adds the >> needed synchronization. > >1. Should you not assign to irq_vector[] and vector_irq[] in Xen with >the lock held? Otherwise you may double-allocate if two requests are >made concurrently to assign for the same irq (unlikely, but...)Hmm, the vector_irq assignment shouldn''t need the lock (which is why I moved the unlock up), but you''re right, the IO_APIC_VECTOR() write *and* read should happen with the lock held. I''ll update that.>2. Since that''ll need a re-send, please also add a Signed-off-by line.Sure, if you prefer it that way. Should this go into the patch (attachment) or the message? Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 13 Apr 2006, at 17:03, Jan Beulich wrote:>> 2. Since that''ll need a re-send, please also add a Signed-off-by line. > > Sure, if you prefer it that way. Should this go into the patch > (attachment) or the message?Wherever you put the text that should go in the changeset comment (so that I can cut-and-paste). Apart from that I''m not fussed either way. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
In both i386 and x86-64 Linux, using a static variable (and thus having the potential of missing synchronization there, as I suspect exists in native Linux) is not needed with the hypercall approach. In the hypervisor, the patch adds the needed synchronization. Signed-off-by: Jan Beulich <jbeulich@novell.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel