mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-21 07:15:49 +00:00
vmm: MTRR should be saved/restored
This fixes restoring a Linux VM if it was suspended while in the GRUB menu. Adding MTTR increases the kernel dump size by 256 bytes per vCPU. Sponsored by: vStack Reviewed by: markj, rew Differential Revision: https://reviews.freebsd.org/D43226
This commit is contained in:
parent
b831c7732c
commit
683ea4d22b
@ -2781,6 +2781,8 @@ svm_vcpu_snapshot(void *vcpui, struct vm_snapshot_meta *meta)
|
||||
SNAPSHOT_VAR_OR_LEAVE(vcpu->asid.gen, meta, err, done);
|
||||
SNAPSHOT_VAR_OR_LEAVE(vcpu->asid.num, meta, err, done);
|
||||
|
||||
SNAPSHOT_BUF_OR_LEAVE(&vcpu->mtrr, sizeof(vcpu->mtrr), meta, err, done);
|
||||
|
||||
/* Set all caches dirty */
|
||||
if (meta->op == VM_SNAPSHOT_RESTORE)
|
||||
svm_set_dirty(vcpu, 0xffffffff);
|
||||
|
@ -4200,6 +4200,9 @@ vmx_vcpu_snapshot(void *vcpui, struct vm_snapshot_meta *meta)
|
||||
SNAPSHOT_BUF_OR_LEAVE(vcpu->pir_desc,
|
||||
sizeof(*vcpu->pir_desc), meta, err, done);
|
||||
|
||||
SNAPSHOT_BUF_OR_LEAVE(&vcpu->mtrr,
|
||||
sizeof(vcpu->mtrr), 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);
|
||||
|
Loading…
Reference in New Issue
Block a user