[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9556a9a426af155ee12533166ed3b8ee86fa88fe.camel@intel.com>
Date: Thu, 16 May 2024 23:08:13 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "kvm@...r.kernel.org" <kvm@...r.kernel.org>, "pbonzini@...hat.com"
<pbonzini@...hat.com>, "seanjc@...gle.com" <seanjc@...gle.com>, "Huang, Kai"
<kai.huang@...el.com>
CC: "Zhao, Yan Y" <yan.y.zhao@...el.com>, "sagis@...gle.com"
<sagis@...gle.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "Aktas, Erdem" <erdemaktas@...gle.com>,
"isaku.yamahata@...il.com" <isaku.yamahata@...il.com>, "dmatlack@...gle.com"
<dmatlack@...gle.com>
Subject: Re: [PATCH 04/16] KVM: x86/mmu: Add address conversion functions for
TDX shared bit of GPA
On Wed, 2024-05-15 at 18:20 -0700, Rick Edgecombe wrote:
> On Thu, 2024-05-16 at 13:04 +1200, Huang, Kai wrote:
> >
> > I really don't see difference between ...
> >
> > is_private_mem(gpa)
> >
> > ... and
> >
> > is_private_gpa(gpa)
> >
> > If it confuses me, it can confuses other people.
>
> Again, point taken. I'll try to think of a better name. Please share if you
> do.
What about:
bool kvm_on_private_root(const struct kvm *kvm, gpa_t gpa);
Since SNP doesn't have a private root, it can't get confused for SNP. For TDX
it's a little weirder. We usually want to know if the GPA is to the private
half. Whether it's on a separate root or not is not really important to the
callers. But they could infer that if it's on a private root it must be a
private GPA.
Otherwise:
bool kvm_is_private_gpa_bits(const struct kvm *kvm, gpa_t gpa);
The bits indicates it's checking actual bits in the GPA and not the
private/shared state of the GFN.
Powered by blists - more mailing lists