aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
authorBojan Novković <bojan.novkovic@fer.hr>2023-05-09 07:02:04 +0000
committerCorvin Köhne <corvink@FreeBSD.org>2023-08-17 13:06:29 +0000
commit82eece443ee3eed9a04481e7127271985734ddff (patch)
treed0b872c08ac3b696b4ddba3960d664cdbf8f841d /sys/amd64
parent3152cbdd16572e0580588b349165c680ce8bc87b (diff)
downloadsrc-82eece443ee3eed9a04481e7127271985734ddff.tar.gz
src-82eece443ee3eed9a04481e7127271985734ddff.zip
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/include/vmm.h1
-rw-r--r--sys/amd64/vmm/intel/vmx.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h
index 29797ad04e0d..84b689dd7391 100644
--- a/sys/amd64/include/vmm.h
+++ b/sys/amd64/include/vmm.h
@@ -500,6 +500,7 @@ enum vm_cap_type {
VM_CAP_RDPID,
VM_CAP_RDTSCP,
VM_CAP_IPI_EXIT,
+ VM_CAP_MASK_HWINTR,
VM_CAP_MAX
};
diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c
index 3a0693a29e80..9c2672c9ae23 100644
--- a/sys/amd64/vmm/intel/vmx.c
+++ b/sys/amd64/vmm/intel/vmx.c
@@ -1439,6 +1439,10 @@ vmx_inject_interrupts(struct vmx_vcpu *vcpu, struct vlapic *vlapic,
uint64_t rflags, entryinfo;
uint32_t gi, info;
+ if (vcpu->cap.set & (1 << VM_CAP_MASK_HWINTR)) {
+ return;
+ }
+
if (vcpu->state.nextrip != guestrip) {
gi = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY);
if (gi & HWINTR_BLOCKING) {
@@ -3634,6 +3638,9 @@ vmx_setcap(void *vcpui, int type, int val)
vlapic = vm_lapic(vcpu->vcpu);
vlapic->ipi_exit = val;
break;
+ case VM_CAP_MASK_HWINTR:
+ retval = 0;
+ break;
default:
break;
}