From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Roger Pau Monne <roger.pau@citrix.com>
Cc: Juergen Gross <jgross@suse.com>,
xen-devel@lists.xenproject.org,
Vitaly Kuznetsov <vkuznets@redhat.com>
Subject: Re: [RFC] xen/pvh: detect PVH after kexec
Date: Tue, 21 Mar 2017 11:01:37 -0400 [thread overview]
Message-ID: <f7eb4a2d-0d4c-51a0-b23e-d2e0e33a5d7a@oracle.com> (raw)
In-Reply-To: <20170321141629.sgbouqatbmcxrsow@dhcp-3-128.uk.xensource.com>
On 03/21/2017 10:16 AM, Roger Pau Monne wrote:
> On Tue, Mar 21, 2017 at 10:05:27AM -0400, Boris Ostrovsky wrote:
>> On 03/21/2017 08:13 AM, Roger Pau Monne wrote:
>>> On Tue, Mar 21, 2017 at 12:53:07PM +0100, Vitaly Kuznetsov wrote:
>>>> Roger Pau Monne <roger.pau@citrix.com> writes:
>>>>> On Tue, Mar 21, 2017 at 10:21:52AM +0100, Vitaly Kuznetsov wrote:
>>>> I didn't investigate why it happens, setting xen_pvh=1 helped. Not sure
>>>> if it's related, but I see the following code in __gnttab_init():
>>>>
>>>> /* Delay grant-table initialization in the PV on HVM case */
>>>> if (xen_hvm_domain() && !xen_pvh_domain())
>>>> return 0;
>>>>
>>>> and gnttab_init() is later called in platform_pci_probe().
>>> But I guess this never happens in the PVH case because there's no Xen platform
>>> PCI device?
>>>
>>> Making the initialization of the grant tables conditional to the presence of
>>> the Xen platform PCI device seems wrong. The only thing needed for grant tables
>>> is a physical memory region. This can either be picked from unused physical
>>> memory (over 4GB to avoid collisions), or by freeing some RAM region.
>> That's because Linux HVM guests use PCI MMIO region for grant tables
>> (see platform_pci_probe()).
> There's no limitation in Xen that forces HVM guests to use the PCI MMIO hole of
> the Xen PCI device for the grant table. You can safely use a RAM region, or an
> unused physical range, probably above 4GB for safety. I'm not sure about what
> other things prevent booting a PVH guest using the same path as HVM, I guess
> the ACPI SCI interrupt is also one of them.
I think (hope?) using ACPI_IRQ_MODEL_PLATFORM for PVH guests takes care
of this.
>
> I wonder if it would make sense to announce using CPUID the things that differ
> from HVM (like the SCI over event channels), instead of simply advertising PVH.
> Boris, do you have a list of differences that prevent PVH from using the HVM
> code paths?
There isn't much, really. And most of them are discoverable already. For
example, we choose acpi_irq_model based on availability of IOAPICs,
which we find out by parsing MADT.
Similarly, for the problem at hand (lack of PCI platform device) we
should be able to just search PCI space and not find it, shouldn't we?
We may need to change order of how things are done.
-boris
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-03-21 15:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-20 18:20 [RFC] xen/pvh: detect PVH after kexec Vitaly Kuznetsov
2017-03-20 20:21 ` Boris Ostrovsky
2017-03-21 9:21 ` Vitaly Kuznetsov
2017-03-21 10:01 ` Roger Pau Monne
2017-03-21 10:07 ` Roger Pau Monne
2017-03-21 10:07 ` Jan Beulich
2017-03-21 10:21 ` Roger Pau Monne
2017-03-21 10:42 ` Jan Beulich
2017-03-21 10:59 ` Roger Pau Monne
2017-03-21 11:00 ` Andrew Cooper
2017-03-21 11:53 ` Vitaly Kuznetsov
2017-03-21 12:13 ` Roger Pau Monne
2017-03-21 14:05 ` Boris Ostrovsky
2017-03-21 14:16 ` Roger Pau Monne
2017-03-21 15:01 ` Boris Ostrovsky [this message]
2017-03-21 14:35 ` Vitaly Kuznetsov
2017-03-21 14:44 ` Vitaly Kuznetsov
2017-03-21 15:14 ` Boris Ostrovsky
2017-03-21 17:10 ` Vitaly Kuznetsov
2017-03-21 17:28 ` Roger Pau Monne
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=f7eb4a2d-0d4c-51a0-b23e-d2e0e33a5d7a@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=jgross@suse.com \
--cc=roger.pau@citrix.com \
--cc=vkuznets@redhat.com \
--cc=xen-devel@lists.xenproject.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).