[PATCH 1/1] xen/include/xen/byteorder: Re-implement bswap/swab with compiler builtin functions

2021-10-15 Thread Lin Liu
Current implementation of bswap/swab is overhaul which involves byte operations, compilers has builtin functions can help to simply the implementation * GCC: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html * Clang: https://clang.llvm.org/docs/LanguageExtensions.html This commit replace the

Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]

2021-10-15 Thread Julien Grall
Hi Ian, On 14/10/2021 18:54, Ian Jackson wrote: (Replying to both the earlier subthread on v5 and to the new v6 patch.) Bertrand Marquis writes ("Re: [PATCH v5 10/11] arm/libxl: Emulated PCI device tree node in libxl"): Now you suggest to add a new field arm_vpci in libxl__domain_create_state

Re: [PATCH v6 1/3] xen/vpci: Move ecam access functions to common code

2021-10-15 Thread Bertrand Marquis
Hi Jan, > On 15 Oct 2021, at 07:29, Jan Beulich wrote: > > On 14.10.2021 19:09, Bertrand Marquis wrote: >>> On 14 Oct 2021, at 17:06, Jan Beulich wrote: >>> On 14.10.2021 16:49, Bertrand Marquis wrote: @@ -305,7 +291,7 @@ static int vpci_portio_read(const struct hvm_io_handler *handl

Re: [PATCH v3 0/3] disable building of pv-grub and qemu-trad per default

2021-10-15 Thread Juergen Gross
On 27.09.21 16:43, Ian Jackson wrote: Juergen Gross writes ("Re: [PATCH v3 0/3] disable building of pv-grub and qemu-trad per default"): On 10.09.21 17:34, Ian Jackson wrote: Juergen Gross writes ("[PATCH v3 0/3] disable building of pv-grub and qemu-trad per default"): This is a first step o

Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]

2021-10-15 Thread Michal Orzel
Hi guys, On 15.10.2021 09:28, Julien Grall wrote: > Hi Ian, > > On 14/10/2021 18:54, Ian Jackson wrote: >> (Replying to both the earlier subthread on v5 and to the new v6 >> patch.) >> >> Bertrand Marquis writes ("Re: [PATCH v5 10/11] arm/libxl: Emulated PCI >> device tree node in libxl"): >>> N

Re: [PATCH v6 1/3] xen/vpci: Move ecam access functions to common code

2021-10-15 Thread Roger Pau Monné
On Thu, Oct 14, 2021 at 03:49:49PM +0100, Bertrand Marquis wrote: > PCI standard is using ECAM and not MCFG which is coming from ACPI[1]. > Use ECAM/ecam instead of MCFG in common code and in new functions added > in common vpci code by this patch. > > Rename vpci_access_allowed to vpci_ecam_acces

Re: [PATCH v6 1/3] xen/vpci: Move ecam access functions to common code

2021-10-15 Thread Bertrand Marquis
Hi Roger, > On 15 Oct 2021, at 08:44, Roger Pau Monné wrote: > > On Thu, Oct 14, 2021 at 03:49:49PM +0100, Bertrand Marquis wrote: >> PCI standard is using ECAM and not MCFG which is coming from ACPI[1]. >> Use ECAM/ecam instead of MCFG in common code and in new functions added >> in common vpci

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Jan Beulich
On 14.10.2021 16:49, Bertrand Marquis wrote: > @@ -752,6 +752,19 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, > > check_pdev(pdev); > > +#ifdef CONFIG_ARM > +/* > + * On ARM PCI devices discovery will be done by Dom0. Add vpci handler > when > + * Dom0 inform XEN to add th

Re: [PATCH v6 1/3] usb: Add Xen pvUSB protocol description

2021-10-15 Thread Juergen Gross
On 13.10.21 14:01, Greg KH wrote: On Wed, Oct 13, 2021 at 09:52:05AM +0200, Juergen Gross wrote: Add the definition of pvUSB protocol used between the pvUSB frontend in a Xen domU and the pvUSB backend in a Xen driver domain (usually Dom0). This header was originally provided by Fujitsu for Xen

Re: [PATCH v6 1/3] xen/vpci: Move ecam access functions to common code

