Displaying 7 results from an estimated 7 matches for "patch_hypercall".
2020 Feb 07
0
[RFC PATCH v7 09/78] KVM: x86: avoid injecting #PF when emulate the VMCALL instruction
...ee24bb5fa52 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7467,11 +7467,15 @@ static int emulator_fix_hypercall(struct x86_emulate_ctxt *ctxt)
struct kvm_vcpu *vcpu = emul_to_vcpu(ctxt);
char instruction[3];
unsigned long rip = kvm_rip_read(vcpu);
+ int err;
kvm_x86_ops->patch_hypercall(vcpu, instruction);
- return emulator_write_emulated(ctxt, rip, instruction, 3,
+ err = emulator_write_emulated(ctxt, rip, instruction, 3,
&ctxt->exception);
+ if (err == X86EMUL_PROPAGATE_FAULT)
+ err = X86EMUL_CONTINUE;
+ return err;
}
static int dm_request_for_irq_injection(stru...
2020 Jul 21
0
[PATCH v9 08/84] KVM: x86: avoid injecting #PF when emulate the VMCALL instruction
...4..23bce3ef26d8 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7714,11 +7714,15 @@ static int emulator_fix_hypercall(struct x86_emulate_ctxt *ctxt)
struct kvm_vcpu *vcpu = emul_to_vcpu(ctxt);
char instruction[3];
unsigned long rip = kvm_rip_read(vcpu);
+ int err;
kvm_x86_ops.patch_hypercall(vcpu, instruction);
- return emulator_write_emulated(ctxt, rip, instruction, 3,
+ err = emulator_write_emulated(ctxt, rip, instruction, 3,
&ctxt->exception);
+ if (err == X86EMUL_PROPAGATE_FAULT)
+ err = X86EMUL_CONTINUE;
+ return err;
}
static int dm_request_for_irq_injection(stru...
2019 Aug 09
0
[RFC PATCH v6 74/92] kvm: x86: do not unconditionally patch the hypercall instruction during emulation
...struction[3];
+ char buf[KVM_HYPERCALL_INSN_LEN];
+ char instruction[KVM_HYPERCALL_INSN_LEN];
unsigned long rip = kvm_rip_read(vcpu);
+ err = emulator_read_emulated(ctxt, rip, buf, sizeof(buf),
+ &ctxt->exception);
+ if (err != X86EMUL_CONTINUE)
+ return err;
+
kvm_x86_ops->patch_hypercall(vcpu, instruction);
+ if (!memcmp(instruction, buf, sizeof(instruction)))
+ /*
+ * The hypercall instruction is the correct one. Retry
+ * its execution maybe we got here as a result of an
+ * event other than #UD which has been resolved in the
+ * mean time.
+ */
+ return X86EMUL_CONTI...
2019 Aug 09
117
[RFC PATCH v6 00/92] VM introspection
The KVM introspection subsystem provides a facility for applications running
on the host or in a separate VM, to control the execution of other VM-s
(pause, resume, shutdown), query the state of the vCPUs (GPRs, MSRs etc.),
alter the page access bits in the shadow page tables (only for the hardware
backed ones, eg. Intel's EPT) and receive notifications when events of
interest have taken place
2019 Aug 09
117
[RFC PATCH v6 00/92] VM introspection
The KVM introspection subsystem provides a facility for applications running
on the host or in a separate VM, to control the execution of other VM-s
(pause, resume, shutdown), query the state of the vCPUs (GPRs, MSRs etc.),
alter the page access bits in the shadow page tables (only for the hardware
backed ones, eg. Intel's EPT) and receive notifications when events of
interest have taken place
2020 Feb 07
78
[RFC PATCH v7 00/78] VM introspection
The KVM introspection subsystem provides a facility for applications
running on the host or in a separate VM, to control the execution of
other VMs (pause, resume, shutdown), query the state of the vCPUs (GPRs,
MSRs etc.), alter the page access bits in the shadow page tables (only
for the hardware backed ones, eg. Intel's EPT) and receive notifications
when events of interest have taken place
2020 Jul 21
87
[PATCH v9 00/84] VM introspection
The KVM introspection subsystem provides a facility for applications
running on the host or in a separate VM, to control the execution of
other VMs (pause, resume, shutdown), query the state of the vCPUs (GPRs,
MSRs etc.), alter the page access bits in the shadow page tables (only
for the hardware backed ones, eg. Intel's EPT) and receive notifications
when events of interest have taken place