From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: david.vrabel@citrix.com, JGross@suse.com,
linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org
Subject: Re: [PATCH 5/8] xen/pvh: Prevent PVH guests from using PIC, RTC and IOAPIC
Date: Wed, 26 Oct 2016 12:06:31 -0400 [thread overview]
Message-ID: <6ab88e87-0c3e-32c7-d3f3-d6c859cc477c@oracle.com> (raw)
In-Reply-To: <20161026151825.zqt4fpirqurllsii@mac>
On 10/26/2016 11:18 AM, Roger Pau Monné wrote:
> On Wed, Oct 26, 2016 at 10:50:21AM -0400, Boris Ostrovsky wrote:
>> On 10/26/2016 06:42 AM, Roger Pau Monné wrote:
>>> On Fri, Oct 14, 2016 at 02:05:15PM -0400, Boris Ostrovsky wrote:
>>>> Make sure they don't use these devices since they are not emulated
>>>> for unprivileged PVH guest.
>>>>
>>>> Also don't initialize hypercall page for them in init_hvm_pv_info()
>>>> since this has already been done.
>>>>
>>>> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>>>> ---
>>>> arch/x86/xen/enlighten.c | 24 +++++++++++++++++-------
>>>> 1 file changed, 17 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
>>>> index d38d568..6c1a330 100644
>>>> --- a/arch/x86/xen/enlighten.c
>>>> +++ b/arch/x86/xen/enlighten.c
>>>> @@ -1803,10 +1803,21 @@ static void __init init_hvm_pv_info(void)
>>>> minor = eax & 0xffff;
>>>> printk(KERN_INFO "Xen version %d.%d.\n", major, minor);
>>>>
>>>> - cpuid(base + 2, &pages, &msr, &ecx, &edx);
>>>> + xen_domain_type = XEN_HVM_DOMAIN;
>>>>
>>>> - pfn = __pa(hypercall_page);
>>>> - wrmsr_safe(msr, (u32)pfn, (u32)(pfn >> 32));
>>>> + /* PVH set up hypercall page earlier in xen_prepare_pvh() */
>>>> + if (xen_pvh_domain()) {
>>>> + pv_info.name = "Xen PVH";
>>>> +#ifdef CONFIG_ACPI
>>>> + /* No PIC or IOAPIC */
>>> Shouldn't this be fetched from the MADT ACPI table if ACPI is available
>>> (rsdp_paddr != 0 in start_info)?
>>
>> At this point we haven't parsed ACPI yet (with or without rsdp_paddr,
>> which we don't set anyway for domU) so we don't know whether we have PIC
>> or IOAPIC.
> I guess I'm missing something, but if we are providing ACPI tables to a PVH
> DomU rsdp_paddr should be set, or else we are failing to comply with our own
> start info specification.
acpi_find_root_pointer() searches low MB of memory for the RSDP
signature. This is standard ACPICA's method of finding it, I'd think
that FreeBSD does the same thing. And that's how a non-UEFI system is
expected to find it as required by the ACPI spec ("Root System
Description Pointer (RSDP)" section)
RSDP structure is placed at RSDP_ADDRESS (which is just under 1MB at
0xfffc0) by libxl__dom_load_acpi().
>
>> Having said that, I will probably remove this ("acpi_irq_model =
>> ACPI_IRQ_MODEL_PLATFORM", together with the comment) since I am working
>> on adding SCI support via an event channel and ACPI_IRQ_MODEL_PIC model,
>> which is default, seems to work OK.
> Hm, right, that might be an option.
I'd actually prefer not to use ACPI_IRQ_MODEL_PIC since it implies that
we have a PIC (which we don't). It just so happens that using it in
Linux works for PVH as well.
> Do you know how hardware-reduced ACPI
> implementations (which IIRC also don't have a SCI interrupt) deliver events
> to the OS? Or it's simply not possible in that case?
I believe you need _AEI object for that. At least that's what section
"4.1.1.1 GPIO-Signaled Events" suggests.
-boris
next prev parent reply other threads:[~2016-10-26 16:05 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 18:05 [PATCH 0/8] PVH v2 support Boris Ostrovsky
2016-10-14 18:05 ` [PATCH 1/8] xen/x86: Remove PVH support Boris Ostrovsky
2016-10-14 18:31 ` [Xen-devel] " Konrad Rzeszutek Wilk
2016-10-18 13:46 ` Juergen Gross
2016-10-18 14:45 ` Boris Ostrovsky
2016-10-18 15:33 ` Juergen Gross
2016-10-18 15:42 ` Boris Ostrovsky
2016-10-14 18:05 ` [PATCH 2/8] x86/head: Refactor 32-bit pgtable setup Boris Ostrovsky
2016-10-14 18:31 ` hpa
2016-10-14 18:44 ` Boris Ostrovsky
2016-10-14 19:04 ` hpa
2016-10-14 19:18 ` Boris Ostrovsky
2016-10-31 12:33 ` Boris Ostrovsky
2016-12-01 15:33 ` Boris Ostrovsky
2016-12-02 9:45 ` Ingo Molnar
2016-12-02 14:04 ` Boris Ostrovsky
2016-12-02 16:08 ` Ingo Molnar
2016-12-02 17:52 ` hpa
2016-12-02 19:49 ` Boris Ostrovsky
2016-12-03 5:49 ` Ingo Molnar
2016-12-03 6:36 ` hpa
2016-10-14 18:05 ` [PATCH 3/8] xen/pvh: Import PVH-related Xen public interfaces Boris Ostrovsky
2016-10-14 18:34 ` [Xen-devel] " Konrad Rzeszutek Wilk
2016-10-21 10:58 ` Juergen Gross
2016-10-14 18:05 ` [PATCH 4/8] xen/pvh: Bootstrap PVH guest Boris Ostrovsky
2016-10-14 18:38 ` [Xen-devel] " Andrew Cooper
2016-10-14 18:55 ` Boris Ostrovsky
2016-10-14 19:12 ` Andrew Cooper
2016-10-14 19:14 ` Konrad Rzeszutek Wilk
2016-10-14 19:34 ` Boris Ostrovsky
2016-10-14 18:05 ` [PATCH 5/8] xen/pvh: Prevent PVH guests from using PIC, RTC and IOAPIC Boris Ostrovsky
2016-10-14 19:16 ` [Xen-devel] " Konrad Rzeszutek Wilk
2016-10-14 19:37 ` Boris Ostrovsky
2016-10-26 10:42 ` Roger Pau Monné
2016-10-26 14:50 ` Boris Ostrovsky
2016-10-26 15:18 ` Roger Pau Monné
2016-10-26 16:06 ` Boris Ostrovsky [this message]
2016-10-14 18:05 ` [PATCH 6/8] xen/pvh: Initialize grant table for PVH guests Boris Ostrovsky
2016-10-14 19:19 ` [Xen-devel] " Konrad Rzeszutek Wilk
2016-10-14 19:43 ` Boris Ostrovsky
2016-10-14 19:51 ` Konrad Rzeszutek Wilk
2016-10-14 20:02 ` Boris Ostrovsky
2016-10-18 16:08 ` Juergen Gross
2016-10-18 16:40 ` Boris Ostrovsky
2016-10-19 5:47 ` Juergen Gross
2016-10-14 18:05 ` [PATCH 7/8] xen/pvh: PVH guests always have PV devices Boris Ostrovsky
2016-10-14 19:17 ` [Xen-devel] " Konrad Rzeszutek Wilk
2016-10-18 15:54 ` Juergen Gross
2016-10-14 18:05 ` [PATCH 8/8] xen/pvh: Enable CPU hotplug Boris Ostrovsky
2016-10-14 18:41 ` [Xen-devel] " Andrew Cooper
2016-10-14 19:01 ` Boris Ostrovsky
2016-10-27 14:25 ` Boris Ostrovsky
2016-10-27 15:00 ` Andrew Cooper
2016-10-27 16:23 ` Boris Ostrovsky
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=6ab88e87-0c3e-32c7-d3f3-d6c859cc477c@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=JGross@suse.com \
--cc=david.vrabel@citrix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roger.pau@citrix.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
all inboxes | Powered by JetHome®