[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YdND4m/XjX6tRo0z@dt>
Date: Mon, 3 Jan 2022 12:43:46 -0600
From: Venu Busireddy <venu.busireddy@...cle.com>
To: Brijesh Singh <brijesh.singh@....com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
linux-efi@...r.kernel.org, platform-driver-x86@...r.kernel.org,
linux-coco@...ts.linux.dev, linux-mm@...ck.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Joerg Roedel <jroedel@...e.de>,
Tom Lendacky <thomas.lendacky@....com>,
"H. Peter Anvin" <hpa@...or.com>, Ard Biesheuvel <ardb@...nel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Jim Mattson <jmattson@...gle.com>,
Andy Lutomirski <luto@...nel.org>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Sergio Lopez <slp@...hat.com>, Peter Gonda <pgonda@...gle.com>,
Peter Zijlstra <peterz@...radead.org>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
David Rientjes <rientjes@...gle.com>,
Dov Murik <dovmurik@...ux.ibm.com>,
Tobin Feldman-Fitzthum <tobin@....com>,
Borislav Petkov <bp@...en8.de>,
Michael Roth <michael.roth@....com>,
Vlastimil Babka <vbabka@...e.cz>,
"Kirill A . Shutemov" <kirill@...temov.name>,
Andi Kleen <ak@...ux.intel.com>,
"Dr . David Alan Gilbert" <dgilbert@...hat.com>,
tony.luck@...el.com, marcorr@...gle.com,
sathyanarayanan.kuppuswamy@...ux.intel.com
Subject: Re: [PATCH v8 09/40] x86/compressed: Add helper for validating pages
in the decompression stage
On 2021-12-17 17:24:43 -0600, Brijesh Singh wrote:
>
> On 12/17/21 2:47 PM, Venu Busireddy wrote:
>
> >> * the caches.
> >> */
> >> - if ((set | clr) & _PAGE_ENC)
> >> + if ((set | clr) & _PAGE_ENC) {
> >> clflush_page(address);
> >>
> >> + /*
> >> + * If the encryption attribute is being cleared, then change
> >> + * the page state to shared in the RMP table.
> >> + */
> >> + if (clr)
> > This function is also called by set_page_non_present() with clr set to
> > _PAGE_PRESENT. Do we want to change the page state to shared even when
> > the page is not present? If not, shouldn't the check be (clr & _PAGE_ENC)?
>
> I am not able to follow your comment. Here we only pay attention to the
> encryption attribute, if encryption attribute is getting cleared then
> make PSC. In the case ov set_page_non_present(), the outer if() block
> will return false. Am I missing something ?
You are right. I missed the outer check.
> > The page is not "added", right? Shouldn't we just say:
>
> Technically, PSC modifies the RMP entry, so I should use that instead
> of calling "added".
>
>
> > Validate the page so that it is consistent with the RMP entry.
>
> Yes, I am okay with it.
Thanks,
Venu
Powered by blists - more mailing lists