|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 10/16] x86/mm: put nested p2m code under CONFIG_HVM
>>> On 13.09.18 at 17:07, <wei.liu2@xxxxxxxxxx> wrote:
> On Fri, Sep 07, 2018 at 01:06:38AM -0600, Jan Beulich wrote:
>> >>> On 04.09.18 at 18:15, <wei.liu2@xxxxxxxxxx> wrote:
>> > @@ -149,6 +149,7 @@ static void p2m_teardown_hostp2m(struct domain *d)
>> > }
>> > }
>> >
>> > +#ifdef CONFIG_HVM
>> > static void p2m_teardown_nestedp2m(struct domain *d)
>> > {
>> > unsigned int i;
>> > @@ -186,6 +187,7 @@ static int p2m_init_nestedp2m(struct domain *d)
>> >
>> > return 0;
>> > }
>> > +#endif
>>
>> With the goal of limited code churn I think these would better be put
>> around the entire body of the function. That way the ones below
>> enclosing the function calls can go away.
>
> Later the ifdefs here and some other places will be expand to cover
> altp2m as well. If we enclose only the body here, we will need to do the
> same things for altp2m functions.
>
> The end result is we will actually have more or less the
> same amount whether we change to that method or not.
But (to me at least) it's a difference whether there are many small
cope (covering a single line, i.e. a call site here) #ifdef-s, or the
same amount of ones covering while function bodies. The latter
imo is better readable overall.
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 |