|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/monitor: add get_capabilities to monitor_op domctl
>>> On 07.07.15 at 14:01, <tlengyel@xxxxxxxxxxx> wrote:
> On Tue, Jul 7, 2015 at 4:22 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>> >>> On 07.07.15 at 02:43, <tlengyel@xxxxxxxxxxx> wrote:
>> > --- a/xen/arch/x86/monitor.c
>> > +++ b/xen/arch/x86/monitor.c
>> > @@ -42,6 +42,22 @@ int status_check(struct xen_domctl_monitor_op *mop,
>> bool_t status)
>> > return 0;
>> > }
>> >
>> > +static inline
>> > +void get_capabilities(struct domain *d, struct xen_domctl_monitor_op
>> *mop)
>> > +{
>> > + mop->event = 0;
>> > +
>> > + if ( !is_hvm_domain(d) || !cpu_has_vmx )
>> > + return;
>> > +
>> > + mop->event = (1 << XEN_DOMCTL_MONITOR_EVENT_WRITE_CTRLREG) |
>> > + (1 << XEN_DOMCTL_MONITOR_EVENT_MOV_TO_MSR) |
>> > + (1 << XEN_DOMCTL_MONITOR_EVENT_SOFTWARE_BREAKPOINT);
>> > +
>> > + if ( hvm_is_singlestep_supported() )
>> > + mop->event |= (1 << XEN_DOMCTL_MONITOR_EVENT_SINGLESTEP);
>> > +}
>>
>> And with this in mind I suppose the hook then would return a bit
>> mask to be or-ed in here, instead of just a boolean flag.
>>
>
> I think the boolean flag return is a lot more generic. I rather keep it as
> is - otherwise I have to mask the bitfield again in the toggle patch too.
With the other patch in mind I agree.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |