mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
[VMX] Make sure that the WP bit is always set in CR0 when running SVM guests.
This is the VMX equivalent of cset 12525:4ddda0bbb57c. Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
This commit is contained in:
1 parent
551993ffe8
commit
c0a204d2b4
1 file changed
+2
-1
@@ -1373,7 +1373,8 @@ static int vmx_set_cr0(unsigned long value)
|
||||
__vm_clear_bit(EXCEPTION_BITMAP, EXCEPTION_BITMAP_NM);
|
||||
}
|
||||
|
||||
v->arch.hvm_vmx.cpu_cr0 = value | X86_CR0_PE | X86_CR0_PG | X86_CR0_NE;
|
||||
v->arch.hvm_vmx.cpu_cr0 = (value | X86_CR0_PE | X86_CR0_PG
|
||||
| X86_CR0_NE | X86_CR0_WP);
|
||||
__vmwrite(GUEST_CR0, v->arch.hvm_vmx.cpu_cr0);
|
||||
|
||||
v->arch.hvm_vmx.cpu_shadow_cr0 = value;
|
||||
|
||||