lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9f527b7b-96de-6657-aa48-8de401f5083e@redhat.com>
Date:   Fri, 4 Dec 2020 09:48:58 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Sean Christopherson <seanjc@...gle.com>,
        Rick Edgecombe <rick.p.edgecombe@...el.com>
Cc:     vkuznets@...hat.com, wanpengli@...cent.com, jmattson@...gle.com,
        joro@...tes.org, bgardon@...gle.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kvm: x86/mmu: Use cpuid to determine max gfn

On 04/12/20 01:43, Sean Christopherson wrote:
> On Thu, Dec 03, 2020, Rick Edgecombe wrote:
>> In the TDP MMU, use shadow_phys_bits to dermine the maximum possible GFN
>> mapped in the guest for zapping operations. boot_cpu_data.x86_phys_bits
>> may be reduced in the case of HW features that steal HPA bits for other
>> purposes. However, this doesn't necessarily reduce GPA space that can be
>> accessed via TDP. So zap based on a maximum gfn calculated with MAXPHYADDR
>> retrieved from CPUID. This is already stored in shadow_phys_bits, so use
>> it instead of x86_phys_bits.
>>
>> Fixes: faaf05b00aec ("kvm: x86/mmu: Support zapping SPTEs in the TDP MMU")
>> Signed-off-by: Rick Edgecombe <rick.p.edgecombe@...el.com>
> 
> Dang, in hindsight it'd be nice if KVM_CAP_SMALLER_MAXPHYADDR allowed explicitly
> setting the max MAXPHYADDR for an entire VM instead of being a simple toggle.
> E.g. TDX and SEV-ES likely could also make use of "what's this VM's max GPA?".
> 
> Reviewed-by: Sean Christopherson <seanjc@...gle.com>
> 

Queued, thanks.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