[linux-linus test] 184679: regressions - trouble: broken/fail/pass

2024-02-15 Thread osstest service owner
flight 184679 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/184679/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt-raw broken test-amd64-amd64-libvirt-raw 5

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

2024-02-15 Thread osstest service owner
flight 184677 xen-unstable real [real] flight 184680 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/184677/ http://logs.test-lab.xenproject.org/osstest/logs/184680/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

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

2024-02-15 Thread osstest service owner
flight 184678 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/184678/ 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

[PATCH v13.1 01/14] vpci: use per-domain PCI lock to protect vpci structure

2024-02-15 Thread Stewart Hildebrand
From: Oleksandr Andrushchenko Use the per-domain PCI read/write lock to protect the presence of the pci device vpci field. This lock can be used (and in a few cases is used right away) so that vpci removal can be performed while holding the lock in write mode. Previously such removal could race

Re: [GIT PULL] xen: branch for v6.8-rc5

2024-02-15 Thread pr-tracker-bot
The pull request you sent on Thu, 15 Feb 2024 16:24:26 +0100: > git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git > for-linus-6.8a-rc5-tag has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/cc9c4f0b3113d513a94bcf489f2fa8cb9cc7c679 Thank you! -- Deet-doot-dot,

Re: [PATCH] build/xen: fail to rebuild if Kconfig fails

2024-02-15 Thread Roger Pau Monné
On Thu, Feb 15, 2024 at 05:22:00PM +0100, Jan Beulich wrote: > On 15.02.2024 17:08, Roger Pau Monné wrote: > > On Thu, Feb 15, 2024 at 02:02:41PM +0100, Jan Beulich wrote: > >> --- a/xen/Rules.mk > >> +++ b/xen/Rules.mk > >> @@ -15,7 +15,11 @@ srcdir := $(srctree)/$(src) > >> PHONY := __build >

Re: [PATCH v8 5/7] xen/asm-generic: introduce generic device.h

2024-02-15 Thread Oleksii
> > On 14/02/2024 09:32, Oleksii wrote: > > On Tue, 2024-02-13 at 18:09 +, Julien Grall wrote: > > > > +#ifdef CONFIG_HAS_PASSTHROUGH > > > > +    struct iommu_fwspec *iommu_fwspec; /* per-device IOMMU > > > > instance data */ > > > > +#endif > > > > +}; > > > > + > > > > +typedef struct

[PATCH v3] x86/vmx: add support for virtualize SPEC_CTRL

2024-02-15 Thread Roger Pau Monne
The feature is defined in the tertiary exec control, and is available starting from Sapphire Rapids and Alder Lake CPUs. When enabled, two extra VMCS fields are used: SPEC_CTRL mask and shadow. Bits set in mask are not allowed to be toggled by the guest (either set or clear) and the value in the

Re: [PATCH v4 25/30] xen/riscv: add minimal stuff to processor.h to build full Xen

2024-02-15 Thread Jan Beulich
On 15.02.2024 17:38, Oleksii wrote: > On Tue, 2024-02-13 at 14:33 +0100, Jan Beulich wrote: >> On 05.02.2024 16:32, Oleksii Kurochko wrote: >>> + depends on LLD_VERSION >= 15 || LD_VERSION >= 23600 >> >> What's the linker dependency here? Depending on the answer I might >> further >> ask why

Re: [PATCH v4 25/30] xen/riscv: add minimal stuff to processor.h to build full Xen

2024-02-15 Thread Oleksii
On Tue, 2024-02-13 at 14:33 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > --- a/xen/arch/riscv/Kconfig > > +++ b/xen/arch/riscv/Kconfig > > @@ -45,6 +45,13 @@ config RISCV_ISA_C > >   > >     If unsure, say Y. > >   > > +config TOOLCHAIN_HAS_ZIHINTPAUSE > > +

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

2024-02-15 Thread osstest service owner
flight 184675 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/184675/ 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

Re: [PATCH] build/xen: fail to rebuild if Kconfig fails

2024-02-15 Thread Jan Beulich
On 15.02.2024 17:08, Roger Pau Monné wrote: > On Thu, Feb 15, 2024 at 02:02:41PM +0100, Jan Beulich wrote: >> --- a/xen/Rules.mk >> +++ b/xen/Rules.mk >> @@ -15,7 +15,11 @@ srcdir := $(srctree)/$(src) >> PHONY := __build >> __build: >> >> --include $(objtree)/include/config/auto.conf >> +ifneq

Re: [PATCH] build/xen: fail to rebuild if Kconfig fails

2024-02-15 Thread Roger Pau Monné
On Thu, Feb 15, 2024 at 02:02:41PM +0100, Jan Beulich wrote: > On 15.02.2024 12:04, Roger Pau Monné wrote: > > On Thu, Feb 15, 2024 at 11:43:02AM +0100, Jan Beulich wrote: > >> On 15.02.2024 11:28, Roger Pau Monné wrote: > >>> On Thu, Feb 15, 2024 at 10:49:31AM +0100, Jan Beulich wrote: > On

Re: [PATCH v2] x86/vmx: add support for virtualize SPEC_CTRL

2024-02-15 Thread Jan Beulich
On 15.02.2024 16:54, Roger Pau Monné wrote: > On Mon, Feb 12, 2024 at 03:09:01PM +0100, Jan Beulich wrote: >> On 09.02.2024 12:40, Roger Pau Monne wrote: >>> --- a/xen/arch/x86/hvm/vmx/vmx.c >>> +++ b/xen/arch/x86/hvm/vmx/vmx.c >>> @@ -823,18 +823,29 @@ static void cf_check

Re: [PATCH v7 03/21] tools/xen-9pfsd: add transport layer

2024-02-15 Thread Juergen Gross
On 15.02.24 14:04, Juergen Gross wrote: Add the transport layer of 9pfs. This is basically the infrastructure to receive requests from the frontend and to send the related answers via the rings. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD Seems CI is

Re: [PATCH] xen/arm: Make hwdom vUART optional feature

2024-02-15 Thread Julien Grall
Hi Michal, On 15/02/2024 14:39, Michal Orzel wrote: At the moment, the hardware domain vUART is always compiled in. In the spirit of fine granular configuration, make it optional so that the feature can be disabled if not needed. This UART is not exposed (e.g. via device tree) to a domain and

Re: [PATCH v2] x86/vmx: add support for virtualize SPEC_CTRL

2024-02-15 Thread Roger Pau Monné
On Mon, Feb 12, 2024 at 03:09:01PM +0100, Jan Beulich wrote: > On 09.02.2024 12:40, Roger Pau Monne wrote: > > @@ -1378,6 +1379,10 @@ static int construct_vmcs(struct vcpu *v) > > rc = vmx_add_msr(v, MSR_PRED_CMD, PRED_CMD_IBPB, > > VMX_MSR_HOST); > > > > +

Re: [PATCH] xen/arm: Make hwdom vUART optional feature

2024-02-15 Thread Luca Fancellu
> On 15 Feb 2024, at 14:39, Michal Orzel wrote: > > At the moment, the hardware domain vUART is always compiled in. In the > spirit of fine granular configuration, make it optional so that the > feature can be disabled if not needed. This UART is not exposed (e.g. > via device tree) to a

[xen-unstable test] 184673: tolerable FAIL

2024-02-15 Thread osstest service owner
flight 184673 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/184673/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-dom0pvh-xl-amd 14 guest-start fail in 184670 pass in 184673 test-armhf-armhf-libvirt-qcow2

[GIT PULL] xen: branch for v6.8-rc5

2024-02-15 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-6.8a-rc5-tag xen: branch for v6.8-rc5 It contains the following fixes and simple cleanups: - A fix using a proper flexible array instead of a one-element array in order to avoid

Re: Return type of clean_and_invalidate_dcache_va_range

2024-02-15 Thread Nicola Vetrini
I do like the idea. I applied some of the suggestions to this proof of concept patch (attached). Still not compile-tested, since the CI seems a bit slow today. arch_grant_cache_flush is missing the return type on x86, sorry. -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl

[PATCH V3] libxl: Add "grant_usage" parameter for virtio disk devices

2024-02-15 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko Allow administrators to control whether Xen grant mappings for the virtio disk devices should be used. By default (when new parameter is not specified), the existing behavior is retained (we enable grants if backend-domid != 0). Signed-off-by: Oleksandr Tyshchenko

[PATCH] xen/arm: Make hwdom vUART optional feature

2024-02-15 Thread Michal Orzel
At the moment, the hardware domain vUART is always compiled in. In the spirit of fine granular configuration, make it optional so that the feature can be disabled if not needed. This UART is not exposed (e.g. via device tree) to a domain and is mostly used to support special use cases like Linux

Re: Return type of clean_and_invalidate_dcache_va_range

2024-02-15 Thread Nicola Vetrini
Hi Julien, On 2024-02-13 18:14, Julien Grall wrote: Hi Jan, On 13/02/2024 07:13, Jan Beulich wrote: On 12.02.2024 19:38, Julien Grall wrote: An alternative would be to introduced arch_grant_cache_flush() and move the if/else logic there. Something like: diff --git

Re: [PATCH v2 1/2] xen/arm: Add imx8q{m,x} platform glue

2024-02-15 Thread John Ernberg
Hi Michal, On 2/15/24 10:02, Michal Orzel wrote: > Hi, > > On 14/02/2024 17:06, John Ernberg wrote: >> >> >> When using Linux for dom0 there are a bunch of drivers that need to do SMC >> SIP calls into the firmware to enable certain hardware bits like the >> watchdog. >> >> Provide a basic

Re: [PATCH v4 12/30] xen/riscv: introduce cmpxchg.h

2024-02-15 Thread Oleksii
> > +    : "=r" (ret), "+A" (*ptr) \ > > +    : "r" (new) \ > > +    : "memory" ); \ > > +}) > > + > > +#define emulate_xchg_1_2(ptr, new, ret, release_barrier, > > acquire_barrier) \ > > +({ \ > > +    uint32_t *ptr_32b_aligned = (uint32_t *)ALIGN_DOWN((unsigned > > long)ptr, 4); \ >

[PATCH v7 18/21] tools/xenstored: mount 9pfs device in stubdom

2024-02-15 Thread Juergen Gross
Mount the 9pfs device in stubdom enabling it to use files. This has to happen in a worker thread in order to allow the main thread handling the required Xenstore accesses in parallel. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall --- V3: - add logging in

[PATCH v7 13/21] tools/xen-9pfsd: add 9pfs read request support

2024-02-15 Thread Juergen Gross
Add the read request of the 9pfs protocol. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- V2: - make error check more readable (Jason Andryuk) V4: - add directory read support V5: - rewinddir() if reading a directory and offset is 0 (Jason Andryuk) ---

[PATCH v7 10/21] tools/xen-9pfsd: add 9pfs create request support

2024-02-15 Thread Juergen Gross
Add the create request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - set permissions correctly (Jason Andryuk) V3: - use opendirat() etc. (Jason Andryuk) - rework error handling a little bit --- tools/9pfsd/io.c | 151

[PATCH v7 15/21] tools/xl: support new 9pfs backend xen_9pfsd

2024-02-15 Thread Juergen Gross
Add support for the new 9pfs backend "xen_9pfsd". For this backend type the tag defaults to "Xen" and the host side path to "/var/log/xen/guests/". Do most of the default settings in libxl. Unfortunately the default path can't easily be set in libxl, as the domain name isn't available in the

[PATCH v7 21/21] tools/xenstored: have a single do_control_memreport()

2024-02-15 Thread Juergen Gross
With 9pfs now available in Xenstore-stubdom, there is no reason to have distinct do_control_memreport() variants for the daemon and the stubdom implementations. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xenstored/control.c | 27 +++ 1 file

[PATCH v7 11/21] tools/xen-9pfsd: add 9pfs stat request support

2024-02-15 Thread Juergen Gross
Add the stat request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V3: - use fstatat() (Jason Andryuk) V4: - add "s" format to fill_buffer() as a preparation for reading dirs --- tools/9pfsd/io.c | 102

[PATCH v7 12/21] tools/xen-9pfsd: add 9pfs write request support

2024-02-15 Thread Juergen Gross
Add the write request of the 9pfs protocol. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- tools/9pfsd/io.c | 54 1 file changed, 54 insertions(+) diff --git a/tools/9pfsd/io.c b/tools/9pfsd/io.c index

[PATCH v7 19/21] tools/xenstored: add helpers for filename handling

2024-02-15 Thread Juergen Gross
Add some helpers for handling filenames which might need different implementations between stubdom and daemon environments: - expansion of relative filenames (those are not really defined today, just expand them to be relative to /var/lib/xen/xenstore) - expansion of xenstore_daemon_rundir()

[XEN PATCH v2] automation/eclair_analysis: deviate certain macros for Rule 20.12

2024-02-15 Thread Nicola Vetrini
Certain macros are allowed to violate the Rule, since their meaning and intended use is well-known to all Xen developers. Variadic macros that rely on the GCC extension for removing a trailing comma when token pasting the variable argument are similarly well-understood and therefore allowed. No

[PATCH v7 17/21] tools: add 9pfs device to xenstore-stubdom

2024-02-15 Thread Juergen Gross
Add a 9pfs device to Xenstore stubdom in order to allow it to do e.g. logging into a dom0 file. Use the following parameters for the new device: - tag = "Xen" - type = "xen_9pfsd" - path = "/var/lib/xen/xenstore" - security-model = "none" For now don't limit allowed file space or number of

[PATCH v7 16/21] stubdom: extend xenstore stubdom configs

