From: Matt Wilson <msw@linux.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
xen-devel@lists.xen.org,
Sander Eikelenboom <linux@eikelenboom.it>,
Astarta <astarta@rat.ru>, David Vrabel <david.vrabel@citrix.com>,
Matt Wilson <msw@amazon.com>
Subject: Re: [BUG] Xen vm kernel crash in get_free_entries.
Date: Mon, 21 Oct 2013 11:29:52 +0100 [thread overview]
Message-ID: <20131021102952.GA12019@u109add4315675089e695.ant.amazon.com> (raw)
In-Reply-To: <1382180597.28188.9.camel@dagon.hellion.org.uk>
On Sat, Oct 19, 2013 at 12:03:17PM +0100, Ian Campbell wrote:
> On Sat, 2013-10-19 at 14:51 +0400, Astarta wrote:
> > On 10/19/2013 03:14 AM, Sander Eikelenboom wrote:
>
> > > makes a HVM guest (qemu-xen-traditional) with xen_platform_pci=0 boot again using xl, haven't tested it with xend.
> > >
> > Great catch!
> > I also confirm that 3.11.5 kernel boots just fine after reverting of
> > 'correctly initialize grant table version 1' patch.
>
> This could just be down to that patch adding some BUG_ONs to catch bad
> things going on, e.g. the one in gnttab_expand which I think is being
> hit here.
Indeed, the BUG_ON was added to ensure that the grant table system is
initialized before we attempt to expand the grant table space.
> I have a feeling that it is still wrong (but just more benign) to be
> hitting that call chain in a configuration where there is no platform
> device driver running. IOW reverting that patch removes the obvious
> symptom (blowing up) but not the root cause, i.e. the patch is doing its
> job.
The initialization of the grant table is deferred when running on a
HVM guest.
drivers/xen/grant-table.c:
static int __gnttab_init(void)
{
/* Delay grant-table initialization in the PV on HVM case */
if (xen_hvm_domain())
return 0;
if (!xen_pv_domain())
return -ENODEV;
return gnttab_init();
}
The Xen platform PCI driver initializes it when it binds to the PCI
device:
drivers/xen/platform-pci.c:
static int platform_pci_init(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
...
max_nr_gframes = gnttab_max_grant_frames();
xen_hvm_resume_frames = alloc_xen_mmio(PAGE_SIZE *
max_nr_gframes);
ret = gnttab_init();
if (ret)
goto out;
xenbus_probe(NULL);
return 0;
...
Lots of initialization depends on the presence of the Xen platform PCI
device, I don't see how PV enlightenment can be expected to work if
you don't enable the PCI device.
--msw
next prev parent reply other threads:[~2013-10-21 10:29 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 6:28 [BUG] Xen vm kernel crash in get_free_entries Astarta
2013-10-16 13:29 ` David Vrabel
2013-10-16 14:17 ` Pasi Kärkkäinen
2013-10-17 8:55 ` Astarta
2013-10-17 19:04 ` Astarta
2013-10-17 19:28 ` Pasi Kärkkäinen
2013-10-18 9:31 ` David Vrabel
2013-10-18 9:46 ` Ian Campbell
2013-10-18 10:31 ` Astarta
2013-10-18 11:34 ` Paul Durrant
2013-10-18 11:06 ` Paul Durrant
2013-10-18 11:08 ` Astarta
2013-10-18 11:27 ` Sander Eikelenboom
2013-10-18 11:33 ` Paul Durrant
2013-10-18 14:15 ` Pasi Kärkkäinen
2013-10-18 14:19 ` Ian Campbell
2013-10-18 14:27 ` Pasi Kärkkäinen
2013-10-18 23:14 ` Sander Eikelenboom
2013-10-19 10:51 ` Astarta
2013-10-19 11:03 ` Ian Campbell
2013-10-19 11:58 ` Sander Eikelenboom
2013-10-21 10:55 ` Matt Wilson
2013-11-07 5:20 ` Astarta
2013-11-07 13:47 ` Ian Campbell
2013-11-12 15:56 ` Konrad Rzeszutek Wilk
2013-11-13 9:40 ` Ian Campbell
2013-11-13 12:39 ` Ian Campbell
2013-11-26 20:08 ` Konrad Rzeszutek Wilk
2013-11-26 22:00 ` Sander Eikelenboom
2013-11-26 22:15 ` Sander Eikelenboom
2013-11-26 22:55 ` Sander Eikelenboom
2013-11-26 23:05 ` Konrad Rzeszutek Wilk
2013-11-26 23:14 ` Sander Eikelenboom
2013-11-27 9:36 ` Ian Campbell
2013-11-27 14:24 ` Konrad Rzeszutek Wilk
2013-11-27 15:58 ` Ian Campbell
2013-11-27 16:40 ` Konrad Rzeszutek Wilk
2013-11-28 14:56 ` Stefano Stabellini
2013-11-29 3:26 ` Konrad Rzeszutek Wilk
2013-11-29 11:54 ` Stefano Stabellini
2013-12-09 12:57 ` Sander Eikelenboom
2013-12-10 15:07 ` Konrad Rzeszutek Wilk
2013-10-21 10:29 ` Matt Wilson [this message]
2013-10-21 10:46 ` David Vrabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131021102952.GA12019@u109add4315675089e695.ant.amazon.com \
--to=msw@linux.com \
--cc=Ian.Campbell@citrix.com \
--cc=astarta@rat.ru \
--cc=david.vrabel@citrix.com \
--cc=linux@eikelenboom.it \
--cc=msw@amazon.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).