[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YKzO2+Dwb5ABKFyF@zn.tnic>
Date: Tue, 25 May 2021 12:18:03 +0200
From: Borislav Petkov <bp@...en8.de>
To: Brijesh Singh <brijesh.singh@....com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
tglx@...utronix.de, jroedel@...e.de, thomas.lendacky@....com,
pbonzini@...hat.com, mingo@...hat.com, dave.hansen@...el.com,
rientjes@...gle.com, seanjc@...gle.com, peterz@...radead.org,
hpa@...or.com, tony.luck@...el.com
Subject: Re: [PATCH Part1 RFC v2 11/20] x86/compressed: Add helper for
validating pages in the decompression stage
On Thu, May 20, 2021 at 01:05:15PM -0500, Brijesh Singh wrote:
> Maybe I am missing something, the statement above was executed for
> either set or clr but the page shared need to happen only for clr. So,
> from code readability point I kept it outside of that if().
>
> Otherwise we may have to do something like.
>
> ...
>
> if ((set | clr) & _PAGE_EN) {
>
> if (clr)
>
> snp_set_page_shared(pte_pfn(*ptep) << PAGE_SHIFT);
>
> }
>
> I am okay with above is the preferred approach.
Yes pls, because it keeps the _PAGE_ENC handling together in one
statement.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists