From: "Jan Beulich" Subject: Re: [PATCH v2 for 4.5] ioreq-server: handle the lack of a default emulator properly Date: Tue, 30 Sep 2014 10:03:52 +0100 Message-ID: <542A8E18020000780003AE9F@mail.emea.novell.com> References: <1411986115-5147-1-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1411986115-5147-1-git-send-email-paul.durrant@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: Keir Fraser , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 29.09.14 at 12:21, wrote: > +static bool_t hvm_complete_assist_req(ioreq_t *p) > +{ > + switch (p->type) > + { > + case IOREQ_TYPE_COPY: > + case IOREQ_TYPE_PIO: > + if ( p->dir == IOREQ_READ ) > + { > + if ( !p->data_is_ptr ) > + p->data = ~0ul; > + else > + { > + int i, sign = p->df ? -1 : 1; > + uint32_t data = ~0; > + > + for ( i = 0; i < p->count; i++ ) > + hvm_copy_to_guest_phys(p->data + sign * i * p->size, &data, > + p->size); It's not clear which code you cloned this from - these constructs did all get replaced by commit f21399e148 ("x86/HVM: properly handle backward string instruction emulation "), and hence this new addition has to follow suit. Jan > + } > + } > + /* FALLTHRU */ > + default: > + p->state = STATE_IORESP_READY; > + hvm_io_assist(p); > + break; > + } > + > + return 1; > +}