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

Re: [Xen-devel] [PATCH v2] x86/monitor: add support for descriptor access events



On Thu, Apr 06, 2017 at 08:09:23AM -0600, Jan Beulich wrote:
> >>> On 06.04.17 at 11:37, <apop@xxxxxxxxxxxxxxx> wrote:
> > On Thu, Apr 06, 2017 at 03:20:21AM -0600, Jan Beulich wrote:
> >> >>> On 06.04.17 at 10:59, <apop@xxxxxxxxxxxxxxx> wrote:
> >> > On Wed, Apr 05, 2017 at 08:26:27AM -0600, Jan Beulich wrote:
> >> >> >>> On 04.04.17 at 11:57, <apop@xxxxxxxxxxxxxxx> wrote:
> >> >> > --- a/xen/arch/x86/hvm/hvm.c
> >> >> > +++ b/xen/arch/x86/hvm/hvm.c
> >> >> > @@ -3572,6 +3572,43 @@ gp_fault:
> >> >> >      return X86EMUL_EXCEPTION;
> >> >> >  }
> >> >> >  
> >> >> > +int hvm_descriptor_access_intercept(uint64_t exit_info,
> >> >> > +                                    uint64_t vmx_exit_qualification,
> >> >> > +                                    uint8_t descriptor, bool 
> >> >> > is_write)
> >> >> 
> >> >> Why uint8_t?
> >> > 
> >> > The descriptor type from struct vm_event_desc_access is uint8_t since
> >> > there are only 4 possible descriptors:
> >> > 
> >> >> > +#define VM_EVENT_DESC_IDTR           1
> >> >> > +#define VM_EVENT_DESC_GDTR           2
> >> >> > +#define VM_EVENT_DESC_LDTR           3
> >> >> > +#define VM_EVENT_DESC_TR             4
> >> > 
> >> > Should it be something else?
> >> 
> >> Well, you should avoid fixed width types where they're not really
> >> needed (their use should signal a true dependency on the specified
> >> width). "unsigned int" would be quite fine here afaict.
> > 
> > So should it be changed in the struct definition as well?
> 
> You mean in the public interface? No, there you _need_ to use fixed
> width types.

Ok, I'll make the changes and resend.

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