Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1572482 > unrolled thread

Re: [PATCH v2 5/9] xen/pvh: Prevent PVH guests from using PIC, RTC and IOAPIC

Started byRoger Pau Monné <roger.pau@citrix.com>
First post2017-02-02 16:50 +0100
Last post2017-02-02 18:50 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2 5/9] xen/pvh: Prevent PVH guests from using PIC, RTC  and IOAPIC Roger Pau Monné <roger.pau@citrix.com> - 2017-02-02 16:50 +0100
    Re: [PATCH v2 5/9] xen/pvh: Prevent PVH guests from using PIC, RTC  and IOAPIC Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-02-02 17:30 +0100
      Re: [PATCH v2 5/9] xen/pvh: Prevent PVH guests from using PIC, RTC  and IOAPIC Roger Pau Monné <roger.pau@citrix.com> - 2017-02-02 18:10 +0100
        Re: [PATCH v2 5/9] xen/pvh: Prevent PVH guests from using PIC, RTC  and IOAPIC Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-02-02 18:50 +0100

#1572482 — Re: [PATCH v2 5/9] xen/pvh: Prevent PVH guests from using PIC, RTC and IOAPIC

FromRoger Pau Monné <roger.pau@citrix.com>
Date2017-02-02 16:50 +0100
SubjectRe: [PATCH v2 5/9] xen/pvh: Prevent PVH guests from using PIC, RTC and IOAPIC
Message-ID<t6rO2-5RR-27@gated-at.bofh.it>
On Thu, Jan 26, 2017 at 02:41:28PM -0500, Boris Ostrovsky wrote:
> Make sure they don't use these devices since they are not emulated
> for unprivileged PVH guest.

This description seems weird for what it's actually done. AFAICT you are not
really preventing the guest from using the PIC or the IO APIC, because this is
fetched from the MADT table (or should be fetched from there in any case).

See below for the RTC...

[...]
> @@ -1892,6 +1900,9 @@ static void __init xen_hvm_guest_init(void)
>  
>  	init_hvm_pv_info();
>  
> +	if (xen_pvh_domain())
> +		x86_platform.legacy.rtc = 0;

Can't you fetch that from the FADT boot flags field? (See "5.2.9.3 IA-PC Boot
Architecture Flags" in ACPI 6.1 spec).

Roger.

[toc] | [next] | [standalone]


#1572501

FromBoris Ostrovsky <boris.ostrovsky@oracle.com>
Date2017-02-02 17:30 +0100
Message-ID<t6sqK-6kI-15@gated-at.bofh.it>
In reply to#1572482
On 02/02/2017 10:35 AM, Roger Pau Monné wrote:
> On Thu, Jan 26, 2017 at 02:41:28PM -0500, Boris Ostrovsky wrote:
>> Make sure they don't use these devices since they are not emulated
>> for unprivileged PVH guest.
> This description seems weird for what it's actually done. AFAICT you are not
> really preventing the guest from using the PIC or the IO APIC, because this is
> fetched from the MADT table (or should be fetched from there in any case).

This was meant to say that we don't want to use ACPI_IRQ_MODEL_[IOA]PIC
since we don't support SCI (which is expected on x86 to be one of the two).

I'll re-word it.

>
> See below for the RTC...
>
> [...]
>> @@ -1892,6 +1900,9 @@ static void __init xen_hvm_guest_init(void)
>>  
>>  	init_hvm_pv_info();
>>  
>> +	if (xen_pvh_domain())
>> +		x86_platform.legacy.rtc = 0;
> Can't you fetch that from the FADT boot flags field? (See "5.2.9.3 IA-PC Boot
> Architecture Flags" in ACPI 6.1 spec).

Good point. In fact, I can drop this altogether because
acpi_parse_fadt() will do this for us.

-boris

[toc] | [prev] | [next] | [standalone]


#1572527

FromRoger Pau Monné <roger.pau@citrix.com>
Date2017-02-02 18:10 +0100
Message-ID<t6t3r-6OU-9@gated-at.bofh.it>
In reply to#1572501
On Thu, Feb 02, 2017 at 11:30:19AM -0500, Boris Ostrovsky wrote:
> On 02/02/2017 10:35 AM, Roger Pau Monné wrote:
> > On Thu, Jan 26, 2017 at 02:41:28PM -0500, Boris Ostrovsky wrote:
> >> Make sure they don't use these devices since they are not emulated
> >> for unprivileged PVH guest.
> > This description seems weird for what it's actually done. AFAICT you are not
> > really preventing the guest from using the PIC or the IO APIC, because this is
> > fetched from the MADT table (or should be fetched from there in any case).
> 
> This was meant to say that we don't want to use ACPI_IRQ_MODEL_[IOA]PIC
> since we don't support SCI (which is expected on x86 to be one of the two).

Hm, right. At some point (ie: when PCI-passthrough is implemented) we will be
providing an IO APIC and a SCI through it. Or would we rather always use the
event channel SCI?

Roger.

[toc] | [prev] | [next] | [standalone]


#1572546

FromBoris Ostrovsky <boris.ostrovsky@oracle.com>
Date2017-02-02 18:50 +0100
Message-ID<t6tG9-73H-17@gated-at.bofh.it>
In reply to#1572527
On 02/02/2017 11:40 AM, Roger Pau Monné wrote:
> On Thu, Feb 02, 2017 at 11:30:19AM -0500, Boris Ostrovsky wrote:
>> On 02/02/2017 10:35 AM, Roger Pau Monné wrote:
>>> On Thu, Jan 26, 2017 at 02:41:28PM -0500, Boris Ostrovsky wrote:
>>>> Make sure they don't use these devices since they are not emulated
>>>> for unprivileged PVH guest.
>>> This description seems weird for what it's actually done. AFAICT you are not
>>> really preventing the guest from using the PIC or the IO APIC, because this is
>>> fetched from the MADT table (or should be fetched from there in any case).
>> This was meant to say that we don't want to use ACPI_IRQ_MODEL_[IOA]PIC
>> since we don't support SCI (which is expected on x86 to be one of the two).
> Hm, right. At some point (ie: when PCI-passthrough is implemented) we will be
> providing an IO APIC and a SCI through it. Or would we rather always use the
> event channel SCI?

Staying closer to bare-metal (i.e. doing it via IOAPIC) might be better
but then this would always require IOAPIC for PVH (because we'd want to
use SCI for hotplug too, if we ever get there).

-boris

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web