Re: [PATCH v4 19/30] xen/riscv: introduce event.h

2024-02-14 Thread Jan Beulich
On 14.02.2024 13:16, Oleksii wrote: > On Mon, 2024-02-12 at 16:20 +0100, Jan Beulich wrote: >> On 05.02.2024 16:32, Oleksii Kurochko wrote: >>> Signed-off-by: Oleksii Kurochko >> >> Acked-by: Jan Beulich >> again with a nit, though: >> >>> --- /dev/null >>> +++

Re: [PATCH v4 14/30] xen/riscv: introduce atomic.h

2024-02-14 Thread Jan Beulich
On 14.02.2024 13:11, Oleksii wrote: > On Tue, 2024-02-13 at 12:36 +0100, Jan Beulich wrote: >> On 05.02.2024 16:32, Oleksii Kurochko wrote: >>> --- /dev/null >>> +++ b/xen/arch/riscv/include/asm/atomic.h >>> @@ -0,0 +1,395 @@ >>> +/* SPDX-License-Identifier: GPL-2.0-only */ >>> +/* >>> + * Taken

[PATCH v2 5/5] mm: add the __must_check attribute to {gfn,mfn,dfn}_add()

2024-02-14 Thread Roger Pau Monne
It's not obvious from just the function name whether the incremented value will be stored in the parameter, or returned to the caller. That has leads to bugs in the past as callers may assume the incremented value is stored in the parameter. Add the __must_check attribute to the function to

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

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

Re: [PATCH v2] Reduce assembly code size of exception entry points

2024-02-14 Thread Roger Pau Monné
On Wed, Feb 14, 2024 at 04:08:12PM +0100, Jan Beulich wrote: > On 14.02.2024 16:02, Roger Pau Monné wrote: > > On Wed, Feb 14, 2024 at 10:35:58AM +, Frediano Ziglio wrote: > >> We just pushed a 8-bytes zero and exception constants are > >> small so we can just write a single byte saving 3

[PATCH net v2 1/7] net: fill in MODULE_DESCRIPTION()s for xen-netback

2024-02-14 Thread Breno Leitao
W=1 builds now warn if module is built without a MODULE_DESCRIPTION(). Add descriptions to the Xen backend network module. Signed-off-by: Breno Leitao Acked-by: Paul Durrant --- drivers/net/xen-netback/netback.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH v13 10/14] vpci/header: emulate PCI_COMMAND register for guests

2024-02-14 Thread Jan Beulich
On 02.02.2024 22:33, Stewart Hildebrand wrote: > @@ -836,9 +870,20 @@ static int cf_check init_header(struct pci_dev *pdev) > if ( pdev->ignore_bars ) > return 0; > > -/* Disable memory decoding before sizing. */ > cmd = pci_conf_read16(pdev->sbdf, PCI_COMMAND); > -if

Re: [PATCH v5 16/22] tools/xl: support new 9pfs backend xen_9pfsd

2024-02-14 Thread Anthony PERARD
On Thu, Feb 08, 2024 at 05:55:40PM +0100, 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

Re: [PATCH v5 21/22] tools/xenstored: support complete log capabilities in stubdom

2024-02-14 Thread Anthony PERARD
On Thu, Feb 08, 2024 at 05:55:45PM +0100, Juergen Gross wrote: > 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. > >

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

2024-02-14 Thread Anthony PERARD
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 standard (at least, it seems to be mandatory since IEEE

Re: [PATCH v5 15/22] tools/libs/light: add backend type for 9pfs PV devices

2024-02-14 Thread Anthony PERARD
On Wed, Feb 14, 2024 at 11:18:18AM +0100, Jürgen Groß wrote: > On 13.02.24 19:03, Anthony PERARD wrote: > > On Thu, Feb 08, 2024 at 05:55:39PM +0100, Juergen Gross wrote: > > > +struct libxl__aop9_state { > > > +libxl__spawn_state spawn; > > > +libxl__ao_device *aodev; > > > +

Re: [PATCH v5 07/22] tools/9pfsd: add 9pfs attach request support

2024-02-14 Thread Andrew Cooper
On 08/02/2024 4:55 pm, Juergen Gross wrote: > +static struct p9_fid *alloc_fid_mem(device *device, unsigned int fid, > +const char *path) > +{ > +struct p9_fid *fidp; > +size_t pathlen; > + > +pathlen = strlen(path); > +fidp =

Re: [PATCH] x86/altp2m: p2m_altp2m_get_or_propagate() should honor ap2m->default_access

2024-02-14 Thread Andrew Cooper
On 06/02/2024 10:08 am, Petr Beneš wrote: > From: Petr Beneš > > This patch addresses a behavior discrepancy in the handling of altp2m views, > where upon the creation and subsequent EPT violation, the page access > permissions were incorrectly inherited from the hostp2m instead of respecting >

Re: [PATCH 2/5] iommu/x86: print RMRR/IVMD ranges using full addresses

2024-02-14 Thread Roger Pau Monné
On Wed, Feb 14, 2024 at 02:22:09PM +0100, Jan Beulich wrote: > On 14.02.2024 11:37, Roger Pau Monne wrote: > > It's easier to correlate with the physical memory map if the addresses are > > fully printed, instead of using frame numbers. > > > > Requested-by: Andrew Cooper > > Signed-off-by:

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

2024-02-14 Thread Federico Serafini
On 12/02/24 09:43, Jan Beulich wrote: On 09.02.2024 10:50, Federico Serafini wrote: On 08/02/24 12:14, Jan Beulich wrote: On 08.02.2024 11:45, Federico Serafini wrote: On 07/02/24 17:19, Jan Beulich wrote: On 07.02.2024 16:58, Federico Serafini wrote: On 07/02/24 16:24, Jan Beulich wrote:

Re: [PATCH v5 07/22] tools/9pfsd: add 9pfs attach request support

2024-02-14 Thread Andrew Cooper
On 08/02/2024 4:55 pm, Juergen Gross wrote: > +static struct p9_fid *alloc_fid(device *device, unsigned int fid, > +const char *path) > +{ > +struct p9_fid *fidp = NULL; > + > +pthread_mutex_lock(>fid_mutex); > + > +if ( find_fid(device, fid) ) > +{

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

2024-02-14 Thread Andrew Cooper
On 14/02/2024 6:00 pm, 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

Re: [PATCH 3/5] iommu/x86: use full addresses internally for the IVMD/RMRR range checks

2024-02-14 Thread Jan Beulich
On 14.02.2024 11:37, Roger Pau Monne wrote: > Adjust the code in the checker to use full addresses rather than frame > numbers, > as it's only page_get_ram_type() that requires an mfn parameter. > > Suggested-by: Andrew Cooper > Signed-off-by: Roger Pau Monné In this very shape I'd like to

Re: [PATCH 5/5] mm: add the __must_check attribute to {gfn,mfn}_add()

2024-02-14 Thread Jan Beulich
On 14.02.2024 11:37, Roger Pau Monne wrote: > It's not obvious from the function itself whether the incremented value will > be s/the function itself/just the function name/ ? > stored in the parameter, or returned to the caller. That has leads to bugs in > the past as callers assume the

Re: [PATCH v2] Reduce assembly code size of exception entry points

2024-02-14 Thread Jan Beulich
On 14.02.2024 11:35, Frediano Ziglio wrote: > We just pushed a 8-bytes zero This part is now somewhat stale. > and exception constants are > small so we can just write a single byte saving 3 bytes for > instruction. > With ENDBR64 this reduces the size of many entry points from 32 to > 16 bytes

Re: [PATCH v2 2/3] docs/misra/rules.rst: add rule 5.5

2024-02-14 Thread Federico Serafini
On 14/02/24 14:15, Jan Beulich wrote: On 14.02.2024 12:27, Federico Serafini wrote: On 14/02/24 09:28, Jan Beulich wrote: On 13.02.2024 23:33, Stefano Stabellini wrote: Signed-off-by: Stefano Stabellini --- docs/misra/rules.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git

Re: [PATCH v2 5/5] mm: add the __must_check attribute to {gfn,mfn,dfn}_add()

2024-02-14 Thread Jan Beulich
On 14.02.2024 15:11, Roger Pau Monne wrote: > It's not obvious from just the function name whether the incremented value > will > be stored in the parameter, or returned to the caller. That has leads to bugs > in the past as callers may assume the incremented value is stored in the > parameter.

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

2024-02-14 Thread Jan Beulich
On 14.02.2024 16:31, Nicola Vetrini wrote: > On 2024-02-14 12:49, Jan Beulich wrote: >> On 14.02.2024 12:26, Nicola Vetrini wrote: >>> +-config=MC3R1.R20.12,macros+={deliberate, >>> "name(ASSERT||BUILD_BUG_ON||BUILD_BUG_ON_ZERO||GENERATE_CASE)"} >> >> I said in another context already that it is

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

2024-02-14 Thread Nicola Vetrini
On 2024-02-14 16:45, Jan Beulich wrote: On 14.02.2024 16:31, Nicola Vetrini wrote: On 2024-02-14 12:49, Jan Beulich wrote: On 14.02.2024 12:26, Nicola Vetrini wrote: +-config=MC3R1.R20.12,macros+={deliberate, "name(ASSERT||BUILD_BUG_ON||BUILD_BUG_ON_ZERO||GENERATE_CASE)"} I said in another

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

2024-02-14 Thread osstest service owner
flight 184667 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/184667/ 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 v2] Reduce assembly code size of exception entry points

2024-02-14 Thread Roger Pau Monné
On Wed, Feb 14, 2024 at 10:35:58AM +, Frediano Ziglio wrote: > We just pushed a 8-bytes zero and exception constants are > small so we can just write a single byte saving 3 bytes for > instruction. > With ENDBR64 this reduces the size of many entry points from 32 to > 16 bytes (due to

Re: [PATCH v2] Reduce assembly code size of exception entry points

2024-02-14 Thread Jan Beulich
On 14.02.2024 16:02, Roger Pau Monné wrote: > On Wed, Feb 14, 2024 at 10:35:58AM +, Frediano Ziglio wrote: >> We just pushed a 8-bytes zero and exception constants are >> small so we can just write a single byte saving 3 bytes for >> instruction. >> With ENDBR64 this reduces the size of many

[xen-unstable test] 184665: tolerable FAIL

2024-02-14 Thread osstest service owner
flight 184665 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/184665/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-amd64-xl-qemuu-debianhvm-amd64-shadow 20 guest-start/debianhvm.repeat fail in 184660 pass in 184665

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

2024-02-14 Thread John Ernberg
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 format of these calls are as follows: - reg 0: service ID - reg

[PATCH v2 0/2] Xen: ARM: Improved NXP iMX8 platform support

2024-02-14 Thread John Ernberg
The iMX lpuart driver added at 44e17aa60d47 ("xen/arm: Add i.MX lpuart driver") is not enough to boot a Linux based dom0 when certain drivers, such as the watchdog driver, are enabled. We're also fixing compatibles in imx-lpuart to allow Xen to use the UART on the QXP variant as well. NOTE:

[PATCH v2 2/2] xen/drivers: imx-lpuart: Replace iMX8QM compatible with iMX8QXP

2024-02-14 Thread John Ernberg
Allow the uart to probe also with iMX8QXP. The ip-block is the same as in the QM. Since the fsl,imx8qm-lpuart compatible in Linux exists in name only and is not used in the driver any iMX8QM device tree that can boot Linux must set fsl,imx8qxp-lpuart compatible as well as the QM one. Thus we

Re: [PATCH v2 2/3] docs/misra/rules.rst: add rule 5.5

2024-02-14 Thread Jan Beulich
On 14.02.2024 12:27, Federico Serafini wrote: > On 14/02/24 09:28, Jan Beulich wrote: >> On 13.02.2024 23:33, Stefano Stabellini wrote: >>> Signed-off-by: Stefano Stabellini >>> --- >>> docs/misra/rules.rst | 6 ++ >>> 1 file changed, 6 insertions(+) >>> >>> diff --git

Re: [PATCH v2] Reduce assembly code size of exception entry points

2024-02-14 Thread Andrew Cooper
On 14/02/2024 3:29 pm, Roger Pau Monné wrote: > On Wed, Feb 14, 2024 at 04:08:12PM +0100, Jan Beulich wrote: >> On 14.02.2024 16:02, Roger Pau Monné wrote: >>> On Wed, Feb 14, 2024 at 10:35:58AM +, Frediano Ziglio wrote: We just pushed a 8-bytes zero and exception constants are small

Re: [PATCH] tools/ocaml: Add missing vmtrace_buf_kb field

2024-02-14 Thread Christian Lindig
> On 14 Feb 2024, at 11:45, Andrew Cooper wrote: > > Xapi is the only consumer of this interface. I've fixed up the build > against staging, but we're not going to be running KFX under Xapi any > time soon. > > Ultimately it's Christian's call. After a discussion with Andrew, we will not

Re: [PATCH 4/5] iommu/x86: print page type in IVMD/RMRR check in case of error

2024-02-14 Thread Jan Beulich
On 14.02.2024 11:37, Roger Pau Monne wrote: > Provide more information in case the page can't be converted, and print the > original type(s). > > Requested-by: Andrew Cooper > Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich

Re: [PATCH v6 02/15] xen/arm: add initial support for LLC coloring on arm64

2024-02-14 Thread Carlo Nonato
Hi Michal, On Wed, Feb 14, 2024 at 11:14 AM Michal Orzel wrote: > > Hi Carlo, > > On 29/01/2024 18:17, Carlo Nonato wrote: > > > > > > LLC coloring needs to know the last level cache layout in order to make the > > best use of it. This can be probed by inspecting the CLIDR_EL1 register, > > so

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

2024-02-14 Thread osstest service owner
flight 184666 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/184666/ 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 v6 14/15] xen/arm: add cache coloring support for Xen

2024-02-14 Thread Carlo Nonato
Hi Jan, On Wed, Feb 14, 2024 at 8:55 AM Jan Beulich wrote: > > On 13.02.2024 18:29, Carlo Nonato wrote: > > On Tue, Feb 13, 2024 at 4:25 PM Jan Beulich wrote: > >> On 29.01.2024 18:18, Carlo Nonato wrote: > >>> @@ -218,9 +230,44 @@ static void xen_pt_enforce_wnx(void) > >>> ---

Re: [PATCH v2] Reduce assembly code size of exception entry points

2024-02-14 Thread Jan Beulich
On 14.02.2024 11:35, Frediano Ziglio wrote: > @@ -898,105 +898,105 @@ END(handle_exception) > FUNC(entry_DE) > ENDBR64 > pushq $0 > -movl $X86_EXC_DE, 4(%rsp) > +movb $X86_EXC_DE, 4(%rsp) As we're trying to compact things: This writes 0 over the previously

Re: [PATCH 2/5] iommu/x86: print RMRR/IVMD ranges using full addresses

2024-02-14 Thread Jan Beulich
On 14.02.2024 11:37, Roger Pau Monne wrote: > It's easier to correlate with the physical memory map if the addresses are > fully printed, instead of using frame numbers. > > Requested-by: Andrew Cooper > Signed-off-by: Roger Pau Monné In principle Reviewed-by: Jan Beulich I'm not sure though

Re: [PATCH 3/5] iommu/x86: use full addresses internally for the IVMD/RMRR range checks

2024-02-14 Thread Jan Beulich
On 14.02.2024 15:05, Roger Pau Monné wrote: > On Wed, Feb 14, 2024 at 02:29:35PM +0100, Jan Beulich wrote: >> On 14.02.2024 11:37, Roger Pau Monne wrote: >>> Adjust the code in the checker to use full addresses rather than frame >>> numbers, >>> as it's only page_get_ram_type() that requires an

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

2024-02-14 Thread Anthony PERARD
The `which` command is not standard, may not exist on the build host, or may not behave as expected. It is recommanded to use `command -v` to find out if a command exist and have it's path, and it's part of a POSIX shell standard. Signed-off-by: Anthony PERARD --- xen/Makefile | 4 ++-- 1 file

Re: [PATCH v2] Reduce assembly code size of exception entry points

2024-02-14 Thread Roger Pau Monné
On Wed, Feb 14, 2024 at 03:53:24PM +, Andrew Cooper wrote: > On 14/02/2024 3:29 pm, Roger Pau Monné wrote: > > On Wed, Feb 14, 2024 at 04:08:12PM +0100, Jan Beulich wrote: > >> On 14.02.2024 16:02, Roger Pau Monné wrote: > >>> On Wed, Feb 14, 2024 at 10:35:58AM +, Frediano Ziglio wrote: >

Re: [PATCH 5/5] mm: add the __must_check attribute to {gfn,mfn}_add()

2024-02-14 Thread Roger Pau Monné
On Wed, Feb 14, 2024 at 02:42:46PM +0100, Jan Beulich wrote: > On 14.02.2024 11:37, Roger Pau Monne wrote: > > It's not obvious from the function itself whether the incremented value > > will be > > s/the function itself/just the function name/ ? > > > stored in the parameter, or returned to

Re: [PATCH 3/5] iommu/x86: use full addresses internally for the IVMD/RMRR range checks

2024-02-14 Thread Roger Pau Monné
On Wed, Feb 14, 2024 at 02:29:35PM +0100, Jan Beulich wrote: > On 14.02.2024 11:37, Roger Pau Monne wrote: > > Adjust the code in the checker to use full addresses rather than frame > > numbers, > > as it's only page_get_ram_type() that requires an mfn parameter. > > > > Suggested-by: Andrew

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

2024-02-14 Thread Marek Marczykowski-Górecki
On Wed, Feb 14, 2024 at 02:34:11PM +, Anthony PERARD wrote: > The `which` command is not standard, may not exist on the build host, > or may not behave as expected. It is recommanded to use `command -v` > to find out if a command exist and have it's path, and it's part of a > POSIX shell

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

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

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

2024-02-14 Thread Nicola Vetrini
On 2024-02-14 12:49, Jan Beulich wrote: On 14.02.2024 12:26, Nicola Vetrini wrote: --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -387,6 +387,16 @@ in assignments." {safe, "left_right(^[(,\\[]$,^[),\\]]$)"} -doc_end

Re: [PATCH v5 18/22] tools: add 9pfs device to xenstore-stubdom

2024-02-14 Thread Anthony PERARD
On Thu, Feb 08, 2024 at 05:55:42PM +0100, Juergen Gross wrote: > diff --git a/tools/include/libxl.h b/tools/include/libxl.h > index a554f2ccd6..e6ab5ddb94 100644 > --- a/tools/include/libxl.h > +++ b/tools/include/libxl.h > @@ -583,6 +583,13 @@ > * libxl_console_add_xenstore() in libxl. > */ >

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

2024-02-14 Thread osstest service owner
flight 184668 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/184668/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 184665

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

2024-02-14 Thread Marek Marczykowski
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: > >>> On Tue, Feb 13, 2024 at 08:45:54AM +0100, Jan Beulich wrote: >

[ovmf test] 184669: all pass - PUSHED

2024-02-14 Thread osstest service owner
flight 184669 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/184669/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf edc6681206c1a8791981a2f911d2fb8b3d2f5768 baseline version: ovmf

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

2024-02-14 Thread Stefano Stabellini
On Wed, 14 Feb 2024, Federico Serafini wrote: > On 12/02/24 09:43, Jan Beulich wrote: > > On 09.02.2024 10:50, Federico Serafini wrote: > > > On 08/02/24 12:14, Jan Beulich wrote: > > > > On 08.02.2024 11:45, Federico Serafini wrote: > > > > > On 07/02/24 17:19, Jan Beulich wrote: > > > > > > On

Re: [PATCH 0/3] xen-analysis.py: Enable Xen deviation tag at the end of the line

2024-02-14 Thread Stefano Stabellini
On Wed, 31 Jan 2024, Luca Fancellu wrote: > This serie is enabling the xen-analysis tool to parse and substitute correctly > a deviation tag put at the end of the line containing a deviation to be > deviated. > > Before this serie the only way to deviate a violation was to put the tag in > the

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

2024-02-14 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 v6 02/21] tools/xen-9pfsd: connect to frontend

2024-02-14 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 v6 01/21] tools: add a new xen 9pfs daemon

2024-02-14 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.

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

2024-02-14 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 v6 03/21] tools/xen-9pfsd: add transport layer

2024-02-14 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 v6 06/21] tools/xen-9pfsd: add 9pfs attach request support

