Re: [PATCH v2 11/17] KVM: x86/mmu: Mark the PAE roots as decrypted for shadow paging

2021-03-05 Thread Sean Christopherson
On Fri, Mar 05, 2021, Paolo Bonzini wrote: > On 05/03/21 02:10, Sean Christopherson wrote: > > @@ -5301,6 +5307,22 @@ static int __kvm_mmu_create(struct kvm_vcpu *vcpu, > > struct kvm_mmu *mmu) > > for (i = 0; i < 4; ++i) > > mmu->pae_root[i] = 0; > > I think this should be

Re: [PATCH v2 11/17] KVM: x86/mmu: Mark the PAE roots as decrypted for shadow paging

2021-03-05 Thread Paolo Bonzini
On 05/03/21 02:10, Sean Christopherson wrote: @@ -5301,6 +5307,22 @@ static int __kvm_mmu_create(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu) for (i = 0; i < 4; ++i) mmu->pae_root[i] = 0; I think this should be deleted, since you have another identical for loop below?

[PATCH v2 11/17] KVM: x86/mmu: Mark the PAE roots as decrypted for shadow paging

2021-03-04 Thread Sean Christopherson
Set the PAE roots used as decrypted to play nice with SME when KVM is using shadow paging. Explicitly skip setting the C-bit when loading CR3 for PAE shadow paging, even though it's completely ignored by the CPU. The extra documentation is nice to have. Note, there are several subtleties at