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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABgObfbukWu5srwDGA-orsd35VRk-ZGmqbMzoCfwQvN-HMHDnw@mail.gmail.com>
Date: Sun, 22 Dec 2024 20:28:56 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: Yan Zhao <yan.y.zhao@...el.com>
Cc: seanjc@...gle.com, rick.p.edgecombe@...el.com, binbin.wu@...ux.intel.com, 
	linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH] KVM: x86/mmu: Only zap valid non-mirror roots in kvm_zap_gfn_range()

On Fri, Nov 15, 2024 at 9:50 AM Yan Zhao <yan.y.zhao@...el.com> wrote:
> Sean also suggested making the self-snoop feature a hard dependency for
> enabling TDX [2].
>
> That is because
> - TDX shared EPT is able to reuse the memory type specified in VMX's code
>   as long as guest MTRRs are not referenced.
> - KVM does not call kvm_zap_gfn_range() when attaching/detaching
>   non-coherent DMA devices when the CPU have feature self-snoop. [3]
>
> However, [3] cannot be guaranteed after commit 9d70f3fec144 ("Revert "KVM:
> VMX: Always honor guest PAT on CPUs that support self-snoop"), which was
> due to a regression with the bochsdrm driver.

I think we should treat honoring of guest PAT like zap-memslot-only,
and make it a quirk that TDX disables. Making it a quirk adds a bit of
complexity, but it documents why the code exists and it makes it easy
for TDX to disable it.

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