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: <Ze8vM6HcU4vnXVSS@google.com>
Date: Mon, 11 Mar 2024 09:20:03 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: francisco_flynn <francisco_flynn@...mail.com>
Cc: dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org, 
	tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, x86@...nel.org, 
	hpa@...or.com, rdunlap@...radead.org, akpm@...ux-foundation.org, 
	bhelgaas@...gle.com, mawupeng1@...wei.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: x86/mmu: treat WC memory as MMIO

On Mon, Mar 11, 2024, francisco_flynn wrote:
> when doing kvm_tdp_mmu_map for WC memory, such as pages
> allocated by amdgpu ttm driver for ttm_write_combined
> caching mode(e.g. host coherent in vulkan),
> the spte would be set to WB, in this case, vcpu write
> to these pages would goes to cache first, and never
> be write-combined and host-coherent anymore. so
> WC memory should be treated as MMIO, and the effective
> memory type is depending on guest PAT.

No, the effective memtype is not fully guest controlled.  By forcing the EPT memtype
to UC, the guest can only use UC or WC.  I don't know if there's a use case for
the host mapping memory WC while the guest uses WB, but it should be a moot point,
because this this series should do what you want (allow guest to map GPU buffers
as WC).

https://lore.kernel.org/all/20240309010929.1403984-1-seanjc@google.com

> Signed-off-by: francisco_flynn <francisco_flynn@...mail.com>
> ---
>  arch/x86/include/asm/memtype.h | 2 ++
>  arch/x86/kvm/mmu/spte.c        | 5 +++--

Please use get_maintainers.pl.

>  arch/x86/mm/pat/memtype.c      | 8 ++++++++
>  3 files changed, 13 insertions(+), 2 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