Re: [Xen-devel] [PATCH] ns16550: Re-order the serial port address checking

2020-02-25 Thread Wei Xu
Hi Jan, On 2020/2/25 21:10, Jan Beulich wrote: > On 25.02.2020 01:33, Wei Xu wrote: >> On 2020/2/25 6:03, Julien Grall wrote: >>> Thank you for sending a follow-up. >>> >>> On 24/02/2020 11:30, Wei Xu wrote: >>>> Check the serial port address spac

Re: [Xen-devel] [PATCH v4] ns16550: Add ACPI support for ARM only

2020-02-25 Thread Wei Xu
Hi Jan, On 2020/2/25 20:25, Jan Beulich wrote: > On 24.02.2020 02:06, Wei Xu wrote: >> On 2020/2/21 23:07, Jan Beulich wrote: >>> On 21.02.2020 15:57, Julien Grall wrote: >>>> On 21/02/2020 14:02, Jan Beulich wrote: >>>>> On 21.02.2020 03:22, Wei Xu w

Re: [Xen-devel] [PATCH] ns16550: Re-order the serial port address checking

2020-02-24 Thread Wei Xu
Hi Julien, On 2020/2/25 6:03, Julien Grall wrote: > Hi Wei, > > Thank you for sending a follow-up. > > On 24/02/2020 11:30, Wei Xu wrote: >> Check the serial port address space before checking the address. > > Could you explain in a sentence why you want to re-or

[Xen-devel] [PATCH] ns16550: Re-order the serial port address checking

2020-02-24 Thread Wei Xu
Check the serial port address space before checking the address. Signed-off-by: Wei Xu --- xen/drivers/char/ns16550.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index dc8ac4c..425e044 100644 --- a/xen

Re: [Xen-devel] [PATCH v5] ns16550: Add ACPI support for ARM only

2020-02-24 Thread Wei Xu
Hi Julien, On 2020/2/24 18:09, Julien Grall wrote: > Hi Wei, > > On 24/02/2020 01:17, Wei Xu wrote: >> Parse the ACPI SPCR table and initialize the 16550 compatible serial port >> for ARM only. Currently we only support one UART on ARM. Some fields >> which we do not

[Xen-devel] [PATCH v5] ns16550: Add ACPI support for ARM only

2020-02-23 Thread Wei Xu
Parse the ACPI SPCR table and initialize the 16550 compatible serial port for ARM only. Currently we only support one UART on ARM. Some fields which we do not care yet on ARM are ignored. Signed-off-by: Wei Xu Reviewed-by: Jan Beulich Acked-by: Julien Grall --- Changes in v5: - check

Re: [Xen-devel] [PATCH v4] ns16550: Add ACPI support for ARM only

2020-02-23 Thread Wei Xu
Hi Jan, On 2020/2/21 23:07, Jan Beulich wrote: > On 21.02.2020 15:57, Julien Grall wrote: >> On 21/02/2020 14:02, Jan Beulich wrote: >>> On 21.02.2020 03:22, Wei Xu wrote: >>>> --- a/xen/drivers/char/ns16550.c >>>> +++ b/xen/drivers/char/ns16550.c &

Re: [Xen-devel] [PATCH v4] ns16550: Add ACPI support for ARM only

