From: "Jan Beulich" Subject: Re: [PATCH v4 15/17] x86/hvm: use ioreq_t to track in-flight state Date: Thu, 25 Jun 2015 10:51:10 +0100 Message-ID: <558BEB2E0200007800089706@mail.emea.novell.com> References: <1435145089-21999-1-git-send-email-paul.durrant@citrix.com> <1435145089-21999-16-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z83oQ-0007LW-2k for xen-devel@lists.xenproject.org; Thu, 25 Jun 2015 09:51:14 +0000 In-Reply-To: <1435145089-21999-16-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: Andrew Cooper , Keir Fraser , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org >>> On 24.06.15 at 13:24, wrote: > Use an ioreq_t rather than open coded state, size, dir and data fields > in struct hvm_vcpu_io. This also allows PIO completion to be handled > similarly to MMIO completion by re-issuing the handle_pio() call. Aren't you referring to ... > @@ -501,11 +501,12 @@ void hvm_do_resume(struct vcpu *v) > (void)handle_mmio(); ... this one as the reference? > break; > case HVMIO_pio_completion: > - if ( vio->io_size == 4 ) /* Needs zero extension. */ > - guest_cpu_user_regs()->rax = (uint32_t)vio->io_data; > + if ( vio->io_req.size == 4 ) /* Needs zero extension. */ > + guest_cpu_user_regs()->rax = (uint32_t)vio->io_req.data; > else > - memcpy(&guest_cpu_user_regs()->rax, &vio->io_data, vio->io_size); > - vio->io_state = STATE_IOREQ_NONE; > + memcpy(&guest_cpu_user_regs()->rax, &vio->io_req.data, > + vio->io_req.size); > + vio->io_req.state = STATE_IOREQ_NONE; > break; I.e. shouldn't I expect to see a handle_pio() call here? Or where else is this new handle_pio() call going to show up? Jan