Skip to contentSkip to conversation

xenstore: make producer/consumer volatile

PATCH In review Christoph Egger 2 participants 2 messages Jul 28, 2008

lore
Share & tools
lore
#0 lore raw

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.

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
diff -r 37fae02cc335 xen/include/public/io/xs_wire.h
@@ -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

#1 lore raw
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.

We don't use volatile. If extra ordering constraints are required then the access code should be amended to include extra barriers.

-- Keir