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

Re: [Xen-devel] [PATCH v9] x86/hvm: Allow guest_request vm_events coming from userspace



>>> On 29.08.17 at 10:09, <aisaila@xxxxxxxxxxxxxxx> wrote:
> +        unsigned int guest_request_userspace_enabled                       : 
> 1;

This being a single bit, ...

> --- a/xen/include/asm-x86/monitor.h
> +++ b/xen/include/asm-x86/monitor.h
> @@ -33,6 +33,12 @@ struct monitor_msr_bitmap {
>  };
>  
>  static inline
> +void arch_monitor_allow_userspace(struct domain *d, uint8_t allow_userspace)

... I think you want to use bool here, or else ...

> +{
> +    d->arch.monitor.guest_request_userspace_enabled = allow_userspace;

... assigning the 8-bit value here would truncate the high 7 bits
instead of the presumably intended meaning of non-zero -> true
and zero -> false in ...

> --- a/xen/include/public/domctl.h
> +++ b/xen/include/public/domctl.h
> @@ -1124,6 +1124,7 @@ struct xen_domctl_monitor_op {
>          struct {
>              /* Pause vCPU until response */
>              uint8_t sync;
> +            uint8_t allow_userspace;
>          } guest_request;

... the public interface.

Jan


_______________________________________________
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®.