xenstore: make producer/consumer volatile
PATCH 1/1 xenstore: make producer/consumer volatile
Hi!
Don't allow the compiler to play around with producer/consumer shared across domains.
Keir: Please apply this also to Xen 3.2-testing.
Signed-off-by Christoph Egger <[email protected]>
Signature · 12 lines
AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Geschäftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplementär: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Geschäftsführer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy
xen/include/public/io/xs_wire.h +2 -2
@@ -106,8 +106,8 @@ struct xenstore_domain_interface {struct xenstore_domain_interface {char req[XENSTORE_RING_SIZE ];/* Requests to xenstore daemon. */ char rsp[XENSTORE_RING_SIZE ];/* Replies and async watch events. */ -XENSTORE_RING_IDX req_cons, req_prod; -XENSTORE_RING_IDX rsp_cons, rsp_prod; +volatile XENSTORE_RING_IDX req_cons, req_prod; +volatile XENSTORE_RING_IDX rsp_cons, rsp_prod; };/* Violating this is very bad. See docs/misc/xenstore.txt. */
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 8 lines · Christoph Egger
Hi!
Don't allow the compiler to play around with producer/consumer shared across domains.
Keir: Please apply this also to Xen 3.2-testing.
Signed-off-by Christoph Egger <[email protected]>
We don't use volatile. If extra ordering constraints are required then the access code should be amended to include extra barriers.
-- Keir