[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 1/1] xen-hvm.c: Add support for Xen access to vmport
On Fri, 3 Oct 2014, Don Slutz wrote: > On 10/03/14 12:23, Stefano Stabellini wrote: > > On Fri, 3 Oct 2014, Don Slutz wrote: > > > On 10/03/14 05:52, Stefano Stabellini wrote: > > > > On Thu, 2 Oct 2014, Don Slutz wrote: > > > > > This adds synchronisation of the 6 vcpu registers (only 32bits of > > > > > them) that vmport.c needs between Xen and QEMU. > > > > > > ... > > > > > } > > > > > -static void handle_ioreq(ioreq_t *req) > > > > > +static void regs_to_cpu(XenIOState *state, vmware_ioreq_t > > > > > *vmport_req) > > > > > +{ > > > > > + X86CPU *cpu; > > > > > + CPUX86State *env; > > > > > + > > > > > + if (!state->cpu_by_ioreq_id[0]) { > > > > > + CPUState *cpu_state; > > > > > + > > > > > + CPU_FOREACH(cpu_state) { > > > > > + state->cpu_by_ioreq_id[cpu_state->cpu_index] = cpu_state; > > > > > + } > > > > > + } > > > > This is just the initialization, isn't it? > > > > It would be best to move it to an initialization function then. > > > > > > > A new initialization function would need to be added. A new call to it > > > would > > > need > > > to be added (not sure where the best place is). Since the overhead here > > > is > > > small I went with the less intrusive change. > > I'd prefer the initialization function if it is possible. > > > > > > > > Ok, how does: > > > @@ -1023,6 +1028,11 @@ static void xen_main_loop_prepare(XenIOState *state) > state); > > if (evtchn_fd != -1) { > + CPUState *cpu_state; > + > + CPU_FOREACH(cpu_state) { > + state->cpu_by_ioreq_id[cpu_state->cpu_index] = cpu_state; > + } > qemu_set_fd_handler(evtchn_fd, cpu_handle_ioreq, NULL, state); > } > } > > Look? It looks fine _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |