kpatch/test/integration/rhel-7.5/module-shadow.patch
Artem Savkov 76ebcd2fa4 test/integration: add patches rebased for recent rhel minor releases
This commit contains centos-7 patches rebased and adjusted to work with
recent rhel minors so that integration tests actually pass on those.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2019-06-14 10:53:57 +02:00

26 lines
875 B
Diff

Index: src/arch/x86/kvm/vmx.c
===================================================================
--- src.orig/arch/x86/kvm/vmx.c
+++ src/arch/x86/kvm/vmx.c
@@ -11168,10 +11168,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 <linux/livepatch.h>
static void nested_vmx_entry_failure(struct kvm_vcpu *vcpu,
struct vmcs12 *vmcs12,
u32 reason, unsigned long qualification)
{
+ int *kpatch;
+
+ kpatch = klp_shadow_alloc(vcpu, 0, NULL, sizeof(*kpatch),
+ GFP_KERNEL);
+ if (kpatch) {
+ klp_shadow_get(vcpu, 0);
+ klp_shadow_free(vcpu, 0);
+ }
+
load_vmcs12_host_state(vcpu, vmcs12);
vmcs12->vm_exit_reason = reason | VMX_EXIT_REASONS_FAILED_VMENTRY;
vmcs12->exit_qualification = qualification;