[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 06/11] ioreq: allow dispatching ioreqs to internal servers
> -----Original Message----- > From: Roger Pau Monne <roger.pau@xxxxxxxxxx> > Sent: 03 September 2019 17:14 > To: xen-devel@xxxxxxxxxxxxxxxxxxxx > Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>; Paul Durrant > <Paul.Durrant@xxxxxxxxxx>; Jan Beulich > <jbeulich@xxxxxxxx>; Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; Wei Liu > <wl@xxxxxxx> > Subject: [PATCH v2 06/11] ioreq: allow dispatching ioreqs to internal servers > > Internal ioreq servers are always processed first, and ioreqs are > dispatched by calling the handler function. Note this is already the > case due to the implementation of FOR_EACH_IOREQ_SERVER. > I'd re-jig this a bit. Something like... "Internal ioreq servers will be processed first due to the implementation of FOR_EACH_IOREQ_SERVER, and ioreqs are dispatched simply by calling the handler function." > Note that hvm_send_ioreq doesn't get passed the ioreq server id, so > obtain it from the ioreq server data by doing pointer arithmetic. > I think this 2nd paragraph is stale now? > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Otherwise LGTM, so with those things fixed up... Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx> > --- > Changes since v1: > - Avoid having to iterate twice over the list of ioreq servers since > now internal servers are always processed first by > FOR_EACH_IOREQ_SERVER. > - Obtain ioreq server id using pointer arithmetic. > --- > xen/arch/x86/hvm/ioreq.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/xen/arch/x86/hvm/ioreq.c b/xen/arch/x86/hvm/ioreq.c > index dbc5e6b4c5..8331a89eae 100644 > --- a/xen/arch/x86/hvm/ioreq.c > +++ b/xen/arch/x86/hvm/ioreq.c > @@ -1493,9 +1493,18 @@ int hvm_send_ioreq(ioservid_t id, ioreq_t *proto_p, > bool buffered) > > ASSERT(s); > > + if ( hvm_ioreq_is_internal(id) && buffered ) > + { > + ASSERT_UNREACHABLE(); > + return X86EMUL_UNHANDLEABLE; > + } > + > if ( buffered ) > return hvm_send_buffered_ioreq(s, proto_p); > > + if ( hvm_ioreq_is_internal(id) ) > + return s->handler(curr, proto_p, s->data); > + > if ( unlikely(!vcpu_start_shutdown_deferral(curr)) ) > return X86EMUL_RETRY; > > -- > 2.22.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |