Re: [PATCH 2/3] KVM: x86: simplify handling of PKRU

2017-08-24 Thread David Hildenbrand
On 24.08.2017 12:12, Paolo Bonzini wrote: > Move it to struct kvm_arch_vcpu, replacing guest_pkru_valid with a > simple comparison against the host value of the register. The write of > PKRU in addition can be skipped if the guest has not enabled the feature. > Once we do this, we need not test

Re: [PATCH 2/3] KVM: x86: simplify handling of PKRU

2017-08-24 Thread David Hildenbrand
On 24.08.2017 12:12, Paolo Bonzini wrote: > Move it to struct kvm_arch_vcpu, replacing guest_pkru_valid with a > simple comparison against the host value of the register. The write of > PKRU in addition can be skipped if the guest has not enabled the feature. > Once we do this, we need not test

[PATCH 2/3] KVM: x86: simplify handling of PKRU

2017-08-24 Thread Paolo Bonzini
Move it to struct kvm_arch_vcpu, replacing guest_pkru_valid with a simple comparison against the host value of the register. The write of PKRU in addition can be skipped if the guest has not enabled the feature. Once we do this, we need not test OSPKE in the host anymore, because guest_CR4.PKE=1

[PATCH 2/3] KVM: x86: simplify handling of PKRU

2017-08-24 Thread Paolo Bonzini
Move it to struct kvm_arch_vcpu, replacing guest_pkru_valid with a simple comparison against the host value of the register. The write of PKRU in addition can be skipped if the guest has not enabled the feature. Once we do this, we need not test OSPKE in the host anymore, because guest_CR4.PKE=1