Re: [PATCH] tools/libs: Don't recursively expand MAJOR ?= $(shell ...)

2021-12-14 Thread Jan Beulich
On 13.12.2021 20:04, Andrew Cooper wrote: > --- a/tools/libs/libs.mk > +++ b/tools/libs/libs.mk > @@ -6,7 +6,10 @@ > # MINOR: minor version of lib (0 if empty) > > LIBNAME := $(notdir $(CURDIR)) > -MAJOR ?= $(shell $(XEN_ROOT)/version.sh $(XEN_ROOT)/xen/Makefile) > + > +ifeq ($(origin MAJOR

[PATCH] revert "hvmloader: PA range 0xfc000000-0xffffffff should be UC"

2021-12-14 Thread Jan Beulich
This reverts commit c22bd567ce22f6ad9bd93318ad0d7fd1c2eadb0d. While its description is correct from an abstract or real hardware pov, the range is special inside HVM guests. The range being UC in particular gets in the way of OVMF, which places itself at [FFE0,]. While this is benign t

[PATCH] hvmloader: tidy pci_mem_{start,end}

2021-12-14 Thread Jan Beulich
For one at least pci_mem_start has to be precisely 32 bits wide, so use uint32_t for both. Otherwise expressions like "pci_mem_start <<= 1" won't have the intended effect (in their context). Further since its introduction pci_mem_end was never written to. Mark it const to make this explicit. Fina

Re: [PATCH v3 05/13] xen: generate hypercall interface related code

2021-12-14 Thread Jan Beulich
On 08.12.2021 16:55, Juergen Gross wrote: > 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

Re: [PATCH v2 14/18] IOMMU: fold flush-all hook into "flush one"

2021-12-14 Thread Jan Beulich
On 13.12.2021 16:04, Roger Pau Monné wrote: > On Fri, Sep 24, 2021 at 11:53:59AM +0200, Jan Beulich wrote: >> Having a separate flush-all hook has always been puzzling me some. We >> will want to be able to force a full flush via accumulated flush flags >> from the map/unmap functions. Introduce a

Re: [PATCH v2 15/18] IOMMU/x86: prefill newly allocate page tables

2021-12-14 Thread Jan Beulich
On 13.12.2021 16:51, Roger Pau Monné wrote: > On Fri, Sep 24, 2021 at 11:54:58AM +0200, Jan Beulich wrote: >> Page table are used for two purposes after allocation: They either start >> out all empty, or they get filled to replace a superpage. Subsequently, >> to replace all empty or fully contiguo

Re: [PATCH] xen/arm64: Zero the top 32 bits of gp registers on entry...

2021-12-14 Thread Michal Orzel
Hi Julien, Jan On 08.12.2021 10:55, Julien Grall wrote: > Hi, > > On 08/12/2021 07:20, Jan Beulich wrote: >> On 07.12.2021 20:11, Julien Grall wrote: >>> >>> >>> On 07/12/2021 08:37, Michal Orzel wrote: Hi Julien, >>> >>> Hi, >>> On 06.12.2021 16:29, Julien Grall wrote: > Hi, >

Re: [PATCH v2 14/18] IOMMU: fold flush-all hook into "flush one"

2021-12-14 Thread Roger Pau Monné
On Tue, Dec 14, 2021 at 10:06:37AM +0100, Jan Beulich wrote: > On 13.12.2021 16:04, Roger Pau Monné wrote: > > On Fri, Sep 24, 2021 at 11:53:59AM +0200, Jan Beulich wrote: > >> Having a separate flush-all hook has always been puzzling me some. We > >> will want to be able to force a full flush via

Re: [PATCH v5] x86/PVH: permit more physdevop-s to be used by Dom0

2021-12-14 Thread Roger Pau Monné
On Fri, Dec 03, 2021 at 11:28:39AM +0100, Jan Beulich wrote: > Certain notifications of Dom0 to Xen are independent of the mode Dom0 is > running in. Permit further PCI related ones (only their modern forms). > Also include the USB2 debug port operation at this occasion. While > largely relevant fo

Re: [PATCH] xen/arm64: Zero the top 32 bits of gp registers on entry...

2021-12-14 Thread Julien Grall
On 14/12/2021 09:17, Michal Orzel wrote: Hi Julien, Jan Hi, On 08.12.2021 10:55, Julien Grall wrote: Hi, On 08/12/2021 07:20, Jan Beulich wrote: On 07.12.2021 20:11, Julien Grall wrote: On 07/12/2021 08:37, Michal Orzel wrote: Hi Julien, Hi, On 06.12.2021 16:29, Julien Grall wro

[RFC v1 4/5] tools/arm: add "scmi_smc" option to xl.cfg

2021-12-14 Thread Oleksii Moisieiev
This enumeration sets SCI type for the domain. Currently there is two possible options: either 'none' or 'scmi_smc'. 'none' is the default value and it disables SCI support at all. 'scmi_smc' enables access to the Firmware from the domains using SCMI protocol and SMC as transport. Signed-off-by:

[RFC v1 0/5] Introduce SCI-mediator feature

2021-12-14 Thread Oleksii Moisieiev
Introducing the feature, called SCI mediator. It's purpose is to redirect SCMI requests from the domains to firmware (SCP, ATF etc), which controls the power/clock/resets etc. The idea is to make SCP firmware (or similar, such as AT-F) responsible for control power/clock/resets and provide SCMI int

[RFC v1 3/5] xen/arm: introduce SCMI-SMC mediator driver

2021-12-14 Thread Oleksii Moisieiev
This is the implementation of SCI interface, called SCMI-SMC driver, which works as the mediator between XEN Domains and Firmware (SCP, ATF etc). This allows devices from the Domains to work with clocks, resets and power-domains without access to CPG. The following features are implemented: - requ

[RFC v1 1/5] xen/arm: add support for Renesas R-Car Gen3 platform

2021-12-14 Thread Oleksii Moisieiev
Implementation includes platform-specific smc handler for rcar3 platform. Signed-off-by: Oleksii Moisieiev --- xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/rcar3.c | 46 + 2 files changed, 47 insertions(+) create mode 100644 xen/arch/arm/platfo

[RFC v1 5/5] xen/arm: add SCI mediator support for DomUs

2021-12-14 Thread Oleksii Moisieiev
Integration of the SCMI mediator with xen libs: - add hypercalls to aquire SCI channel and set device permissions for DomUs; - add SCMI_SMC nodes to DomUs device-tree based on partial device-tree; - SCI requests redirection from DomUs to Firmware. Signed-off-by: Oleksii Moisieiev --- tools/inclu

[RFC v1 2/5] xen/arm: add generic SCI mediator framework

2021-12-14 Thread Oleksii Moisieiev
This patch adds the basic framework for SCI mediator. SCI is System Control Interface, which is designed to redirect requests for the Hardware (such as power-domain/clock/resets etc) from the Domains to the firmware. Originally, cpg should be passed to the domain so it can work with power-domains/c

[PATCH] x86/cpuid: Fix TSXLDTRK definition

2021-12-14 Thread Andrew Cooper
TSXLDTRK lives in CPUID leaf 7[0].edx, not 7[0].ecx. Bit 16 in ecx is LA57. Fixes: a6d1b558471f ("x86emul: support X{SUS,RES}LDTRK") Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu --- tools/libs/light/libxl_cpuid.c | 2 +- tools/misc/xen-cpuid.c

Re: [patch V3 00/35] genirq/msi, PCI/MSI: Spring cleaning - Part 2

2021-12-14 Thread Thomas Gleixner
On Mon, Dec 13 2021 at 12:29, Nishanth Menon wrote: > On 23:18-20211210, Thomas Gleixner wrote: > Also while testing on TI K3 platforms, I noticed: > > msi_device_data_release/msi_device_destroy_sysfs in am64xx-evm / j7200 The warning complains about a device being released with MSI descriptors st

Re: [RFC v1 5/5] xen/arm: add SCI mediator support for DomUs

2021-12-14 Thread Jan Beulich
On 14.12.2021 10:34, Oleksii Moisieiev wrote: > --- a/xen/include/public/domctl.h > +++ b/xen/include/public/domctl.h > @@ -1177,6 +1177,13 @@ struct xen_domctl_vmtrace_op { > #define XEN_DOMCTL_vmtrace_get_option 5 > #define XEN_DOMCTL_vmtrace_set_option 6 > }; > + > +/* XEN_DOM

Re: [PATCH] xen/arm64: Zero the top 32 bits of gp registers on entry...

2021-12-14 Thread Michal Orzel
Hi Julien, On 14.12.2021 10:33, Julien Grall wrote: > > > On 14/12/2021 09:17, Michal Orzel wrote: >> Hi Julien, Jan > > Hi, > >> On 08.12.2021 10:55, Julien Grall wrote: >>> Hi, >>> >>> On 08/12/2021 07:20, Jan Beulich wrote: On 07.12.2021 20:11, Julien Grall wrote: > > > On

Re: [PATCH] xen/arm64: Zero the top 32 bits of gp registers on entry...

2021-12-14 Thread Jan Beulich
On 14.12.2021 10:51, Michal Orzel wrote: > Hi Julien, > > On 14.12.2021 10:33, Julien Grall wrote: >> >> >> On 14/12/2021 09:17, Michal Orzel wrote: >>> Hi Julien, Jan >> >> Hi, >> >>> On 08.12.2021 10:55, Julien Grall wrote: Hi, On 08/12/2021 07:20, Jan Beulich wrote: > On 07.1

Re: [PATCH] xen/arm64: Zero the top 32 bits of gp registers on entry...

2021-12-14 Thread Michal Orzel
On 14.12.2021 11:01, Jan Beulich wrote: > On 14.12.2021 10:51, Michal Orzel wrote: >> Hi Julien, >> >> On 14.12.2021 10:33, Julien Grall wrote: >>> >>> >>> On 14/12/2021 09:17, Michal Orzel wrote: Hi Julien, Jan >>> >>> Hi, >>> On 08.12.2021 10:55, Julien Grall wrote: > Hi, > >

[PATCH] xen/arm: vpci: Remove PCI I/O ranges property value

2021-12-14 Thread Rahul Singh
IO ports on ARM don't exist so all IO ports related hypercalls are going to fail on ARM when we passthrough a PCI device. Failure of xc_domain_ioport_permission(..) would turn into a critical failure at domain creation. We need to avoid this outcome, instead we want to continue with domain creation

[PATCH] xen/vpci: msix: move x86 specific code to x86 file

2021-12-14 Thread Rahul Singh
vpci/msix.c file will be used for arm architecture when vpci msix support will be added to ARM, but there is x86 specific code in this file. Move x86 specific code to the x86_msix.c file to make sure common code will be used for other architecture. No functional change intended. Signed-off-by: R

Re: [PATCH v5] x86/PVH: improve Dom0 memory size calculation

2021-12-14 Thread Roger Pau Monné
On Fri, Dec 03, 2021 at 11:27:20AM +0100, Jan Beulich wrote: > Assuming that the accounting for IOMMU page tables will also take care > of the P2M needs was wrong: dom0_paging_pages() can determine a far > higher value, high enough for the system to run out of memory while > setting up Dom0. Hence

Re: [PATCH] x86/cpuid: Fix TSXLDTRK definition

2021-12-14 Thread Jan Beulich
On 14.12.2021 10:37, Andrew Cooper wrote: > TSXLDTRK lives in CPUID leaf 7[0].edx, not 7[0].ecx. > > Bit 16 in ecx is LA57. I wonder how I managed to screw this up; it certainly hasn't been a typo in the original doc. > Fixes: a6d1b558471f ("x86emul: support X{SUS,RES}LDTRK") > Signed-off-by: An

Re: [PATCH v2] xen-blkfront: Use the bitmap API when applicable

2021-12-14 Thread Roger Pau Monné
On Thu, Dec 02, 2021 at 09:16:04PM +0100, Christophe JAILLET wrote: > Use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid some > open-coded arithmetic in allocator arguments. > > Also change the corresponding 'kfree()' into 'bitmap_free()' to keep > consistency. > > Use 'bitmap

Re: [PATCH] xen/arm64: Zero the top 32 bits of gp registers on entry...

2021-12-14 Thread Julien Grall
Hi, Replying in one e-mail the comments from Jan and Michal. On 14/12/2021 10:01, Jan Beulich wrote: On 14.12.2021 10:51, Michal Orzel wrote: Hi Julien, On 14.12.2021 10:33, Julien Grall wrote: On 14/12/2021 09:17, Michal Orzel wrote: Hi Julien, Jan Hi, On 08.12.2021 10:55, Julien Gra

Re: [PATCH v2] xen-blkfront: Use the bitmap API when applicable

2021-12-14 Thread Roger Pau Monné
On Tue, Dec 14, 2021 at 11:59:39AM +0100, Roger Pau Monné wrote: > On Thu, Dec 02, 2021 at 09:16:04PM +0100, Christophe JAILLET wrote: > > Use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid some > > open-coded arithmetic in allocator arguments. > > > > Also change the correspon

Re: [PATCH] tools/libs: Don't recursively expand MAJOR ?= $(shell ...)

2021-12-14 Thread Anthony PERARD
On Mon, Dec 13, 2021 at 07:04:49PM +, Andrew Cooper wrote: > Something slightly weird is going on. Before this, the exact number of hits > that verson.sh gets isn't stable, even when running repeat incremental builds. > I suspect this means we've got a lurking parallel build issue. It could s

Re: [PATCH] xen/arm64: Zero the top 32 bits of gp registers on entry...

2021-12-14 Thread Julien Grall
On 14/12/2021 11:01, Julien Grall wrote: Hi, Replying in one e-mail the comments from Jan and Michal. On 14/12/2021 10:01, Jan Beulich wrote: On 14.12.2021 10:51, Michal Orzel wrote: Hi Julien, On 14.12.2021 10:33, Julien Grall wrote: On 14/12/2021 09:17, Michal Orzel wrote: Hi Julien

Re: [PATCH v2 15/18] IOMMU/x86: prefill newly allocate page tables

2021-12-14 Thread Roger Pau Monné
On Tue, Dec 14, 2021 at 10:15:37AM +0100, Jan Beulich wrote: > On 13.12.2021 16:51, Roger Pau Monné wrote: > > On Fri, Sep 24, 2021 at 11:54:58AM +0200, Jan Beulich wrote: > >> Page table are used for two purposes after allocation: They either start > >> out all empty, or they get filled to replace

Re: [PATCH v2 15/18] IOMMU/x86: prefill newly allocate page tables

2021-12-14 Thread Jan Beulich
On 14.12.2021 12:41, Roger Pau Monné wrote: > On Tue, Dec 14, 2021 at 10:15:37AM +0100, Jan Beulich wrote: >> On 13.12.2021 16:51, Roger Pau Monné wrote: >>> On Fri, Sep 24, 2021 at 11:54:58AM +0200, Jan Beulich wrote: Page table are used for two purposes after allocation: They either start >>

RE: [PATCH 01/10] iommu/ipmmu-vmsa: Remove all unused register definitions

2021-12-14 Thread Yoshihiro Shimoda
Hello Oleksandr-san, > From: Oleksandr Tyshchenko, Sent: Sunday, November 28, 2021 2:52 AM > > From: Oleksandr Tyshchenko > > This is a non-verbatim port of corresponding Linux upsteam commit: > 77cf983892b2e0d40dc256b784930a9ffaad4fc8 > > Original commit message: > commit 77cf983892b2e0d40dc

RE: [PATCH 02/10] iommu/ipmmu-vmsa: Add helper functions for MMU "context" registers

2021-12-14 Thread Yoshihiro Shimoda
Hello Oleksandr-san, > From: Oleksandr Tyshchenko, Sent: Sunday, November 28, 2021 2:52 AM > > From: Oleksandr Tyshchenko > > This is a non-verbatim port of corresponding Linux upsteam commit: > 16d9454f5e0447f9c19cbf350b35ed377b9f64eb > > Original commit message: > commit 16d9454f5e0447f9c19

RE: [PATCH 03/10] iommu/ipmmu-vmsa: Add helper functions for "uTLB" registers

2021-12-14 Thread Yoshihiro Shimoda
Hello Oleksandr-san, > From: Oleksandr Tyshchenko, Sent: Sunday, November 28, 2021 2:52 AM > > From: Oleksandr Tyshchenko > > This is a non-verbatim port of corresponding Linux upsteam commit: > 3667c9978b2911dc1ded77f5971df477885409c4 > > Original commit message: > commit 3667c9978b2911dc1de

RE: [PATCH 04/10] iommu/ipmmu-vmsa: Add light version of Linux's ipmmu_features

2021-12-14 Thread Yoshihiro Shimoda
Hello Oleksandr-san, > From: Oleksandr Tyshchenko, Sent: Sunday, November 28, 2021 2:52 AM > > From: Oleksandr Tyshchenko > > This is a prereq work needed to add support for S4 series easily > in the future. > > We don't need to pull the whole struct and all instances as Xen > driver doesn't s

RE: [PATCH 05/10] iommu/ipmmu-vmsa: Calculate context registers' offset instead of a macro

2021-12-14 Thread Yoshihiro Shimoda
Hello Oleksandr-san, > From: Oleksandr Tyshchenko, Sent: Sunday, November 28, 2021 2:52 AM > > From: Oleksandr Tyshchenko > > This is a non-verbatim port of corresponding Linux upsteam commit: > 3dc28d9f59eaae41461542b27afe70339347ebb3 > > Original commit message: > commit 3dc28d9f59eaae41461

RE: [PATCH 06/10] iommu/ipmmu-vmsa: Add utlb_offset_base

2021-12-14 Thread Yoshihiro Shimoda
Hello Oleksandr-san, > From: Oleksandr Tyshchenko, Sent: Sunday, November 28, 2021 2:52 AM > > From: Oleksandr Tyshchenko > > This is a non-verbatim port of corresponding Linux upsteam commit: > 1289f7f15001c7ed36be6d23cb145c1d5feacdc8 > > Original commit message: > commit 1289f7f15001c7ed36b

RE: [PATCH 07/10] iommu/ipmmu-vmsa: Add Renesas R8A779F0 (R-Car S4) support

2021-12-14 Thread Yoshihiro Shimoda
Hello Oleksandr-san, Thank you for the patch! > From: Oleksandr Tyshchenko, Sent: Sunday, November 28, 2021 2:52 AM > > From: Oleksandr Tyshchenko > > Based on the following commit from the Renesas BSP: > 7003b9f732cffdc778fceb4bffb05ebb4540f726 > located at: > https://github.com/renesas-rcar/

[xen-unstable test] 167402: regressions - FAIL

2021-12-14 Thread osstest service owner
flight 167402 xen-unstable real [real] flight 167408 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/167402/ http://logs.test-lab.xenproject.org/osstest/logs/167408/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be r

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

2021-12-14 Thread osstest service owner
flight 167407 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/167407/ 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 0/2 v2] cpu/hotplug: Allow the CPU in CPU_UP_PREPARE state to be brought up again.

