Re: [PATCH] KVM, pkeys: fix guest pkru save wrong on migration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2017/7/13 16:12, Paolo Bonzini wrote:
On 13/07/2017 03:02, Junkang Fu wrote:
There is no need to do the opposite in load_xsave or
setting vmx->guest_pkru_valid.
the right guest_pkru will be restored as long as the right guest_pkru
was saved.
Without this patch Pkeys self-tests (commit 5f23f6d082a9) may reports
_rdpkru: Assertion `pkru == shadow_pkru'  failed on migration

Even if it is restored correctly, you will have the wrong PKRU on the
host between kvm_load_guest_fpu and entering the guest.

Before kvm_load_guest_fpu or after? kvm_load_guest_fpu will load the right pkru.


I think it's safer to do the symmetric change to load_xsave.

Paolo



--
Yang
Alibaba Cloud Computing



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux