Description of problem: Currently, when reboot a memory encrypted guest, it'is possible that the virtual machine may crash due to cache consistency issues. But KVM doesn't know whether the guest is rebooting, we introduce ioctl interfaces to support notifying KVM that the guest is rebooting so that flush the cache at appropriate time. KVM use guest_state_protected to indicate the VMSA is encrypted and should not update the related vCPU states anymore. In order to support rebooting a CSV2 guest, we use the ioctl interfaces dictated above to notify KVM that the vCPU states can be initailized during rebooting. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/2071