2021-10-15 Thread Jan Beulich
On 15.10.2021 09:37, Bertrand Marquis wrote: >> On 15 Oct 2021, at 07:29, Jan Beulich wrote: >> On 14.10.2021 19:09, Bertrand Marquis wrote: On 14 Oct 2021, at 17:06, Jan Beulich wrote: On 14.10.2021 16:49, Bertrand Marquis wrote: > @@ -305,7 +291,7 @@ static int vpci_portio_read(co

Re: [PATCH v6 1/3] usb: Add Xen pvUSB protocol description

2021-10-15 Thread Greg KH
On Fri, Oct 15, 2021 at 10:07:35AM +0200, Juergen Gross wrote: > On 13.10.21 14:01, Greg KH wrote: > > On Wed, Oct 13, 2021 at 09:52:05AM +0200, Juergen Gross wrote: > > > Add the definition of pvUSB protocol used between the pvUSB frontend in > > > a Xen domU and the pvUSB backend in a Xen driver

Re: [PATCH v6 1/3] xen/vpci: Move ecam access functions to common code

2021-10-15 Thread Bertrand Marquis
Hi Jan, > On 15 Oct 2021, at 09:13, Jan Beulich wrote: > > On 15.10.2021 09:37, Bertrand Marquis wrote: >>> On 15 Oct 2021, at 07:29, Jan Beulich wrote: >>> On 14.10.2021 19:09, Bertrand Marquis wrote: > On 14 Oct 2021, at 17:06, Jan Beulich wrote: > On 14.10.2021 16:49, Bertrand Marqu

RE: [PATCH v2] xen/arm: vgic to ignore GICD ICPENRn registers access

2021-10-15 Thread Hongda Deng
Hi, > -Original Message- > From: Julien Grall > Sent: 2021年10月14日 17:30 > To: Hongda Deng ; xen- > de...@lists.xenproject.org; sstabell...@kernel.org > Cc: Bertrand Marquis ; Wei Chen > > Subject: Re: [PATCH v2] xen/arm: vgic to ignore GICD ICPENRn registers > access > > On 14/10/2021 0

Re: [PATCH 1/1] xen/include/xen/byteorder: Re-implement bswap/swab with compiler builtin functions

2021-10-15 Thread Jan Beulich
On 15.10.2021 09:26, Lin Liu wrote: > Current implementation of bswap/swab is overhaul which involves > byte operations, compilers has builtin functions can help to > simply the implementation > * GCC: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html > * Clang: https://clang.llvm.org/docs/Lan

Re: [PATCH v6 1/3] xen/vpci: Move ecam access functions to common code

2021-10-15 Thread Jan Beulich
On 15.10.2021 10:20, Bertrand Marquis wrote: > Anyway if we agree on naming scheme and bool return type I think all > your comments here are covered ? Probably, but I have to admit I've lost track ... Jan

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Roger Pau Monné
On Thu, Oct 14, 2021 at 03:49:50PM +0100, Bertrand Marquis wrote: > From: Rahul Singh > > The existing VPCI support available for X86 is adapted for Arm. > When the device is added to XEN via the hyper call > “PHYSDEVOP_pci_device_add”, VPCI handler for the config space > access is added to the X

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Michal Orzel
On 15.10.2021 10:32, Roger Pau Monné wrote: > On Thu, Oct 14, 2021 at 03:49:50PM +0100, Bertrand Marquis wrote: >> From: Rahul Singh >> >> The existing VPCI support available for X86 is adapted for Arm. >> When the device is added to XEN via the hyper call >> “PHYSDEVOP_pci_device_add”, VPCI ha

Re: [PATCH v2 1/6] xen: introduce XEN_DOMCTL_CDF_directmap

2021-10-15 Thread Jan Beulich
On 15.10.2021 05:09, Penny Zheng wrote: > From: Stefano Stabellini > > This commit introduces a new arm-specific flag XEN_DOMCTL_CDF_directmap to > specify that this domain should have its memory directly mapped > (guest physical address == physical address) at domain creation. > > Refine is_dom

Re: [PATCH v6 1/3] usb: Add Xen pvUSB protocol description

2021-10-15 Thread Juergen Gross
On 15.10.21 10:14, Greg KH wrote: On Fri, Oct 15, 2021 at 10:07:35AM +0200, Juergen Gross wrote: On 13.10.21 14:01, Greg KH wrote: On Wed, Oct 13, 2021 at 09:52:05AM +0200, Juergen Gross wrote: Add the definition of pvUSB protocol used between the pvUSB frontend in a Xen domU and the pvUSB bac

Re: [PATCH 0/2] x86/shadow: address two Coverity issues

2021-10-15 Thread Jan Beulich
On 13.10.2021 18:10, Andrew Cooper wrote: > On 13/10/2021 16:36, Jan Beulich wrote: >> It's not clear to me why the tool spotted them now and not before, > > Several reasons. > > The Coverity backend is a software product just like everything else.  > IIRC, it releases quarterly. > > "If somethi

Re: [PATCH v2 1/6] xen: introduce XEN_DOMCTL_CDF_directmap

2021-10-15 Thread Julien Grall
Hi Penny, On 15/10/2021 04:09, Penny Zheng wrote: diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 0167731ab0..37e2d62d47 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -3069,8 +3069,10 @@ static int __init construct_dom0(struct domain *

Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]

2021-10-15 Thread Julien Grall
Hi Michal, On 15/10/2021 08:41, Michal Orzel wrote: Do you agree on the following approach: 1. Modify argument of libxl__arch_domain_init_hw_description to libxl_domain_config (patch 1) 2. Modify argument of libxl__prepare_dtb to libxl_domain_config (patch 2) 3. Remove arch_arm.vpci completely

Re: [PATCH 1/2] x86/shadow: adjust some shadow_set_le() callers

2021-10-15 Thread Andrew Cooper
On 13/10/2021 16:37, Jan Beulich wrote: > Coverity dislikes sh_page_fault() storing the return value into a local > variable but then never using the value (and oddly enough spots this in > the 2- and 3-level cases, but not in the 4-level one). Instead of adding > yet another cast to void as replac

Re: [PATCH 2/2] memory: XENMEM_add_to_physmap (almost) wrapping checks

2021-10-15 Thread Julien Grall
Hi, On 14/10/2021 15:10, Jan Beulich wrote: On 14.10.2021 13:29, Julien Grall wrote: On 13/09/2021 07:42, Jan Beulich wrote: Determining that behavior is correct (i.e. results in failure) for a passed in GFN equaling INVALID_GFN is non-trivial. Make this quite a bit more obvious by checking in

Re: [PATCH v2 2/6] gnttab: allow setting max version per-domain

2021-10-15 Thread Jan Beulich
On 22.09.2021 10:21, Roger Pau Monne wrote: > --- a/xen/common/grant_table.c > +++ b/xen/common/grant_table.c > @@ -53,6 +53,7 @@ struct grant_table { > percpu_rwlock_t lock; > /* Lock protecting the maptrack limit */ > spinlock_tmaptrack_lock; > +unsigned int

Re: [PATCH v2 2/6] gnttab: allow setting max version per-domain

2021-10-15 Thread Jan Beulich
On 15.10.2021 11:39, Jan Beulich wrote: > On 22.09.2021 10:21, Roger Pau Monne wrote: >> --- a/xen/include/public/domctl.h >> +++ b/xen/include/public/domctl.h >> @@ -87,14 +87,22 @@ struct xen_domctl_createdomain { >> /* >> * Various domain limits, which impact the quantity of resources

Re: [PATCH v6 1/3] xen/vpci: Move ecam access functions to common code

2021-10-15 Thread Roger Pau Monné
On Fri, Oct 15, 2021 at 10:13:24AM +0200, Jan Beulich wrote: > On 15.10.2021 09:37, Bertrand Marquis wrote: > >> On 15 Oct 2021, at 07:29, Jan Beulich wrote: > >> On 14.10.2021 19:09, Bertrand Marquis wrote: > On 14 Oct 2021, at 17:06, Jan Beulich wrote: > On 14.10.2021 16:49, Bertrand

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Bertrand Marquis
Hi Roger, > On 15 Oct 2021, at 09:32, Roger Pau Monné wrote: > > On Thu, Oct 14, 2021 at 03:49:50PM +0100, Bertrand Marquis wrote: >> From: Rahul Singh >> >> The existing VPCI support available for X86 is adapted for Arm. >> When the device is added to XEN via the hyper call >> “PHYSDEVOP_pci_

Re: [PATCH v6 1/3] xen/vpci: Move ecam access functions to common code

2021-10-15 Thread Roger Pau Monné
On Fri, Oct 15, 2021 at 07:53:38AM +, Bertrand Marquis wrote: > > On 15 Oct 2021, at 08:44, Roger Pau Monné wrote: > > On Thu, Oct 14, 2021 at 03:49:49PM +0100, Bertrand Marquis wrote: > >> @@ -434,25 +420,8 @@ static int vpci_mmcfg_read(struct vcpu *v, unsigned > >> long addr, > >> reg =

RE: [PATCH v2 1/6] xen: introduce XEN_DOMCTL_CDF_directmap

2021-10-15 Thread Penny Zheng
Hi Jan > -Original Message- > From: Jan Beulich > Sent: Friday, October 15, 2021 4:47 PM > To: Penny Zheng > Cc: Wei Chen ; Bertrand Marquis > ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org; jul...@xen.org > Subject: Re: [PATCH v2 1/6] xen: introduce XEN_DOMCTL_CDF_directmap

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Ian Jackson
Jan Beulich writes ("Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM."): > On 15.10.2021 01:49, Stefano Stabellini wrote: > > Replacing the 3 characters with 'x' solves the problem. > > https://gitlab.com/xen-project/people/sstabellini/xen/-/pipelines/388721262 > >

Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]

2021-10-15 Thread Ian Jackson
Julien Grall writes ("Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]"): > On 14/10/2021 18:54, Ian Jackson wrote: ... > > That is, as I understand it on ARM vpci should be enabled if > > passthrough is enabled and not otherwise. That is precisely what >

RE: [PATCH v2 1/6] xen: introduce XEN_DOMCTL_CDF_directmap

2021-10-15 Thread Penny Zheng
Hi julien > -Original Message- > From: Julien Grall > Sent: Friday, October 15, 2021 4:57 PM > To: Penny Zheng ; xen-devel@lists.xenproject.org; > sstabell...@kernel.org > Cc: Wei Chen ; Bertrand Marquis > > Subject: Re: [PATCH v2 1/6] xen: introduce XEN_DOMCTL_CDF_directmap > > Hi Pen

Re: [PATCH v2 3/6] gnttab: allow per-domain control over transitive grants

2021-10-15 Thread Jan Beulich
On 22.09.2021 10:21, Roger Pau Monne wrote: > --- a/xen/arch/arm/domain_build.c > +++ b/xen/arch/arm/domain_build.c > @@ -2649,7 +2649,8 @@ void __init create_domUs(void) > .max_evtchn_port = -1, > .max_grant_frames = -1, > .max_maptrack_frames = -1, > -

Re: [PATCH v3 0/3] disable building of pv-grub and qemu-trad per default

2021-10-15 Thread Ian Jackson
Juergen Gross writes ("Re: [PATCH v3 0/3] disable building of pv-grub and qemu-trad per default"): > I believe patch 1 of my series could go in at any time, as it is just > fixing a bug. Oh yes, indeed. Done. Ian.

Re: [PATCH v2 1/6] xen: introduce XEN_DOMCTL_CDF_directmap

2021-10-15 Thread Jan Beulich
On 15.10.2021 11:59, Penny Zheng wrote: >> From: Jan Beulich >> Sent: Friday, October 15, 2021 4:47 PM >> >> On 15.10.2021 05:09, Penny Zheng wrote: >>> xen/arch/arm/domain.c| 3 ++- >>> xen/arch/arm/domain_build.c | 4 +++- >>> xen/common/domain.c | 3 ++- >>> xen/include/asm-a

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Bertrand Marquis
Hi Jan, > On 15 Oct 2021, at 09:00, Jan Beulich wrote: > > On 14.10.2021 16:49, Bertrand Marquis wrote: >> @@ -752,6 +752,19 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, >> >> check_pdev(pdev); >> >> +#ifdef CONFIG_ARM >> +/* >> + * On ARM PCI devices discovery will be done by

Re: [PATCH] xen-netback: Remove redundant initialization of variable err

2021-10-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (master) by David S. Miller : On Wed, 13 Oct 2021 17:51:42 +0100 you wrote: > From: Colin Ian King > > The variable err is being initialized with a value that is never read, it > is being updated immediately afterwards. The assignment is redu

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Bertrand Marquis
Hi Stefano, > On 15 Oct 2021, at 00:49, Stefano Stabellini wrote: > > On Thu, 14 Oct 2021, Bertrand Marquis wrote: >> From: Rahul Singh >> >> The existing VPCI support available for X86 is adapted for Arm. >> When the device is added to XEN via the hyper call >> “PHYSDEVOP_pci_device_add”, VPC

Re: [PATCH v6 1/3] xen/vpci: Move ecam access functions to common code

2021-10-15 Thread Bertrand Marquis
Hi Roger, > On 15 Oct 2021, at 10:53, Roger Pau Monné wrote: > > On Fri, Oct 15, 2021 at 07:53:38AM +, Bertrand Marquis wrote: >>> On 15 Oct 2021, at 08:44, Roger Pau Monné wrote: >>> On Thu, Oct 14, 2021 at 03:49:49PM +0100, Bertrand Marquis wrote: @@ -434,25 +420,8 @@ static int vpci

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Luca Fancellu
> On 15 Oct 2021, at 10:52, Bertrand Marquis wrote: > > Hi Roger, > >> On 15 Oct 2021, at 09:32, Roger Pau Monné wrote: >> >> On Thu, Oct 14, 2021 at 03:49:50PM +0100, Bertrand Marquis wrote: >>> From: Rahul Singh >>> >>> The existing VPCI support available for X86 is adapted for Arm. >>>

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Ian Jackson
Bertrand Marquis writes ("Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM."): > > On 15 Oct 2021, at 09:00, Jan Beulich wrote: > > The latter is fine to be put here (i.e. FTAOD I'm fine with it > > staying here). For the former I even question its original placemen

Re: [PATCH v6 1/3] xen/vpci: Move ecam access functions to common code

2021-10-15 Thread Jan Beulich
On 15.10.2021 11:53, Roger Pau Monné wrote: > On Fri, Oct 15, 2021 at 07:53:38AM +, Bertrand Marquis wrote: >>> On 15 Oct 2021, at 08:44, Roger Pau Monné wrote: >>> On Thu, Oct 14, 2021 at 03:49:49PM +0100, Bertrand Marquis wrote: @@ -434,25 +420,8 @@ static int vpci_mmcfg_read(struct vcp

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Bertrand Marquis
Hi Luca, > On 15 Oct 2021, at 11:13, Luca Fancellu wrote: > > > >> On 15 Oct 2021, at 10:52, Bertrand Marquis wrote: >> >> Hi Roger, >> >>> On 15 Oct 2021, at 09:32, Roger Pau Monné wrote: >>> >>> On Thu, Oct 14, 2021 at 03:49:50PM +0100, Bertrand Marquis wrote: From: Rahul Singh >>

[libvirt test] 165516: regressions - FAIL

2021-10-15 Thread osstest service owner
flight 165516 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/165516/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-libvirt 6 libvirt-buildfail REGR. vs. 151777 build-amd64-libvirt

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Jan Beulich
On 15.10.2021 12:14, Ian Jackson wrote: > Bertrand Marquis writes ("Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 > virtual PCI support for ARM."): >>> On 15 Oct 2021, at 09:00, Jan Beulich wrote: >>> The latter is fine to be put here (i.e. FTAOD I'm fine with it >>> staying here). For the

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Roger Pau Monné
On Fri, Oct 15, 2021 at 09:52:28AM +, Bertrand Marquis wrote: > Hi Roger, > > > On 15 Oct 2021, at 09:32, Roger Pau Monné wrote: > > > > On Thu, Oct 14, 2021 at 03:49:50PM +0100, Bertrand Marquis wrote: > >> From: Rahul Singh > >> diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/pas

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Jan Beulich
On 15.10.2021 11:52, Bertrand Marquis wrote: >> On 15 Oct 2021, at 09:32, Roger Pau Monné wrote: >> On Thu, Oct 14, 2021 at 03:49:50PM +0100, Bertrand Marquis wrote: >>> @@ -752,6 +752,19 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, >>> >>> check_pdev(pdev); >>> >>> +#ifdef CONFIG_ARM >>>

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Bertrand Marquis
Hi, > On 15 Oct 2021, at 11:19, Roger Pau Monné wrote: > > On Fri, Oct 15, 2021 at 09:52:28AM +, Bertrand Marquis wrote: >> Hi Roger, >> >>> On 15 Oct 2021, at 09:32, Roger Pau Monné wrote: >>> >>> On Thu, Oct 14, 2021 at 03:49:50PM +0100, Bertrand Marquis wrote: From: Rahul Singh >

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Bertrand Marquis
> On 15 Oct 2021, at 11:24, Jan Beulich wrote: > > On 15.10.2021 11:52, Bertrand Marquis wrote: >>> On 15 Oct 2021, at 09:32, Roger Pau Monné wrote: >>> On Thu, Oct 14, 2021 at 03:49:50PM +0100, Bertrand Marquis wrote: @@ -752,6 +752,19 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, >>>

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Jan Beulich
On 15.10.2021 12:09, Bertrand Marquis wrote: >> On 15 Oct 2021, at 09:00, Jan Beulich wrote: >> On 14.10.2021 16:49, Bertrand Marquis wrote: >>> @@ -752,6 +752,19 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, >>> >>> check_pdev(pdev); >>> >>> +#ifdef CONFIG_ARM >>> +/* >>> + * On AR

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Jan Beulich
On 15.10.2021 12:33, Bertrand Marquis wrote: >> On 15 Oct 2021, at 11:24, Jan Beulich wrote: >> On 15.10.2021 11:52, Bertrand Marquis wrote: On 15 Oct 2021, at 09:32, Roger Pau Monné wrote: On Thu, Oct 14, 2021 at 03:49:50PM +0100, Bertrand Marquis wrote: > @@ -752,6 +752,19 @@ int

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Bertrand Marquis
Hi Jan, > On 15 Oct 2021, at 11:41, Jan Beulich wrote: > > On 15.10.2021 12:33, Bertrand Marquis wrote: >>> On 15 Oct 2021, at 11:24, Jan Beulich wrote: >>> On 15.10.2021 11:52, Bertrand Marquis wrote: > On 15 Oct 2021, at 09:32, Roger Pau Monné wrote: > On Thu, Oct 14, 2021 at 03:49:5

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Jan Beulich
On 15.10.2021 12:48, Bertrand Marquis wrote: > Hi Jan, > >> On 15 Oct 2021, at 11:41, Jan Beulich wrote: >> >> On 15.10.2021 12:33, Bertrand Marquis wrote: On 15 Oct 2021, at 11:24, Jan Beulich wrote: On 15.10.2021 11:52, Bertrand Marquis wrote: >> On 15 Oct 2021, at 09:32, Roger P

Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]

2021-10-15 Thread Michal Orzel
Hi, On 15.10.2021 12:02, Ian Jackson wrote: > Julien Grall writes ("Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree > node in libxl [and 1 more messages]"): >> On 14/10/2021 18:54, Ian Jackson wrote: > ... >>> That is, as I understand it on ARM vpci should be enabled if >>> passthrough is

Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]

2021-10-15 Thread Michal Orzel
On 15.10.2021 12:58, Michal Orzel wrote: > Hi, > > On 15.10.2021 12:02, Ian Jackson wrote: >> Julien Grall writes ("Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree >> node in libxl [and 1 more messages]"): >>> On 14/10/2021 18:54, Ian Jackson wrote: >> ... That is, as I understand

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Bertrand Marquis
Hi, > On 15 Oct 2021, at 11:51, Jan Beulich wrote: > > On 15.10.2021 12:48, Bertrand Marquis wrote: >> Hi Jan, >> >>> On 15 Oct 2021, at 11:41, Jan Beulich wrote: >>> >>> On 15.10.2021 12:33, Bertrand Marquis wrote: > On 15 Oct 2021, at 11:24, Jan Beulich wrote: > On 15.10.2021 11:52

Re: [PATCH 2/2] x86/shadow: adjust 2-level case of SHADOW_FOREACH_L2E()

2021-10-15 Thread Andrew Cooper
On 13/10/2021 16:38, Jan Beulich wrote: > Coverity apparently takes issue with the assignment inside an if(), but > then only in two of the cases (sh_destroy_l2_shadow() and > sh_unhook_32b_mappings()). As it's pretty simple to break out of the > outer loop without the need for a local helper varia

[xen-unstable test] 165515: tolerable FAIL - PUSHED

2021-10-15 Thread osstest service owner
flight 165515 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/165515/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-rtds 20 guest-localmigrate/x10 fail like 165509 test-amd64-amd64-xl-qemut-win7-amd64

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Roger Pau Monné
On Fri, Oct 15, 2021 at 12:18:59PM +0200, Jan Beulich wrote: > On 15.10.2021 12:14, Ian Jackson wrote: > > Bertrand Marquis writes ("Re: [PATCH v6 2/3] xen/arm: Enable the existing > > x86 virtual PCI support for ARM."): > >>> On 15 Oct 2021, at 09:00, Jan Beulich wrote: > >>> The latter is fine

Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]

2021-10-15 Thread Ian Jackson
Michal Orzel writes ("Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]"): > On 15.10.2021 12:02, Ian Jackson wrote: > > Can you leave a comment somewhere (near where c_info.passthrough is > > set) pointing to this use of num_pcidevs ? That might save some

Re: [PATCH v2 3/6] gnttab: allow per-domain control over transitive grants

2021-10-15 Thread Jan Beulich
On 22.09.2021 10:21, Roger Pau Monne wrote: > @@ -1965,6 +1969,8 @@ int grant_table_init(struct domain *d, int > max_grant_frames, > gt->max_grant_frames = max_grant_frames; > gt->max_maptrack_frames = max_maptrack_frames; > gt->max_grant_version = max_grant_version; > +gt->allo

Re: [PATCH v2 2/6] gnttab: allow setting max version per-domain

2021-10-15 Thread Jan Beulich
On 22.09.2021 10:21, Roger Pau Monne wrote: > @@ -1917,11 +1918,27 @@ active_alloc_failed: > } > > int grant_table_init(struct domain *d, int max_grant_frames, > - int max_maptrack_frames) > + int max_maptrack_frames, unsigned int options) > { > str

Re: [PATCH v2 6/6] gnttab: allow disabling grant table per-domain

2021-10-15 Thread Jan Beulich
On 22.09.2021 11:19, Julien Grall wrote: > On 22/09/2021 13:21, Roger Pau Monne wrote: >> --- a/docs/man/xl.cfg.5.pod.in >> +++ b/docs/man/xl.cfg.5.pod.in >> @@ -583,8 +583,8 @@ L. >> =item B >> >> Specify the maximum grant table version the domain is allowed to use. >> Current >> -supporte

Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]

2021-10-15 Thread Michal Orzel
On 15.10.2021 13:46, Ian Jackson wrote: > Michal Orzel writes ("Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree > node in libxl [and 1 more messages]"): >> On 15.10.2021 12:02, Ian Jackson wrote: >>> Can you leave a comment somewhere (near where c_info.passthrough is >>> set) pointing to

Re: [PATCH v2 6/6] gnttab: allow disabling grant table per-domain

2021-10-15 Thread Jan Beulich
On 22.09.2021 10:21, Roger Pau Monne wrote: > Allow setting max_grant_version to 0 in order to disable grant table > usage by a domain. This prevents allocating the grant-table structure > inside of Xen and requires guards to be added in several functions in > order to prevent dereferencing the str

Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]

2021-10-15 Thread Julien Grall
Hi Michal, On 15/10/2021 12:53, Michal Orzel wrote: On 15.10.2021 13:46, Ian Jackson wrote: Michal Orzel writes ("Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]"): On 15.10.2021 12:02, Ian Jackson wrote: Can you leave a comment somewhere (near wh

Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]

2021-10-15 Thread Ian Jackson
Michal Orzel writes ("Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]"): > On 15.10.2021 13:46, Ian Jackson wrote: > > Maybe something like > > > > // NB, on ARM, libxl__arch_blah directly examines num_pcidevs to > > // decide whether to enable vpci,

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Bertrand Marquis
Hi Roger, > On 15 Oct 2021, at 12:35, Roger Pau Monné wrote: > > On Fri, Oct 15, 2021 at 12:18:59PM +0200, Jan Beulich wrote: >> On 15.10.2021 12:14, Ian Jackson wrote: >>> Bertrand Marquis writes ("Re: [PATCH v6 2/3] xen/arm: Enable the existing >>> x86 virtual PCI support for ARM."): > On

Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]

2021-10-15 Thread Ian Jackson
Julien Grall writes ("Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]"): > Long term, I would expect a similar check to be necessary to set the > vCPI flag at the domain creation. So it would be best to introduce an > internal field 'vpci' to avoid dupl

[PATCH v2] tools/tests: Make E2BIG non-fatal to xenstore unit test

2021-10-15 Thread Kevin Stefanov
Xenstore's unit test fails on read and write of big numbers if quota-maxsize is set to a lower number than those test cases use. Output a special warning instead of a failure message in such cases and make the error non-fatal to the unit test. Signed-off-by: Kevin Stefanov --- CC: Ian Jackson C

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Jan Beulich
On 15.10.2021 14:13, Bertrand Marquis wrote: > Hi Roger, > >> On 15 Oct 2021, at 12:35, Roger Pau Monné wrote: >> >> On Fri, Oct 15, 2021 at 12:18:59PM +0200, Jan Beulich wrote: >>> On 15.10.2021 12:14, Ian Jackson wrote: Bertrand Marquis writes ("Re: [PATCH v6 2/3] xen/arm: Enable the exist

Re: [PATCH v2] tools/tests: Make E2BIG non-fatal to xenstore unit test

2021-10-15 Thread Jan Beulich
On 15.10.2021 14:14, Kevin Stefanov wrote: > --- a/tools/tests/xenstore/test-xenstore.c > +++ b/tools/tests/xenstore/test-xenstore.c > @@ -110,8 +110,17 @@ static int call_test(struct test *tst, int iters, bool > no_clock) > break; > } > > +/* Make E2BIG non-fatal to the te

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Bertrand Marquis
Hi Jan, > On 15 Oct 2021, at 13:18, Jan Beulich wrote: > > On 15.10.2021 14:13, Bertrand Marquis wrote: >> Hi Roger, >> >>> On 15 Oct 2021, at 12:35, Roger Pau Monné wrote: >>> >>> On Fri, Oct 15, 2021 at 12:18:59PM +0200, Jan Beulich wrote: On 15.10.2021 12:14, Ian Jackson wrote: >

[PATCH 00/12] xen: drop hypercall function tables

2021-10-15 Thread Juergen Gross
In order to avoid indirect function calls on the hypercall path as much as possible this series is removing the hypercall function tables and is replacing the hypercall handler calls via the function array by automatically generated switch statements. Another by-product of generating the switch st

[PATCH 01/12] xen: limit number of hypercall parameters to 5

2021-10-15 Thread Juergen Gross
Today there is no hypercall with more than 5 parameters, while the ABI allows up to 6 parameters. Especially for the X86 32-bit case using 6 parameters would require to run without frame pointer, which isn't very fortunate. Note that for Arm the limit is 5 parameters already. So limit the maximum

[PATCH 04/12] xen/x86: modify hvm_memory_op() prototype

2021-10-15 Thread Juergen Gross
hvm_memory_op() should take an unsigned long as cmd, like do_memory_op(). As hvm_memory_op() is basically just calling do_memory_op() (or compat_memory_op()) passing through the parameters the cmd parameter should have no smaller size than that of the called functions. Signed-off-by: Juergen Gros

[PATCH 02/12] xen: move do_vcpu_op() to arch specific code

2021-10-15 Thread Juergen Gross
Today Arm is using another entry point for the vcpu_op hypercall as x86, as some of the common sub-ops are not supported on Arm. The Arm specific handler filetrs out the not supported sub-ops and then calls the common handler. This leads to the weird call hierarchy: do_arm_vcpu_op() do_vcpu_

[PATCH 08/12] x86/pv-shim: don't modify hypercall table

2021-10-15 Thread Juergen Gross
When running as pv-shim the hypercall is modified today in order to replace the functions for __HYPERVISOR_event_channel_op and __HYPERVISOR_grant_table_op hypercalls. Change this to call the related functions from the normal handlers instead when running as shim. The performance implications are

[PATCH 03/12] xen: harmonize return types of hypercall handlers

2021-10-15 Thread Juergen Gross
Today most hypercall handlers have a return type of long, while the compat ones return an int. There are a few exceptions from that rule, however. Get rid of the exceptions by letting compat handlers always return int and others always return long. For the compat hvm case use eax instead of rax f

[PATCH 09/12] xen/x86: don't use hypercall table for calling compat hypercalls

2021-10-15 Thread Juergen Gross
Today the *_op_compat hypercalls call the modern handler functions by using the entries from the hypercall table. This is resulting in a not needed indirect function call which can be avoided by using the correct handler function directly. This is basically a revert of commit 1252e282311734 ("86/pv

[PATCH 05/12] xen: don't include asm/hypercall.h from C sources

2021-10-15 Thread Juergen Gross
Instead of including asm/hypercall.h always use xen/hypercall.h. Additionally include xen/hypercall.h from all sources containing a hypercall handler. This prepares for generating the handlers' prototypes at build time. Add a guard in asm/hypercall.h to catch direct inclusion. Signed-off-by: Jue

[PATCH 10/12] xen/x86: call hypercall handlers via switch statement

2021-10-15 Thread Juergen Gross
Instead of using a function table use the generated switch statement macros for calling the appropriate hypercall handlers. This is beneficial to performance and avoids speculation issues. With calling the handlers using the correct number of parameters now it is possible to do the parameter regi

[PATCH 07/12] xen: use generated prototypes for hypercall handlers

2021-10-15 Thread Juergen Gross
Remove the hypercall handler's prototypes in the related header files and use the generated ones instead. Some handlers having been static before need to be made globally visible. Signed-off-by: Juergen Gross --- xen/arch/x86/hvm/hypercall.c| 6 +- xen/include/asm-x86/hypercall.h | 133 --

[PATCH 06/12] xen: generate hypercall interface related code

2021-10-15 Thread Juergen Gross
Instead of repeating similar data multiple times use a single source file and a generator script for producing prototypes and call sequences of the hypercalls. As the script already knows the number of parameters used add generating a macro for populating an array with the number of parameters per

[PATCH 11/12] xen/arm: call hypercall handlers via switch statement

2021-10-15 Thread Juergen Gross
Instead of using a function table use the generated switch statement macros for calling the appropriate hypercall handlers. This makes the calls of the handlers type safe. For deprecated hypercalls define stub functions. Signed-off-by: Juergen Gross --- xen/arch/arm/traps.c | 119 ++---

[PATCH 12/12] xen/x86: add hypercall performance counters for hvm, correct pv

2021-10-15 Thread Juergen Gross
The HVM hypercall handler is missing incrementing the per hypercall counters. Add that. The counters for PV are handled wrong, as they are not using perf_incra() with the number of the hypercall as index, but are incrementing the total number of hypercalls only. Fix that. Signed-off-by: Juergen G

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Jan Beulich
On 15.10.2021 14:28, Bertrand Marquis wrote: >> On 15 Oct 2021, at 13:18, Jan Beulich wrote: >> On 15.10.2021 14:13, Bertrand Marquis wrote: On 15 Oct 2021, at 12:35, Roger Pau Monné wrote: On Fri, Oct 15, 2021 at 12:18:59PM +0200, Jan Beulich wrote: > On 15.10.2021 12:14, Ian Jacks

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Bertrand Marquis
Hi Jan, > On 15 Oct 2021, at 14:00, Jan Beulich wrote: > > On 15.10.2021 14:28, Bertrand Marquis wrote: >>> On 15 Oct 2021, at 13:18, Jan Beulich wrote: >>> On 15.10.2021 14:13, Bertrand Marquis wrote: > On 15 Oct 2021, at 12:35, Roger Pau Monné wrote: > On Fri, Oct 15, 2021 at 12:18:5

Re: [PATCH v2] tools/tests: Make E2BIG non-fatal to xenstore unit test

2021-10-15 Thread Ian Jackson
Kevin Stefanov writes ("[PATCH v2] tools/tests: Make E2BIG non-fatal to xenstore unit test"): > Xenstore's unit test fails on read and write of big numbers if > quota-maxsize is set to a lower number than those test cases use. > > Output a special warning instead of a failure message in such case

Re: [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM.

2021-10-15 Thread Roger Pau Monné
On Fri, Oct 15, 2021 at 10:48:41AM +, Bertrand Marquis wrote: > Hi Jan, > > > On 15 Oct 2021, at 11:41, Jan Beulich wrote: > > > > On 15.10.2021 12:33, Bertrand Marquis wrote: > >>> On 15 Oct 2021, at 11:24, Jan Beulich wrote: > >>> On 15.10.2021 11:52, Bertrand Marquis wrote: > > On 15

Re: [PATCH v6 1/3] usb: Add Xen pvUSB protocol description

2021-10-15 Thread Juergen Gross
On 15.10.21 10:52, Juergen Gross wrote: On 15.10.21 10:14, Greg KH wrote: On Fri, Oct 15, 2021 at 10:07:35AM +0200, Juergen Gross wrote: On 13.10.21 14:01, Greg KH wrote: On Wed, Oct 13, 2021 at 09:52:05AM +0200, Juergen Gross wrote: Add the definition of pvUSB protocol used between the pvUSB

[xen-unstable-smoke test] 165522: tolerable all pass - PUSHED

2021-10-15 Thread osstest service owner
flight 165522 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/165522/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

Re: [PATCH 08/12] x86/pv-shim: don't modify hypercall table

2021-10-15 Thread Jan Beulich
On 15.10.2021 14:51, Juergen Gross wrote: > When running as pv-shim the hypercall is modified today in order to > replace the functions for __HYPERVISOR_event_channel_op and > __HYPERVISOR_grant_table_op hypercalls. > > Change this to call the related functions from the normal handlers > instead w

[PATCH v7 0/5] PCI devices passthrough on Arm

2021-10-15 Thread Bertrand Marquis
Hello All, This serie is a follow up on Rahul serie where we included various fixes required after review on the mailing list and a new patch to move some of the x86 ecam related code to the common vpci code. Most of the patches of the original serie have been merged and this serie includes only

[PATCH v7 1/5] xen/vpci: Move ecam access functions to common code

2021-10-15 Thread Bertrand Marquis
PCI standard is using ECAM and not MCFG which is coming from ACPI[1]. Use ECAM/ecam instead of MCFG in common code and in new functions added in common vpci code by this patch. Move vpci_access_allowed from arch/x86/hvm/io.c to drivers/vpci/vpci.c. Create vpci_ecam_{read,write} in drivers/vpci/vp

[PATCH v7 2/5] xen/arm: Enable the existing x86 virtual PCI support for ARM

2021-10-15 Thread Bertrand Marquis
From: Rahul Singh The existing VPCI support available for X86 is adapted for Arm. When the device is added to XEN via the hyper call “PHYSDEVOP_pci_device_add”, VPCI handler for the config space access is added to the Xen to emulate the PCI devices config space. A MMIO trap handler for the PCI E

[PATCH v7 5/5] arm/libxl: Emulated PCI device tree node in libxl

2021-10-15 Thread Bertrand Marquis
From: Rahul Singh libxl will create an emulated PCI device tree node in the device tree to enable the guest OS to discover the virtual PCI during guest boot. Emulated PCI device tree node will only be created when there is any device assigned to guest. A new area has been reserved in the arm gue

[PATCH v7 3/5] tools/libxl: Modify libxl__arch_domain_init_hw_description...

2021-10-15 Thread Bertrand Marquis
From: Michal Orzel ... to take a second argument of type libxl_domain_config* rather than libxl_domain_build_info*. We need to pass the whole libxl_domain_config structure as this will be needed later on to modify the libxl__prepare_dtb function to also take libxl_domain_config. Signed-off-by:

[PATCH v7 4/5] tools/libxl_arm: Modify libxl__prepare_dtb...

2021-10-15 Thread Bertrand Marquis
From: Michal Orzel ... to take a second argument of type libxl_domain_config* rather than libxl_domain_build_info*. This change will be needed to get access from libxl__prepare_dtb to "num_pcidevs" field of libxl_domain_config to check whether to create a vPCI DT node or not. Signed-off-by: Mic

  1   2   >