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]
Date: Mon, 10 Jun 2024 16:00:21 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "pbonzini@...hat.com" <pbonzini@...hat.com>
CC: "seanjc@...gle.com" <seanjc@...gle.com>, "Huang, Kai"
	<kai.huang@...el.com>, "sagis@...gle.com" <sagis@...gle.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "Aktas, Erdem"
	<erdemaktas@...gle.com>, "Zhao, Yan Y" <yan.y.zhao@...el.com>,
	"dmatlack@...gle.com" <dmatlack@...gle.com>, "kvm@...r.kernel.org"
	<kvm@...r.kernel.org>, "Yamahata, Isaku" <isaku.yamahata@...el.com>,
	"isaku.yamahata@...il.com" <isaku.yamahata@...il.com>
Subject: Re: [PATCH v2 09/15] KVM: x86/tdp_mmu: Support mirror root for TDP
 MMU

On Mon, 2024-06-10 at 11:23 +0200, Paolo Bonzini wrote:
> > The previous versions checked kvm_gfn_shared_mask() more readily in various
> > open
> > coded spots. In this v2 we tried to reduce this and instead always rely on
> > the "private" concept to switch between the roots in the generic code. I
> > think
> > it's arguably a little easier to understand if we stick to a single way of
> > deciding which root to use.
> 
> But there isn't any other place that relies on is_private, right? So...

I meant the "private" concept in general, like triggering off of
KVM_PROCESS_PRIVATE to use the mirror.

> 
> > But I don't feel like any of these solutions discussed is perfectly clean.
> > So
> > I'm ok taking the benefits you prefer. I guess doing bitwise operations when
> > possible is kind of the KVM way, haha. :)
> 
> ... while I'm definitely guilty of that, :) it does seem the cleanest
> option to use fault->addr to go from struct kvm_page_fault to the kind
> of root.
> 
> If you prefer, you can introduce a bool kvm_is_addr_direct(struct kvm
> *kvm, gpa_t gpa), and use it here as kvm_is_addr_direct(kvm,
> fault->addr). Maybe that's the best of both worlds.

Yes, I think a helper will make it easier for non-TDX readers.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