kpatch/test/integration/fedora-27/module-shadow.patch
Joe Lawrence 1d942ebb41 testing: rebase patches for Fedora 27 4.13.9-300.fc27.x86_64
Rename the old Fedora 25 integration patch directory and rebase to
Fedora 27 sources.

Fixes #761.

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
2018-03-22 14:36:34 -04:00

25 lines
926 B
Diff

diff -Nupr src.orig/arch/x86/kvm/vmx.c src/arch/x86/kvm/vmx.c
--- src.orig/arch/x86/kvm/vmx.c 2017-11-17 15:58:19.369211972 -0500
+++ src/arch/x86/kvm/vmx.c 2017-11-17 15:59:29.615211972 -0500
@@ -11259,10 +11259,20 @@ static void vmx_leave_nested(struct kvm_
* It should only be called before L2 actually succeeded to run, and when
* vmcs01 is current (it doesn't leave_guest_mode() or switch vmcss).
*/
+#include "kpatch.h"
static void nested_vmx_entry_failure(struct kvm_vcpu *vcpu,
struct vmcs12 *vmcs12,
u32 reason, unsigned long qualification)
{
+ int *kpatch;
+
+ kpatch = kpatch_shadow_alloc(vcpu, "kpatch", sizeof(*kpatch),
+ GFP_KERNEL);
+ if (kpatch) {
+ kpatch_shadow_get(vcpu, "kpatch");
+ kpatch_shadow_free(vcpu, "kpatch");
+ }
+
load_vmcs12_host_state(vcpu, vmcs12);
vmcs12->vm_exit_reason = reason | VMX_EXIT_REASONS_FAILED_VMENTRY;
vmcs12->exit_qualification = qualification;