search for: exit_reason

Displaying 20 results from an estimated 37 matches for "exit_reason".

2008 Nov 24
2
no such file or directory
...#include <asm/hvm/vpt.h> #include <public/hvm/save.h> #include <asm/hvm/trace.h> - +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> char *vmx_msr_bitmap; static void vmx_ctxt_switch_from(struct vcpu *v); @@ -2590,9 +2592,13 @@ unsigned int exit_reason; unsigned long exit_qualification, inst_len = 0; struct vcpu *v = current; + int test; + unsigned long FS_SELECTOR,FS_LIMIT,FS_AR_BYTES,FS_BASE,CR3; + FILE *fp; + char a=''\n'',b=''%''; exit_reason = __vmread(VM_EXIT_REASON); - + HVMTRACE_2D(VM...
2012 Oct 10
7
[PATCH 0 of 7] Miscellaneous updates
Clearing out my local queue of changes before applying other''s.
2020 Feb 07
0
[RFC PATCH v7 75/78] KVM: introspection: add KVMI_EVENT_SINGLESTEP
...tatic int handle_invalid_op(struct kvm_vcpu *vcpu) static int handle_monitor_trap(struct kvm_vcpu *vcpu) { + kvmi_singlestep_done(vcpu); return 1; } @@ -5994,6 +5995,11 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu) } } + if (kvmi_vcpu_running_singlestep(vcpu) && + exit_reason != EXIT_REASON_EPT_VIOLATION && + exit_reason != EXIT_REASON_MONITOR_TRAP_FLAG) + kvmi_singlestep_failed(vcpu); + if (exit_reason < kvm_vmx_max_exit_handlers && kvm_vmx_exit_handlers[exit_reason]) { #ifdef CONFIG_RETPOLINE diff --git a/include/linux/kvmi_host.h b/in...
2019 Aug 09
0
[RFC PATCH v6 64/92] kvm: introspection: add single-stepping
...384,6 +5384,7 @@ static int handle_invalid_op(struct kvm_vcpu *vcpu) static int handle_monitor_trap(struct kvm_vcpu *vcpu) { + kvmi_stop_ss(vcpu); return 1; } @@ -5992,6 +5993,11 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu) } } + if (kvmi_vcpu_enabled_ss(vcpu) + && exit_reason != EXIT_REASON_EPT_VIOLATION + && exit_reason != EXIT_REASON_MONITOR_TRAP_FLAG) + kvmi_stop_ss(vcpu); + if (exit_reason < kvm_vmx_max_exit_handlers && kvm_vmx_exit_handlers[exit_reason]) return kvm_vmx_exit_handlers[exit_reason](vcpu); @@ -7842,6 +7848,16 @@ static...
2008 Apr 01
0
[16/18]KVM:IA64 : Add kvm sal/pal virtulization support.V9
...omments: > --- /dev/null > +++ b/arch/ia64/kvm/kvm_fw.c > +static void kvm_get_pal_call_data(struct kvm_vcpu *vcpu, > + u64 *gr28, u64 *gr29, u64 *gr30, u64 *gr31) { > + struct exit_ctl_data *p; > + > + if (vcpu) { > + p = &vcpu->arch.exit_data; > + if (p->exit_reason == EXIT_REASON_PAL_CALL) { > + *gr28 = p->u.pal_data.gr28; > + *gr29 = p->u.pal_data.gr29; > + *gr30 = p->u.pal_data.gr30; > + *gr31 = p->u.pal_data.gr31; > + return ; > + } > + } > + printk(KERN_DEBUG"Error occurs in kvm_get_pal_call_data!!\n&quo...
2012 Dec 10
26
[PATCH 00/11] Add virtual EPT support Xen.
From: Zhang Xiantao <xiantao.zhang@intel.com> With virtual EPT support, L1 hyerpvisor can use EPT hardware for L2 guest''s memory virtualization. In this way, L2 guest''s performance can be improved sharply. According to our testing, some benchmarks can show > 5x performance gain. Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com> Zhang Xiantao (11):
2019 Aug 12
1
[RFC PATCH v6 64/92] kvm: introspection: add single-stepping
...pu) > > static int handle_monitor_trap(struct kvm_vcpu *vcpu) > { > + kvmi_stop_ss(vcpu); > return 1; > } > > @@ -5992,6 +5993,11 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu) > } > } > > + if (kvmi_vcpu_enabled_ss(vcpu) > + && exit_reason != EXIT_REASON_EPT_VIOLATION > + && exit_reason != EXIT_REASON_MONITOR_TRAP_FLAG) Bad indentation. This is prevelant through the series. > + kvmi_stop_ss(vcpu); > + > if (exit_reason < kvm_vmx_max_exit_handlers > && kvm_vmx_exit_handlers[exit_reason])...
2020 Jul 22
0
[RFC PATCH v1 06/34] KVM: x86: mmu: add support for EPT switching
...OINTER); + unsigned int view; + + for (view = 0; view < KVM_MAX_EPT_VIEWS; view++) + if (eptp_list[view] == eptp) { + vmx->view = view; + break; + } + + return vmx->view; } /* @@ -6073,6 +6149,13 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath) u32 exit_reason = vmx->exit_reason; u32 vectoring_info = vmx->idt_vectoring_info; + if (vmx->eptp_list_pg) { + unsigned int view = update_ept_view(vmx); + struct kvm_mmu *mmu = vcpu->arch.mmu; + + mmu->root_hpa = mmu->root_hpa_altviews[view]; + } + /* * Flush logged GPAs PML buffer, t...
2008 Mar 20
1
[RFC/PATCH 06/15] kvm-s390: sie intercept handling
...ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) { + int rc; sigset_t sigsaved; vcpu_load(vcpu); @@ -393,7 +399,45 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v atomic_set_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); - __vcpu_run(vcpu); + switch (kvm_run->exit_reason) { + case KVM_EXIT_S390_SIEIC: + vcpu->arch.sie_block->gpsw.mask = kvm_run->s390_sieic.mask; + vcpu->arch.sie_block->gpsw.addr = kvm_run->s390_sieic.addr; + break; + case KVM_EXIT_UNKNOWN: + case KVM_EXIT_S390_RESET: + break; + default: + BUG(); + } + + might_sleep(); + + do...
2008 Mar 20
1
[RFC/PATCH 06/15] kvm-s390: sie intercept handling
...ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) { + int rc; sigset_t sigsaved; vcpu_load(vcpu); @@ -393,7 +399,45 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_v atomic_set_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); - __vcpu_run(vcpu); + switch (kvm_run->exit_reason) { + case KVM_EXIT_S390_SIEIC: + vcpu->arch.sie_block->gpsw.mask = kvm_run->s390_sieic.mask; + vcpu->arch.sie_block->gpsw.addr = kvm_run->s390_sieic.addr; + break; + case KVM_EXIT_UNKNOWN: + case KVM_EXIT_S390_RESET: + break; + default: + BUG(); + } + + might_sleep(); + + do...
2020 Jul 21
0
[PATCH v9 81/84] KVM: introspection: add KVMI_EVENT_SINGLESTEP
...p(struct kvm_vcpu *vcpu) static int handle_monitor_trap(struct kvm_vcpu *vcpu) { + kvmi_singlestep_done(vcpu); return 1; } @@ -6173,6 +6174,11 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath) } } + if (kvmi_vcpu_running_singlestep(vcpu) && + exit_reason != EXIT_REASON_EPT_VIOLATION && + exit_reason != EXIT_REASON_MONITOR_TRAP_FLAG) + kvmi_singlestep_failed(vcpu); + if (exit_fastpath != EXIT_FASTPATH_NONE) return 1; diff --git a/include/linux/kvmi_host.h b/include/linux/kvmi_host.h index a641768027cc..b01e8505f493 100644 --- a/i...
2020 Feb 07
0
[RFC PATCH v7 24/78] KVM: x86: add .gpt_translation_fault()
...ion_fault, }; static int __init svm_init(void) diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 6f41a7b27a11..83f047fe6bc1 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -7830,6 +7830,13 @@ static bool vmx_spt_fault(struct kvm_vcpu *vcpu) return (vmx->exit_reason == EXIT_REASON_EPT_VIOLATION); } +static bool vmx_gpt_translation_fault(struct kvm_vcpu *vcpu) +{ + if (vcpu->arch.exit_qualification & EPT_VIOLATION_GVA_TRANSLATED) + return false; + return true; +} + static struct kvm_x86_ops vmx_x86_ops __ro_after_init = { .cpu_has_kvm_support = cp...
2020 Feb 07
0
[RFC PATCH v7 23/78] KVM: x86: add .spt_fault()
...df5725d06f..6f41a7b27a11 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -7823,6 +7823,13 @@ static u64 vmx_fault_gla(struct kvm_vcpu *vcpu) return ~0ull; } +static bool vmx_spt_fault(struct kvm_vcpu *vcpu) +{ + const struct vcpu_vmx *vmx = to_vmx(vcpu); + + return (vmx->exit_reason == EXIT_REASON_EPT_VIOLATION); +} + static struct kvm_x86_ops vmx_x86_ops __ro_after_init = { .cpu_has_kvm_support = cpu_has_kvm_support, .disabled_by_bios = vmx_disabled_by_bios, @@ -7982,6 +7989,7 @@ static struct kvm_x86_ops vmx_x86_ops __ro_after_init = { .apic_init_signal_blocked = vmx_...
2020 Jul 21
0
[PATCH v9 25/84] KVM: x86: add .gpt_translation_fault()
...truct kvm_x86_init_ops svm_init_ops __initdata = { diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 17b88345dfb5..a043e3e7d09a 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -7916,6 +7916,13 @@ static bool vmx_spt_fault(struct kvm_vcpu *vcpu) return (vmx->exit_reason == EXIT_REASON_EPT_VIOLATION); } +static bool vmx_gpt_translation_fault(struct kvm_vcpu *vcpu) +{ + if (vcpu->arch.exit_qualification & EPT_VIOLATION_GVA_TRANSLATED) + return false; + return true; +} + static struct kvm_x86_ops vmx_x86_ops __initdata = { .hardware_unsetup = hardware_u...
2020 Jul 22
34
[RFC PATCH v1 00/34] VM introspection - EPT Views and Virtualization Exceptions
This patch series is based on the VM introspection patches (https://lore.kernel.org/kvm/20200721210922.7646-1-alazar at bitdefender.com/), extending the introspection API with EPT Views and Virtualization Exceptions (#VE) support. The purpose of this series is to get an initial feedback and to see if we are on the right track, especially because the changes made to add the EPT views are not small
2012 Dec 18
0
[PATCH] nested vmx: nested TPR shadow/threshold emulation
...data = gen_vmx_msr(data, VMX_PROCBASED_CTLS_DEFAULT1, host_data); break; @@ -1707,6 +1741,11 @@ int nvmx_n2_vmexit_handler(struct cpu_user_regs *regs, if ( ctrl & SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES ) nvcpu->nv_vmexit_pending = 1; break; + case EXIT_REASON_TPR_BELOW_THRESHOLD: + ctrl = __n2_exec_control(v); + if ( ctrl & CPU_BASED_TPR_SHADOW ) + nvcpu->nv_vmexit_pending = 1; + break; default: gdprintk(XENLOG_WARNING, "Unknown nested vmexit reason %x.\n", exit_reason); --...
2009 Jul 07
0
[PATCH] [VMX] Add support for Pause-Loop Exiting
...condary_exec_control); Index: hv/xen/arch/x86/hvm/vmx/vmx.c =================================================================== --- hv.orig/xen/arch/x86/hvm/vmx/vmx.c +++ hv/xen/arch/x86/hvm/vmx/vmx.c @@ -2617,6 +2617,13 @@ asmlinkage void vmx_vmexit_handler(struc break; } + case EXIT_REASON_PAUSE_INSTRUCTION: + { + perfc_incr(ple_exits); + do_sched_op_compat(SCHEDOP_yield, 0); + break; + } + default: exit_and_crash: gdprintk(XENLOG_ERR, "Bad vmexit (reason %x)\n", exit_reason); Index: hv/xen/include/asm-x86/hvm/vmx/vmcs.h =======...
2015 Oct 09
0
[PATCH 2/2] kvm/x86: Hyper-V kvm exit
...t a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 7580e9c..4c80d18 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -6335,6 +6335,12 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) r = 0; goto out; } + if (kvm_check_request(KVM_REQ_HV_EXIT, vcpu)) { + vcpu->run->exit_reason = KVM_EXIT_HYPERV; + vcpu->run->hyperv = vcpu->arch.hyperv.exit; + r = 0; + goto out; + } } /* diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 30fac73..d80b031 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -143,6 +143,7 @@ stati...
2015 Oct 16
0
[PATCH 9/9] kvm/x86: Hyper-V kvm exit
...t a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 807d124..9453207 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -6342,6 +6342,12 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) r = 0; goto out; } + if (kvm_check_request(KVM_REQ_HV_EXIT, vcpu)) { + vcpu->run->exit_reason = KVM_EXIT_HYPERV; + vcpu->run->hyperv = vcpu->arch.hyperv.exit; + r = 0; + goto out; + } } /* diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 43b0141..e38ac16 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -143,6 +143,7 @@ stati...
2008 Mar 20
0
[RFC/PATCH 10/15] kvm-s390: intercepts for diagnose instructions
...SUPP; + } + + atomic_clear_mask(CPUSTAT_RUNNING, &vcpu->arch.sie_block->cpuflags); + vcpu->run->s390_reset_flags |= KVM_S390_RESET_SUBSYSTEM; + vcpu->run->s390_reset_flags |= KVM_S390_RESET_IPL; + vcpu->run->s390_reset_flags |= KVM_S390_RESET_CPU_INIT; + vcpu->run->exit_reason = KVM_EXIT_S390_RESET; + VCPU_EVENT(vcpu, 3, "requesting userspace resets %lx", + vcpu->run->s390_reset_flags); + return -EREMOTE; +} + +int kvm_s390_handle_diag(struct kvm_vcpu *vcpu) +{ + int code = (vcpu->arch.sie_block->ipb & 0xfff0000) >> 16; + + switch (code)...