xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Steven Noonan <snoonan@amazon.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Matt Wilson <msw@linux.com>,
	xen-devel@lists.xen.org,
	Sander Eikelenboom <linux@eikelenboom.it>,
	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: Tue, 12 Nov 2013 10:56:14 -0500	[thread overview]
Message-ID: <20131112155614.GA11354@phenom.dumpdata.com> (raw)
In-Reply-To: <1383832023.32399.39.camel@kazak.uk.xensource.com>

On Thu, Nov 07, 2013 at 01:47:03PM +0000, Ian Campbell wrote:
> On Thu, 2013-11-07 at 09:20 +0400, Astarta wrote:
> > Hello,
> > 
> > Let me bring some new life to this discussion.
> > 
> > I've investigated a bit and found another way to make  kernels starting 
> > from 3.8.x to boot on the VMs with platform device_id 0002.
> > Reverting of xen-grant-table-correctly-initialize-grant-table-version-1 
> > patch is not necessary.
> > 
> > We can simply modify struct pci_device_id platform_pci_tbl[] (in 
> > drivers/xen/platform-pci.c) to respect 0002 and 0000 device ids.
> > That makes the kernel (3.8.x and 3.11.6) to boot correctly, disks and 
> > network are also recognized.
> 
> I think this is just working around the problem, by avoiding the
> situation where the error occurs. You could just as well switch to
> platform device id < 2.

I am bit late to this discussion - but shouldn't there be something
in the kernel to deal with this?

> 
> > IMO, there is no need to add new fields with device id 0002 and device 
> > id 0000 to platform_pci_tbl[] , we can modify the existing one to use 
> > PCI_ANY_ID instead of PCI_DEVICE_ID_XEN_PLATFORM (which is 0001), so if 
> > we have PCI_VENDOR_ID_XEN there is no need to pay attention on device id.
> 
> That omits the possibility that a future rev might differ in some
> meaningful way though.
> 
> Ian.
> 
> > 
> > So the patch is more than simple. See attached. I've tested the resulted 
> > kernel in my environment (with device ids 0002, 0001 and 0000) and it 
> > seems to work well.
> > 
> > 
> > --
> > Marina
> > 
> > On 10/21/2013 02:55 PM, Matt Wilson wrote:
> > > On Sat, Oct 19, 2013 at 01:58:50PM +0200, Sander Eikelenboom wrote:
> > >> Saturday, October 19, 2013, 1:03:17 PM, you 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.
> > >>> 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.
> > >> That was my suspicion too, but at least it seems like some starting point
> > >> of further debugging.
> > >> (and indication of the kernels affected since this commit went to stable as well)
> > >>
> > >> Since i was still seeing the "Booting PV enabled guest on Xen HVM" is was wondering
> > >> what is supposed to happen when there are some combinations ....
> > > This is the enlightenment code noticing that it's running in a HVM
> > > guest under Xen via the hypervisor cpuid leaf (cpuid leaf
> > > 0x40000000).
> > >
> > >> xen HVM xen_platform_pci=0 + guest kernel without PV guest support and without xen pv drivers (net + block)
> > > This should work.
> > >
> > >> xen HVM xen_platform_pci=0 + guest kernel with PV guest support but without xen pv drivers (net + block)
> > > This should work.
> > >
> > >> xen HVM xen_platform_pci=0 + guest kernel with PV guest support and with xen pv drivers (net + block)
> > >> -- This is the configuration that hits the bug described here.
> > > I don't see how this can be expected to work - the PV net and block
> > > devices need the facilities that are initialized by the Xen platform
> > > PCI device to operate. Of course it shouldn't crash either, it should
> > > just use emulated devices instead of xen-netfront/xen-blkfront.
> > >
> > >> xen HVM xen_platform_pci=1 + guest kernel without PV guest support and without xen pv drivers (net + block)
> > > This should work.
> > >
> > >> xen HVM xen_platform_pci=1 + guest kernel with PV guest support and without xen pv drivers (net + block)
> > > This should work.
> > >
> > >> xen HVM xen_platform_pci=1 + guest kernel with PV guest support and with xen pv drivers (net + block)
> > > This should work.
> > >
> > >> Booting a guest kernel with PV support as HVM but without using PV doesn't seem possible with a .cfg option ?
> > >> (yes it's a hypothetical option (performance wise), as is running with a guest kernel which supports PV drivers,
> > >>   but not using them with xen_platform_pci=0 .. but it is useful for debugging )
> > > AFAICT the expected behavior would be to for the guest kernel to use
> > > basic enlightenment for CPU operations (hotplug, timers) but no PV IO
> > > support (net + block). But perhaps I'm missing something since you
> > > theoretically don't need the PCI device if you have event channel
> > > callback support in the guest kernel and sufficient support in the
> > > hypervisor.
> > >
> > > --msw
> > 
> > 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

  reply	other threads:[~2013-11-12 15:56 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 [this message]
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
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=20131112155614.GA11354@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=astarta@rat.ru \
    --cc=david.vrabel@citrix.com \
    --cc=linux@eikelenboom.it \
    --cc=msw@amazon.com \
    --cc=msw@linux.com \
    --cc=snoonan@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).