Page MenuHomeFreeBSD

D39949.diff
No OneTemporary

D39949.diff

diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h
--- a/sys/amd64/include/vmm.h
+++ b/sys/amd64/include/vmm.h
@@ -497,6 +497,7 @@
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
--- a/sys/amd64/vmm/intel/vmx.c
+++ b/sys/amd64/vmm/intel/vmx.c
@@ -1439,6 +1439,10 @@
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 @@
vlapic = vm_lapic(vcpu->vcpu);
vlapic->ipi_exit = val;
break;
+ case VM_CAP_MASK_HWINTR:
+ retval = 0;
+ break;
default:
break;
}
diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c
--- a/usr.sbin/bhyve/gdb.c
+++ b/usr.sbin/bhyve/gdb.c
@@ -801,6 +801,9 @@
if (vs->stepping) {
error = vm_set_capability(vcpu, VM_CAP_MTRAP_EXIT, 1);
assert(error == 0);
+
+ error = vm_set_capability(vcpu, VM_CAP_MASK_HWINTR, 1);
+ assert(error == 0);
}
}
@@ -853,6 +856,8 @@
vs->stepping = false;
vs->stepped = true;
vm_set_capability(vcpu, VM_CAP_MTRAP_EXIT, 0);
+ vm_set_capability(vcpu, VM_CAP_MASK_HWINTR, 0);
+
while (vs->stepped) {
if (stopped_vcpu == -1) {
debug("$vCPU %d reporting step\n", vcpuid);

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 13, 10:17 PM (18 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15788009
Default Alt Text
D39949.diff (1 KB)

Event Timeline