[Xen-devel] [RFC Patch V1 06/12] PCI: Use for_pci_msi_entry() to access MSI device list

2015-07-09 Thread Jiang Liu
Use accessor for_pci_msi_entry() to access MSI device list, so we could easily move msi_list from struct pci_dev into struct device later. Signed-off-by: Jiang Liu --- drivers/pci/msi.c | 39 --- drivers/pci/xen-pcifront.c |2 +- 2 files

[Xen-devel] [RFC Patch V1 05/12] x86, PCI: Use for_pci_msi_entry() to access MSI device list

2015-07-09 Thread Jiang Liu
Use accessor for_pci_msi_entry() to access MSI device list, so we could easily move msi_list from struct pci_dev into struct device later. Signed-off-by: Jiang Liu --- arch/x86/pci/xen.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/pci/xen.c b/arch/x86

[Xen-devel] [Patch v3 27/36] x86, irq: Use access helper irq_data_get_affinity_mask()

2015-06-02 Thread Jiang Liu
Use access helper irq_data_get_affinity_mask() to hide implementation details of struct irq_desc. Signed-off-by: Jiang Liu --- Hi Thomas, This version changes the patch to correctly support bisecting. Thanks! Gerry --- arch/x86/kernel/apic/io_apic.c |2 +- arch/x86/kernel/apic

Re: [Xen-devel] [Patch v3 27/36] x86, irq: Use access helper irq_data_get_affinity_mask()

2015-06-02 Thread Jiang Liu
On 2015/6/3 3:19, Thomas Gleixner wrote: > On Mon, 1 Jun 2015, Jiang Liu wrote: > >> diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c >> index 9b62f690b0ff..dfa3a5f5b3d3 100644 >> --- a/arch/x86/kernel/apic/vector.c >> +++ b/arch/x86/ker

[Xen-devel] [Patch v3 27/36] x86, irq: Use access helper irq_data_get_affinity_mask()

2015-06-01 Thread Jiang Liu
Use access helper irq_data_get_affinity_mask() to hide implementation details of struct irq_desc. Signed-off-by: Jiang Liu --- arch/x86/kernel/apic/io_apic.c |2 +- arch/x86/kernel/apic/vector.c|5 ++--- arch/x86/kernel/irq.c|5 +++-- drivers/xen/events

[Xen-devel] [Patch v2 08/14] genirq: Introduce helper function irq_data_get_affinity_mask()

2015-05-20 Thread Jiang Liu
Introduce helper function irq_data_get_affinity_mask() and irq_get_affinity_mask() to hide implementation details, so we could move field 'affinity' from struct irq_data into struct irq_common_data later. Signed-off-by: Jiang Liu --- arch/alpha/kernel/irq.c |2 +-

[Xen-devel] [RFC v1 06/11] genirq: Introduce helper function irq_data_get_affinity_mask()

2015-05-03 Thread Jiang Liu
Introduce helper function irq_data_get_affinity_mask() and irq_get_affinity_mask() to hide implementation details, so we could move field 'affinity' from struct irq_data into struct irq_common_data later. Signed-off-by: Jiang Liu --- arch/alpha/kernel/irq.c |2 +-

[Xen-devel] [Patch v4 01/23] ACPICA: Resources: Provide common part for struct acpi_resource_address structures.

2015-02-04 Thread Jiang Liu
Build tests are passed with defconfig/allnoconfig/allyesconfig and defconfig+CONFIG_ACPI=n. Original-by: Thomas Gleixner Original-by: Jiang Liu Signed-off-by: Lv Zheng Signed-off-by: Jiang Liu --- arch/ia64/kernel/acpi-ext.c |6 ++-- arch/ia64/pci/pci.c | 14

[Xen-devel] [Patch v2 01/23] ACPICA: Resources: Provide common part for struct acpi_resource_address structures.

2015-02-01 Thread Jiang Liu
Build tests are passed with defconfig/allnoconfig/allyesconfig and defconfig+CONFIG_ACPI=n. Original-by: Thomas Gleixner Original-by: Jiang Liu Signed-off-by: Lv Zheng Signed-off-by: Jiang Liu --- arch/ia64/kernel/acpi-ext.c |6 ++-- arch/ia64/pci/pci.c | 14

[Xen-devel] [Patch v2 01/22] ACPICA: Resources: Provide common part for struct acpi_resource_address structures.

2015-01-28 Thread Jiang Liu
Build tests are passed with defconfig/allnoconfig/allyesconfig and defconfig+CONFIG_ACPI=n. Original-by: Thomas Gleixner Original-by: Jiang Liu Signed-off-by: Lv Zheng Signed-off-by: Jiang Liu --- arch/ia64/kernel/acpi-ext.c |6 ++-- arch/ia64/pci/pci.c | 14

[Xen-devel] [Resend Patch v4 12/16] smp, x86: Kill SMP single function call interrupt

2015-01-22 Thread Jiang Liu
interfaces, so kill the redundant single function call interrupt. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Steven Rostedt Signed-off-by: Jiang Liu --- arch/x86/include/asm/entry_arch.h|1 - arch/x86/include/asm/hw_irq.h|3 --- arch/x86/include/asm/irq_vectors.h

[Xen-devel] [Resend Patch v4 11/16] smp, x86, xen: Kill SMP single function call interrupt

2015-01-22 Thread Jiang Liu
interfaces, so kill the redundant single function call interrupt. Signed-off-by: Jiang Liu Acked-by: Konrad Rzeszutek Wilk Cc: x...@kernel.org Cc: xen-de...@lists.xensource.com Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Jiang Liu --- arch/x86/include/asm/xen/events.h |1 - ar

[Xen-devel] [Bugfix 3/3] xen/irq: Override ACPI IRQ management callback __acpi_unregister_gsi

2015-01-19 Thread Jiang Liu
. Signed-off-by: Jiang Liu Tested-by: Sander Eikelenboom --- arch/x86/include/asm/acpi.h |1 + arch/x86/pci/xen.c |2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h index 0ab4f9fd2687..3a45668f6dc3 100644 --- a/arch/x86

[Xen-devel] [Bugfix 1/3] xen/pci: Kill function xen_setup_acpi_sci()

2015-01-19 Thread Jiang Liu
e change, there's no need for xen_setup_acpi_sci() anymore. The above change also works with bare metal kernel too. Signed-off-by: Jiang Liu Tested-by: Sander Eikelenboom --- arch/x86/kernel/acpi/boot.c | 26 arch/x86/pci/xen.c | 47 --

Re: [Xen-devel] [Bugfix 0/3] Fix regressions in Xen IRQ management

2015-01-19 Thread Jiang Liu
+ 3 of this series: > - powerbutton is still working as expected due to apic v4 series > - videostream from passed through device is stable again, so that's > good ! > > > So to summarize: > The reported problems are fixed, everything looks goo

[Xen-devel] [Bugfix 2/3] xen/irq: Override ACPI IRQ management callback __acpi_unregister_gsi

2015-01-18 Thread Jiang Liu
. Signed-off-by: Jiang Liu --- arch/x86/include/asm/acpi.h |1 + arch/x86/pci/xen.c |2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h index 0ab4f9fd2687..3a45668f6dc3 100644 --- a/arch/x86/include/asm/acpi.h +++ b/arch

Re: [Xen-devel] [Bugfix v4 1/2] xen/pci: Fix xen IRQ allocation failure caused by commit b81975eade8c

2015-01-18 Thread Jiang Liu
On 2015/1/17 2:13, Konrad Rzeszutek Wilk wrote: > On Thu, Jan 15, 2015 at 09:04:35PM +0800, Jiang Liu wrote: >> >> Note: we need to test this patch on those special AMD systems which >> override normal SCI GSI (9) with strange GSI (20). > > [0.00] DMI: Superm

Re: [Xen-devel] [Bugfix v4 1/2] xen/pci: Fix xen IRQ allocation failure caused by commit b81975eade8c

2015-01-18 Thread Jiang Liu
On 2015/1/17 2:13, Konrad Rzeszutek Wilk wrote: > On Thu, Jan 15, 2015 at 09:04:35PM +0800, Jiang Liu wrote: >> >> Note: we need to test this patch on those special AMD systems which >> override normal SCI GSI (9) with strange GSI (20). > > [0.00] DMI: Superm

[Xen-devel] [Bugfix v4 2/2] xen/pci: Simplify x86/pci/xen.c by killing gsi_override related code

2015-01-15 Thread Jiang Liu
There's no use of gsi_override related logic anymore, so kill code related to gsi_override. Signed-off-by: Jiang Liu --- arch/x86/pci/xen.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c index 6e5e89c

[Xen-devel] [Bugfix v4 1/2] xen/pci: Fix xen IRQ allocation failure caused by commit b81975eade8c

2015-01-15 Thread Jiang Liu
p_acpi_sci() anymore. The above change also works with bare metal kernel too. Note: we need to test this patch on those special AMD systems which override normal SCI GSI (9) with strange GSI (20). Signed-off-by: Jiang Liu --- arch/x86/kernel/acpi/boot.c | 26 +++

Re: [Xen-devel] 3.19-rc4: Xen pci-passthrough regression, bisected to commit cffe0a2b5a34c95a4dadc9ec7132690a5b0f6687 "x86, irq: Keep balance of IOAPIC pin reference count"

2015-01-15 Thread Jiang Liu
Hi Sander, It really cost me some time to understand HVM, PVH, Dom0, PV and read Xen interrupt related code:( Now I have basic understanding of related staffs. The patch for previous issue is actually wrong and I'm working on another fixes for it. I will handle this issue once getting done

Re: [Xen-devel] [PATCH v2] [Bugfix] x86/apic: Fix xen IRQ allocation failure caused by commit b81975eade8c

2015-01-13 Thread Jiang Liu
On 2015/1/13 18:09, David Vrabel wrote: > 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") >>>> br

Re: [Xen-devel] [PATCH v2] [Bugfix] x86/apic: Fix xen IRQ allocation failure caused by commit b81975eade8c

2015-01-12 Thread Jiang Liu
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 n

[Xen-devel] [PATCH v2] [Bugfix] x86/apic: Fix xen IRQ allocation failure caused by commit b81975eade8c

2015-01-12 Thread Jiang Liu
_cpus() to call setup_IO_APIC() to initialize irqdomain for IOAPICs. Signed-off-by: Jiang Liu --- Hi Sander, Could you please help to test this patch against 3.19-rc3? I have reworked it based Konrad's suggestions. Thanks! Gerry --- arch/x86/kernel/apic/io_apic.c | 31 +

Re: [Xen-devel] [Bugfix] x86/apic: Fix xen IRQ allocation failure caused by commit b81975eade8c

2015-01-07 Thread Jiang Liu
On 2015/1/7 23:44, Konrad Rzeszutek Wilk wrote: > On Wed, Jan 07, 2015 at 11:37:52PM +0800, Jiang Liu wrote: >> On 2015/1/7 22:50, Konrad Rzeszutek Wilk wrote: >>> On Wed, Jan 07, 2015 at 02:13:49PM +0800, Jiang Liu wrote: >>>> Commit b81975eade8c ("x86, irq:

Re: [Xen-devel] [Bugfix] x86/apic: Fix xen IRQ allocation failure caused by commit b81975eade8c

2015-01-07 Thread Jiang Liu
On 2015/1/7 22:50, Konrad Rzeszutek Wilk wrote: > On Wed, Jan 07, 2015 at 02:13:49PM +0800, Jiang Liu wrote: >> Commit b81975eade8c ("x86, irq: Clean up irqdomain transition code") >> breaks xen IRQ allocation because xen_smp_prepare_cpus() doesn't invoke >&g

[Xen-devel] [Bugfix] x86/apic: Fix xen IRQ allocation failure caused by commit b81975eade8c

2015-01-06 Thread Jiang Liu
_cpus() to call setup_IO_APIC() to initialize irqdomain for IOAPICs. Signed-off-by: Jiang Liu Reported-and-tested-by: Sander Eikelenboom Cc: Konrad Rzeszutek Wilk --- Hi all, This patch should be backported to v3.17, but there are conflicts. So I will send backported patch to 3.17/3.18 stable tree

Re: [Xen-devel] Bisected Linux regression: ACPI powerbutton events don't work under Xen since commit b81975eade8c6495f3c4d6746d22bdc95f617777

2014-12-19 Thread Jiang Liu
1 is the first bad commit > commit b81975eade8c6495f3c4d6746d22bdc95f61 > Author: Jiang Liu > Date: Mon Jun 9 16:20:11 2014 +0800 > > x86, irq: Clean up irqdomain transition code > > Now we have completely switched to irqdomain, so clean up transition code > in IOAPIC drivers. >

Re: [Xen-devel] Bisected Linux regression: ACPI powerbutton events don't work under Xen since commit b81975eade8c6495f3c4d6746d22bdc95f617777

2014-12-19 Thread Jiang Liu
> > b81975eade8c6495f3c4d6746d22bdc95f61 is the first bad commit > commit b81975eade8c6495f3c4d6746d22bdc95f61 > Author: Jiang Liu > Date: Mon Jun 9 16:20:11 2014 +0800 > > x86, irq: Clean up irqdomain transition code > > Now we have comple

Re: [Xen-devel] Bisected Linux regression: ACPI powerbutton events don't work under Xen since commit b81975eade8c6495f3c4d6746d22bdc95f617777

2014-12-19 Thread Jiang Liu
> > On baremetal everything works fine, acpid gets the event and the > machine powers down perfectly. The machine is an Intel NUC. > > Bisection has lead to: > > b81975eade8c6495f3c4d6746d22bdc95f61 is the first bad commit > commit b81975eade8c6495f3c4d6746d22bdc95f61

[Xen-devel] [RFC Part4 v1 11/17] PCI, MSI: Rename __read_msi_msg() as __pci_read_msi_msg()

2014-11-09 Thread Jiang Liu
Rename __read_msi_msg() as __pci_read_msi_msg() and kill unused read_msi_msg(). It's a preparation to separate generic MSI code from PCI core. Signed-off-by: Jiang Liu --- arch/powerpc/platforms/pseries/msi.c |2 +- arch/x86/pci/xen.c |2 +- drivers/pci/

[Xen-devel] [RFC Part4 v1 12/17] PCI, MSI: Rename __write_msi_msg() as __pci_write_msi_msg()

2014-11-09 Thread Jiang Liu
Rename __write_msi_msg() as __pci_write_msi_msg() to mark it as PCI specific. Also define pci_write_msi_msg() as write_msi_msg() for easy transition. Signed-off-by: Jiang Liu --- arch/x86/pci/xen.c |2 +- drivers/pci/msi.c |9 - include/linux/msi.h |3 ++- 3 files changed