[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] x86/shim: fix build with PV_SHIM_EXCLUSIVE and SHADOW_PAGING



On 14.09.2020 18:44, Roger Pau Monné wrote:
> On Mon, Sep 14, 2020 at 02:38:49PM +0200, Jan Beulich wrote:
>> While there's little point in enabling both, the combination ought to at
>> least build correctly. Drop the direct PV_SHIM_EXCLUSIVE conditionals
>> and instead zap PG_log_dirty to zero under the right conditions, and key
>> other #ifdef-s off of that.
>>
>> While there also expand on ded576ce07e9 ("x86/shadow: dirty VRAM
>> tracking is needed for HVM only"): There was yet another is_hvm_domain()
>> missing, and code touching the struct fields needs to be guarded by
>> suitable #ifdef-s as well. While there also guard shadow-mode-only
>> fields accordingly.
>>
>> Fixes: 8b5b49ceb3d9 ("x86: don't include domctl and alike in shim-exclusive 
>> builds")
>> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks.

> We seem to be growing more and more ifdefs which is not ideal IMO, we
> should rather aim to remove them by splitting code into separate
> compilation units. There doesn't seem to be much option to split
> stuff in this case, so be it.

Right - I was indeed wondering whether maybe shadow_vram_{get,put}_l1e()
could be moved into hvm.c, but I didn't want to right away take the time
to check, as it seemed more important to get the build issue addressed.

Beyond the #ifdef-s added there the majority of the changes here are
merely adjustments to existing ones. (I'd except the new PG_log_dirty
conditional #define-s from the ones wanting better alternatives, as we
have been doing the same already for other PG_* constants.)

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.