]> xenbits.xensource.com Git - xen.git/commitdiff
x86/mm: fix mod_l1_entry() return value when encountering r/o MMIO page
authorJan Beulich <jbeulich@novell.com>
Mon, 9 Jul 2012 09:30:16 +0000 (10:30 +0100)
committerJan Beulich <jbeulich@novell.com>
Mon, 9 Jul 2012 09:30:16 +0000 (10:30 +0100)
While putting together the workaround announced in
http://lists.xen.org/archives/html/xen-devel/2012-06/msg00709.html, I
found that mod_l1_entry(), upon encountering a set bit in
mmio_ro_ranges, would return 1 instead of 0 (the removal of the write
permission is supposed to be entirely transparent to the caller, even
more so to the calling guest).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   25487:baa85434d0ec
xen-unstable date:        Thu Jun 21 11:30:59 2012 +0200

xen/arch/x86/mm.c

index 583e1f74bd13cad1a75c53c4374294e703815599..5ad30d386ae60a831f8f3a4cad62795f3ed0190c 100644 (file)
@@ -1801,6 +1801,7 @@ static int mod_l1_entry(l1_pgentry_t *pl1e, l1_pgentry_t nl1e,
             return 0;
         case -1:
             l1e_remove_flags(nl1e, _PAGE_RW);
+            rc = 0;
             break;
         }