Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107352671
D39949.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D39949.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D39949: bhyve: Fix vCPU single-stepping on VMX
Attached
Detach File
Event Timeline
Log In to Comment