]> git.proxmox.com Git - pve-kernel.git/blobdiff - patches/kernel/0010-kvm-nVMX-Enforce-cpl-0-for-VMX-instructions.patch
rebase patches on top of Ubuntu-4.13.0-45.50
[pve-kernel.git] / patches / kernel / 0010-kvm-nVMX-Enforce-cpl-0-for-VMX-instructions.patch
index 2da036a1928428ed94fddfadb74a75d58b446d73..880425b25607b31bda0d9e5d595c4cc531322421 100644 (file)
@@ -1,7 +1,7 @@
-From 727ba748e110b4de50d142edca9d6a9b7e6111d8 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Felix Wilhelm <fwilhelm@google.com>
 Date: Mon, 11 Jun 2018 09:43:44 +0200
-Subject: kvm: nVMX: Enforce cpl=0 for VMX instructions
+Subject: [PATCH] kvm: nVMX: Enforce cpl=0 for VMX instructions
 
 VMX instructions executed inside a L1 VM will always trigger a VM exit
 even when executed with cpl 3. This means we must perform the
@@ -17,10 +17,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
  1 file changed, 13 insertions(+), 2 deletions(-)
 
 diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
-index 709de996..4bf1f9d 100644
+index 54980817194a..b2d75b59b6e5 100644
 --- a/arch/x86/kvm/vmx.c
 +++ b/arch/x86/kvm/vmx.c
-@@ -7905,6 +7905,12 @@ static int handle_vmon(struct kvm_vcpu *vcpu)
+@@ -7180,6 +7180,12 @@ static int handle_vmon(struct kvm_vcpu *vcpu)
                return 1;
        }
  
@@ -33,7 +33,7 @@ index 709de996..4bf1f9d 100644
        if (vmx->nested.vmxon) {
                nested_vmx_failValid(vcpu, VMXERR_VMXON_IN_VMX_ROOT_OPERATION);
                return kvm_skip_emulated_instruction(vcpu);
-@@ -7964,6 +7970,11 @@ static int handle_vmon(struct kvm_vcpu *vcpu)
+@@ -7239,6 +7245,11 @@ static int handle_vmon(struct kvm_vcpu *vcpu)
   */
  static int nested_vmx_check_permission(struct kvm_vcpu *vcpu)
  {
@@ -45,7 +45,7 @@ index 709de996..4bf1f9d 100644
        if (!to_vmx(vcpu)->nested.vmxon) {
                kvm_queue_exception(vcpu, UD_VECTOR);
                return 0;
-@@ -8283,7 +8294,7 @@ static int handle_vmread(struct kvm_vcpu *vcpu)
+@@ -7577,7 +7588,7 @@ static int handle_vmread(struct kvm_vcpu *vcpu)
                if (get_vmx_mem_address(vcpu, exit_qualification,
                                vmx_instruction_info, true, &gva))
                        return 1;
@@ -54,7 +54,7 @@ index 709de996..4bf1f9d 100644
                kvm_write_guest_virt_system(&vcpu->arch.emulate_ctxt, gva,
                             &field_value, (is_long_mode(vcpu) ? 8 : 4), NULL);
        }
-@@ -8448,7 +8459,7 @@ static int handle_vmptrst(struct kvm_vcpu *vcpu)
+@@ -7720,7 +7731,7 @@ static int handle_vmptrst(struct kvm_vcpu *vcpu)
        if (get_vmx_mem_address(vcpu, exit_qualification,
                        vmx_instruction_info, true, &vmcs_gva))
                return 1;
@@ -63,6 +63,3 @@ index 709de996..4bf1f9d 100644
        if (kvm_write_guest_virt_system(&vcpu->arch.emulate_ctxt, vmcs_gva,
                                 (void *)&to_vmx(vcpu)->nested.current_vmptr,
                                 sizeof(u64), &e)) {
--- 
-cgit v1.1
-