From 67bf522af6b3757c38f8abd68c9e4d87fa93628f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 12 Jun 2009 22:27:00 -0600 Subject: [PATCH] --- yaml --- r: 147977 b: refs/heads/master c: f7027c6387d0c3acf569845165ec7947e2083c82 h: refs/heads/master i: 147975: 98c4ea29dd1e6b795f47b953c33b913e6b2febd1 v: v3 --- [refs] | 2 +- trunk/Documentation/lguest/lguest.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 1ddec571cc5e..b79dd7d06835 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1028375e93a7aa4dbe466947d1c65f368b1f61c1 +refs/heads/master: f7027c6387d0c3acf569845165ec7947e2083c82 diff --git a/trunk/Documentation/lguest/lguest.c b/trunk/Documentation/lguest/lguest.c index 1a2b906a3ae6..1e31d1ec12a3 100644 --- a/trunk/Documentation/lguest/lguest.c +++ b/trunk/Documentation/lguest/lguest.c @@ -182,9 +182,10 @@ struct virtqueue /* Remember the arguments to the program so we can "reboot" */ static char **main_args; -/* Since guest is UP and we don't run at the same time, we don't need barriers. - * But I include them in the code in case others copy it. */ -#define wmb() +/* We have to be careful with barriers: our devices are all run in separate + * threads and so we need to make sure that changes visible to the Guest happen + * in precise order. */ +#define wmb() __asm__ __volatile__("" : : : "memory") /* Convert an iovec element to the given type. *