[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 01/17] x86/hvm: simplify hvmemul_do_io()
>>> On 17.06.15 at 16:55, <Paul.Durrant@xxxxxxxxxx> wrote: >> From: Jan Beulich [mailto:JBeulich@xxxxxxxx] >> Sent: 17 June 2015 15:48 >> >>> On 17.06.15 at 15:54, <Paul.Durrant@xxxxxxxxxx> wrote: >> >> -----Original Message----- >> >> From: Jan Beulich [mailto:JBeulich@xxxxxxxx] >> >> Sent: 17 June 2015 14:31 >> >> >>> On 11.06.15 at 17:42, <paul.durrant@xxxxxxxxxx> wrote: >> >> > +/* >> >> > + * Perform I/O between <port> and <buffer>. <dir> indicates the >> >> > + * direction: IOREQ_READ means a read from <port> to <buffer> and >> >> > + * IOREQ_WRITE means a write from <buffer> to <port>. Each access >> has >> >> > + * width <size> and up to *<reps> accesses will be performed. If >> >> > + * X86EMUL_OKAY is returned then <reps> will be updated with the >> >> number >> >> > + * of accesses actually performed. >> >> > + * >> >> > + * NOTE: If *<reps> is greater than 1, each access will use the >> >> > + * <buffer> pointer; there is no implicit interation over a >> >> > + * block of memory starting at <buffer>. >> >> > + */ >> >> > +int hvmemul_do_pio_buffer(uint16_t port, >> >> > + unsigned long *reps, >> >> >> >> Considering the comment - can't you instead drop the reps parameter >> >> here then? >> >> >> > >> > No. A rep stos does multiple port writes from the same buffer pointer. >> >> A REP STOS doesn't do any port writes at all. REP OUTS does, but >> it accesses "a block of memory", which the comment specifically says >> doesn't happen here. I.e. I still think either the comment is wrong (or >> at least misleading) or the function could be simplified. >> > > Hmm. Good point. I'm sure I ran into a case where something was trying to > multi rep port I/O from a buffer, but you're right... it makes no sense. IDE drivers are the most common ones to use such. It really all depends on whether REP INS and REP OUTS can make it here. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |