Re: [PATCH] KVM: x86: workaround invalid CPUID[0xD, 9] info on some AMD processors

2022-03-23 Thread Peter Krempa
On Wed, Mar 23, 2022 at 12:43:15 +0100, Paolo Bonzini wrote: > Some AMD processors expose the PKRU extended save state even if they do not > have > the related PKU feature in CPUID. Worse, when they do they report a size of > 64, whereas the expected size of the PKRU extended save state is 8, the

Re: [PATCH] KVM: x86: workaround invalid CPUID[0xD,9] info on some AMD processors

2022-03-23 Thread Yang Zhong
On Wed, Mar 23, 2022 at 12:43:15PM +0100, Paolo Bonzini wrote: > Some AMD processors expose the PKRU extended save state even if they do not > have > the related PKU feature in CPUID. Worse, when they do they report a size of > 64, whereas the expected size of the PKRU extended save state is 8, t

Re: [PATCH] KVM: x86: workaround invalid CPUID[0xD,9] info on some AMD processors

2022-03-23 Thread Daniel P . Berrangé
On Wed, Mar 23, 2022 at 12:43:15PM +0100, Paolo Bonzini wrote: > Some AMD processors expose the PKRU extended save state even if they do not > have > the related PKU feature in CPUID. Worse, when they do they report a size of > 64, whereas the expected size of the PKRU extended save state is 8, t

[PATCH] KVM: x86: workaround invalid CPUID[0xD, 9] info on some AMD processors

2022-03-23 Thread Paolo Bonzini
Some AMD processors expose the PKRU extended save state even if they do not have the related PKU feature in CPUID. Worse, when they do they report a size of 64, whereas the expected size of the PKRU extended save state is 8, therefore the esa->size == eax assertion does not hold. The state is alr