[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] dom_cow is needed for mem-sharing only
>>> On 31.05.19 at 19:13, <andrew.cooper3@xxxxxxxxxx> wrote: > On 31/05/2019 02:35, Jan Beulich wrote: >> A couple of adjustments are needed to code checking for dom_cow, but >> since there are pretty few it is probably better to adjust those than >> to set up and keep around a never used domain. >> >> Take the opportunity and tighten a BUG_ON() in emul-priv-op.c:read_cr(). >> (Arguably this perhaps shouldn't be a BUG_ON() in the first place.) > > Yes - it should be ASSERT_UNREACHABLE()/domain_crash() > > I'm not fussed if this done as part of this patch, or split out > separately. It almost doesn't seem worth splitting out. Well, to do both changes at the same time, I'll really split this out into a prereq patch. >> --- a/xen/include/xen/mm.h >> +++ b/xen/include/xen/mm.h >> @@ -644,6 +644,9 @@ static inline void filtered_flush_tlb_ma >> >> /* Private domain structs for DOMID_XEN, DOMID_IO, etc. */ >> extern struct domain *dom_xen, *dom_io, *dom_cow; >> +#ifndef CONFIG_HAS_MEM_SHARING >> +# define dom_cow NULL >> +#endif >> >> enum XENSHARE_flags { >> SHARE_rw, > > What is wrong with > > #ifdef CONFIG_HAS_MEM_SHARING > extern struct domain *dom_cow; > #else > # define dom_cow NULL > #endif > > which is how we usually express things like this? Sure, its a tiny bit > longer to write, but it is easier to follow. Well, since you're the second one to ask, I'll switch, despite not agreeing with this. Yet again some use of the C language that apparently needs to be listed in ./CODING_STYLE as unwanted / forbidden. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |