[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH V7] vm_event: Allow subscribing to write events for specific MSR-s
>>> Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> 05/05/16 12:51 PM >>> >On 05/04/2016 05:45 PM, Jan Beulich wrote: >>> + *msr &= 0x1fff; >>> > + return &d->arch.monitor_msr_bitmap->high; >>> > + >>> > + default: >>> > + return NULL; >>> > + } >>> > +} >>> > + >>> > +static int monitor_enable_msr(struct domain *d, u32 msr) >>> > +{ >>> > + u32 *bitmap; >> Together with the above - unsigned long * please (and the helper >> function's return type should then also be unsigned long *). > >But returning unsigned long * from the helper function would require >three aditional casts (when returning >&d->arch.monitor_msr_bitmap->{low,hypervisor,high}), otherwise the >compiler will complain about incompatible pointer types. Well, I also suggested to make those arrays actual bitmaps. The way it is now the fact that you use void * as return type means you hide a cast from u8(*)[1024] to u32*. Using proper bitmaps and a proper return type will avoid all that. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |