From: "Jan Beulich" Subject: Re: [PATCH v6 08/16] x86/hvm: unify stdvga mmio intercept with standard mmio intercept Date: Thu, 09 Jul 2015 10:21:24 +0100 Message-ID: <559E5934020000780008EA52@mail.emea.novell.com> References: <1435940733-20856-1-git-send-email-paul.durrant@citrix.com> <1435940733-20856-9-git-send-email-paul.durrant@citrix.com> <559E5297020000780008E9EE@mail.emea.novell.com> <9AAE0902D5BC7E449B7C8E4E778ABCD02F4B3ED9@AMSPEX01CL02.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZD81G-0001ee-Dd for xen-devel@lists.xenproject.org; Thu, 09 Jul 2015 09:21:26 +0000 In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD02F4B3ED9@AMSPEX01CL02.citrite.net> 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: "xen-devel@lists.xenproject.org" , "Keir(Xen.org)" List-Id: xen-devel@lists.xenproject.org >>> On 09.07.15 at 11:00, wrote: >> From: Jan Beulich [mailto:JBeulich@suse.com] >> Sent: 09 July 2015 09:53 >> >>> On 03.07.15 at 18:25, wrote: >> > --- a/xen/arch/x86/hvm/emulate.c >> > +++ b/xen/arch/x86/hvm/emulate.c >> > @@ -266,6 +266,15 @@ static int hvmemul_acquire_page(unsigned long >> gmfn, struct page_info **page) >> > return X86EMUL_RETRY; >> > } >> > >> > + /* This code should not be reached if the gmfn is not RAM */ >> > + if ( p2m_is_mmio(p2mt) ) >> > + { >> > + domain_crash(curr_d); >> > + >> > + put_page(*page); >> > + return X86EMUL_UNHANDLEABLE; >> > + } >> > + >> > return X86EMUL_OKAY; >> > } >> >> Does this change really belong here, not in an earlier patch? >> > > It could be, but it's always been in this patch because this is the one > where I apparently remove code that handled MMIO <-> MMIO copying so I think > it's most illustrative to leave it here. Okay then. >> > + if ( !s->cache ) >> > + goto done; >> >> Why is this not being dealt with by stdvga_mem_accept()? >> > > Because, as the big lock comment below states: > > "Single-cycle write transactions are accepted even if the cache is > not active since we can assert, when in stdvga mode, that writes > to VRAM have no side effect and thus we can try to buffer them" Ah, right, thanks for connecting the two together for me. Jan