git: c543e09f1f8e - main - bhyve: save/restore pir_desc
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 09 May 2023 08:32:43 UTC
The branch main has been updated by corvink:
URL: https://cgit.FreeBSD.org/src/commit/?id=c543e09f1f8ef98f201f7dd3f34ae023d61dfa83
commit c543e09f1f8ef98f201f7dd3f34ae023d61dfa83
Author: Vitaliy Gusev <gusev.vitaliy@gmail.com>
AuthorDate: 2023-05-09 08:27:29 +0000
Commit: Corvin Köhne <corvink@FreeBSD.org>
CommitDate: 2023-05-09 08:31:27 +0000
bhyve: save/restore pir_desc
Failing to preserve pir_desc can result in pending interrupts being lost
on resume leading to a hung VM.
Reviewed by: corvink, jhb
MFC after: 1 week
Sponsored by: vStack
Differential Revision: https://reviews.freebsd.org/D35447
---
sys/amd64/vmm/intel/vmx.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c
index 69391f5b77de..ec54273caaaa 100644
--- a/sys/amd64/vmm/intel/vmx.c
+++ b/sys/amd64/vmm/intel/vmx.c
@@ -4179,6 +4179,9 @@ vmx_vcpu_snapshot(void *vcpui, struct vm_snapshot_meta *meta)
SNAPSHOT_BUF_OR_LEAVE(vcpu->guest_msrs,
sizeof(vcpu->guest_msrs), meta, err, done);
+ SNAPSHOT_BUF_OR_LEAVE(vcpu->pir_desc,
+ sizeof(*vcpu->pir_desc), meta, err, done);
+
vmxctx = &vcpu->ctx;
SNAPSHOT_VAR_OR_LEAVE(vmxctx->guest_rdi, meta, err, done);
SNAPSHOT_VAR_OR_LEAVE(vmxctx->guest_rsi, meta, err, done);