2024-02-14 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 v6 08/21] tools/xen-9pfsd: add 9pfs open request support

2024-02-14 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 v6 07/21] tools/xen-9pfsd: add 9pfs walk request support

2024-02-14 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) ---

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

2024-02-14 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 v6 09/21] tools/xen-9pfsd: add 9pfs clunk request support

2024-02-14 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 v6 00/21] tools: enable xenstore-stubdom to use 9pfs

2024-02-14 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

Re: [PATCH v5 15/22] tools/libs/light: add backend type for 9pfs PV devices

2024-02-14 Thread Jürgen Groß
On 14.02.24 18:27, Anthony PERARD wrote: On Wed, Feb 14, 2024 at 11:18:18AM +0100, Jürgen Groß wrote: On 13.02.24 19:03, Anthony PERARD wrote: On Thu, Feb 08, 2024 at 05:55:39PM +0100, Juergen Gross wrote: +struct libxl__aop9_state { +libxl__spawn_state spawn; +libxl__ao_device

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

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

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

2024-02-14 Thread Stewart Hildebrand
On 2/14/24 06:38, Jan Beulich wrote: > On 02.02.2024 22:33, Stewart Hildebrand wrote: >> --- a/xen/arch/x86/physdev.c >> +++ b/xen/arch/x86/physdev.c >> @@ -123,7 +123,9 @@ int physdev_map_pirq(domid_t domid, int type, int >> *index, int *pirq_p, >> >> case MAP_PIRQ_TYPE_MSI: >> case

Re: [PATCH v5 07/22] tools/9pfsd: add 9pfs attach request support

2024-02-14 Thread Jürgen Groß
On 14.02.24 18:48, Andrew Cooper wrote: On 08/02/2024 4:55 pm, Juergen Gross wrote: +static struct p9_fid *alloc_fid(device *device, unsigned int fid, +const char *path) +{ +struct p9_fid *fidp = NULL; + +pthread_mutex_lock(>fid_mutex); + +if (

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

2024-02-14 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 v6 14/21] tools/libs/light: add backend type for 9pfs PV devices

2024-02-14 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: -

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

2024-02-14 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 v6 18/21] tools/xenstored: mount 9pfs device in stubdom

2024-02-14 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 v6 15/21] tools/xl: support new 9pfs backend xen_9pfsd

2024-02-14 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 v6 16/21] stubdom: extend xenstore stubdom configs

2024-02-14 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 v6 13/21] tools/xen-9pfsd: add 9pfs read request support

2024-02-14 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 v6 19/21] tools/xenstored: add helpers for filename handling

2024-02-14 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()

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

2024-02-14 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 v6 21/21] tools/xenstored: have a single do_control_memreport()

2024-02-14 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 v6 12/21] tools/xen-9pfsd: add 9pfs write request support

2024-02-14 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

Re: [PATCH v5 07/22] tools/9pfsd: add 9pfs attach request support

2024-02-14 Thread Jürgen Groß
On 14.02.24 18:40, Andrew Cooper wrote: On 08/02/2024 4:55 pm, Juergen Gross wrote: +static struct p9_fid *alloc_fid_mem(device *device, unsigned int fid, +const char *path) +{ +struct p9_fid *fidp; +size_t pathlen; + +pathlen = strlen(path); +

Re: [PATCH 5/5] mm: add the __must_check attribute to {gfn,mfn}_add()

2024-02-14 Thread Julien Grall
Hi, On 14/02/2024 10:37, Roger Pau Monne wrote: It's not obvious from the function itself whether the incremented value will be stored in the parameter, or returned to the caller. That has leads to bugs in the past as callers assume the incremented value is stored in the parameter. Add the

Re: [PATCH 1/5] iommu/x86: fix IVMD/RMRR range checker loop increment

2024-02-14 Thread Roger Pau Monné
On Wed, Feb 14, 2024 at 12:51:36PM +0100, Jan Beulich wrote: > On 14.02.2024 11:37, Roger Pau Monne wrote: > > mfn_add() doesn't store the incremented value in the parameter, and instead > > returns it to the caller. As a result, the loop in iommu_unity_region_ok() > > didn't make progress. Fix

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

2024-02-14 Thread Julien Grall
Hi 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 device device_t; + +#ifdef CONFIG_HAS_DEVICE_TREE +

Re: [PATCH v4 14/30] xen/riscv: introduce atomic.h

2024-02-14 Thread Oleksii
On Tue, 2024-02-13 at 12:36 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > From: Bobby Eshleman > > > > Additionally, this patch introduces macros in fence.h, > > which are utilized in atomic.h. > > These are used in an earlier patch already, so either you want to

Re: [PATCH v4 16/30] xen/riscv: introduce p2m.h

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 16:16 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > Acked-by: Jan Beulich > with two more nits: > > > --- /dev/null > > +++ b/xen/arch/riscv/include/asm/p2m.h > > @@ -0,0 +1,102 @@ > > +/*

Re: [PATCH v4 18/30] xen/riscv: introduce time.h

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 16:18 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > Acked-by: Jan Beulich > > Nevertheless ... > > > --- /dev/null > > +++ b/xen/arch/riscv/include/asm/time.h > > @@ -0,0 +1,29 @@ > > +/*

Re: [PATCH v4 19/30] xen/riscv: introduce event.h

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 16:20 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > Acked-by: Jan Beulich > again with a nit, though: > > > --- /dev/null > > +++ b/xen/arch/riscv/include/asm/event.h > > @@ -0,0 +1,40 @@ > > +/*

Re: [PATCH v4 30/30] xen/README: add compiler and binutils versions for RISC-V64

2024-02-14 Thread Oleksii
On Wed, 2024-02-14 at 10:52 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > --- > >  Changes in V4: > >   - Update version of GCC (12.2) and GNU Binutils (2.39) to the > > version > >     which are in Xen's contrainter for RISC-V >

Re: xen | Failed pipeline for staging | d670c1a3

2024-02-14 Thread Jan Beulich
On 14.02.2024 13:42, GitLab wrote: > > > Pipeline #1176167215 has failed! > > Project: xen ( https://gitlab.com/xen-project/xen ) > Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) > > Commit: d670c1a3 ( >

Re: [PATCH v4 30/30] xen/README: add compiler and binutils versions for RISC-V64

2024-02-14 Thread Jan Beulich
On 14.02.2024 13:21, Oleksii wrote: > On Wed, 2024-02-14 at 10:52 +0100, Jan Beulich wrote: >> On 05.02.2024 16:32, Oleksii Kurochko wrote: >>> Signed-off-by: Oleksii Kurochko >>> --- >>>  Changes in V4: >>>   - Update version of GCC (12.2) and GNU Binutils (2.39) to the >>> version >>>     which

Re: [regression] Re: [PATCH v2 2/2] iommu/vt-d: switch to common RMRR checker

2024-02-14 Thread Roger Pau Monné
On Wed, Feb 14, 2024 at 08:45:28AM +0100, Jan Beulich wrote: > On 13.02.2024 23:37, Andrew Cooper wrote: > > On 12/02/2024 2:38 pm, Jan Beulich wrote: > >> On 07.02.2024 16:34, Roger Pau Monne wrote: > >>> Use the newly introduced generic unity map checker. > >>> > >>> Also drop the message

Re: [PATCH v6 1/3] xen: introduce Kconfig function alignment option

2024-02-14 Thread Michal Orzel
Hi, On 07/02/2024 15:55, Roger Pau Monne wrote: > > > And use it to replace CODE_ALIGN in assembly. This allows to generalize the > way the code alignment gets set across all architectures. > > No functional change intended. > > Signed-off-by: Roger Pau Monné In xen/linkage.h, there is

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

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

Re: [PATCH v2 2/3] docs/misra/rules.rst: add rule 5.5

2024-02-14 Thread Jan Beulich
On 13.02.2024 23:33, Stefano Stabellini wrote: > Signed-off-by: Stefano Stabellini > --- > docs/misra/rules.rst | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst > index c185366966..931158b354 100644 > --- a/docs/misra/rules.rst > +++

Re: [PATCH v4 09/30] xen/riscv: introduce bitops.h

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 16:58 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > --- /dev/null > > +++ b/xen/arch/riscv/include/asm/bitops.h > > @@ -0,0 +1,164 @@ > > +/* SPDX-License-Identifier: GPL-2.0 */ > > +/* Copyright (C) 2012 Regents of the University of California

Re: [PATCH v4 11/30] xen/riscv: introduce smp.h

2024-02-14 Thread Oleksii
On Mon, 2024-02-12 at 16:13 +0100, Jan Beulich wrote: > On 05.02.2024 16:32, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > Acked-by: Jan Beulich Thanks for Ack. ~ Oleksii

[PULL 14/60] apic, i386/tcg: add x2apic transitions

2024-02-14 Thread Michael S. Tsirkin
From: Bui Quang Minh This commit adds support for x2APIC transitions when writing to MSR_IA32_APICBASE register and finally adds CPUID_EXT_X2APIC to TCG_EXT_FEATURES. The set_base in APICCommonClass now returns an integer to indicate error in execution. apic_set_base return -1 on invalid APIC

Re: [PATCH v4 09/30] xen/riscv: introduce bitops.h

2024-02-14 Thread Jan Beulich
On 14.02.2024 12:06, Oleksii wrote: > On Mon, 2024-02-12 at 16:58 +0100, Jan Beulich wrote: >> On 05.02.2024 16:32, Oleksii Kurochko wrote: >>> +({  \ >>> +    unsigned long __res, __mask;    \ >> >> Leftover leading

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

2024-02-14 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

  1   2   >