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

Re: [Xen-devel] [PATCH] add support for XCHG instruction accessing APIC




On 5 Apr 2006, at 15:01, Boris Ostrovsky wrote:

In fact I'm pretty sure the locking is not needed even if we did care about atomicity. You're only protecting guest accesses from other guest accesses, and each VCPU has its own local APIC model, so there cannot be multiple simultaneous guest accesses to a single local APIC.


My only argument in favor of using the lock would be for completeness of the emulation. You are absolutely right in that for Linux there seems to be no need to hold the lock. My concern is that other OSs may treat this differently. And if we don't have sources, it may be somewhat difficult to figure out that the atomicity (or lack of it) was the cause of a problem.

If, however, there is a strong feeling that we don't need the lock, I am happy to drop it. I guess you are mostly unhappy about adding a new field to hvm_domain, not about performance
impact?

Yes, also my second argument was that there is *no way* for two VCPUs to conflict on a local APIC access, since LAPIC accesses are always to the VCPU's own LAPIC. So there is no potential concurrency that needs to be serialised, regardless of the guest OS.

 -- Keir


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