2021-12-14 Thread Sebastian Andrzej Siewior
On 2021-12-06 16:20:32 [+0100], To linux-ker...@vger.kernel.org wrote: > This is a repost of the previous patch (#2) and adding Boris > (Ostrovsky)'s suggestion regarding the XEN bits. > The previous post can be found at >https://lore.kernel.org/all/20211122154714.xaoxok3fpk5bg...@linutronix.de

Re: [PATCH] xen/vpci: msix: move x86 specific code to x86 file

2021-12-14 Thread Roger Pau Monné
On Tue, Dec 14, 2021 at 10:45:17AM +, Rahul Singh wrote: > vpci/msix.c file will be used for arm architecture when vpci msix > support will be added to ARM, but there is x86 specific code in this > file. > > Move x86 specific code to the x86_msix.c file to make sure common code > will be used

Re: [PATCH 07/10] iommu/ipmmu-vmsa: Add Renesas R8A779F0 (R-Car S4) support

2021-12-14 Thread Oleksandr
On 14.12.21 14:10, Yoshihiro Shimoda wrote: Hello Oleksandr-san, Hello Shimoda-san, Thank you for the patch! From: Oleksandr Tyshchenko, Sent: Sunday, November 28, 2021 2:52 AM From: Oleksandr Tyshchenko Based on the following commit from the Renesas BSP: 7003b9f732cffdc778fceb4bffb0

Re: [PATCH] tools/libs: Don't recursively expand MAJOR ?= $(shell ...)

2021-12-14 Thread Andrew Cooper
On 14/12/2021 08:17, Jan Beulich wrote: > On 13.12.2021 20:04, Andrew Cooper wrote: >> --- a/tools/libs/libs.mk >> +++ b/tools/libs/libs.mk >> @@ -6,7 +6,10 @@ >> # MINOR: minor version of lib (0 if empty) >> >> LIBNAME := $(notdir $(CURDIR)) >> -MAJOR ?= $(shell $(XEN_ROOT)/version.sh $(XE

Re: [PATCH] libxl/PCI: defer backend wait upon attaching to PV guest

2021-12-14 Thread Jason Andryuk
On Tue, Dec 14, 2021 at 2:50 AM Jan Beulich wrote: > > Attempting to wait when the backend hasn't been created yet can't work: > the function will complain "Backend ... does not exist". Move the > waiting past the creation of the backend (and that of other related > nodes), hoping that there are n

[ovmf test] 167409: all pass - PUSHED

2021-12-14 Thread osstest service owner
flight 167409 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/167409/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf c039fa7ff09729de07bc7ebcdd4878340bfaf252 baseline version: ovmf 7a6e6ae9332614d386446

Re: [PATCH V4] xen/gnttab: Store frame GFN in struct page_info on Arm

2021-12-14 Thread Jan Beulich
On 03.12.2021 21:33, Oleksandr Tyshchenko wrote: > --- a/xen/arch/arm/mm.c > +++ b/xen/arch/arm/mm.c > @@ -1382,8 +1382,10 @@ void share_xen_page_with_guest(struct page_info *page, > struct domain *d, > spin_lock(&d->page_alloc_lock); > > /* The incremented type count pins as writable

Re: [PATCH] xen-hvm: Allow disabling buffer_io_timer

2021-12-14 Thread Durrant, Paul
On 10/12/2021 11:34, Jason Andryuk wrote: commit f37f29d31488 "xen: slightly simplify bufioreq handling" hard coded setting req.count = 1 during initial field setup before the main loop. This missed a subtlety that an early exit from the loop when there are no ioreqs to process, would have req.c

[linux-linus test] 167404: tolerable FAIL - PUSHED

2021-12-14 Thread osstest service owner
flight 167404 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/167404/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-armhf-armhf-xl-rtds 14 guest-start fail REGR. vs. 167399 Tests which did not succeed,

Re: [PATCH] libxl/PCI: defer backend wait upon attaching to PV guest

2021-12-14 Thread Jan Beulich
On 14.12.2021 14:34, Jason Andryuk wrote: > On Tue, Dec 14, 2021 at 2:50 AM Jan Beulich wrote: >> >> Attempting to wait when the backend hasn't been created yet can't work: >> the function will complain "Backend ... does not exist". Move the >> waiting past the creation of the backend (and that of

Re: [PATCH] tools/libs: Don't recursively expand MAJOR ?= $(shell ...)

2021-12-14 Thread Jan Beulich
On 14.12.2021 13:52, Andrew Cooper wrote: > On 14/12/2021 08:17, Jan Beulich wrote: >> On 13.12.2021 20:04, Andrew Cooper wrote: >>> --- a/tools/libs/libs.mk >>> +++ b/tools/libs/libs.mk >>> @@ -6,7 +6,10 @@ >>> # MINOR: minor version of lib (0 if empty) >>> >>> LIBNAME := $(notdir $(CURDIR

Re: [PATCH] xen/vpci: msix: move x86 specific code to x86 file

2021-12-14 Thread Jan Beulich
On 14.12.2021 11:45, Rahul Singh wrote: > --- a/xen/drivers/vpci/msix.c > +++ b/xen/drivers/vpci/msix.c > @@ -17,15 +17,24 @@ > * License along with this program; If not, see > . > */ > > +#include > #include > #include > > -#include > #include > > -

Re: [PATCH] tools/libs: Don't recursively expand MAJOR ?= $(shell ...)

2021-12-14 Thread Anthony PERARD
On Mon, Dec 13, 2021 at 07:04:49PM +, Andrew Cooper wrote: > ?= is a deferred assignment. Switch to an alternative form which lets us use > an immediate assignment. > > Before, version.sh gets run anywhere between 46 and 88 times, with 50 on a > `clean`. After, 6 times, invariant of main run

Re: [PATCH v2 15/18] IOMMU/x86: prefill newly allocate page tables

2021-12-14 Thread Roger Pau Monné
On Fri, Sep 24, 2021 at 11:54:58AM +0200, Jan Beulich wrote: > Page table are used for two purposes after allocation: They either start > out all empty, or they get filled to replace a superpage. Subsequently, > to replace all empty or fully contiguous page tables, contiguous sub- > regions will be

[OSSTEST PATCH 1/2] daily-cron-email-{play,adhoc}-*: Drop Citrix email

2021-12-14 Thread Ian Jackson
Any such adhoc flights run from cron should be reported to osstest-admin, not my (soon to be deleted) Citrix adddress. Now the only remaining occurrences are - examples - authorship annotation of the init script - crontab-cambridge, which would need updating CC: Roger Pau Monné Signed-off-

[OSSTEST PATCH 2/2] daily-cron-email-real-*: Temporarily drop osstest-admin

2021-12-14 Thread Ian Jackson
Roger has agreed to take on osstest admin for the moment. Someone who intents to take on the role long term will probably want to get CC's of these flight reports, but it's fairly noisy. So for now, send them only to the lists. CC: Roger Pau Monné Signed-off-by: Ian Jackson --- daily-cron-ema

Re: [PATCH v2 15/18] IOMMU/x86: prefill newly allocate page tables

2021-12-14 Thread Jan Beulich
On 14.12.2021 15:50, Roger Pau Monné wrote: > On Fri, Sep 24, 2021 at 11:54:58AM +0200, Jan Beulich wrote: >> Page table are used for two purposes after allocation: They either start >> out all empty, or they get filled to replace a superpage. Subsequently, >> to replace all empty or fully contiguo

Re: [PATCH v2 15/18] IOMMU/x86: prefill newly allocate page tables

2021-12-14 Thread Roger Pau Monné
Forgot to comment. On Fri, Sep 24, 2021 at 11:54:58AM +0200, Jan Beulich wrote: > --- a/xen/drivers/passthrough/amd/pci_amd_iommu.c > +++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c > @@ -238,7 +238,7 @@ int amd_iommu_alloc_root(struct domain * > > if ( unlikely(!hd->arch.amd.root_table)

Re: [PATCH v2 15/18] IOMMU/x86: prefill newly allocate page tables

2021-12-14 Thread Jan Beulich
On 14.12.2021 16:06, Roger Pau Monné wrote: > Forgot to comment. > > On Fri, Sep 24, 2021 at 11:54:58AM +0200, Jan Beulich wrote: >> --- a/xen/drivers/passthrough/amd/pci_amd_iommu.c >> +++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c >> @@ -238,7 +238,7 @@ int amd_iommu_alloc_root(struct domain

[PATCH] x86: drop/replace MEMORY_GUARD

2021-12-14 Thread Jan Beulich
The functions it guards are dead code. Worse, while intended to exist in debug builds only, as of commit bacbf0cb7349 ("build: convert debug to Kconfig") they also get compiled in release builds. The remaining uses in show_stack_overflow() aren't really related to any memory guarding anymore - wit

Re: [PATCH v2 15/18] IOMMU/x86: prefill newly allocate page tables

2021-12-14 Thread Roger Pau Monné
On Tue, Dec 14, 2021 at 04:05:27PM +0100, Jan Beulich wrote: > On 14.12.2021 15:50, Roger Pau Monné wrote: > > On Fri, Sep 24, 2021 at 11:54:58AM +0200, Jan Beulich wrote: > >> --- a/xen/drivers/passthrough/amd/iommu-defs.h > >> +++ b/xen/drivers/passthrough/amd/iommu-defs.h > >> @@ -445,6 +445,8 @

[PATCH] Arm: drop memguard_{,un}guard_range() stubs

2021-12-14 Thread Jan Beulich
These exist for no reason: The code using them is only ever built for Arm32. And memguard_guard_stack() has no use outside of x86-specific code at all. Signed-off-by: Jan Beulich --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -2152,8 +2152,6 @@ void init_xenheap_pages(paddr_t ps,

Re: [PATCH v2 15/18] IOMMU/x86: prefill newly allocate page tables

2021-12-14 Thread Roger Pau Monné
On Tue, Dec 14, 2021 at 04:10:28PM +0100, Jan Beulich wrote: > On 14.12.2021 16:06, Roger Pau Monné wrote: > > Forgot to comment. > > > > On Fri, Sep 24, 2021 at 11:54:58AM +0200, Jan Beulich wrote: > >> --- a/xen/drivers/passthrough/amd/pci_amd_iommu.c > >> +++ b/xen/drivers/passthrough/amd/pci_a

Re: [PATCH v2 15/18] IOMMU/x86: prefill newly allocate page tables

2021-12-14 Thread Jan Beulich
On 14.12.2021 16:15, Roger Pau Monné wrote: > On Tue, Dec 14, 2021 at 04:05:27PM +0100, Jan Beulich wrote: >> On 14.12.2021 15:50, Roger Pau Monné wrote: >>> On Fri, Sep 24, 2021 at 11:54:58AM +0200, Jan Beulich wrote: --- a/xen/drivers/passthrough/amd/iommu_map.c +++ b/xen/drivers/passth

Re: [PATCH] x86: drop/replace MEMORY_GUARD

2021-12-14 Thread Andrew Cooper
On 14/12/2021 15:13, Jan Beulich wrote: > --- a/xen/arch/x86/traps.c > +++ b/xen/arch/x86/traps.c > @@ -642,7 +642,7 @@ void show_stack_overflow(unsigned int cp > { > unsigned long esp = regs->rsp; > unsigned long curr_stack_base = esp & ~(STACK_SIZE - 1); > -#ifdef MEMORY_GUARD > +#ifde

Re: [PATCH v2 15/18] IOMMU/x86: prefill newly allocate page tables

2021-12-14 Thread Jan Beulich
On 14.12.2021 16:17, Roger Pau Monné wrote: > On Tue, Dec 14, 2021 at 04:10:28PM +0100, Jan Beulich wrote: >> On 14.12.2021 16:06, Roger Pau Monné wrote: >>> Forgot to comment. >>> >>> On Fri, Sep 24, 2021 at 11:54:58AM +0200, Jan Beulich wrote: --- a/xen/drivers/passthrough/amd/pci_amd_iommu.

Re: [PATCH] Arm: drop memguard_{,un}guard_range() stubs

2021-12-14 Thread Julien Grall
Hi Jan, On 14/12/2021 15:16, Jan Beulich wrote: These exist for no reason: The code using them is only ever built for Arm32. And memguard_guard_stack() has no use outside of x86-specific code at all. Signed-off-by: Jan Beulich Acked-by: Julien Grall --- a/xen/common/page_alloc.c +++ b/xe

Re: [PATCH V6 1/2] libxl: Add support for Virtio disk configuration

2021-12-14 Thread Anthony PERARD
On Wed, Dec 08, 2021 at 06:59:43PM +0200, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > This patch adds basic support for configuring and assisting virtio-disk > backend (emualator) which is intended to run out of Qemu and could be > run in any domain. > Although the Virtio block d

[libvirt test] 167405: regressions - FAIL

2021-12-14 Thread osstest service owner
flight 167405 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/167405/ 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 V3 00/35] genirq/msi, PCI/MSI: Spring cleaning - Part 2

2021-12-14 Thread Nishanth Menon
On 10:41-20211214, Thomas Gleixner wrote: > On Mon, Dec 13 2021 at 12:29, Nishanth Menon wrote: > > On 23:18-20211210, Thomas Gleixner wrote: > > Also while testing on TI K3 platforms, I noticed: > > > > msi_device_data_release/msi_device_destroy_sysfs in am64xx-e

Re: [PATCH V4] xen/gnttab: Store frame GFN in struct page_info on Arm

2021-12-14 Thread Oleksandr
On 14.12.21 15:37, Jan Beulich wrote: Hi Jan, Julien. On 03.12.2021 21:33, Oleksandr Tyshchenko wrote: --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -1382,8 +1382,10 @@ void share_xen_page_with_guest(struct page_info *page, struct domain *d, spin_lock(&d->page_alloc_lock);

Re: [patch V3 00/35] genirq/msi, PCI/MSI: Spring cleaning - Part 2

2021-12-14 Thread Thomas Gleixner
On Tue, Dec 14 2021 at 10:22, Nishanth Menon wrote: > On 10:41-20211214, Thomas Gleixner wrote: > Agreed that the warning is fine, the null pointer exception that follows > [1] [2] it however does'nt look right and it can be trivially fixed with the > following fixup for ee907874

Re: [PATCH V4] xen/gnttab: Store frame GFN in struct page_info on Arm

2021-12-14 Thread Jan Beulich
On 14.12.2021 17:26, Oleksandr wrote: > On 14.12.21 15:37, Jan Beulich wrote: >> On 03.12.2021 21:33, Oleksandr Tyshchenko wrote: >>> @@ -2177,14 +2181,22 @@ void *alloc_xenheap_pages(unsigned int order, >>> unsigned int memflags) >>> >>> void free_xenheap_pages(void *v, unsigned int order) >

Re: [PATCH V4] xen/gnttab: Store frame GFN in struct page_info on Arm

2021-12-14 Thread Oleksandr
On 14.12.21 18:45, Jan Beulich wrote: Hi Jan. On 14.12.2021 17:26, Oleksandr wrote: On 14.12.21 15:37, Jan Beulich wrote: On 03.12.2021 21:33, Oleksandr Tyshchenko wrote: @@ -2177,14 +2181,22 @@ void *alloc_xenheap_pages(unsigned int order, unsigned int memflags) void free_xenheap_

Re: [XEN PATCH v8 01/47] build: factorise generation of the linker scripts

2021-12-14 Thread Julien Grall
Hi Anthony, On 25/11/2021 13:39, Anthony PERARD wrote: In Arm and X86 makefile, generating the linker script is the same, so we can simply have both call the same macro. We need to add *.lds files into extra-y so that Rules.mk can find the .*.cmd dependency file and load it. Change made to the

Re: [XEN PATCH v8 02/47] xen: move include/asm-* to arch/*/include/asm

2021-12-14 Thread Julien Grall
Hi, On 25/11/2021 13:39, Anthony PERARD wrote: This avoid the need to create the symbolic link "include/asm". Whenever a comment refer to an "asm" headers, this patch avoid spelling the arch when not needed to avoid some code churn. One unrelated change is to sort entries in MAINTAINERS for "I

Re: [XEN PATCH v8 05/47] build: adjust $(TARGET).efi creation in arch/arm

2021-12-14 Thread Julien Grall
Hi Anthony, On 25/11/2021 13:39, Anthony PERARD wrote: There is no need to try to guess a relative path to the "xen.efi" file, we can simply use $@. Also, there's no need to use `notdir`, make already do that work via $(@F). Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich Acked-by: J

Re: [XEN PATCH v8 08/47] build: prepare to always invoke $(MAKE) from xen/, use $(obj)

2021-12-14 Thread Julien Grall
Hi Anthony, On 25/11/2021 13:39, Anthony PERARD wrote: In a future patch, when building a subdirectory, we will set "obj=$subdir" rather than change directory. Before that, we add "$(obj)" and "$(src)" in as many places as possible where we will need to know which subdirectory is been built. "$

Re: [patch V3 00/35] genirq/msi, PCI/MSI: Spring cleaning - Part 2

2021-12-14 Thread Thomas Gleixner
On Tue, Dec 14 2021 at 17:36, Thomas Gleixner wrote: > On Tue, Dec 14 2021 at 10:22, Nishanth Menon wrote: >> On 10:41-20211214, Thomas Gleixner wrote: > [ 13.478122] Call trace: > [ 13.509042] msi_device_destroy_sysfs+0x18/0x88 > [ 13.509058] msi_domain_free_irqs+0x34/0x

Re: [XEN PATCH v8 12/47] build: build everything from the root dir, use obj=$subdir

2021-12-14 Thread Julien Grall
Hi Anthonny, On 25/11/2021 13:39, Anthony PERARD wrote: A subdirectory is now built by setting "$(obj)" instead of changing directory. "$(obj)" should always be set when using "Rules.mk" and thus a shortcut "$(build)" is introduced and should be used. A new variable "$(need-builtin)" is introdu

Re: [XEN PATCH v8 14/47] build: rename __LINKER__ to LINKER_SCRIPT

2021-12-14 Thread Julien Grall
Hi Anthony, On 25/11/2021 13:39, Anthony PERARD wrote: For two reasons: this macro is used to generate a "linker script" and is not by the linker, and name starting with an underscore '_' are supposed to be reserved, so better avoid them when not needed. If that's the case, then shouldn't we a

Re: [XEN PATCH v8 20/47] build: add headers path to CFLAGS once for all archs

2021-12-14 Thread Julien Grall
Hi Anthony, On 25/11/2021 13:39, Anthony PERARD wrote: This just remove duplication. Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich For Arm: Acked-by: Julien Grall Cheers, --- xen/Makefile | 3 +++ xen/arch/arm/arch.mk | 3 --- xen/arch/riscv/arch.mk | 2 -- xe

Re: [XEN PATCH v8 22/47] build: clean-up "clean" rules of duplication

2021-12-14 Thread Julien Grall
Hi Anthony, On 25/11/2021 13:39, Anthony PERARD wrote: All those files to be removed are already done in the main Makefile, either by the "find" command or directly (for $(TARGET).efi). Signed-off-by: Anthony PERARD Acked-by: Jan Beulich Acked-by: Julien Grall Cheers, -- Julien Grall

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

2021-12-14 Thread osstest service owner
flight 167412 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/167412/ 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: [XEN PATCH v8 01/47] build: factorise generation of the linker scripts

2021-12-14 Thread Anthony PERARD
On Tue, Dec 14, 2021 at 04:54:21PM +, Julien Grall wrote: > On 25/11/2021 13:39, Anthony PERARD wrote: > > diff --git a/xen/Rules.mk b/xen/Rules.mk > > +# Linker scripts, .lds.S -> .lds > > +quiet_cmd_cpp_lds_S = LDS $@ > > +cmd_cpp_lds_S = $(CPP) -P $(call cpp_flags,$(a_flags)) -D__LINKER_

Re: [XEN PATCH v8 01/47] build: factorise generation of the linker scripts

2021-12-14 Thread Julien Grall
Hi, On 14/12/2021 17:09, Anthony PERARD wrote: On Tue, Dec 14, 2021 at 04:54:21PM +, Julien Grall wrote: On 25/11/2021 13:39, Anthony PERARD wrote: diff --git a/xen/Rules.mk b/xen/Rules.mk +# Linker scripts, .lds.S -> .lds +quiet_cmd_cpp_lds_S = LDS $@ +cmd_cpp_lds_S = $(CPP) -P $(call

Re: [PATCH v3 01/13] xen: move do_vcpu_op() to arch specific code

2021-12-14 Thread Julien Grall
Hi Juergen, On 08/12/2021 15:55, Juergen Gross wrote: Today Arm is using another entry point for the vcpu_op hypercall as NIT: The 'as' doesn't sound right here. Did you mean 'compare to'? x86, as some of the common sub-ops are not supported on Arm. The Arm specific handler filetrs out the n

Re: [PATCH v3 02/13] xen: harmonize return types of hypercall handlers

2021-12-14 Thread Julien Grall
Hi, On 08/12/2021 15:55, Juergen Gross wrote: 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. So on Arm64, I don't think you can make use of the full 64-bit because a 32-bit domain would not be

Re: [XEN PATCH v8 02/47] xen: move include/asm-* to arch/*/include/asm

2021-12-14 Thread Andrew Cooper
On 25/11/2021 13:39, Anthony PERARD wrote: > This avoid the need to create the symbolic link "include/asm". > > Whenever a comment refer to an "asm" headers, this patch avoid > spelling the arch when not needed to avoid some code churn. > > One unrelated change is to sort entries in MAINTAINERS for

Re: [PATCH V6 1/2] libxl: Add support for Virtio disk configuration

2021-12-14 Thread Oleksandr
On 14.12.21 18:03, Anthony PERARD wrote: Hi Anthony On Wed, Dec 08, 2021 at 06:59:43PM +0200, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko This patch adds basic support for configuring and assisting virtio-disk backend (emualator) which is intended to run out of Qemu and could b

Re: [PATCH v2] xen-blkfront: Use the bitmap API when applicable

2021-12-14 Thread Christophe JAILLET
Le 14/12/2021 à 12:08, Roger Pau Monné a écrit : On Tue, Dec 14, 2021 at 11:59:39AM +0100, Roger Pau Monné wrote: On Thu, Dec 02, 2021 at 09:16:04PM +0100, Christophe JAILLET wrote: Use 'bitmap_zalloc()' to simplify code, improve the semantic and avoid some open-coded arithmetic in allocator ar

Re: [PATCH] tools/libxl: Don't read STORE/CONSOLE_PFN from Xen

2021-12-14 Thread Anthony PERARD
On Thu, Dec 09, 2021 at 05:07:52PM +, Andrew Cooper wrote: > The values are already available in dom->{console,xenstore}_pfn, just like on > the PV side of things. No need to ask Xen. > > Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH] SUPPORT.md, MAINTAINERS: De-support qemu-xen-traditional

2021-12-14 Thread Julien Grall
Hi Ian, On 09/12/2021 14:26, Ian Jackson wrote: In 4.16 we changed to not build this by default. I think it is now time to explicitly desupport it, completely, in favour of Linux dm stub domains. Signed-off-by: Ian Jackson --- MAINTAINERS | 2 +- SUPPORT.md | 18 +- 2 fi

Re: [patch V3 00/35] genirq/msi, PCI/MSI: Spring cleaning - Part 2

2021-12-14 Thread Thomas Gleixner
Nishanth, On Tue, Dec 14 2021 at 18:03, Thomas Gleixner wrote: > msi_device_data_release() > ... > pcim_release() >pci_disable_msi[x]() > > Groan I think I managed to distangle this. Can you please give: git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git msi-

Re: [patch V3 00/35] genirq/msi, PCI/MSI: Spring cleaning - Part 2

2021-12-14 Thread Nishanth Menon
On 21:15-20211214, Thomas Gleixner wrote: > Nishanth, > > On Tue, Dec 14 2021 at 18:03, Thomas Gleixner wrote: > > msi_device_data_release() > > ... > > pcim_release() > >pci_disable_msi[x]() > > > > Groan > > I thi

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

2021-12-14 Thread osstest service owner
flight 167411 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/167411/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-dom0pvh-xl-intel 20 guest-localmigrate/x10 fail in 167402 pass in 167411 test-amd64-i386-xl-q

[PATCH] x86/cpuid: Introduce dom0-cpuid command line option

2021-12-14 Thread Andrew Cooper
Specifically, this lets the user opt in to non-default for dom0. Split features[] out of parse_xen_cpuid(), giving it a lightly more appropraite name, so it can be shared with parse_xen_cpuid(). Collect all dom0 settings together in dom0_{en,dis}able_feat[], and apply it to dom0's policy when oth

Re: [patch V3 00/35] genirq/msi, PCI/MSI: Spring cleaning - Part 2

2021-12-14 Thread Thomas Gleixner
Nishanth, On Tue, Dec 14 2021 at 14:56, Nishanth Menon wrote: > On 21:15-20211214, Thomas Gleixner wrote: >> I think I managed to distangle this. Can you please give: >> >>git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git msi-v4-part-2 > > > Umm..

  1   2   >