[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 2/2] xen: add update indicator to vcpu_runstate_info
>>> On 16.06.16 at 14:11, <JGross@xxxxxxxx> wrote: > On 16/06/16 13:15, Jan Beulich wrote: >>>>> On 15.06.16 at 13:34, <JGross@xxxxxxxx> wrote: >>> + if ( VM_ASSIST(v->domain, runstate_update_flag) ) >>> + { >>> + off = offsetof(struct vcpu_runstate_info, state_entry_time) + >>> + sizeof(v->runstate.state_entry_time) - 1; >>> + if ( has_32bit_shinfo(v->domain) ) >>> + { >>> + guest_handle = v->runstate_guest.compat.p; >>> + guest_handle += >>> + offsetof(struct compat_vcpu_runstate_info, >>> state_entry_time) + >>> + sizeof(v->runstate.state_entry_time) - 1; >> >> The sizes of the native and compat fields happen to be the same, >> but it would be nice if the right field/type could be used here. > > Hmm, this will require some ugly type casting, but it is probably > cleaner. Type casting? I would expect you to be able to use v->runstate_guest.compat.p->state_entry_time. In fact I think you also could get rid of the offsetof() if you used &v->runstate_guest.compat.p->state_entry_time for initializing guest_handle. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |