[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 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? > >> > +struct vm_event_desc_access { > >> > + union { > >> > + struct { > >> > + uint32_t instr_info; /* VMX: VMCS > >> > Instruction-Information */ > >> > + uint32_t _pad1; > >> > + uint64_t exit_qualification; /* VMX: VMCS Exit > >> > Qualification */ > >> > + } vmx; > >> > + struct { > >> > + uint64_t exitinfo; /* SVM: VMCB EXITINFO */ > >> > + uint64_t _pad2; > >> > + } svm; > >> > + } arch; > >> > + uint8_t descriptor; /* VM_EVENT_DESC_* */ > >> > + uint8_t is_write; > >> > + uint8_t _pad[6]; > >> > +}; _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |