lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54B4EEC5.1090107@citrix.com>
Date:	Tue, 13 Jan 2015 10:09:09 +0000
From:	David Vrabel <david.vrabel@...rix.com>
To:	Jiang Liu <jiang.liu@...ux.intel.com>,
	David Vrabel <david.vrabel@...rix.com>,
	Sander Eikelenboom <linux@...elenboom.it>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, <x86@...nel.org>,
	Boris Ostrovsky <boris.ostrovsky@...cle.com>,
	Grant Likely <grant.likely@...aro.org>,
	Yinghai Lu <yinghai@...nel.org>
CC:	<xen-devel@...ts.xenproject.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [Xen-devel] [PATCH v2] [Bugfix] x86/apic: Fix xen IRQ allocation
 failure caused by commit b81975eade8c

On 13/01/15 02:23, Jiang Liu wrote:
> On 2015/1/12 23:01, David Vrabel wrote:
>> On 12/01/15 13:39, Jiang Liu wrote:
>>> Commit b81975eade8c ("x86, irq: Clean up irqdomain transition code")
>>> breaks xen IRQ allocation because xen_smp_prepare_cpus() doesn't invoke
>>> setup_IO_APIC(), so no irqdomains created for IOAPICs and
>>> mp_map_pin_to_irq() fails at the very beginning.
>>>
>>> Enhance xen_smp_prepare_cpus() to call setup_IO_APIC() to initialize
>>> irqdomain for IOAPICs.
>>
>> Having Xen call setup_IO_APIC() to initialize the irq domains then having to
>> add special cases to it is just wrong.
>>
>> The bits of init deferred by mp_register_apic() are also deferred to
>> two different places which looks odd.
>>
>> What about something like the following (untested) patch?
> Hi David,
> 	Really appreciate your suggestions about Xen IOAPIC:)
> Your patch solves the issue, but it will break a coming patch
> set to enable hierarchy irqdomain on x86.

For 3.19 I would recommend this patch.  Since it's been tested and it's
pretty small.  Can you spin a version of this with a proper changelog.
please?

> 	To enable hierarchy irqdomain on x86, need to build
> irqdomains in following order:
> 1) create irqdomain for CPU vector domain
> 2) create irqdomains for interrupt remapping unit if interrupt
>    remapping is enabled.
> 3) create irqdomains for IOAPIC/MSI/HPET etc.
> 
> Function arch_early_ioapic_init() is called before initializing
> interrupt remapping subsystem. So creating IOAPIC irqdomains in
> arch_early_ioapic_init() will break hierarchy irqdomain with
> interrupt remapping enabled. I will post the x86 hierarchy
> irqdomain patch soon.
> 
> So could you please help to advice on:

I don't know enough about this area to comment on these authoritatively
and I don't have time to look into this in more detail right now, but to
the best of my understanding.

> 1) Is IOAPIC irqdomain needed for PV?

PV dom0 only requires a mechanism to obtain properties of the IOAPIC
interrupt lines.  The actual physical interrupts are delivered to the
hypervisor.  It doesn't require any of the irq setup.

> 2) Is IOAPIC irqdomain needed for HVM?

Yes.

> 3) Is IOAPIC irqdomain needed for Dom0?


See (1) above.

> 4) What's the proper hook point to create IOAPIC irqdomain for Xen
>    UP systems?

Don't know.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