From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?windows-1252?Q?Roger_Pau_Monn=E9?= Subject: Re: Removing the PVH assert in arch/x86/hvm/io.c:87 Date: Fri, 5 Dec 2014 12:07:44 +0100 Message-ID: <54819200.3010601@citrix.com> References: <54808D6F.302@citrix.com> <548185DF020000780004D076@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xwqjr-0003Fx-0c for xen-devel@lists.xenproject.org; Fri, 05 Dec 2014 11:07:55 +0000 In-Reply-To: <548185DF020000780004D076@mail.emea.novell.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: Jan Beulich Cc: xen-devel@lists.xenproject.org, Tim Deegan List-Id: xen-devel@lists.xenproject.org El 05/12/14 a les 10.15, Jan Beulich ha escrit: >>>> On 04.12.14 at 17:35, wrote: >> I've just stumbled upon this assert while testing PVH on different >> hardware. It was added in 7c4870 as a safe belt, but it turns out INS >> and OUTS go through handle_mmio. So using this instructions from a PVH >> guest basically kills Xen. >> >> I've removed it and everything seems fine, so I'm considering sending a >> patch for 4.5 in order to have it removed. I think the path that could >> trigger the crash because of the missing vioapic stuff is already >> guarded by the other chunk added in the same patch. > > Iirc we settled on forbidding paths to handle_mmio() for PVH (hence > the ASSERT()). Sadly you provide way too little detail on what is > actually happening in your case: What's the use case of to-be- > emulated INS/OUTS in a PVH kernel? In this specific situation I'm seeing intsw instructions executed by the FreeBSD ATA layer: http://fxr.watson.org/fxr/source/dev/ata/ata-lowlevel.c#L740 > What's the call tree that gets > you into handle_mmio(), considering that both calls to > handle_mmio_with_translation() from hvm_hap_nested_page_fault() > as well as the one to handle_mmio() ought to be unreachable for PVH? You can get there from vmx_vmexit_handler if the exit reason is EXIT_REASON_IO_INSTRUCTION. Roger.