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

Re: [Xen-devel] [PATCH 4/4] x86/shadow: Switch to using bool



Hi,

At 12:16 +0100 on 28 Jun (1498652182), Andrew Cooper wrote:
> sh_pin() has boolean properties, so switch its return type.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Good idea, thanks.

> -static bool_t
> +static bool
>  sh_write_guest_entry(struct vcpu *v, intpte_t *p, intpte_t new, mfn_t gmfn)

Can you please update paging.h too?  We need matching changes to
write_guest_entry and cmpxchg_guest_entry in struct shadow_paging_mode,
and invlpg in struct paging_mode.

I'm a little surprised that the compiler doesn't complain.  I suppose
the implicit promotion to int makes it all equivalent.

> @@ -3620,7 +3620,7 @@ static int sh_page_fault(struct vcpu *v,
>   * instruction should be issued on the hardware, or 0 if it's safe not
>   * to do so.
>   */
> -static bool_t sh_invlpg(struct vcpu *v, unsigned long va)
> +static bool sh_invlpg(struct vcpu *v, unsigned long va)

This comment needs to be updated too. 

> @@ -102,7 +102,7 @@ int shadow_set_allocation(struct domain *d, unsigned int 
> pages,
>      ({ ASSERT_UNREACHABLE(); -EOPNOTSUPP; })
>  
>  static inline void sh_remove_shadows(struct domain *d, mfn_t gmfn,
> -                                     bool_t fast, bool_t all) {}
> +                                     bool fast, bool all) {}

Actually, please make these ints, to match the main implementation.

Cheers,

Tim.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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