[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e68beed4c536712ddf28cdd8296050222731415e.camel@intel.com>
Date: Thu, 4 Feb 2021 17:31:11 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "pbonzini@...hat.com" <pbonzini@...hat.com>,
"seanjc@...gle.com" <seanjc@...gle.com>
CC: "jmattson@...gle.com" <jmattson@...gle.com>,
"joro@...tes.org" <joro@...tes.org>,
"vkuznets@...hat.com" <vkuznets@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"thomas.lendacky@....com" <thomas.lendacky@....com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"wanpengli@...cent.com" <wanpengli@...cent.com>,
"brijesh.singh@....com" <brijesh.singh@....com>
Subject: Re: [PATCH 07/12] KVM: x86: SEV: Treat C-bit as legal GPA bit
regardless of vCPU mode
On Thu, 2021-02-04 at 11:34 +0100, Paolo Bonzini wrote:
> On 04/02/21 03:19, Sean Christopherson wrote:
> > Ah, took me a few minutes, but I see what you're saying. LAM will
> > introduce
> > bits that are repurposed for CR3, but not generic GPAs. And, the
> > behavior is
> > based on CPU support, so it'd make sense to have a mask cached in
> > vcpu->arch
> > as opposed to constantly generating it on the fly.
> >
> > Definitely agree that having a separate cr3_lm_rsvd_bits or
> > whatever is the
> > right way to go when LAM comes along. Not sure it's worth keeping
> > a duplicate
> > field in the meantime, though it would avoid a small amount of
> > thrash.
>
> We don't even know if the cr3_lm_rsvd_bits would be a field in
> vcpu->arch, or rather computed on the fly. So renaming the field in
> vcpu->arch seems like the simplest thing to do now.
Fair enough. But just to clarify, I meant that I thought the code would
be more confusing to use illegal gpa bit checks for checking cr3. It
seems they are only incidentally the same value. Alternatively there
could be something like a is_rsvd_cr3_bits() helper that just uses
reserved_gpa_bits for now. Probably put the comment in the wrong place.
It's a minor point in any case.
Powered by blists - more mailing lists