When the KVM VM file descriptor has changed and a new one created, the guest state is no longer in protected state. Mark it as such. The guest state becomes protected again when TDX and SEV-ES and SEV-SNP mark it as such.
Signed-off-by: Ani Sinha <[email protected]> --- accel/kvm/kvm-all.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index c9564bf681..abdf91c0de 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2640,6 +2640,9 @@ static int kvm_reset_vmfd(MachineState *ms) s->vmfd = ret; + /* guest state is now unprotected again */ + kvm_state->guest_state_protected = false; + kvm_setup_dirty_ring(s); /* rebind memory to new vm fd */ -- 2.42.0
