Re: [Xen-devel] [PATCH 1/1] hw/intc/arm_gicv3_its: Fix the VM termination in vm_change_state_handler()

2017-11-03 Thread Shanker Donthineni
Thanks Julien, sorry for sending to XEN mailing list and it was my mistake. Thanks, Shanker -Original Message- From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of Julien Grall Sent: Friday, November 3, 2017 6:51 AM To: Shanker Donthineni ; xen-devel ; Julien Grall

[Xen-devel] [PATCH 1/1] hw/intc/arm_gicv3_its: Fix the VM termination in vm_change_state_handler()

2017-11-03 Thread Shanker Donthineni
ET_DEVICE_ATTR failed: Group 4 attr 0x0000000001' Signed-off-by: Shanker Donthineni --- hw/intc/arm_gicv3_its_kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c index 39903d5..9b00ce5 100644 --- a/hw/int

Re: [Xen-devel] [PATCH for-4.9] xen/arm: acpi: Map MMIO on fault in stage-2 page table for the hardware domain

2017-03-30 Thread Shanker Donthineni
Hi Julien, On 03/30/2017 07:58 AM, Julien Grall wrote: > > On 30/03/17 13:52, Shanker Donthineni wrote: >> Hi Julien, > Hi Shanker, > >> On 03/30/2017 07:43 AM, Julien Grall wrote: >>> Shanker: You mentioned offline that you tested the patch. May I add >&

Re: [Xen-devel] [PATCH for-4.9] xen/arm: acpi: Map MMIO on fault in stage-2 page table for the hardware domain

2017-03-30 Thread Shanker Donthineni
nd provide feedback on missing features. > > All the code is gated by !acpi_disabled and therefore will not be > executed on when using Device Tree. > > RM hat on: I will leave the decision to Stefano. > > Shanker: You mentioned offline that you tested the pat

Re: [Xen-devel] [PATCH v2 14/27] ARM: vGICv3: introduce basic ITS emulation bits

2017-03-16 Thread Shanker Donthineni
+ if ( info->dabt.size != DABT_WORD ) goto bad_width; > +*r = vgic_reg32_extract(its->enabled | BIT(31), info); > + break; > +case VREG32(GITS_IIDR): > +if ( info->dabt.size != DABT_WORD ) goto bad_width; > +*r = vgic_reg32_extract(GITS_IID

Re: [Xen-devel] [PATCH v2 05/27] ARM: GICv3 ITS: introduce ITS command handling

2017-03-16 Thread Shanker Donthineni
((0x3UL << GITS_BASER_SHAREABILITY_SHIFT) | \ > (0x7UL << GITS_BASER_OUTER_CACHEABILITY_SHIFT) | \ > @@ -184,22 +326,59 @@ retry: > return -EINVAL; > } > > +/* > + * Before an ITS gets initialized, it should be in a

Re: [Xen-devel] [PATCH 09/28] ARM: GICv3 ITS: map device and LPIs to the ITS on physdev_op hypercall

2017-03-01 Thread Shanker Donthineni
Hi Julien, On 02/28/2017 12:29 PM, Julien Grall wrote: On 27/02/17 17:20, Andre Przywara wrote: Hi, Hi Andre, On 24/02/17 19:57, Shanker Donthineni wrote: Hi Julien, On 01/31/2017 10:18 AM, Julien Grall wrote: On 31/01/17 16:02, Jaggi, Manish wrote: On 1/31/2017 8:47 PM, Julien

Re: [Xen-devel] xen/arm: Hiding SMMUs from Dom0 when using ACPI on Xen

2017-02-27 Thread Shanker Donthineni
unique ID. In case of direct VLPI, LPI number has to be programmed whenever dom0/domU calls the MAPTI command but not at the time of PCIe device creation. -- Shanker Donthineni Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies,

Re: [Xen-devel] [PATCH 09/28] ARM: GICv3 ITS: map device and LPIs to the ITS on physdev_op hypercall

2017-02-24 Thread Shanker Donthineni
hardware_domain, devid, devid, size + 1, + valid); +if (ret < 0) + return ret; + -- Shanker Donthineni Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Auro

Re: [Xen-devel] [PATCH 07/28] ARM: GICv3 ITS: introduce device mapping

2017-02-24 Thread Shanker Donthineni
r = _xmalloc(BIT(bits) * hw_its->itte_size, 256); Please use _xzalloc() to avoid potential issues with ITS hardware prefetching feature. -- Shanker Donthineni Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the C

Re: [Xen-devel] [PATCH 04/28] ARM: GICv3 ITS: allocate device and collection table

2017-02-24 Thread Shanker Donthineni
Hi Andre On 02/16/2017 01:03 PM, Shanker Donthineni wrote: Hi Andre, On 01/30/2017 12:31 PM, Andre Przywara wrote: Each ITS maps a pair of a DeviceID (usually the PCI b/d/f triplet) and an EventID (the MSI payload or interrupt ID) to a pair of LPI number and collection ID, which points to

Re: [Xen-devel] [PATCH 04/28] ARM: GICv3 ITS: allocate device and collection table

2017-02-16 Thread Shanker Donthineni
lize the host structures for LPIs. */ +/* Initialize the host structures for LPIs and the host ITSes. */ int gicv3_lpi_init_host_lpis(unsigned int nr_lpis); +int gicv3_its_init(struct host_its *hw_its); #else @@ -62,6 +111,10 @@ static inline int gicv3_lpi_init_host_lpis(unsigned int nr_lpis)

Re: [Xen-devel] [PATCH 15/28] ARM: vGICv3: introduce basic ITS emulation bits

2017-02-15 Thread Shanker Donthineni
= vgic_reg64_extract(0x1eff1, info); Why GITS_TYPER is hard-coded here? For DOM0, at least MOVP, ID_bits and Devbits fields should be same as hardware otherwise MSI(x) feature fails for some devices. Shanker Donthineni Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Te

Re: [Xen-devel] [PATCH 04/28] ARM: GICv3 ITS: allocate device and collection table

2017-02-15 Thread Shanker Donthineni
st ITSes. */ int gicv3_lpi_init_host_lpis(unsigned int nr_lpis); +int gicv3_its_init(struct host_its *hw_its); #else @@ -62,6 +111,10 @@ static inline int gicv3_lpi_init_host_lpis(unsigned int nr_lpis) { return 0; } +static inline int gicv3_its_init(struct host_its *hw_its) +{ +r

Re: [Xen-devel] [PATCH] arm/acpi: hide watchdog timer in GTDT table for dom0

2016-11-30 Thread Shanker Donthineni
issue and update the results to you by end of this week. Thanks, Shanker -- Shanker Donthineni Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Pr

Re: [Xen-devel] [PATCH] arm/acpi: hide watchdog timer in GTDT table for dom0

2016-11-30 Thread Shanker Donthineni
Hi Julien, On 11/30/2016 08:31 AM, Shanker Donthineni wrote: Hi Julien, On 11/30/2016 04:29 AM, Julien Grall wrote: Hi Shanker, On 29/11/2016 02:59, Shanker Donthineni wrote: Either we have to hide the watchdog timer section in GTDT or emulate watchdog timer block for dom0. Otherwise

Re: [Xen-devel] [PATCH] arm/acpi: hide watchdog timer in GTDT table for dom0

2016-11-30 Thread Shanker Donthineni
Hi Julien, On 11/30/2016 04:29 AM, Julien Grall wrote: Hi Shanker, On 29/11/2016 02:59, Shanker Donthineni wrote: Either we have to hide the watchdog timer section in GTDT or emulate watchdog timer block for dom0. Otherwise, system gets panic when dom0 accesses its MMIO registers. The

[Xen-devel] [PATCH] arm/acpi: hide watchdog timer in GTDT table for dom0

2016-11-28 Thread Shanker Donthineni
ff-by: Shanker Donthineni --- xen/arch/arm/domain_build.c | 41 + xen/include/asm-arm/acpi.h | 1 + 2 files changed, 42 insertions(+) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index e8a400c..611c803 100644 --- a/xen/arc

Re: [Xen-devel] [PATCH v2 5/6] xen/arm: traps: Avoid unnecessary VA -> IPA translation in abort handlers

2016-08-17 Thread Shanker Donthineni
On 08/17/2016 06:11 AM, Julien Grall wrote: On 17/08/16 03:19, Shanker Donthineni wrote: Hi Julien, Hello Shanker, On 07/27/2016 12:09 PM, Julien Grall wrote: Translating a VA to a IPA is expensive. Currently, Xen is assuming that HPFAR_EL2 is only valid when the stage-2 data/instruction

Re: [Xen-devel] [RFC 00/22] xen/arm: Rework the P2M code to follow break-before-make sequence

2016-08-16 Thread Shanker Donthineni
Hi Julien, I have verified this patch series on Qualcomm Server platform QDF2XXX without any issue. Tested-by: Shanker Donthineni On 08/15/2016 10:06 AM, Edgar E. Iglesias wrote: On Thu, Jul 28, 2016 at 03:51:23PM +0100, Julien Grall wrote: Hello all, The ARM architecture mandates the

Re: [Xen-devel] [PATCH v2 5/6] xen/arm: traps: Avoid unnecessary VA -> IPA translation in abort handlers

2016-08-16 Thread Shanker Donthineni
-2451,7 +2467,7 @@ static void do_trap_data_abort_guest(struct cpu_user_regs *regs, return; /* Try again */ } -switch ( dabt.dfsc & ~FSC_LL_MASK ) +switch ( fsc ) { case FSC_FLT_PERM: { -- Shanker Donthineni Qualcomm Datacenter Technologies, Inc.

[Xen-devel] [PATCH V3 2/4] xen: Add generic implementation of binary search

2016-07-20 Thread Shanker Donthineni
This patch adds the generic implementation of binary search algorithm which is copied from Linux kernel v4.7-rc7. No functional changes. Signed-off-by: Shanker Donthineni Reviewed-by: Andrew Cooper Reviewed-by: Julien Grall --- Changes since v2: Fixed the compilation issue due to a missing

[Xen-devel] [PATCH V3 0/4] Change fixed mmio handlers to a variable number

2016-07-20 Thread Shanker Donthineni
allocation strategy to allocate memory resource dynamically depends on the number of Redistributor regions that are described in the APCI MADT table. Shanker Donthineni (4): arm/io: Use separate memory allocation for mmio handlers xen: Add generic implementation of binary search xen/arm: io: Use

[Xen-devel] [PATCH V3 3/4] xen/arm: io: Use binary search for mmio handler lookup

2016-07-20 Thread Shanker Donthineni
change from linear (complexity O(n)) to a binary search (complexity O(log n) for reducing mmio handler lookup overhead. Signed-off-by: Shanker Donthineni --- xen/arch/arm/io.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/xen/arch/arm

[Xen-devel] [PATCH V3 1/4] arm/io: Use separate memory allocation for mmio handlers

2016-07-20 Thread Shanker Donthineni
dynamically during domain build. This patch uses the dynamic allocation strategy to reduce memory footprint for 'struct domain' instead of static allocation. Signed-off-by: Shanker Donthineni Acked-by: Julien Grall --- xen/arch/arm/domain.c | 6 -- xen/arch/arm/io.c

[Xen-devel] [PATCH V3 4/4] arm/vgic: Change fixed number of mmio handlers to variable number

2016-07-20 Thread Shanker Donthineni
: domain_vgic_register(&count) domain_io_init(count + MAX_IO_HANDLER) domain_vgic_init() Signed-off-by: Shanker Donthineni --- xen/arch/arm/domain.c | 12 +++- xen/arch/arm/vgic-v2.c | 3 ++- xen/arch/arm/vgic-v3.c | 5 - xen/arch/arm/vgic.c| 10 +++--- xen/inc

[Xen-devel] [PATCH V2 3/4] xen/arm: io: Use binary search for mmio handler lookup

2016-07-17 Thread Shanker Donthineni
change from linear (complexity O(n)) to a binary search (complexity O(log n) for reducing mmio handler lookup overhead. Signed-off-by: Shanker Donthineni --- xen/arch/arm/io.c | 39 --- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/xen/arch/arm

[Xen-devel] [PATCH V2 1/4] arm/io: Use separate memory allocation for mmio handlers

2016-07-17 Thread Shanker Donthineni
dynamically during domain build. This patch uses the dynamic allocation strategy to reduce memory footprint for 'struct domain' instead of static allocation. Signed-off-by: Shanker Donthineni Acked-by: Julien Grall --- xen/arch/arm/domain.c | 6 -- xen/arch/arm/io.c

[Xen-devel] [PATCH V2 2/4] xen: Add generic implementation of binary search

2016-07-17 Thread Shanker Donthineni
This patch adds the generic implementation of binary search algorithm whcih is copied from Linux kernel v4.7-rc7. No functional changes. Signed-off-by: Shanker Donthineni Reviewed-by: Andrew Cooper --- Changes since v1: Removed the header file xen/include/xen/bsearch.h. Defined function

[Xen-devel] [PATCH V2 0/4] Change fixed mmio handlers to a variable number

2016-07-17 Thread Shanker Donthineni
allocation strategy to allocate memory resource dynamically depends on the number of Redistributor regions that are described in the APCI MADT table. Shanker Donthineni (4): arm/io: Use separate memory allocation for mmio handlers xen: Add generic implementation of binary search xen/arm: io: Use

[Xen-devel] [PATCH V2 4/4] arm/vgic: Change fixed number of mmio handlers to variable number

2016-07-17 Thread Shanker Donthineni
: domain_vgic_register(&count) domain_io_init(count + MAX_IO_HANDLER) domain_vgic_init() Signed-off-by: Shanker Donthineni --- xen/arch/arm/domain.c | 12 +++- xen/arch/arm/vgic-v2.c | 3 ++- xen/arch/arm/vgic-v3.c | 5 - xen/arch/arm/vgic.c| 10 +++--- xen/inc

Re: [Xen-devel] [PATCH RESEND 2/4] xen: Add generic implementation of binary search

2016-07-15 Thread Shanker Donthineni
Hi Andrew, On 07/15/2016 12:42 PM, Andrew Cooper wrote: On 15/07/16 18:35, Shanker Donthineni wrote: This patch adds the generic implementation of binary search algorithm whcih is copied from Linux kernel v4.7-rc7. No functional changes. Signed-off-by: Shanker Donthineni --- Resend to fix

[Xen-devel] [PATCH RESEND 3/4] xen/arm: io: Use binary search for mmio handler lookup

2016-07-15 Thread Shanker Donthineni
change from linear (complexity O(n)) to a binary search (complexity O(log n) for reducing mmio handler lookup overhead. Signed-off-by: Shanker Donthineni --- Resend to fix the In-Reply-To/References header feilds. xen/arch/arm/io.c | 40 +--- 1 file changed, 25

[Xen-devel] [PATCH RESEND 1/4] arm/io: Use separate memory allocation for mmio handlers

2016-07-15 Thread Shanker Donthineni
dynamically during domain build. This patch uses the dynamic allocation strategy to reduce memory footprint for 'struct domain' instead of static allocation. Signed-off-by: Shanker Donthineni Acked-by: Julien Grall --- Resend to fix the In-Reply-To/References header feilds. xe

[Xen-devel] [PATCH RESEND 4/4] arm/vgic: Change fixed number of mmio handlers to variable number

2016-07-15 Thread Shanker Donthineni
: domain_vgic_register(&count) domain_io_init(count + MAX_IO_HANDLER) domain_vgic_init() Signed-off-by: Shanker Donthineni --- Resend to fix the In-Reply-To/References header fields. xen/arch/arm/domain.c | 12 +++- xen/arch/arm/vgic-v2.c | 3 ++- xen/arch/arm/vgic-v3.c

[Xen-devel] [PATCH RESEND 0/4] Change fixed mmio handlers to a variable number

2016-07-15 Thread Shanker Donthineni
allocation strategy to allocate memory resource dynamically depends on the number of Redistributor regions that are described in the APCI MADT table. Shanker Donthineni (4): arm/io: Use separate memory allocation for mmio handlers xen: Add generic implementation of binary search xen/arm: io: Use

[Xen-devel] [PATCH RESEND 2/4] xen: Add generic implementation of binary search

2016-07-15 Thread Shanker Donthineni
This patch adds the generic implementation of binary search algorithm whcih is copied from Linux kernel v4.7-rc7. No functional changes. Signed-off-by: Shanker Donthineni --- Resend to fix the In-Reply-To/References header feilds. xen/common/Makefile | 1 + xen/common/bsearch.c

Re: [Xen-devel] [PATCH 0/4] Change fixed mmio handlers to a variable number

2016-07-15 Thread Shanker Donthineni
. Sorry for asking more things, I am still leaning the XEN upstream guidelines. Please guide me how do I fix the issue 'thread the series' that you are talking. -- Shanker Donthineni Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technol

[Xen-devel] [PATCH 4/4] arm/vgic: Change fixed number of mmio handlers to variable number

2016-07-15 Thread Shanker Donthineni
: domain_vgic_register(&count) domain_io_init(count + MAX_IO_HANDLER) domain_vgic_init() Signed-off-by: Shanker Donthineni --- xen/arch/arm/domain.c | 12 +++- xen/arch/arm/vgic-v2.c | 3 ++- xen/arch/arm/vgic-v3.c | 5 - xen/arch/arm/vgic.c| 10 +++--- xen/inc

[Xen-devel] [PATCH 3/4] xen/arm: io: Use binary search for mmio handler lookup

2016-07-15 Thread Shanker Donthineni
change from linear (complexity O(n)) to a binary search (complexity O(log n) for reducing mmio handler lookup overhead. Signed-off-by: Shanker Donthineni --- xen/arch/arm/io.c | 40 +--- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/xen/arch/arm

[Xen-devel] [PATCH 0/4] Change fixed mmio handlers to a variable number

2016-07-15 Thread Shanker Donthineni
allocation strategy to allocate memory resource dynamically depends on the number of Redistributor regions that are described in the APCI MADT table. Shanker Donthineni (4): arm/io: Use separate memory allocation for mmio handlers xen: Add generic implementation of binary search xen/arm: io: Use

[Xen-devel] [PATCH 1/4] arm/io: Use separate memory allocation for mmio handlers

2016-07-15 Thread Shanker Donthineni
dynamically during domain build. This patch uses the dynamic allocation strategy to reduce memory footprint for 'struct domain' instead of static allocation. Signed-off-by: Shanker Donthineni Acked-by: Julien Grall --- xen/arch/arm/domain.c | 6 -- xen/arch/arm/io.c

[Xen-devel] [PATCH 2/4] xen: Add generic implementation of binary search

2016-07-15 Thread Shanker Donthineni
This patch adds the generic implementation of binary search algorithm whcih is copied from Linux kernel v4.7-rc7. No functional changes. Signed-off-by: Shanker Donthineni --- xen/common/Makefile | 1 + xen/common/bsearch.c | 51 +++ xen

Re: [Xen-devel] [PATCH V4 10/11] xen/arm: io: Use binary search for mmio handler lookup

2016-07-15 Thread Shanker Donthineni
*vmmio = &d->arch.vmmio; struct mmio_handler *handler; /* Don't allow overlap regions */ BUG_ON(find_mmio_handler(d, addr); BUG_ON(find_mmio_handler(d, addr + size - 1); BUG_ON(vmmio->num_entries >= vmmio->max_num_entries); -- Shanker Donthineni Qualcomm Da

Re: [Xen-devel] [PATCH V4 10/11] xen/arm: io: Use binary search for mmio handler lookup

2016-07-14 Thread Shanker Donthineni
Hi Julien, On 07/14/2016 11:46 AM, Julien Grall wrote: Hi Shanker, On 14/07/16 17:18, Shanker Donthineni wrote: As the number of I/O handlers increase, the overhead associated with linear lookup also increases. The system might have maximum of 144 (assuming CONFIG_NR_CPUS=128) mmio handlers

Re: [Xen-devel] [PATCH v2 0/9] xen/arm: Support SPIs routing

2016-07-14 Thread Shanker Donthineni
Hi Julien, Tested-by: Shanker Donthineni I have tested this patchset on Qualcomm Technologies QDF2XXX server platform without any issue. On 07/14/2016 11:21 AM, Julien Grall wrote: Hello all, Currently, Xen does not route SPIs to DOM0 when ACPI is inuse after the functionality has been

[Xen-devel] [PATCH V4 09/11] xen: Add generic implementation of binary search

2016-07-14 Thread Shanker Donthineni
This patch adds the generic implementation of binary search algorithm whcih is copied from Linux kernel. Only coding style changes to match the general XEN coding style. No functional changes. Signed-off-by: Shanker Donthineni --- xen/common/Makefile | 1 + xen/common/bsearch.c | 52

[Xen-devel] [PATCH V4 10/11] xen/arm: io: Use binary search for mmio handler lookup

2016-07-14 Thread Shanker Donthineni
change from linear (complexity O(n)) to a binary search (complexity O(log n) for reducing mmio handler lookup overhead. Signed-off-by: Shanker Donthineni --- Changes since v3: Moved the function bsearch() to common file xen/common/bsearch.c. Changes since v2: Converted mmio lookup code to a

[Xen-devel] [PATCH V4 08/11] arm/io: Use separate memory allocation for mmio handlers

2016-07-14 Thread Shanker Donthineni
dynamically during domain build. This patch uses the dynamic allocation strategy to reduce memory footprint for 'struct domain' instead of static allocation. Signed-off-by: Shanker Donthineni Acked-by: Julien Grall --- Changes since v1: Moved registration of vgic_v3/v2 functionalit

[Xen-devel] [PATCH V4 11/11] arm/vgic: Change fixed number of mmio handlers to variable number

2016-07-14 Thread Shanker Donthineni
: domain_vgic_register(&count) domain_io_init(count + MAX_IO_HANDLER) domain_vgic_init() Signed-off-by: Shanker Donthineni --- Changes since v3: Removed the variable 'mmio_count' from structure 'arch_domain', handle through a function argument. xen/arch/arm/domain.c | 1

Re: [Xen-devel] [PATCH V3 01/10] arm/gic-v3: Use acpi_table_parse_madt() to parse MADT subtables

2016-07-14 Thread Shanker Donthineni
Hi Stefano/Juilen On 07/14/2016 09:18 AM, Stefano Stabellini wrote: On Mon, 27 Jun 2016, Shanker Donthineni wrote: The function acpi_table_parse_madt() does the same functionality as function acpi_parse_entries() expect it takes a few arguments. Signed-off-by: Shanker Donthineni I committed

Re: [Xen-devel] [PATCH V3 04/10] arm/gic-v3: Parse per-cpu redistributor entry in GICC subtable

2016-06-28 Thread Shanker Donthineni
On 06/28/2016 08:51 AM, Shanker Donthineni wrote: Hi Julien, On 06/28/2016 05:40 AM, Julien Grall wrote: Hello Shanker, On 27/06/16 21:33, Shanker Donthineni wrote: @@ -1397,6 +1408,36 @@ gic_acpi_parse_madt_distributor(struct acpi_subtable_header *header, } static int __init

Re: [Xen-devel] [PATCH V3 04/10] arm/gic-v3: Parse per-cpu redistributor entry in GICC subtable

2016-06-28 Thread Shanker Donthineni
Hi Julien, On 06/28/2016 05:40 AM, Julien Grall wrote: Hello Shanker, On 27/06/16 21:33, Shanker Donthineni wrote: @@ -1397,6 +1408,36 @@ gic_acpi_parse_madt_distributor(struct acpi_subtable_header *header, } static int __init +gic_acpi_parse_cpu_redistributor(struct

Re: [Xen-devel] [PATCH V3 09/10] xen/arm: io: Use binary search for mmio handler lookup

2016-06-28 Thread Shanker Donthineni
Hi Julien, On 06/28/2016 05:49 AM, Julien Grall wrote: Hi Shanker, On 27/06/16 21:33, Shanker Donthineni wrote: As the number of I/O handlers increase, the overhead associated with linear lookup also increases. The system might have maximum of 144 (assuming CONFIG_NR_CPUS=128) mmio handlers

[Xen-devel] [PATCH V3 03/10] arm/gic-v3: Move GICR subtable parsing into a new function

2016-06-27 Thread Shanker Donthineni
Add a new function to parse GICR subtable and move the code that is specific to GICR table to a new function without changing the function gicv3_acpi_init() behavior. Signed-off-by: Shanker Donthineni --- Changes since v2: Changed function gic_acpi_add_rdist_region() protoype. Removed the

[Xen-devel] [PATCH V3 09/10] xen/arm: io: Use binary search for mmio handler lookup

2016-06-27 Thread Shanker Donthineni
change from linear (complexity O(n)) to a binary search (complexity O(log n) for reducing mmio handler lookup overhead. Signed-off-by: Shanker Donthineni --- Changes since v2: Converted mmio lookup code to a critical section. Copied the function bsreach() from Linux kernel. xen/arch/arm/io.c

[Xen-devel] [PATCH V3 08/10] arm/io: Use separate memory allocation for mmio handlers

2016-06-27 Thread Shanker Donthineni
dynamically during domain build. This patch uses the dynamic allocation strategy to reduce memory footprint for 'struct domain' instead of static allocation. Signed-off-by: Shanker Donthineni Acked-by: Julien Grall --- Changes since v1: Moved registration of vgic_v3/v2 functionalit

[Xen-devel] [PATCH V3 07/10] arm: vgic: Split vgic_domain_init() functionality into two functions

2016-06-27 Thread Shanker Donthineni
Separate the code logic that does the registration of vgic_v3/v2 ops to a new function domain_vgic_register(). The intention of this separation is to record the required mmio count in vgic_v3/v2_init() and pass it to function domain_io_init() in a follow-up patch patch. Signed-off-by: Shanker

[Xen-devel] [PATCH V3 04/10] arm/gic-v3: Parse per-cpu redistributor entry in GICC subtable

2016-06-27 Thread Shanker Donthineni
base addresses. Signed-off-by: Shanker Donthineni --- Changes since v2: Removed the unnecessary validation checks and edited commit text. xen/arch/arm/gic-v3.c | 68 +++ xen/include/asm-arm/gic.h | 1 + xen/include/asm-arm/gic_v3_defs.h

[Xen-devel] [PATCH V3 05/10] xen/arm: vgic: Use dynamic memory allocation for vgic_rdist_region

2016-06-27 Thread Shanker Donthineni
code path. struct domain *alloc_domain_struct(void) { struct domain *d; BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE); d = alloc_xenheap_pages(0, 0); if ( d == NULL ) return NULL; ... This patch uses the second approach to fix the BUILD_BUG(). Signed-off-by: Shanker Donthineni ---

[Xen-devel] [PATCH v3 06/10] arm/gic-v3: Remove an unused macro MAX_RDIST_COUNT

2016-06-27 Thread Shanker Donthineni
The macro MAX_RDIST_COUNT is not being used after converting code to handle number of redistributor dynamically. So remove it from header file and the two other panic() messages that are not valid anymore. Signed-off-by: Shanker Donthineni Acked-by: Julien Grall --- xen/arch/arm/gic-v3.c

[Xen-devel] [PATCH V3 02/10] arm/gic-v3: Do early GICD ioremap and clean up

2016-06-27 Thread Shanker Donthineni
the region ioremap to a separate function. The following patch accesses the GICD region inside gicv3_acpi_init() for finding per CPU Redistributor size. Signed-off-by: Shanker Donthineni Acked-by: Julien Grall --- Changes sicne v1: Edited commit text. xen/arch/arm/gic-v3.c | 23

[Xen-devel] [PATCH V3 10/10] arm/vgic: Change fixed number of mmio handlers to variable number

2016-06-27 Thread Shanker Donthineni
code path: domain_vgic_register() count = MAX_IO_HANDLER + d->arch.vgic.mmio_count; domain_io_init(count) domain_vgic_init() Signed-off-by: Shanker Donthineni --- xen/arch/arm/domain.c| 11 +++ xen/arch/arm/vgic-v2.c | 1 + xen/arch/arm/vgic-v3.c | 3 +++ xen/ar

[Xen-devel] [PATCH V3 01/10] arm/gic-v3: Use acpi_table_parse_madt() to parse MADT subtables

2016-06-27 Thread Shanker Donthineni
The function acpi_table_parse_madt() does the same functionality as function acpi_parse_entries() expect it takes a few arguments. Signed-off-by: Shanker Donthineni --- xen/arch/arm/gic-v3.c | 27 ++- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/xen

Re: [Xen-devel] [PATCH V2 03/10] arm/gic-v3: Fold GICR subtable parsing into a new function

2016-06-27 Thread Shanker Donthineni
On 06/27/2016 11:09 AM, Julien Grall wrote: On 27/06/16 17:07, Shanker Donthineni wrote: On 06/27/2016 10:41 AM, Julien Grall wrote: On 27/06/16 16:40, Shanker Donthineni wrote: +gicv3.rdist_regions = rdist_regs; + +/* Parse always-on power domain Re-distributor entries

Re: [Xen-devel] [PATCH V2 03/10] arm/gic-v3: Fold GICR subtable parsing into a new function

2016-06-27 Thread Shanker Donthineni
be On 06/27/2016 10:41 AM, Julien Grall wrote: On 27/06/16 16:40, Shanker Donthineni wrote: +gicv3.rdist_regions = rdist_regs; + +/* Parse always-on power domain Re-distributor entries */ +count = acpi_parse_entries(ACPI_SIG_MADT, + sizeof(struct

Re: [Xen-devel] [PATCH V2 03/10] arm/gic-v3: Fold GICR subtable parsing into a new function

2016-06-27 Thread Shanker Donthineni
On 06/27/2016 06:26 AM, Julien Grall wrote: Hi Shanker, Title: I think you want to say "Move GICR..." rather than "Fold GICR...". On 26/06/16 18:48, Shanker Donthineni wrote: Add a new function for parsing GICR subtable and move the code Add a new function to par

Re: [Xen-devel] [PATCH V2 10/10] arm/vgic: Change fixed number of mmio handlers to variable number

2016-06-27 Thread Shanker Donthineni
On 06/27/2016 08:35 AM, Julien Grall wrote: Hi Shanker, On 26/06/16 18:48, Shanker Donthineni wrote: diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h index 29346c6..b205461 100644 --- a/xen/include/asm-arm/domain.h +++ b/xen/include/asm-arm/domain.h @@ -111,6 +111,7

Re: [Xen-devel] [PATCH V2 09/10] xen/arm: io: Use binary search for mmio handler lookup

2016-06-27 Thread Shanker Donthineni
On 06/27/2016 08:31 AM, Julien Grall wrote: Hi Shanker, On 26/06/16 18:48, Shanker Donthineni wrote: As the number of I/O handlers increase, the overhead associated with linear lookup also increases. The system might have maximum of 144 (assuming CONFIG_NR_CPUS=128) mmio handlers. In worst

Re: [Xen-devel] [PATCH V2 05/10] xen/arm: vgic: Use dynamic memory allocation for vgic_rdist_region

2016-06-27 Thread Shanker Donthineni
On 06/27/2016 07:38 AM, Julien Grall wrote: Hi Shanker, On 26/06/16 18:48, Shanker Donthineni wrote: The number of Re-distributor regions allowed for dom0 is hardcoded s/Re-distributor/Redistributor/ to a compile time macro MAX_RDIST_COUNT which is 4. On some systems, s/a compile time

Re: [Xen-devel] [PATCH V2 04/10] arm/gic-v3: Parse per-cpu redistributor entry in GICC subtable

2016-06-27 Thread Shanker Donthineni
On 06/27/2016 06:47 AM, Julien Grall wrote: Hi Shanker, On 26/06/16 18:48, Shanker Donthineni wrote: The redistributor address can be specified either as part of GICC or GICR subtable depending on the power domain. The current driver doesn't support parsing redistributor entry th

Re: [Xen-devel] [PATCH V2 03/10] arm/gic-v3: Fold GICR subtable parsing into a new function

2016-06-27 Thread Shanker Donthineni
On 06/27/2016 06:26 AM, Julien Grall wrote: Hi Shanker, Title: I think you want to say "Move GICR..." rather than "Fold GICR...". On 26/06/16 18:48, Shanker Donthineni wrote: Add a new function for parsing GICR subtable and move the code Add a new function to par

Re: [Xen-devel] [PATCH V2 01/10] arm/gic-v3: Fix bug in function cmp_rdist()

2016-06-27 Thread Shanker Donthineni
On 06/27/2016 06:03 AM, Julien Grall wrote: Hi Shanker, On 26/06/16 18:48, Shanker Donthineni wrote: The cmp_rdist() is always returning value zero irrespective of the input Redistributor base addresses. Both the local variables 'l' and 'r' are pointing to the first argu

[Xen-devel] [PATCH V2 00/10] Add support for parsing per CPU Redistributor entry

2016-06-26 Thread Shanker Donthineni
;s branch http://xenbits.xen.org/gitweb/?p=people/julieng/xen-unstable.git;a=shortlog;h=refs/heads/irq-routing-acpi-rfc Shanker Donthineni (10): arm/gic-v3: Fix bug in function cmp_rdist() arm/gic-v3: Do early GICD ioremap and clean up arm/gic-v3: Fold GICR subtable parsing into a new functi

[Xen-devel] [PATCH V2 10/10] arm/vgic: Change fixed number of mmio handlers to variable number

2016-06-26 Thread Shanker Donthineni
code path: domain_vgic_register() count = MAX_IO_HANDLER + d->arch.vgic.mmio_count; domain_io_init(count) domain_vgic_init() Signed-off-by: Shanker Donthineni --- xen/arch/arm/domain.c| 11 +++ xen/arch/arm/vgic-v2.c | 1 + xen/arch/arm/vgic-v3.c | 12 ++-- xen/ar

[Xen-devel] [PATCH V2 03/10] arm/gic-v3: Fold GICR subtable parsing into a new function

2016-06-26 Thread Shanker Donthineni
Add a new function for parsing GICR subtable and move the code that is specific to GICR table to new function without changing the function gicv3_acpi_init() behavior. Signed-off-by: Shanker Donthineni --- Changes since v1: Removed the unnecessary GICR ioremap operation inside GICR table parse

[Xen-devel] [PATCH V2 07/10] arm: vgic: Split vgic_domain_init() functionality into two functions

2016-06-26 Thread Shanker Donthineni
Separate the code logic that does the registration of vgic_v3/v2 ops to a new fucntion domain_vgic_register(). The intention of this separation is to record the required mmio count in vgic_v3/v2_init() and pass it to function domain_io_init() in the later patch. Signed-off-by: Shanker Donthineni

[Xen-devel] [PATCH V2 05/10] xen/arm: vgic: Use dynamic memory allocation for vgic_rdist_region

2016-06-26 Thread Shanker Donthineni
main build code path. struct domain *alloc_domain_struct(void) { struct domain *d; BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE); d = alloc_xenheap_pages(0, 0); if ( d == NULL ) return NULL; ... This patch uses the second approach to fix the BUILD_BUG(). Signed-off-by: Shank

[Xen-devel] [PATCH V2 09/10] xen/arm: io: Use binary search for mmio handler lookup

2016-06-26 Thread Shanker Donthineni
change from linear (complexity O(n)) to a binary search (complexity O(log n) for reducing mmio handler lookup overhead. Signed-off-by: Shanker Donthineni --- xen/arch/arm/io.c | 50 +++--- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/xen

[Xen-devel] [PATCH V2 06/10] arm/gic-v3: Remove an unused macro MAX_RDIST_COUNT

2016-06-26 Thread Shanker Donthineni
The macro MAX_RDIST_COUNT is not being used after converting code to handle number of redistributor dynamically. So remove it from header file and the two other panic() messages that are not valid anymore. Signed-off-by: Shanker Donthineni --- xen/arch/arm/gic-v3.c | 8 xen/include

[Xen-devel] [PATCH V2 04/10] arm/gic-v3: Parse per-cpu redistributor entry in GICC subtable

2016-06-26 Thread Shanker Donthineni
addresses. Signed-off-by: Shanker Donthineni --- Changes since v1: Edited commit text and fixed white spaces. Added a new function for parsing per CPU Redistributor entry. xen/arch/arm/gic-v3.c | 84 ++- xen/include/asm-arm/gic.h |

[Xen-devel] [PATCH V2 08/10] arm/io: Use separate memory allocation for mmio handlers

2016-06-26 Thread Shanker Donthineni
dynamically during domain build. This patch uses the dynamic allocation strategy to reduce memory footprint for 'struct domain' instead of static allocation. Signed-off-by: Shanker Donthineni --- xen/arch/arm/domain.c | 6 -- xen/arch/arm/io.c | 14 -- x

[Xen-devel] [PATCH V2 01/10] arm/gic-v3: Fix bug in function cmp_rdist()

2016-06-26 Thread Shanker Donthineni
The cmp_rdist() is always returning value zero irrespective of the input Redistributor base addresses. Both the local variables 'l' and 'r' are pointing to the first argument 'a' causing the logical expression 'l->base < r->base' always evaluated

[Xen-devel] [PATCH V2 02/10] arm/gic-v3: Do early GICD ioremap and clean up

2016-06-26 Thread Shanker Donthineni
the region ioremap to a separate function. The following pacth accesses the GICD region inside gicv3_acpi_init() for finding per CPU Redistributor size. Signed-off-by: Shanker Donthineni --- Changes sicne v1: Edited commit text. xen/arch/arm/gic-v3.c | 23 +-- 1 file changed

Re: [Xen-devel] [PATCH 6/8] arm: vgic: Split vgic_domain_init() functionality into two functions

2016-06-21 Thread Shanker Donthineni
Hi Julien, On 06/21/2016 09:48 AM, Julien Grall wrote: On 21/06/16 15:36, Shanker Donthineni wrote: On 06/21/2016 05:49 AM, Julien Grall wrote: Hello Shanker, On 19/06/16 00:45, Shanker Donthineni wrote: Split code that installs mmio handlers for GICD and Re-distributor regions to a new

Re: [Xen-devel] [PATCH 6/8] arm: vgic: Split vgic_domain_init() functionality into two functions

2016-06-21 Thread Shanker Donthineni
On 06/21/2016 05:49 AM, Julien Grall wrote: Hello Shanker, On 19/06/16 00:45, Shanker Donthineni wrote: Split code that installs mmio handlers for GICD and Re-distributor regions to a new function. The intension of this separation is to defer steps that registers vgic_v2/v3 mmio handlers

Re: [Xen-devel] [PATCH 0/8] Add support for parsing per CPU Redistributor entry

2016-06-21 Thread Shanker Donthineni
On 06/21/2016 08:50 AM, Julien Grall wrote: On 21/06/16 14:37, Shanker Donthineni wrote: On 06/21/2016 04:28 AM, Julien Grall wrote: On 19/06/16 00:45, Shanker Donthineni wrote: The current driver doesn't support parsing Redistributor entries that are described in the MADT GICC table

Re: [Xen-devel] [PATCH 2/8] arm/gic-v3: Fold GICR subtable parsing into a new function

2016-06-21 Thread Shanker Donthineni
On 06/21/2016 05:17 AM, Julien Grall wrote: Hello Shanker, On 19/06/16 00:45, Shanker Donthineni wrote: Add a new function for parsing GICR subtable and move the code that is specific to GICR table to new function without changing the function gicv3_acpi_init() behavior. Signed-off-by

Re: [Xen-devel] [PATCH 3/8] arm/gic-v3: Parse per-cpu redistributor entry in GICC subtable

2016-06-21 Thread Shanker Donthineni
On 06/21/2016 05:16 AM, Julien Grall wrote: Hello Shanker, On 19/06/16 00:45, Shanker Donthineni wrote: The redistributor address can be specified either as part of GICC or GICR subtable depending on the power domain. The current driver doesn't support parsing redistributor entry th

Re: [Xen-devel] [PATCH 0/8] Add support for parsing per CPU Redistributor entry

2016-06-21 Thread Shanker Donthineni
On 06/21/2016 04:28 AM, Julien Grall wrote: Hello Shanker, On 19/06/16 00:45, Shanker Donthineni wrote: The current driver doesn't support parsing Redistributor entries that are described in the MADT GICC table. Not all the GIC implementors places the Redistributor regions in the alwa

[Xen-devel] [PATCH 2/8] arm/gic-v3: Fold GICR subtable parsing into a new function

2016-06-18 Thread Shanker Donthineni
Add a new function for parsing GICR subtable and move the code that is specific to GICR table to new function without changing the function gicv3_acpi_init() behavior. Signed-off-by: Shanker Donthineni --- xen/arch/arm/gic-v3.c | 64 +-- 1 file

[Xen-devel] [PATCH 6/8] arm: vgic: Split vgic_domain_init() functionality into two functions

2016-06-18 Thread Shanker Donthineni
Split code that installs mmio handlers for GICD and Re-distributor regions to a new function. The intension of this separation is to defer steps that registers vgic_v2/v3 mmio handlers. Signed-off-by: Shanker Donthineni --- xen/arch/arm/vgic-v2.c | 10 +++--- xen/arch/arm/vgic-v3.c

[Xen-devel] [PATCH 4/8] xen/arm: vgic: Use dynamic memory allocation for vgic_rdist_region

2016-06-18 Thread Shanker Donthineni
main build code path. struct domain *alloc_domain_struct(void) { struct domain *d; BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE); d = alloc_xenheap_pages(0, 0); if ( d == NULL ) return NULL; ... This patch uses the second approach to fix the BUILD_BUG(). Signed-off-by: Shank

[Xen-devel] [PATCH 7/8] arm/mmio: Use separate memory allocation for mmio handlers

2016-06-18 Thread Shanker Donthineni
dynamically during domain build. This patch uses the dynamic allocation strategy to reduce memory footprint for 'struct domain' instead of static allocation. Signed-off-by: Shanker Donthineni --- xen/arch/arm/domain.c | 6 -- xen/arch/arm/io.c | 14 -- x

[Xen-devel] [PATCH 1/8] arm/gic-v3: Add a separate function for mapping GICD region

2016-06-18 Thread Shanker Donthineni
Move the code that validates base address and does ioremap of GIC distributor region to a separate function. Later patches need to access the GICD region inside function gicv3_acpi_init() for finding per CPU Redistributor size. Signed-off-by: Shanker Donthineni --- xen/arch/arm/gic-v3.c | 23

[Xen-devel] [PATCH 5/8] arm/gic-v3: Remove an unused macro MAX_RDIST_COUNT

2016-06-18 Thread Shanker Donthineni
The macro MAX_RDIST_COUNT is not being used after converting code to handle number of redistributor dynamically. So remove it from header file and the two other panic() messages that are not valid anymore. Signed-off-by: Shanker Donthineni --- xen/arch/arm/gic-v3.c | 8 xen/include

[Xen-devel] [PATCH 0/8] Add support for parsing per CPU Redistributor entry

2016-06-18 Thread Shanker Donthineni
shortlog;h=refs/heads/irq-routing-acpi-rfc Shanker Donthineni (8): arm/gic-v3: Add a separate function for mapping GICD region arm/gic-v3: Fold GICR subtable parsing into a new function arm/gic-v3: Parse per-cpu redistributor entry in GICC subtable xen/arm: vgic: Use dynamic memory

[Xen-devel] [PATCH 3/8] arm/gic-v3: Parse per-cpu redistributor entry in GICC subtable

2016-06-18 Thread Shanker Donthineni
s not on always-on power domain. This patch adds necessary code to handle both types of Redistributors base addresses. Signed-off-by: Shanker Donthineni --- xen/arch/arm/gic-v3.c | 97 --- xen/include/asm-arm/gic.h | 2 + xen/include/as

[Xen-devel] [PATCH 8/8] arm/vgic: Change fixed number of mmio handlers to variable number

2016-06-18 Thread Shanker Donthineni
_vgic_init() count = MAX_IO_HANDLER + d->arch.vgic.mmio_count; domain_io_init(count) domain_vgic_register_mmio() Signed-off-by: Shanker Donthineni --- xen/arch/arm/domain.c| 10 ++ xen/arch/arm/vgic-v2.c | 2 ++ xen/arch/arm/vgic-v3.c | 3 +++ xen/ar

Re: [Xen-devel] [PATCH V9 2/3] drivers/pl011: Use combination of UARTRIS and UARTMSC instead of UARTMIS

2016-06-13 Thread Shanker Donthineni
On 06/13/2016 05:30 AM, Stefano Stabellini wrote: On Thu, 9 Jun 2016, Shanker Donthineni wrote: The Masked interrupt status register (UARTMIS) is not described in ARM SBSA 2.x document. Anding of two registers UARTMSC and UARTRIS values gives the same information as register UARTMIS. UARTRIS

  1   2   >