[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 9/9] x86: PCID is unused when !PV
On Thu, Sep 12, 2019 at 05:48:16PM +0200, Jan Beulich wrote: > On 12.09.2019 17:31, Roger Pau Monné wrote: > > On Wed, Sep 11, 2019 at 05:26:46PM +0200, Jan Beulich wrote: > >> @@ -301,8 +305,12 @@ static inline void write_cr4(unsigned lo > >> { > >> struct cpu_info *info = get_cpu_info(); > >> > >> +#ifdef CONFIG_PV > >> /* No global pages in case of PCIDs enabled! */ > >> ASSERT(!(val & X86_CR4_PGE) || !(val & X86_CR4_PCIDE)); > >> +#else > >> + ASSERT(!(val & X86_CR4_PCIDE)); > > > > That assert seems quite pointless, you have set X86_CR4_PCIDE to 0, so > > this is never going to trigger? > > I was about to drop this, but I have to take back my earlier > reply: The #ifdef you talk about is in flushtlb.c, whereas > here we're in processor.h. Oh yes, sorry for not realizing. In order to avoid the ifdefary maybe you could write the above as: ASSERT((IS_ENABLED(CONFIG_PV) && !(val & X86_CR4_PGE)) || !(val & X86_CR4_PCIDE)); I don't have a strong opinion though, maybe my proposed version is actually harder to read than the ifdef'ed one. Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |