Displaying 20 results from an estimated 32 matches for "kvm_emulate_hypercall".
2019 Aug 09
0
[RFC PATCH v6 74/92] kvm: x86: do not unconditionally patch the hypercall instruction during emulation
...r at bitdefender.com>
---
arch/x86/kvm/x86.c | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 04b1d2916a0a..965c4f0108eb 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7363,16 +7363,33 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu)
}
EXPORT_SYMBOL_GPL(kvm_emulate_hypercall);
+#define KVM_HYPERCALL_INSN_LEN 3
+
static int emulator_fix_hypercall(struct x86_emulate_ctxt *ctxt)
{
+ int err;
struct kvm_vcpu *vcpu = emul_to_vcpu(ctxt);
- char instruction[3];
+ char buf[KVM_HYPERCALL_INSN_LEN];
+ char...
2020 Feb 07
0
[RFC PATCH v7 57/78] KVM: introspection: add KVMI_EVENT_HYPERCALL
...N_CONTINUE:
+ break;
+ default:
+ kvmi_handle_common_event_actions(vcpu->kvm, action,
+ "HYPERCALL");
+ }
+}
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 46a135595893..b4a7805ce9e4 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7433,11 +7433,14 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu)
{
unsigned long nr, a0, a1, a2, a3, ret;
int op_64_bit;
+ bool kvmi_hc;
- if (kvm_hv_hypercall_enabled(vcpu->kvm))
+ nr = kvm_rax_read(vcpu);
+ kvmi_hc = (u32)nr == KVM_HC_XEN_HVM_OP;
+
+ if (kvm_hv_hypercall_enabled(vcpu->kvm) && !kvmi_hc)
return kvm_...
2013 Aug 06
6
[PATCH V12 0/5] Paravirtualized ticket spinlocks for KVM host
This series forms the kvm host part of paravirtual spinlock
based against kvm tree.
Please refer https://lkml.org/lkml/2013/8/6/178 for kvm guest part
of the series.
Please note that:
kvm uapi: Add KICK_CPU and PV_UNHALT definition to uapi is a common patch
for both guest and host.
Srivatsa Vaddagiri (1):
kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks
2013 Aug 06
6
[PATCH V12 0/5] Paravirtualized ticket spinlocks for KVM host
This series forms the kvm host part of paravirtual spinlock
based against kvm tree.
Please refer https://lkml.org/lkml/2013/8/6/178 for kvm guest part
of the series.
Please note that:
kvm uapi: Add KICK_CPU and PV_UNHALT definition to uapi is a common patch
for both guest and host.
Srivatsa Vaddagiri (1):
kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks
2013 Aug 26
7
[PATCH V13 0/4] Paravirtualized ticket spinlocks for KVM host
This series forms the kvm host part of paravirtual spinlock
based against kvm tree.
Please refer to https://lkml.org/lkml/2013/8/9/265 for
kvm guest and Xen, x86 part merged to -tip spinlocks.
Please note that:
kvm uapi: Add KICK_CPU and PV_UNHALT definition to uapi is a common patch
for both guest and host.
Changes since V12:
fold the patch 3 into patch 2 for bisection. (Eric Northup)
2013 Aug 26
7
[PATCH V13 0/4] Paravirtualized ticket spinlocks for KVM host
This series forms the kvm host part of paravirtual spinlock
based against kvm tree.
Please refer to https://lkml.org/lkml/2013/8/9/265 for
kvm guest and Xen, x86 part merged to -tip spinlocks.
Please note that:
kvm uapi: Add KICK_CPU and PV_UNHALT definition to uapi is a common patch
for both guest and host.
Changes since V12:
fold the patch 3 into patch 2 for bisection. (Eric Northup)
2011 May 12
2
Recent kmod-kvm update errors
...odules/2.6.18-194.32.1.el5/weak-updates/kmod-kvm/kvm-amd.ko
needs unknown symbol kvm_x86_ops
WARNING:
/lib/modules/2.6.18-194.32.1.el5/weak-updates/kmod-kvm/kvm-amd.ko
needs unknown symbol kvm_vcpu_cache
WARNING:
/lib/modules/2.6.18-194.32.1.el5/weak-updates/kmod-kvm/kvm-amd.ko
needs unknown symbol kvm_emulate_hypercall
WARNING:
/lib/modules/2.6.18-194.32.1.el5/weak-updates/kmod-kvm/kvm-amd.ko
needs unknown symbol load_pdptrs
WARNING:
/lib/modules/2.6.18-194.32.1.el5/weak-updates/kmod-kvm/kvm-amd.ko
needs unknown symbol kvm_handle_fault_on_reboot
WARNING:
/lib/modules/2.6.18-194.32.1.el5/weak-updates/kmod-kvm/kvm-...
2012 Mar 23
12
[PATCH RFC V5 0/6] kvm : Paravirt-spinlock support for KVM guests
The 6-patch series to follow this email extends KVM-hypervisor and Linux guest
running on KVM-hypervisor to support pv-ticket spinlocks, based on Xen's
implementation.
One hypercall is introduced in KVM hypervisor,that allows a vcpu to kick
another vcpu out of halt state.
The blocking of vcpu is done using halt() in (lock_spinning) slowpath.
one MSR is added to aid live migration.
Changes
2012 Mar 23
12
[PATCH RFC V5 0/6] kvm : Paravirt-spinlock support for KVM guests
The 6-patch series to follow this email extends KVM-hypervisor and Linux guest
running on KVM-hypervisor to support pv-ticket spinlocks, based on Xen's
implementation.
One hypercall is introduced in KVM hypervisor,that allows a vcpu to kick
another vcpu out of halt state.
The blocking of vcpu is done using halt() in (lock_spinning) slowpath.
one MSR is added to aid live migration.
Changes
2012 Apr 23
8
[PATCH RFC V6 0/5] kvm : Paravirt-spinlock support for KVM guests
The 5-patch series to follow this email extends KVM-hypervisor and Linux guest
running on KVM-hypervisor to support pv-ticket spinlocks, based on Xen's
implementation.
One hypercall is introduced in KVM hypervisor,that allows a vcpu to kick
another vcpu out of halt state.
The blocking of vcpu is done using halt() in (lock_spinning) slowpath.
Note: 1) patch is based on 3.4-rc3 + ticketlock
2012 Apr 23
8
[PATCH RFC V6 0/5] kvm : Paravirt-spinlock support for KVM guests
The 5-patch series to follow this email extends KVM-hypervisor and Linux guest
running on KVM-hypervisor to support pv-ticket spinlocks, based on Xen's
implementation.
One hypercall is introduced in KVM hypervisor,that allows a vcpu to kick
another vcpu out of halt state.
The blocking of vcpu is done using halt() in (lock_spinning) slowpath.
Note: 1) patch is based on 3.4-rc3 + ticketlock
2011 Nov 30
6
[PATCH RFC V3 0/4] kvm : Paravirt-spinlock support for KVM guests
The 4-patch series to follow this email extends KVM-hypervisor and Linux guest
running on KVM-hypervisor to support pv-ticket spinlocks, based on Xen's implementation.
One hypercall is introduced in KVM hypervisor,that allows a vcpu to kick
another vcpu out of halt state.
The blocking of vcpu is done using halt() in (lock_spinning) slowpath.
The V2 change discussion was in:
2011 Nov 30
6
[PATCH RFC V3 0/4] kvm : Paravirt-spinlock support for KVM guests
The 4-patch series to follow this email extends KVM-hypervisor and Linux guest
running on KVM-hypervisor to support pv-ticket spinlocks, based on Xen's implementation.
One hypercall is introduced in KVM hypervisor,that allows a vcpu to kick
another vcpu out of halt state.
The blocking of vcpu is done using halt() in (lock_spinning) slowpath.
The V2 change discussion was in:
2018 Jul 19
0
[PATCH 3/3] [RFC V3] KVM: X86: Adding skeleton for Memory ROE
...ULL);
+ hva = gfn_to_hva(kvm, gpa >> PAGE_SHIFT);
+ if (!access_ok(VERIFY_WRITE, hva, PAGE_SIZE))
+ return -EINVAL;
+ return roe_protect_frame(vcpu->kvm, gpa);
+}
+#endif
+
+ /*
* kvm_pv_kick_cpu_op: Kick a vcpu.
*
* @apicid - apicid of vcpu to be kicked.
@@ -6737,6 +6806,11 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu)
case KVM_HC_CLOCK_PAIRING:
ret = kvm_pv_clock_pairing(vcpu, a0, a1);
break;
+#endif
+#ifdef CONFIG_KVM_MROE
+ case KVM_HC_HMROE:
+ ret = kvm_mroe(vcpu, a0);
+ break;
#endif
default:
ret = -KVM_ENOSYS;
@@ -8971,8 +9045,8 @@ static void kvm_mmu_slot_apply_flags(...
2018 Jul 20
0
[PATCH RFC V4 3/3] KVM: X86: Adding skeleton for Memory ROE
...gpa >> PAGE_SHIFT);
+ if (!access_ok(VERIFY_WRITE, hva, npages << PAGE_SHIFT))
+ return -EINVAL;
+ return kvm_mroe_protect_range(vcpu->kvm, gpa, npages);
+}
+#endif
+
+ /*
* kvm_pv_kick_cpu_op: Kick a vcpu.
*
* @apicid - apicid of vcpu to be kicked.
@@ -6739,6 +6830,11 @@ int kvm_emulate_hypercall(struct kvm_vcpu *vcpu)
case KVM_HC_CLOCK_PAIRING:
ret = kvm_pv_clock_pairing(vcpu, a0, a1);
break;
+#endif
+#ifdef CONFIG_KVM_MROE
+ case KVM_HC_HMROE:
+ ret = kvm_mroe(vcpu, a0, a1);
+ break;
#endif
default:
ret = -KVM_ENOSYS;
@@ -8973,8 +9069,8 @@ static void kvm_mmu_slot_apply_fl...
2012 Jan 14
14
[PATCH RFC V4 0/5] kvm : Paravirt-spinlock support for KVM guests
The 5-patch series to follow this email extends KVM-hypervisor and Linux guest
running on KVM-hypervisor to support pv-ticket spinlocks, based on Xen's implementation.
One hypercall is introduced in KVM hypervisor,that allows a vcpu to kick
another vcpu out of halt state.
The blocking of vcpu is done using halt() in (lock_spinning) slowpath.
Changes in V4:
- reabsed to 3.2.0 pre.
- use APIC
2012 Jan 14
14
[PATCH RFC V4 0/5] kvm : Paravirt-spinlock support for KVM guests
The 5-patch series to follow this email extends KVM-hypervisor and Linux guest
running on KVM-hypervisor to support pv-ticket spinlocks, based on Xen's implementation.
One hypercall is introduced in KVM hypervisor,that allows a vcpu to kick
another vcpu out of halt state.
The blocking of vcpu is done using halt() in (lock_spinning) slowpath.
Changes in V4:
- reabsed to 3.2.0 pre.
- use APIC
2018 Jul 20
4
Memory Read Only Enforcement: VMM assisted kernel rootkit mitigation for KVM V4
Here is change log from V3 To V4:
- Fixing spelling/grammar mistakes suggested by Randy Dunlap
- Changing the hypercall interface to be able to process multiple pages
per one hypercall also suggested by Randy Dunlap. It turns out that
this will save lots of vmexist/memory slot flushes when protecting many
pages.
[PATCH RFC V4 1/3] KVM: X86: Memory ROE documentation
[PATCH RFC V4 2/3] KVM:
2013 Jun 24
19
[PATCH RFC V10 0/18] Paravirtualized ticket spinlocks
This series replaces the existing paravirtualized spinlock mechanism
with a paravirtualized ticketlock mechanism. The series provides
implementation for both Xen and KVM.
Changes in V10:
Addressed Konrad's review comments:
- Added break in patch 5 since now we know exact cpu to wakeup
- Dropped patch 12 and Konrad needs to revert two patches to enable xen on hvm
70dd4998, f10cd522c
-
2013 Jun 24
19
[PATCH RFC V10 0/18] Paravirtualized ticket spinlocks
This series replaces the existing paravirtualized spinlock mechanism
with a paravirtualized ticketlock mechanism. The series provides
implementation for both Xen and KVM.
Changes in V10:
Addressed Konrad's review comments:
- Added break in patch 5 since now we know exact cpu to wakeup
- Dropped patch 12 and Konrad needs to revert two patches to enable xen on hvm
70dd4998, f10cd522c
-