libxl: correct bug in domain builder regarding page tables for pvh
authorJuergen Gross <jgross@suse.com>
Thu, 19 Nov 2015 16:11:08 +0000 (17:11 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 20 Nov 2015 14:14:57 +0000 (14:14 +0000)
Commit 81a76e4b12961a9f54f5021809074196dfe6dbba ("libxc: rework of
domain builder's page table handler") dropped a special case for pvh
resulting in page tables being mapped read-only. This led to a panic
of the domain in early boot.

Correct this error.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
tools/libxc/xc_dom_x86.c

index 7279fa2714f0164713299271c93499717feba9f2..5ff33ca1986ce443f6f36a6dbd1a69f0e2f3b9cb 100644 (file)
@@ -372,7 +372,7 @@ static x86_pgentry_t get_pg_prot_x86(struct xc_dom_image *dom, int l,
     unsigned m;
 
     prot = domx86->params->lvl_prot[l];
-    if ( l > 0 )
+    if ( l > 0 || dom->pvh_enabled )
         return prot;
 
     for ( m = 0; m < domx86->n_mappings; m++ )