From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: Xen-unstable-staging: Xen BUG at iommu_map.c:455 Date: Wed, 01 Apr 2015 00:38:34 +0100 Message-ID: <551B2FFA.6080001@citrix.com> References: <1864736142.20150331231153@eikelenboom.it> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yd5jw-0004xs-9l for xen-devel@lists.xenproject.org; Tue, 31 Mar 2015 23:38:36 +0000 In-Reply-To: <1864736142.20150331231153@eikelenboom.it> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Sander Eikelenboom , Jan Beulich Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On 31/03/2015 22:11, Sander Eikelenboom wrote: > Hi all, > > I just tested xen-unstable staging (changeset: git:0522407-dirty) > > with revert of commit 1aeb1156fa43fe2cd2b5003995b20466cd19a622 > (due to an already reported but not yet resolved issue) > > and build with qemu xen from git://xenbits.xen.org/staging/qemu-upstream-unstable.git > (to include the pci command register patch from Jan) > > > and now came across this new splat when starting an HVM with PCI passtrhough: Wow - you are getting all the fun bugs at the moment! Nothing has changed in the AMD IOMMU driver for a while, but the BUG_ON() is particularly unhelpful at identifying what went wrong. As a first pass triage, can you rerun with diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/amd/iommu_map.c index 495ff5c..f15c324 100644 --- a/xen/drivers/passthrough/amd/iommu_map.c +++ b/xen/drivers/passthrough/amd/iommu_map.c @@ -451,8 +451,9 @@ static int iommu_pde_from_gfn(struct domain *d, unsigned long pfn, table = hd->arch.root_table; level = hd->arch.paging_mode; - BUG_ON( table == NULL || level < IOMMU_PAGING_MODE_LEVEL_1 || - level > IOMMU_PAGING_MODE_LEVEL_6 ); + BUG_ON(table == NULL); + BUG_ON(level < IOMMU_PAGING_MODE_LEVEL_1); + BUG_ON(level > IOMMU_PAGING_MODE_LEVEL_6); next_table_mfn = page_to_mfn(table); which will help identify which of the conditions is failing. Can you please also provide the full serial log, including iommu=debug? ~Andrew