From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v6 09/16] x86/hvm: limit reps to avoid the need to handle retry Date: Fri, 3 Jul 2015 18:18:27 +0100 Message-ID: <5596C3E3.3030008@citrix.com> References: <1435940733-20856-1-git-send-email-paul.durrant@citrix.com> <1435940733-20856-10-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 1ZB4bg-0004Oc-Pe for xen-devel@lists.xenproject.org; Fri, 03 Jul 2015 17:18:32 +0000 In-Reply-To: <1435940733-20856-10-git-send-email-paul.durrant@citrix.com> 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 , xen-devel@lists.xenproject.org Cc: Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 03/07/15 17:25, Paul Durrant wrote: > By limiting hvmemul_do_io_addr() to reps falling within the page on which > a reference has already been taken, we can guarantee that calls to > hvm_copy_to/from_guest_phys() will not hit the HVMCOPY_gfn_paged_out > or HVMCOPY_gfn_shared cases. Thus we can remove the retry logic (added > by c/s 82ed8716b "fix direct PCI port I/O emulation retry and error > handling") from the intercept code and simplify it significantly. > > Normally hvmemul_do_io_addr() will only reference single page at a time. > It will, however, take an extra page reference for I/O spanning a page > boundary. > > It is still important to know, upon returning from x86_emulate(), whether > the number of reps was reduced so the mmio_retry flag is retained for that > purpose. > > Signed-off-by: Paul Durrant > Cc: Keir Fraser > Cc: Jan Beulich > Cc: Andrew Cooper Reviewed-by: Andrew Cooper