Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-21 Thread Oleksandr
On 21.08.20 09:16, Jan Beulich wrote: Hi Jan. Thank you for your answer. On 20.08.2020 20:30, Oleksandr wrote: On 06.08.20 14:29, Jan Beulich wrote: On 06.08.2020 13:08, Julien Grall wrote: On 05/08/2020 20:30, Oleksandr wrote: I was thinking how to split handle_hvm_io_completion() grace

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-20 Thread Jan Beulich
On 20.08.2020 20:30, Oleksandr wrote: > On 06.08.20 14:29, Jan Beulich wrote: >> On 06.08.2020 13:08, Julien Grall wrote: >>> On 05/08/2020 20:30, Oleksandr wrote: I was thinking how to split handle_hvm_io_completion() gracefully but I failed find a good solution for that, so decided to a

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-20 Thread Oleksandr
Hello all. I would like to clarify some questions based on the comments for the patch series. I put them together (please see below). On 06.08.20 14:29, Jan Beulich wrote: On 06.08.2020 13:08, Julien Grall wrote: On 05/08/2020 20:30, Oleksandr wrote: I was thinking how to split handle_h

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-17 Thread Oleksandr
On 15.08.20 20:56, Julien Grall wrote: Hi Julien. Hi, On 04/08/2020 15:01, Julien Grall wrote: On 04/08/2020 08:49, Paul Durrant wrote: diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c index 931404c..b5fc066 100644 --- a/tools/libxc/xc_dom_arm.c +++ b/tools/libxc/xc_dom_arm

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-15 Thread Julien Grall
Hi, On 04/08/2020 15:01, Julien Grall wrote: On 04/08/2020 08:49, Paul Durrant wrote: diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c index 931404c..b5fc066 100644 --- a/tools/libxc/xc_dom_arm.c +++ b/tools/libxc/xc_dom_arm.c @@ -26,11 +26,19 @@   #include "xg_private.h"   #inc

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-14 Thread Oleksandr
On 14.08.20 01:14, Julien Grall wrote: Hi Julien On Thu, 13 Aug 2020 at 21:40, Oleksandr Tyshchenko wrote: Hi Sorry for the possible format issue. On Thu, Aug 13, 2020 at 9:42 PM Oleksandr wrote: On 11.08.20 20:50, Julien Grall wrote: Hi Julien On 11/08/2020 18:09, Oleksandr wrote

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-13 Thread Julien Grall
On Thu, 13 Aug 2020 at 21:40, Oleksandr Tyshchenko wrote: > > > Hi > > Sorry for the possible format issue. > > On Thu, Aug 13, 2020 at 9:42 PM Oleksandr wrote: >> >> >> On 11.08.20 20:50, Julien Grall wrote: >> >> Hi Julien >> >> > >> > >> > On 11/08/2020 18:09, Oleksandr wrote: >> >> >> >> On 0

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-13 Thread Oleksandr
On 13.08.20 23:36, Julien Grall wrote: Hi Julien On 13/08/2020 19:41, Oleksandr wrote: Rebooting domain 2 root@generic-armv8-xt-dom0:~# (XEN) Xen BUG at ...tAUTOINC+bb71237a55-r0/git/xen/include/xen/mm.h:683 (XEN) [ Xen-4.14.0  arm64  debug=y   Not tainted ] (XEN) CPU:    3 (XEN)

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-13 Thread Oleksandr Tyshchenko
Hi Sorry for the possible format issue. On Thu, Aug 13, 2020 at 9:42 PM Oleksandr wrote: > > On 11.08.20 20:50, Julien Grall wrote: > > Hi Julien > > > > > > > On 11/08/2020 18:09, Oleksandr wrote: > >> > >> On 05.08.20 12:32, Julien Grall wrote: > >> > >> Hi Julien, Stefano > >> > >>> > >

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-13 Thread Julien Grall
On 13/08/2020 19:41, Oleksandr wrote: Rebooting domain 2 root@generic-armv8-xt-dom0:~# (XEN) Xen BUG at ...tAUTOINC+bb71237a55-r0/git/xen/include/xen/mm.h:683 (XEN) [ Xen-4.14.0  arm64  debug=y   Not tainted ] (XEN) CPU:    3 (XEN) PC: 00246f28 ioreq.c#hvm_free_ioreq_mfn+

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-13 Thread Oleksandr
On 11.08.20 20:50, Julien Grall wrote: Hi Julien On 11/08/2020 18:09, Oleksandr wrote: On 05.08.20 12:32, Julien Grall wrote: Hi Julien, Stefano diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h index 5fdb6e8..5823f11 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-12 Thread Oleksandr
Hi Julien @@ -2275,6 +2282,16 @@ static void check_for_vcpu_work(void)     */    void leave_hypervisor_to_guest(void)    { +#ifdef CONFIG_IOREQ_SERVER +    /* + * XXX: Check the return. Shall we call that in + * continue_running and context_switch instead? + * The benefits would b

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-11 Thread Julien Grall
On 11/08/2020 18:09, Oleksandr wrote: On 05.08.20 12:32, Julien Grall wrote: Hi Julien, Stefano diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h index 5fdb6e8..5823f11 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -385,10 +385,11 @@ static in

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-11 Thread Oleksandr
On 05.08.20 12:32, Julien Grall wrote: Hi Julien, Stefano diff --git a/xen/include/asm-arm/p2m.h b/xen/include/asm-arm/p2m.h index 5fdb6e8..5823f11 100644 --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -385,10 +385,11 @@ static inline int set_foreign_p2m_entry(struct do

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-10 Thread Oleksandr
On 11.08.20 01:37, Julien Grall wrote: Hi Julien On Mon, 10 Aug 2020 at 21:29, Oleksandr wrote: On 10.08.20 22:00, Julien Grall wrote: Hi Julien @@ -2275,6 +2282,16 @@ static void check_for_vcpu_work(void) */ void leave_hypervisor_to_guest(void) { +#ifdef CONFIG_IOREQ_SERVER +

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-10 Thread Julien Grall
On Mon, 10 Aug 2020 at 21:29, Oleksandr wrote: > > > On 10.08.20 22:00, Julien Grall wrote: > > Hi Julien > > > > >>> > > @@ -2275,6 +2282,16 @@ static void check_for_vcpu_work(void) > >*/ > > void leave_hypervisor_to_guest(void) > > { > > +#ifdef CONFIG_IOREQ_SERVER >

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-10 Thread Oleksandr
On 10.08.20 22:00, Julien Grall wrote: Hi Julien @@ -2275,6 +2282,16 @@ static void check_for_vcpu_work(void)    */   void leave_hypervisor_to_guest(void)   { +#ifdef CONFIG_IOREQ_SERVER +    /* + * XXX: Check the return. Shall we call that in + * continue_running and context_swit

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-10 Thread Oleksandr
On 10.08.20 21:25, Julien Grall wrote: Hi Julien Do you mind to provide more details? Previous patch "xen/mm: Make x86's XENMEM_resource_ioreq_server handling common" breaks build on Arm as it includes xen/hvm/ioreq.h which requires arch header to be present (asm/hvm/ioreq.h). But the mi

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-10 Thread Julien Grall
On 10/08/2020 19:09, Oleksandr wrote: On 05.08.20 12:32, Julien Grall wrote: Hi Julien @@ -2275,6 +2282,16 @@ static void check_for_vcpu_work(void)    */   void leave_hypervisor_to_guest(void)   { +#ifdef CONFIG_IOREQ_SERVER +    /* + * XXX: Check the return. Shall we call that in + 

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-10 Thread Julien Grall
On 06/08/2020 14:27, Oleksandr wrote: On 06.08.20 14:08, Julien Grall wrote: Hi Julien What is this function supposed to do? Agree, sounds confusing a bit. I assume it is supposed to complete Guest MMIO access after finishing emulation. Shall I rename it to something appropriate (mayb

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-10 Thread Oleksandr
Hi @@ -2275,6 +2282,16 @@ static void check_for_vcpu_work(void)    */   void leave_hypervisor_to_guest(void)   { +#ifdef CONFIG_IOREQ_SERVER +    /* + * XXX: Check the return. Shall we call that in + * continue_running and context_switch instead? + * The benefits would be to a

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-10 Thread Oleksandr
On 05.08.20 12:32, Julien Grall wrote: Hi Julien @@ -2275,6 +2282,16 @@ static void check_for_vcpu_work(void)    */   void leave_hypervisor_to_guest(void)   { +#ifdef CONFIG_IOREQ_SERVER +    /* + * XXX: Check the return. Shall we call that in + * continue_running and context_switch

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-06 Thread Oleksandr
On 06.08.20 14:08, Julien Grall wrote: Hi Julien What is this function supposed to do? Agree, sounds confusing a bit. I assume it is supposed to complete Guest MMIO access after finishing emulation. Shall I rename it to something appropriate (maybe by adding ioreq prefix)? How about i

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-06 Thread Jan Beulich
On 06.08.2020 13:08, Julien Grall wrote: > On 05/08/2020 20:30, Oleksandr wrote: >> I was thinking how to split handle_hvm_io_completion() >> gracefully but I failed find a good solution for that, so decided to add >> two stubs (msix_write_completion and handle_realmode_completion) on Arm. >> I

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-06 Thread Julien Grall
On 05/08/2020 20:30, Oleksandr wrote: On 05.08.20 17:12, Julien Grall wrote: Hi, Hi Julien On 03/08/2020 19:21, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko This patch makes possible to forward Guest MMIO accesses to a device emulator on Arm and enables that support for Ar

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-06 Thread Julien Grall
Hi, On 05/08/2020 16:41, Oleksandr wrote: On 05.08.20 12:32, Julien Grall wrote: Hi Julien. Hi Stefano, On 05/08/2020 00:22, Stefano Stabellini wrote: On Mon, 3 Aug 2020, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko This patch makes possible to forward Guest MMIO accesses to a

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-05 Thread Oleksandr
On 05.08.20 19:13, Jan Beulich wrote: Hi, Jan On 03.08.2020 20:21, Oleksandr Tyshchenko wrote: --- a/xen/include/xsm/dummy.h +++ b/xen/include/xsm/dummy.h @@ -713,14 +713,14 @@ static XSM_INLINE int xsm_pmu_op (XSM_DEFAULT_ARG struct domain *d, unsigned int } } +#endif /* CONFIG_

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-05 Thread Oleksandr
On 05.08.20 19:41, Stefano Stabellini wrote: Hi Stefano On Wed, 5 Aug 2020, Jan Beulich wrote: On 05.08.2020 01:22, Stefano Stabellini wrote: On Mon, 3 Aug 2020, Oleksandr Tyshchenko wrote: --- a/xen/include/asm-arm/p2m.h +++ b/xen/include/asm-arm/p2m.h @@ -385,10 +385,11 @@ static inline i

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-05 Thread Oleksandr
On 05.08.20 17:12, Julien Grall wrote: Hi, Hi Julien On 03/08/2020 19:21, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko This patch makes possible to forward Guest MMIO accesses to a device emulator on Arm and enables that support for Arm64. Also update XSM code a bit to let D

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-05 Thread Stefano Stabellini
On Wed, 5 Aug 2020, Jan Beulich wrote: > On 05.08.2020 01:22, Stefano Stabellini wrote: > > On Mon, 3 Aug 2020, Oleksandr Tyshchenko wrote: > >> --- a/xen/include/asm-arm/p2m.h > >> +++ b/xen/include/asm-arm/p2m.h > >> @@ -385,10 +385,11 @@ static inline int set_foreign_p2m_entry(struct > >> domai

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-05 Thread Jan Beulich
On 03.08.2020 20:21, Oleksandr Tyshchenko wrote: > --- a/xen/include/xsm/dummy.h > +++ b/xen/include/xsm/dummy.h > @@ -713,14 +713,14 @@ static XSM_INLINE int xsm_pmu_op (XSM_DEFAULT_ARG > struct domain *d, unsigned int > } > } > > +#endif /* CONFIG_X86 */ > + > static XSM_INLINE int xsm_

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-05 Thread Oleksandr
On 05.08.20 12:32, Julien Grall wrote: Hi Julien. Hi Stefano, On 05/08/2020 00:22, Stefano Stabellini wrote: On Mon, 3 Aug 2020, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko This patch makes possible to forward Guest MMIO accesses to a device emulator on Arm and enables that su

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-05 Thread Jan Beulich
On 05.08.2020 16:12, Julien Grall wrote: > On 03/08/2020 19:21, Oleksandr Tyshchenko wrote: >> --- /dev/null >> +++ b/xen/include/asm-arm/hvm/ioreq.h >> @@ -0,0 +1,103 @@ >> +/* >> + * hvm.h: Hardware virtual machine assist interface definitions. >> + * >> + * Copyright (c) 2016 Citrix Systems Inc.

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-05 Thread Julien Grall
Hi, On 03/08/2020 19:21, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko This patch makes possible to forward Guest MMIO accesses to a device emulator on Arm and enables that support for Arm64. Also update XSM code a bit to let DM op be used on Arm. New arch DM op will be introduced in

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-05 Thread Julien Grall
Hi Stefano, On 05/08/2020 00:22, Stefano Stabellini wrote: On Mon, 3 Aug 2020, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko This patch makes possible to forward Guest MMIO accesses to a device emulator on Arm and enables that support for Arm64. Also update XSM code a bit to let DM

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-05 Thread Jan Beulich
On 05.08.2020 01:22, Stefano Stabellini wrote: > On Mon, 3 Aug 2020, Oleksandr Tyshchenko wrote: >> --- a/xen/include/asm-arm/p2m.h >> +++ b/xen/include/asm-arm/p2m.h >> @@ -385,10 +385,11 @@ static inline int set_foreign_p2m_entry(struct domain >> *d, unsigned long gfn, >>

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-04 Thread Stefano Stabellini
On Mon, 3 Aug 2020, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > This patch makes possible to forward Guest MMIO accesses > to a device emulator on Arm and enables that support for > Arm64. > > Also update XSM code a bit to let DM op be used on Arm. > New arch DM op will be intro

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-04 Thread Stefano Stabellini
On Tue, 4 Aug 2020, Julien Grall wrote: > On 04/08/2020 08:49, Paul Durrant wrote: > > > diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c > > > index 931404c..b5fc066 100644 > > > --- a/tools/libxc/xc_dom_arm.c > > > +++ b/tools/libxc/xc_dom_arm.c > > > @@ -26,11 +26,19 @@ > > > #

Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-04 Thread Julien Grall
Hi Paul, On 04/08/2020 08:49, Paul Durrant wrote: diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c index 931404c..b5fc066 100644 --- a/tools/libxc/xc_dom_arm.c +++ b/tools/libxc/xc_dom_arm.c @@ -26,11 +26,19 @@ #include "xg_private.h" #include "xc_dom.h" -#define NR_MAGIC_PA

RE: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-04 Thread Paul Durrant
r Tyshchenko > ; Julien Grall > ; Jan Beulich ; Daniel De Graaf > ; > Volodymyr Babchuk > Subject: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for > IOREQ/DM features > > From: Oleksandr Tyshchenko > > This patch makes possible to forward Guest

[RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features

2020-08-03 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko This patch makes possible to forward Guest MMIO accesses to a device emulator on Arm and enables that support for Arm64. Also update XSM code a bit to let DM op be used on Arm. New arch DM op will be introduced in the follow-up patch. Please note, at the moment build