[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [BUG] Xen vm kernel crash in get_free_entries.



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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.