2020-02-23 Thread Wei Xu
Hi Julien, On 2020/2/21 22:57, Julien Grall wrote: > > > On 21/02/2020 14:02, Jan Beulich wrote: >> On 21.02.2020 03:22, Wei Xu wrote: >>> --- a/xen/drivers/char/ns16550.c >>> +++ b/xen/drivers/char/ns16550.c >>> @@ -1620,6 +1620,85 @@ DT_DEVICE_START(n

[Xen-devel] [PATCH v4] ns16550: Add ACPI support for ARM only

2020-02-20 Thread Wei Xu
Parse the ACPI SPCR table and initialize the 16550 compatible serial port for ARM only. Currently we only support one UART on ARM. Some fields which we do not care yet on ARM are ignored. Signed-off-by: Wei Xu --- Changes in v4: - change the print when the serial port address is 0 - check

Re: [Xen-devel] [PATCH v3] ns16550: Add ACPI support for ARM only

2020-02-20 Thread Wei Xu
Hi Jan, On 2020/2/20 16:33, Jan Beulich wrote: > On 20.02.2020 08:44, Wei Xu wrote: >> On 2020/2/17 21:53, Jan Beulich wrote: >>> On 03.02.2020 12:21, Wei Xu wrote: >>>> +static int __init ns16550_acpi_uart_init(const void *data) >>>> +{ >>>>

Re: [Xen-devel] [PATCH v3] ns16550: Add ACPI support for ARM only

2020-02-19 Thread Wei Xu
Hi Jan, On 2020/2/17 21:53, Jan Beulich wrote: > On 03.02.2020 12:21, Wei Xu wrote: >> Parse the ACPI SPCR table and initialize the 16550 compatible serial port >> for ARM only. Currently we only support one UART on ARM. Some fields >> which we do not care yet on ARM are igno

[Xen-devel] [PATCH v3] ns16550: Add ACPI support for ARM only

2020-02-03 Thread Wei Xu
Parse the ACPI SPCR table and initialize the 16550 compatible serial port for ARM only. Currently we only support one UART on ARM. Some fields which we do not care yet on ARM are ignored. Signed-off-by: Wei Xu --- Changes in v3: - address the code style comments from Jan - use container_of

Re: [Xen-devel] [PATCH] arm/acpi: Add __acpi_unmap_table function for ARM

2020-01-22 Thread Wei Xu
Hi Jan, On 2020/1/22 16:24, Jan Beulich wrote: > On 22.01.2020 06:57, Wei Xu wrote: >> On 2020/1/21 19:02, Jan Beulich wrote: >>> On 21.01.2020 10:49, Wei Xu wrote: >>>> --- a/xen/drivers/acpi/osl.c >>>> +++ b/xen/drivers/acpi/osl.c >>>> @@ -

Re: [Xen-devel] [PATCH v2] ns16550: Add ACPI support for ARM only

2020-01-21 Thread Wei Xu
Hi Jan, On 2020/1/21 19:13, Jan Beulich wrote: > On 21.01.2020 04:44, Wei Xu wrote: >> --- a/xen/drivers/char/ns16550.c >> +++ b/xen/drivers/char/ns16550.c >> @@ -1620,6 +1620,66 @@ DT_DEVICE_START(ns16550, "NS16550 UART", >> DEVICE_SERIAL) >> DT_DEVI

Re: [Xen-devel] [PATCH] arm/acpi: Add __acpi_unmap_table function for ARM

2020-01-21 Thread Wei Xu
Hi Julien, On 2020/1/21 19:25, Julien Grall wrote: > Hi Jan, > > On 21/01/2020 11:02, Jan Beulich wrote: >> On 21.01.2020 10:49, Wei Xu wrote: >>> Add __acpi_unmap_table function for ARM and invoke it at >>> acpi_os_unmap_memory >>> to make sure the re

Re: [Xen-devel] [PATCH] arm/acpi: Add __acpi_unmap_table function for ARM

2020-01-21 Thread Wei Xu
Hi Jan, On 2020/1/21 19:02, Jan Beulich wrote: > On 21.01.2020 10:49, Wei Xu wrote: >> Add __acpi_unmap_table function for ARM and invoke it at acpi_os_unmap_memory >> to make sure the related fixmap has been cleared before using it for a >> different mapping. >

Re: [Xen-devel] [PATCH] arm/acpi: Add __acpi_unmap_table function for ARM

2020-01-21 Thread Wei Xu
Hi Alexandru, On 2020/1/21 18:01, Alexandru Stefan ISAILA wrote: > > > On 21.01.2020 11:49, Wei Xu wrote: >> Add __acpi_unmap_table function for ARM and invoke it at acpi_os_unmap_memory >> to make sure the related fixmap has been cleared before using it for a >> diff

[Xen-devel] [PATCH] arm/acpi: Add __acpi_unmap_table function for ARM

2020-01-21 Thread Wei Xu
Add __acpi_unmap_table function for ARM and invoke it at acpi_os_unmap_memory to make sure the related fixmap has been cleared before using it for a different mapping. Signed-off-by: Wei Xu --- xen/arch/arm/acpi/lib.c | 25 + xen/drivers/acpi/osl.c | 2 ++ xen/include

[Xen-devel] [PATCH v2] ns16550: Add ACPI support for ARM only

2020-01-20 Thread Wei Xu
Parse the ACPI SPCR table and initialize the 16550 compatible serial port for ARM only. Currently we only support one UART on ARM. Some fields like PCI, flow control and so on we do not care yet on ARM are ignored. Signed-off-by: Wei Xu --- Changes in v2: - improve commit message - remove

Re: [Xen-devel] [PATCH] ns16550: Add ACPI support

2020-01-20 Thread Wei Xu
Hi Jan, Julien, On 2020/1/20 16:38, Jan Beulich wrote: On 18.01.2020 13:32, Julien Grall wrote: On 17/01/2020 08:33, Jan Beulich wrote: On 17.01.2020 04:40, Wei Xu wrote: --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -1620,6 +1620,61 @@ DT_DEVICE_START(ns16550

Re: [Xen-devel] Interaction between ACPI and dt_unreserved_regions() (WAS: Re: [PATCH] xen/arm: vgic-v3: Fix the typo of GICD IRQ active status range)

2020-01-19 Thread Wei Xu
On 2020/1/18 4:41, Julien Grall wrote: (Renaming the title to avoid confusion) On 17/01/2020 09:06, Wei Xu wrote: Hi Julien, Hi Wei, On 2020/1/7 23:12, Julien Grall wrote: Sorry for the late reply! Don't worry, thank you for looking into the bug! The PC refers to fdt_num_mem_rsv

Re: [Xen-devel] [PATCH] xen/arm: vgic-v3: Fix the typo of GICD IRQ active status range

2020-01-17 Thread Wei Xu
Hi Julien, On 2020/1/7 23:12, Julien Grall wrote: On 07/01/2020 12:55, Wei Xu wrote: Hi Julien, As only one entity should manage the UART (i.e Xen or Dom0), we today assume this will be managed by Xen. Xen should expose a partial virtual UART (only a few registers are emulating) to dom0

[Xen-devel] [PATCH] ns16550: Add ACPI support

2020-01-16 Thread Wei Xu
Parse the ACPI SPCR table and initialize the 16550 compatible serial port. Signed-off-by: Wei Xu --- xen/drivers/char/ns16550.c | 55 ++ 1 file changed, 55 insertions(+) diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index

Re: [Xen-devel] [PATCH] xen/arm: vgic-v3: Fix the typo of GICD IRQ active status range

2020-01-07 Thread Wei Xu
Hi Julien, On 2020/1/7 19:42, Julien Grall wrote: Hi, On 07/01/2020 09:48, Wei Xu wrote: On 2020/1/7 17:10, Julien Grall wrote: On 07/01/2020 08:39, Wei Xu wrote: Hi Stefano, On 2020/1/7 6:01, Stefano Stabellini wrote: On Sat, 28 Dec 2019, Wei Xu wrote: Hi Julien, On 2019/12/28 16:09

Re: [Xen-devel] [PATCH] xen/arm: vgic-v3: Fix the typo of GICD IRQ active status range

2020-01-07 Thread Wei Xu
Hi Julien, On 2020/1/7 18:51, Julien Grall wrote: On 07/01/2020 09:28, Wei Xu wrote: Hi Julien, On 2020/1/7 17:10, Julien Grall wrote: On 07/01/2020 08:39, Wei Xu wrote: Hi Stefano, On 2020/1/7 6:01, Stefano Stabellini wrote: On Sat, 28 Dec 2019, Wei Xu wrote: Hi Julien, On 2019/12

Re: [Xen-devel] [PATCH] xen/arm: vgic-v3: Fix the typo of GICD IRQ active status range

2020-01-07 Thread Wei Xu
Hi Julien, On 2020/1/7 17:10, Julien Grall wrote: On 07/01/2020 08:39, Wei Xu wrote: Hi Stefano, On 2020/1/7 6:01, Stefano Stabellini wrote: On Sat, 28 Dec 2019, Wei Xu wrote: Hi Julien, On 2019/12/28 16:09, Julien Grall wrote: Hi, On 28/12/2019 03:08, Wei Xu wrote: This patch fixes

Re: [Xen-devel] [PATCH] xen/arm: vgic-v3: Fix the typo of GICD IRQ active status range

2020-01-07 Thread Wei Xu
Hi Stefano, On 2020/1/7 6:01, Stefano Stabellini wrote: On Sat, 28 Dec 2019, Wei Xu wrote: Hi Julien, On 2019/12/28 16:09, Julien Grall wrote: Hi, On 28/12/2019 03:08, Wei Xu wrote: This patch fixes the typo about the active status range of an IRQ via GICD. Otherwise it will be failed

Re: [Xen-devel] [PATCH] xen/arm: vgic-v3: Fix the typo of GICD IRQ active status range

2019-12-28 Thread Wei Xu
Hi Julien, On 2019/12/28 16:09, Julien Grall wrote: Hi, On 28/12/2019 03:08, Wei Xu wrote: This patch fixes the typo about the active status range of an IRQ via GICD. Otherwise it will be failed to handle the mmio access and inject a data abort. I have seen a patch similar from NXP a month

[Xen-devel] [PATCH] xen/arm: vgic-v3: Fix the typo of GICD IRQ active status range

2019-12-27 Thread Wei Xu
This patch fixes the typo about the active status range of an IRQ via GICD. Otherwise it will be failed to handle the mmio access and inject a data abort. Fixes: a2b83f95bfad ("xen/arm: vgic: Properly emulate the full register") Signed-off-by: Wei Xu --- xen/arch/arm/vgic-v3.c | 2