2024-02-15 Thread Juergen Gross
Extend the config files of the Xenstore stubdoms to include XENBUS and 9PFRONT items in order to support file based logging. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- stubdom/xenstore-minios.cfg| 2 +- stubdom/xenstorepvh-minios.cfg | 2 +- 2 files changed, 2

[PATCH v7 20/21] tools/xenstored: support complete log capabilities in stubdom

2024-02-15 Thread Juergen Gross
With 9pfs being fully available in Xenstore-stubdom now, there is no reason to not fully support all logging capabilities in stubdom. Open the logfile on stubdom only after the 9pfs file system has been mounted. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Reviewed-by: Julien Grall

[PATCH v7 14/21] tools/libs/light: add backend type for 9pfs PV devices

2024-02-15 Thread Juergen Gross
Make the backend type of 9pfs PV devices configurable. The default is "qemu" with the related Xenstore backend-side directory being "9pfs". Add another type "xen_9pfsd" with the related Xenstore backend-side directory "xen_9pfs". As additional security features it is possible to specify: -

Re: [PATCH V2] libxl: Add "grant_usage" parameter for virtio disk devices

2024-02-15 Thread Oleksandr Tyshchenko
On 13.02.24 14:14, Anthony PERARD wrote: Hello Anthony > On Tue, Feb 06, 2024 at 02:38:14PM +0200, Oleksandr Tyshchenko wrote: >> From: Oleksandr Tyshchenko >> >> Allow administrators to control whether Xen grant mappings for >> the virtio disk devices should be used. By default (when new >>

[PATCH v7 09/21] tools/xen-9pfsd: add 9pfs clunk request support

2024-02-15 Thread Juergen Gross
Add the clunk request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V3: - use unlinkat() (Jason Andryuk) --- tools/9pfsd/io.c | 43 +++ 1 file changed, 43 insertions(+) diff --git

[PATCH v7 08/21] tools/xen-9pfsd: add 9pfs open request support

2024-02-15 Thread Juergen Gross
Add the open request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - don't allow to open symbolic link V3: - use openat() (Jason Andryuk) - use common error handling in p9_open() --- tools/9pfsd/io.c| 137

[PATCH v7 06/21] tools/xen-9pfsd: add 9pfs attach request support

2024-02-15 Thread Juergen Gross
Add the attach request of the 9pfs protocol. This introduces the "fid" scheme of the 9pfs protocol. As this will be needed later, use a dedicated memory allocation function in alloc_fid() and prepare a fid reference count. For filling the qid data take the approach from the qemu 9pfs backend

[PATCH v7 07/21] tools/xen-9pfsd: add 9pfs walk request support

2024-02-15 Thread Juergen Gross
Add the walk request of the 9pfs protocol. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - don't allow walking across symbolic links V6: - use EBADF instead of EBADFD (Andrew Cooper) - use strncpy() with strlen() + 1 (Andrew Cooper) V7: - undo V6

[PATCH v7 04/21] tools/xen-9pfsd: add 9pfs response generation support

2024-02-15 Thread Juergen Gross
Add support for generation a 9pfs protocol response via a format based approach. Strings are stored in a per device string buffer and they are referenced via their offset in this buffer. This allows to avoid having to dynamically allocate memory for each single string. As a first user of the

[PATCH v7 05/21] tools/xen-9pfsd: add 9pfs version request support

2024-02-15 Thread Juergen Gross
Add the version request of the 9pfs protocol. For the version use the "9P2000.u" variant, as it is supported by Mini-OS and Linux. For the request parsing add all format items needed even in future in order to avoid code churn for those additions later. Signed-off-by: Juergen Gross Acked-by:

[PATCH v7 02/21] tools/xen-9pfsd: connect to frontend

2024-02-15 Thread Juergen Gross
Add the code for connecting to frontends to xenlogd. Signed-off-by: Juergen Gross Acked-by: Anthony PERARD Reviewed-by: Jason Andryuk --- V2: - support multiple rings per device (Jason Andryuk) - don't set .revents initially (Jason Andryuk) - call poll() with infinite timeout (Jason Andryuk) -

[PATCH v7 00/21] tools: enable xenstore-stubdom to use 9pfs

2024-02-15 Thread Juergen Gross
This series is adding 9pfs support to Xenstore-stubdom, enabling it to do logging to a dom0 directory. This is a prerequisite for the final goal to add live update support to Xenstore-stubdom, as it enables the stubdom to store its state in a dom0 file. The 9pfs backend is a new daemon written

[PATCH v7 03/21] tools/xen-9pfsd: add transport layer

2024-02-15 Thread Juergen Gross
Add the transport layer of 9pfs. This is basically the infrastructure to receive requests from the frontend and to send the related answers via the rings. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk Acked-by: Anthony PERARD --- V2: - rename put_request_bytes() (Jason Andryuk) -

[PATCH v7 01/21] tools: add a new xen 9pfs daemon

2024-02-15 Thread Juergen Gross
Add "xen-9pfsd", a new 9pfs daemon meant to support infrastructure domains (e.g. xenstore-stubdom) to access files in dom0. For now only add the code needed for starting the daemon and registering it with Xenstore via a new "libxl/xen-9pfs/state" node by writing the "running" state to it.

Re: [PATCH] build/xen: fail to rebuild if Kconfig fails

2024-02-15 Thread Jan Beulich
On 15.02.2024 12:04, Roger Pau Monné wrote: > On Thu, Feb 15, 2024 at 11:43:02AM +0100, Jan Beulich wrote: >> On 15.02.2024 11:28, Roger Pau Monné wrote: >>> On Thu, Feb 15, 2024 at 10:49:31AM +0100, Jan Beulich wrote: On 15.02.2024 10:30, Roger Pau Monne wrote: > --- a/xen/Makefile >

Re: [PATCH] build/xen: fail to rebuild if Kconfig fails

2024-02-15 Thread Jan Beulich
On 15.02.2024 13:11, Jan Beulich wrote: > On 15.02.2024 12:04, Roger Pau Monné wrote: >> On Thu, Feb 15, 2024 at 11:43:02AM +0100, Jan Beulich wrote: >>> On 15.02.2024 11:28, Roger Pau Monné wrote: Without the reordering the include of include/config/auto.conf will always succeed on

Re: [PATCH] docs: add a best practices coding guide

2024-02-15 Thread Julien Grall
On 08/02/2024 16:27, Julien Grall wrote: Hi Juergen, On 08/02/2024 16:05, Juergen Gross wrote: Today the CODING_STYLE contains a section "Handling unexpected conditions" specific to the hypervisor. This section is kind of misplaced for a coding style. It should rather be part of a "Coding

Re: [PATCH] build/xen: fail to rebuild if Kconfig fails

2024-02-15 Thread Jan Beulich
On 15.02.2024 12:04, Roger Pau Monné wrote: > On Thu, Feb 15, 2024 at 11:43:02AM +0100, Jan Beulich wrote: >> On 15.02.2024 11:28, Roger Pau Monné wrote: >>> Without the reordering the include of include/config/auto.conf will >>> always succeed on rebuilds, because the include is done before >>>

Re: [PATCH v6 15/21] tools/xl: support new 9pfs backend xen_9pfsd

2024-02-15 Thread Anthony PERARD
On Thu, Feb 15, 2024 at 10:42:18AM +0100, Juergen Gross wrote: > On 15.02.24 07:55, Juergen Gross wrote: > > Add support for the new 9pfs backend "xen_9pfsd". For this backend type > > the tag defaults to "Xen" and the host side path to > > "/var/log/xen/guests/". > > > > Do most of the default

Re: [PATCH v3 2/8] keyhandler: drop regs parameter from handle_keyregs()

2024-02-15 Thread Julien Grall
Hi Jan, On 12/02/2024 09:13, Jan Beulich wrote: On 08.02.2024 23:09, Julien Grall wrote: On 05/02/2024 13:28, Jan Beulich wrote: In preparation for further removal of regs parameters, drop it here. In the two places where it's actually needed, retrieve IRQ context if available, or else guest

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

2024-02-15 Thread osstest service owner
flight 184671 linux-linus real [real] flight 184674 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/184671/ http://logs.test-lab.xenproject.org/osstest/logs/184674/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

Re: [PATCH] build/xen: fail to rebuild if Kconfig fails

2024-02-15 Thread Roger Pau Monné
On Thu, Feb 15, 2024 at 10:32:57AM +, Anthony PERARD wrote: > On Thu, Feb 15, 2024 at 10:30:02AM +0100, Roger Pau Monne wrote: > > When doing a rebuild with an xen/include/config/auto.conf already present in > > the tree, failures from Kconfig are ignored since the target is present: > > > >

Re: [PATCH v3 1/8] serial: fake IRQ-regs context in poll handlers

2024-02-15 Thread Marek Marczykowski
On Thu, Feb 15, 2024 at 09:39:41AM +0100, Jan Beulich wrote: > On 15.02.2024 03:19, Marek Marczykowski wrote: > > On Tue, Feb 13, 2024 at 04:44:04PM +0100, Jan Beulich wrote: > >> On 13.02.2024 16:11, Marek Marczykowski wrote: > >>> On Tue, Feb 13, 2024 at 04:00:32PM +0100, Jan Beulich wrote: >

Re: [PATCH] build/xen: fail to rebuild if Kconfig fails

2024-02-15 Thread Roger Pau Monné
On Thu, Feb 15, 2024 at 11:43:02AM +0100, Jan Beulich wrote: > On 15.02.2024 11:28, Roger Pau Monné wrote: > > On Thu, Feb 15, 2024 at 10:49:31AM +0100, Jan Beulich wrote: > >> On 15.02.2024 10:30, Roger Pau Monne wrote: > >>> --- a/xen/Makefile > >>> +++ b/xen/Makefile > >>> @@ -358,10 +358,10 @@

Re: [PATCH] build/xen: fail to rebuild if Kconfig fails

2024-02-15 Thread Jan Beulich
On 15.02.2024 11:28, Roger Pau Monné wrote: > On Thu, Feb 15, 2024 at 10:49:31AM +0100, Jan Beulich wrote: >> On 15.02.2024 10:30, Roger Pau Monne wrote: >>> --- a/xen/Makefile >>> +++ b/xen/Makefile >>> @@ -358,10 +358,10 @@ config: tools_fixdep outputmakefile FORCE >>> else # !config-build >>>

Re: [PATCH] build/xen: fail to rebuild if Kconfig fails

2024-02-15 Thread Jan Beulich
On 15.02.2024 11:32, Anthony PERARD wrote: > On Thu, Feb 15, 2024 at 10:30:02AM +0100, Roger Pau Monne wrote: >> When doing a rebuild with an xen/include/config/auto.conf already present in >> the tree, failures from Kconfig are ignored since the target is present: >> >> gmake -C xen install >>

Re: [PATCH] build/xen: fail to rebuild if Kconfig fails

2024-02-15 Thread Anthony PERARD
On Thu, Feb 15, 2024 at 10:30:02AM +0100, Roger Pau Monne wrote: > When doing a rebuild with an xen/include/config/auto.conf already present in > the tree, failures from Kconfig are ignored since the target is present: > > gmake -C xen install > gmake[1]: Entering directory '/root/src/xen/xen' >

Re: [XEN PATCH v2 2/3] x86/uaccess: replace __{get,put}_user_bad() with STATIC_ASSERT_UNREACHABLE()

2024-02-15 Thread Jan Beulich
On 15.02.2024 11:07, Federico Serafini wrote: > On 15/02/24 09:10, Jan Beulich wrote: >> On 14.02.2024 17:11, Federico Serafini wrote: >>> I did some tries with example programs >>> and the assembler error always points to file and line >>> of the most enclosing function that caused the failure.

Re: [PATCH] build/xen: fail to rebuild if Kconfig fails

2024-02-15 Thread Roger Pau Monné
On Thu, Feb 15, 2024 at 10:49:31AM +0100, Jan Beulich wrote: > On 15.02.2024 10:30, Roger Pau Monne wrote: > > --- a/xen/Makefile > > +++ b/xen/Makefile > > @@ -358,10 +358,10 @@ config: tools_fixdep outputmakefile FORCE > > else # !config-build > > > > ifeq ($(need-config),y) > > --include

Re: [PATCH v2 05/12] IOMMU: rename and re-type ats_enabled

2024-02-15 Thread Jan Beulich
On 15.02.2024 11:15, Jan Beulich wrote: > Make the variable a tristate, with (as done elsewhere) a negative value > meaning "default". Since all use sites need looking at, also rename it > to match our usual "opt_*" pattern. While touching it, also move it to > .data.ro_after_init. > > The only

[PATCH v2 12/12] PCI/ATS: tidy {en,dis}able_ats_device() a little

2024-02-15 Thread Jan Beulich
Use appropriate types for the control register value as well as the capability position. Constify a pointer. Use "else" in favor of encoding the opposite condition of the earlier if(). Signed-off-by: Jan Beulich --- v2: New. --- a/xen/drivers/passthrough/ats.c +++

[PATCH v2 11/12] VT-d: drop flush_dev_iotlb parameter from IOTLB flush hook

2024-02-15 Thread Jan Beulich
All call sites pass it using the flag from the IOMMU which they also pass. Signed-off-by: Jan Beulich --- v2: New. --- a/xen/drivers/passthrough/vtd/extern.h +++ b/xen/drivers/passthrough/vtd/extern.h @@ -57,8 +57,7 @@ int __must_check cf_check vtd_flush_cont uint8_t function_mask,

[PATCH v2 10/12] VT-d: move {,un}map_vtd_domain_page()

2024-02-15 Thread Jan Beulich
..., thus allowing them to become static. There's nothing x86-specific about these functions anyway. Since only the "iommu_inclusive_mapping" parameter declaration would be left in the file, move that as well. There's nothing VT-d specific about it (anymore?): "dom0-iommu=map-inclusive" is

[PATCH v2 09/12] VT-d: move dev_invalidate_iotlb() to the sole file it's used from

2024-02-15 Thread Jan Beulich
..., thus allowing it and qinval_device_iotlb_sync() to become static. There's nothing x86-specific about the function anyway. While moving, adjust types to better match ./CODING_STYLE (albeit use of fixed-width types for parameters is retained to limit the effective change). Append a UL to a

[PATCH v2 08/12] VT-d: move ats_device() to the sole file it's used from

2024-02-15 Thread Jan Beulich
..., thus allowing it to become static, and thus reducing scope overlap between it and pci_ats_device(). There's nothing x86-specific about this function anyway. Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné --- a/xen/drivers/passthrough/vtd/extern.h +++

[PATCH v2 07/12] VT-d: replace find_ats_dev_drhd()

2024-02-15 Thread Jan Beulich
All callers only care about boolean outcome. For this there's no point in allocating a duplicate of the respective DRHD structure; a simple boolean suffices (which eventually may want to become a count, such that the "any ATS devices assigned state" can also clear again). With that boolean, remove

[PATCH v2 06/12] VT-d: respect ACPI SATC's ATC_REQUIRED flag

2024-02-15 Thread Jan Beulich
When the flag is set, permit Dom0 to control the device (no worse than what we had before and in line with other "best effort" behavior we use when it comes to Dom0), but suppress passing through to DomU-s unless ATS can actually be enabled for such devices (and was explicitly enabled on the

[PATCH v2 05/12] IOMMU: rename and re-type ats_enabled

2024-02-15 Thread Jan Beulich
Make the variable a tristate, with (as done elsewhere) a negative value meaning "default". Since all use sites need looking at, also rename it to match our usual "opt_*" pattern. While touching it, also move it to .data.ro_after_init. The only place it retains boolean nature is pci_ats_device(),

[PATCH v2 04/12] AMD/IOMMU: add helper to check whether ATS is to be used for a device

2024-02-15 Thread Jan Beulich
The same set of conditions is used in three places, requiring to be kept in sync. Introduce a helper to centralize these checks. To allow all parameters of the new helper be pointer-to-const, iommu_has_cap() also needs its 1st parameter to be constified. Beyond that further "modernize" that

[PATCH v2 03/12] VT-d: parse ACPI "SoC Integrated Address Translation Cache Reporting Structure"s

2024-02-15 Thread Jan Beulich
This is a prereq to us, in particular, respecting the "ATC required" flag. Note that ACPI_SATC_ATC_REQUIRED has its #define put in dmar.h, as we try to keep actbl*.h in sync what Linux (who in turn inherit from ACPI CA) has. Signed-off-by: Jan Beulich --- Lovely: On the SPR system with the SATC

[PATCH v2 02/12] VT-d: tidy error handling of RMRR parsing

2024-02-15 Thread Jan Beulich
It's acpi_parse_one_rmrr() where the allocation is coming from (by way of invoking acpi_parse_dev_scope()), or in add_one_user_rmrr()'s case allocation is even open-coded there, so freeing would better also happen there. Care needs to be taken to preserve acpi_parse_one_rmrr()'s ultimate return

[PATCH v2 01/12] VT-d: correct ATS checking for root complex integrated devices

2024-02-15 Thread Jan Beulich
Spec version 4.1 says "The ATSR structures identifies PCI Express Root-Ports supporting Address Translation Services (ATS) transactions. Software must enable ATS on endpoint devices behind a Root Port only if the Root Port is reported as supporting ATS transactions." Clearly root complex

[PATCH v2 00/12] VT-d: SATC handling; ATS: tidying

2024-02-15 Thread Jan Beulich
On a Sapphire Rapids system I noticed a line in the serial log indicating a DMAR entry type we're not recognizing. While arranging for it to be both recognized and respected, I noticed some further potential for cleaning up. 01: VT-d: correct ATS checking for root complex integrated devices 02:

Re: [XEN PATCH v2 2/3] x86/uaccess: replace __{get,put}_user_bad() with STATIC_ASSERT_UNREACHABLE()

2024-02-15 Thread Federico Serafini
On 15/02/24 09:10, Jan Beulich wrote: On 14.02.2024 17:11, Federico Serafini wrote: I did some tries with example programs and the assembler error always points to file and line of the most enclosing function that caused the failure. If I am not missing something, using __FILE__ and __LINE__

Re: [PATCH] build/xen: fail to rebuild if Kconfig fails

2024-02-15 Thread Jan Beulich
On 15.02.2024 10:30, Roger Pau Monne wrote: > --- a/xen/Makefile > +++ b/xen/Makefile > @@ -358,10 +358,10 @@ config: tools_fixdep outputmakefile FORCE > else # !config-build > > ifeq ($(need-config),y) > --include include/config/auto.conf > # Read in dependencies to all Kconfig* files, make

Re: [PATCH v6 15/21] tools/xl: support new 9pfs backend xen_9pfsd

2024-02-15 Thread Juergen Gross
On 15.02.24 07:55, Juergen Gross wrote: Add support for the new 9pfs backend "xen_9pfsd". For this backend type the tag defaults to "Xen" and the host side path to "/var/log/xen/guests/". Do most of the default settings in libxl. Unfortunately the default path can't easily be set in libxl, as

Re: [XEN PATCH v2] build: Replace `which` with `command -v`

2024-02-15 Thread Jan Beulich
On 14.02.2024 19:00, Anthony PERARD wrote: > The `which` command is not standard, may not exist on the build host, > or may not behave as expected by the build system. It is recommended > to use `command -v` to find out if a command exist and have its path, > and it's part of a POSIX shell

[PATCH] build/xen: fail to rebuild if Kconfig fails

2024-02-15 Thread Roger Pau Monne
When doing a rebuild with an xen/include/config/auto.conf already present in the tree, failures from Kconfig are ignored since the target is present: gmake -C xen install gmake[1]: Entering directory '/root/src/xen/xen' tools/kconfig/conf --syncconfig Kconfig common/Kconfig:2: syntax error

Re: [XEN PATCH v2 2/3] x86/uaccess: replace __{get,put}_user_bad() with STATIC_ASSERT_UNREACHABLE()

2024-02-15 Thread Jan Beulich
On 15.02.2024 01:05, Stefano Stabellini wrote: > I don't think is a good idea to add further changes to this patch. I > think we should go ahead with it as-is. I didn't suggest adding anything right here; there may want/need to be new prereq-s, though. I'd like to make sure that we don't

Re: [PATCH v2 1/2] xen/arm: Add imx8q{m,x} platform glue

2024-02-15 Thread Michal Orzel
Hi, On 14/02/2024 17:06, John Ernberg wrote: > > > When using Linux for dom0 there are a bunch of drivers that need to do SMC > SIP calls into the firmware to enable certain hardware bits like the > watchdog. > > Provide a basic platform glue that implements the needed SMC forwarding. > > The

Re: [PATCH v3 1/8] serial: fake IRQ-regs context in poll handlers

2024-02-15 Thread Jan Beulich
On 05.02.2024 14:27, Jan Beulich wrote: > In preparation of dropping the register parameters from > serial_[rt]x_interrupt() and in turn from IRQ handler functions, > register state needs making available another way for the few key > handlers which need it. Fake IRQ-like state. > >

Re: [PATCH v3 1/8] serial: fake IRQ-regs context in poll handlers

2024-02-15 Thread Jan Beulich
On 15.02.2024 03:19, Marek Marczykowski wrote: > On Tue, Feb 13, 2024 at 04:44:04PM +0100, Jan Beulich wrote: >> On 13.02.2024 16:11, Marek Marczykowski wrote: >>> On Tue, Feb 13, 2024 at 04:00:32PM +0100, Jan Beulich wrote: On 13.02.2024 15:53, Marek Marczykowski wrote: > Generally

Re: [RFC KERNEL PATCH v4 3/3] PCI/sysfs: Add gsi sysfs for pci_dev

2024-02-15 Thread Roger Pau Monné
On Mon, Feb 12, 2024 at 01:18:58PM -0600, Bjorn Helgaas wrote: > On Mon, Feb 12, 2024 at 10:13:28AM +0100, Roger Pau Monné wrote: > > On Fri, Feb 09, 2024 at 03:05:49PM -0600, Bjorn Helgaas wrote: > > > On Thu, Feb 01, 2024 at 09:39:49AM +0100, Roger Pau Monné wrote: > > > > On Wed, Jan 31, 2024

Re: [XEN PATCH v2 2/3] x86/uaccess: replace __{get,put}_user_bad() with STATIC_ASSERT_UNREACHABLE()

2024-02-15 Thread Jan Beulich
On 14.02.2024 17:11, Federico Serafini wrote: > I did some tries with example programs > and the assembler error always points to file and line > of the most enclosing function that caused the failure. > If I am not missing something, using __FILE__ and __LINE__ does not add > any information. >