From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751666AbdJ0HHp convert rfc822-to-8bit (ORCPT ); Fri, 27 Oct 2017 03:07:45 -0400 Received: from prv-mh.provo.novell.com ([137.65.248.74]:34464 "EHLO prv-mh.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbdJ0HHo (ORCPT ); Fri, 27 Oct 2017 03:07:44 -0400 Message-Id: <59F2F75D020000780018A7E6@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.2 Date: Fri, 27 Oct 2017 01:07:41 -0600 From: "Jan Beulich" To: "Sander Eikelenboom" Cc: "LKP" , "Craig Bergstrom" , "Fengguang Wu" , "Ingo Molnar" , "Linus Torvalds" , , "Xen-devel" , "Boris Ostrovsky" , Subject: Re: [Xen-devel] ce56a86e2a ("x86/mm: Limit mmap() of /dev/mem to valid physical addresses"): kernel BUG at arch/x86/mm/physaddr.c:79! References: <20171024024439.u3ywfgvi67fe4mbg@wfg-t540p.sh.intel.com> <440615a7-6cc0-a607-ce7c-22a34b69e8fe@eikelenboom.it> <1d203c07-0595-a33a-620b-c51eea9721d1@eikelenboom.it> <8721eeac-a644-e815-55e9-5f01956dd22a@eikelenboom.it> <20171026163911.dnovh4zaik5qumtt@gmail.com> <207b6a75-2eff-8e92-d50c-ec2022fddbf9@eikelenboom.it> In-Reply-To: <207b6a75-2eff-8e92-d50c-ec2022fddbf9@eikelenboom.it> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8BIT Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> On 26.10.17 at 21:29, wrote: > On 26/10/17 19:49, Craig Bergstrom wrote: >> Sander, thanks for the details, they've been very useful. >> >> I suspect that your host system's mem=2048M parameter is causing the >> problem. Any chance you can confirm by removing the parameter and >> running the guest code path? > > I removed it, but kept the hypervisor limiting dom0 memory to 2046M intact > (in grub using the xen bootcmd: > "multiboot /xen-4.10.gz dom0_mem=2048M,max:2048M ....." > > Unfortunately that doesn't change anything, the guest still fails to start > with the same errors. > >> More specifically, since you're telling the kernel that it's high >> memory address is at 2048M and your device is at 0xfe1fe000 (~4G), the >> new mmap() limits are preventing you from mapping addresses that are >> explicitly disallowed by the parameter. >> > > Which would probably mean the current patch prohibits hard limiting the dom0 > memory to a certain value (below 4G) > at least in combination with PCI-passthrough. So the only thing left would > be to have no hard memory restriction on dom0 > and rely on auto-ballooning, but I'm not a great fan of that. Plus - how would things work with any RAM size if the PCI BAR was a 64-bit one, pointing somewhere high up beyond 4Gb? Jan