Bug fixes.
- Don't enable the HLT intercept by default. It will be enabled by bhyve(8) if required. Prior to this change HLT exiting was always enabled making the "-H" option to bhyve(8) meaningless. - Recognize a VM exit triggered by a non-maskable interrupt. Prior to this change the exit would be punted to userspace and the virtual machine would terminate.
This commit is contained in:
parent
a38d07e455
commit
3e1af2f123
@ -503,7 +503,6 @@ vmcb_init(struct svm_softc *sc, int vcpu, uint64_t iopm_base_pa,
|
||||
/* Intercept various events (for e.g. I/O, MSR and CPUID accesses) */
|
||||
svm_enable_intercept(sc, vcpu, VMCB_CTRL1_INTCPT, VMCB_INTCPT_IO);
|
||||
svm_enable_intercept(sc, vcpu, VMCB_CTRL1_INTCPT, VMCB_INTCPT_MSR);
|
||||
svm_enable_intercept(sc, vcpu, VMCB_CTRL1_INTCPT, VMCB_INTCPT_HLT);
|
||||
svm_enable_intercept(sc, vcpu, VMCB_CTRL1_INTCPT, VMCB_INTCPT_CPUID);
|
||||
svm_enable_intercept(sc, vcpu, VMCB_CTRL1_INTCPT, VMCB_INTCPT_INTR);
|
||||
svm_enable_intercept(sc, vcpu, VMCB_CTRL1_INTCPT, VMCB_INTCPT_INIT);
|
||||
@ -1041,6 +1040,8 @@ exit_reason_to_str(uint64_t reason)
|
||||
return ("mchk");
|
||||
case VMCB_EXIT_INTR:
|
||||
return ("extintr");
|
||||
case VMCB_EXIT_NMI:
|
||||
return ("nmi");
|
||||
case VMCB_EXIT_VINTR:
|
||||
return ("vintr");
|
||||
case VMCB_EXIT_MSR:
|
||||
@ -1159,6 +1160,9 @@ svm_vmexit(struct svm_softc *svm_sc, int vcpu, struct vm_exit *vmexit)
|
||||
update_rip = false;
|
||||
vmm_stat_incr(svm_sc->vm, vcpu, VMEXIT_EXTINT, 1);
|
||||
break;
|
||||
case VMCB_EXIT_NMI:
|
||||
update_rip = false;
|
||||
break;
|
||||
case VMCB_EXIT_IO:
|
||||
loop = svm_handle_io(svm_sc, vcpu, vmexit);
|
||||
vmm_stat_incr(svm_sc->vm, vcpu, VMEXIT_INOUT, 1);
|
||||
|
@ -124,6 +124,7 @@
|
||||
/* VMCB exit code, APM vol2 Appendix C */
|
||||
#define VMCB_EXIT_MC 0x52
|
||||
#define VMCB_EXIT_INTR 0x60
|
||||
#define VMCB_EXIT_NMI 0x61
|
||||
#define VMCB_EXIT_VINTR 0x64
|
||||
#define VMCB_EXIT_PUSHF 0x70
|
||||
#define VMCB_EXIT_POPF 0x71
|
||||
|
Loading…
Reference in New Issue
Block a user