Re: [PATCH 1/4] amd-vi: fix IVMD memory type checks

2024-02-02 Thread oxjo
On Thursday, February 1st, 2024 at 18:01, Roger Pau Monne wrote: > The current code that parses the IVMD blocks is relaxed with regard to the > restriction that such unity regions should always fall into memory ranges > marked as reserved in the memory map. > > However the type checks for the

[xen-4.17-testing test] 184564: tolerable trouble: fail/pass/starved - PUSHED

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

[linux-6.1 test] 184563: regressions - FAIL

2024-02-02 Thread osstest service owner
flight 184563 linux-6.1 real [real] flight 184569 linux-6.1 real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/184563/ http://logs.test-lab.xenproject.org/osstest/logs/184569/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run:

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

2024-02-02 Thread Stefano Stabellini
On Fri, 2 Feb 2024, Julien Grall wrote: > On 01/02/2024 16:17, John Ernberg wrote: > > On 2/1/24 13:20, Julien Grall wrote: > > > > > > > > > On 31/01/2024 15:32, John Ernberg wrote: > > > > Hi Julien, > > > > > > Hi John, > > > > > > > On 1/31/24 13:22, Julien Grall wrote: > > > > > Hi, > > >

[PATCH v13 11/14] vpci: add initial support for virtual PCI bus topology

2024-02-02 Thread Stewart Hildebrand
From: Oleksandr Andrushchenko Assign SBDF to the PCI devices being passed through with bus 0. The resulting topology is where PCIe devices reside on the bus 0 of the root complex itself (embedded endpoints). This implementation is limited to 32 devices which are allowed on a single PCI bus.

[PATCH v13 07/14] rangeset: add rangeset_purge() function

2024-02-02 Thread Stewart Hildebrand
From: Volodymyr Babchuk This function can be used when user wants to remove all rangeset entries but do not want to destroy rangeset itself. Signed-off-by: Volodymyr Babchuk Signed-off-by: Stewart Hildebrand Acked-by: Jan Beulich --- Changes in v13: - Added Jan's A-b Changes in v12: -

[PATCH v13 12/14] xen/arm: translate virtual PCI bus topology for guests

2024-02-02 Thread Stewart Hildebrand
From: Oleksandr Andrushchenko There are three originators for the PCI configuration space access: 1. The domain that owns physical host bridge: MMIO handlers are there so we can update vPCI register handlers with the values written by the hardware domain, e.g. physical view of the registers vs

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

2024-02-02 Thread Stewart Hildebrand
From: Oleksandr Andrushchenko Xen and/or Dom0 may have put values in PCI_COMMAND which they expect to remain unaltered. PCI_COMMAND_SERR bit is a good example: while the guest's (domU) view of this will want to be zero (for now), the host having set it to 1 should be preserved, or else we'd

[PATCH v13 13/14] xen/arm: account IO handlers for emulated PCI MSI-X

2024-02-02 Thread Stewart Hildebrand
From: Oleksandr Andrushchenko At the moment, we always allocate an extra 16 slots for IO handlers (see MAX_IO_HANDLER). So while adding IO trap handlers for the emulated MSI-X registers we need to explicitly tell that we have additional IO handlers, so those are accounted. Signed-off-by:

[PATCH v13 09/14] vpci/header: program p2m with guest BAR view

2024-02-02 Thread Stewart Hildebrand
From: Oleksandr Andrushchenko Take into account guest's BAR view and program its p2m accordingly: gfn is guest's view of the BAR and mfn is the physical BAR value. This way hardware domain sees physical BAR values and guest sees emulated ones. Hardware domain continues getting the BARs identity

[PATCH v13 14/14] arm/vpci: honor access size when returning an error

2024-02-02 Thread Stewart Hildebrand
From: Volodymyr Babchuk Guest can try to read config space using different access sizes: 8, 16, 32, 64 bits. We need to take this into account when we are returning an error back to MMIO handler, otherwise it is possible to provide more data than requested: i.e. guest issues LDRB instruction to

[PATCH v13 08/14] vpci/header: handle p2m range sets per BAR

2024-02-02 Thread Stewart Hildebrand
From: Oleksandr Andrushchenko Instead of handling a single range set, that contains all the memory regions of all the BARs and ROM, have them per BAR. As the range sets are now created when a PCI device is added and destroyed when it is removed so make them named and accounted. Note that

[PATCH v13 06/14] rangeset: add RANGESETF_no_print flag

2024-02-02 Thread Stewart Hildebrand
From: Oleksandr Andrushchenko There are range sets which should not be printed, so introduce a flag which allows marking those as such. Implement relevant logic to skip such entries while printing. While at it also simplify the definition of the flags by directly defining those without helpers.

[PATCH v13 05/14] vpci/header: implement guest BAR register handlers

2024-02-02 Thread Stewart Hildebrand
From: Oleksandr Andrushchenko Add relevant vpci register handlers when assigning PCI device to a domain and remove those when de-assigning. This allows having different handlers for different domains, e.g. hwdom and other guests. Emulate guest BAR register values: this allows creating a guest

[PATCH v13 04/14] vpci/header: rework exit path in init_header()

2024-02-02 Thread Stewart Hildebrand
From: Volodymyr Babchuk Introduce "fail" label in init_header() function to have the centralized error return path. This is the pre-requirement for the future changes in this function. This patch does not introduce functional changes. Suggested-by: Roger Pau Monné Signed-off-by: Volodymyr

[PATCH v13 03/14] vpci: add hooks for PCI device assign/de-assign

2024-02-02 Thread Stewart Hildebrand
From: Oleksandr Andrushchenko When a PCI device gets assigned/de-assigned we need to initialize/de-initialize vPCI state for the device. Also, rename vpci_add_handlers() to vpci_assign_device() and vpci_remove_device() to vpci_deassign_device() to better reflect role of the functions.

[PATCH v13 02/14] vpci: restrict unhandled read/write operations for guests

2024-02-02 Thread Stewart Hildebrand
From: Oleksandr Andrushchenko A guest would be able to read and write those registers which are not emulated and have no respective vPCI handlers, so it will be possible for it to access the hardware directly. In order to prevent a guest from reads and writes from/to the unhandled registers make

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

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

[PATCH v13 00/14] PCI devices passthrough on Arm, part 3

2024-02-02 Thread Stewart Hildebrand
This is next version of vPCI rework. Aim of this series is to prepare ground for introducing PCI support on ARM platform. in v13: - drop ("xen/arm: vpci: permit access to guest vpci space") as it was unnecessary in v12: - I (Stewart) coordinated with Volodomyr to send this whole series. So,

[libvirt test] 184562: tolerable all pass - PUSHED

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

Re: Nullifying Recently Introduced Xen Headers Check

2024-02-02 Thread John L. Poole
On 2/2/2024 11:25 AM, David Woodhouse wrote: > On Thu, 2024-02-01 at 18:39 +, John L. Poole wrote: >> While the Xen Project "make" works, the Gentoo emerge >> of app-emulation/xen-tools does not unless the three lines are >> removed to simulate prior 4.17.3 and earlier code. >> >> I suspect

Re: Nullifying Recently Introduced Xen Headers Check

2024-02-02 Thread David Woodhouse
On Thu, 2024-02-01 at 18:39 +, John L. Poole wrote: > > While the Xen Project "make" works, the Gentoo emerge > of app-emulation/xen-tools does not unless the three lines are > removed to simulate prior 4.17.3 and earlier code.  > > I suspect the Gentoo approach > of building tools first

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

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

Re: [XEN PATCH 4/9] x86/smp: move stack_base to cpu_data

2024-02-02 Thread Julien Grall
Hi, On 14/11/2023 17:50, Krystian Hebel wrote: This location is easier to access from assembly. Having it close to other data required during initialization has also positive (although rather small) impact on prefetching data from RAM. I understand your goal but... Signed-off-by: Krystian

Re: [XEN PATCH 3/9] x86/smp: drop x86_cpu_to_apicid, use cpu_data[cpu].apicid instead

2024-02-02 Thread Julien Grall
Hi, On 14/11/2023 17:50, Krystian Hebel wrote: Both fields held the same data. Signed-off-by: Krystian Hebel --- xen/arch/x86/boot/x86_64.S | 8 +--- xen/arch/x86/include/asm/asm_defns.h | 2 +- xen/arch/x86/include/asm/processor.h | 2 ++ xen/arch/x86/include/asm/smp.h

[PATCH] xen: move BUG_ON(), WARN_ON(), ASSERT(), ASSERT_UNREACHABLE() to xen/bug.h

2024-02-02 Thread Oleksii Kurochko
Move the macros mentioned in the commit subject to their appropriate locations. Additionally, eliminate the dependency of xen/lib.h from xen/bug.h and include "xen/bug.h" in files where xen/bug.h macros are utilized. Most of the changes were made because a file requires macros from xen/bug.h,

[PATCH] x86/ucode: Remove accidentally introduced tabs

2024-02-02 Thread Andrew Cooper
Fixes: cf7fe8b72dea ("x86/ucode: Fix stability of the raw CPU Policy rescan") Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu I don't know what went wrong here. --- xen/arch/x86/cpu/microcode/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

Re: [PATCH v3 31/34] xen/riscv: add minimal stuff to mm.h to build full Xen

2024-02-02 Thread Oleksii
On Tue, 2024-01-23 at 14:03 +0100, Jan Beulich wrote: > On 22.12.2023 16:13, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > --- > > Changes in V3: > >  - update the commit message > > ??? (yet again) > > > --- a/xen/arch/riscv/include/asm/mm.h > > +++

Re: [PATCH v3 21/33] tools: add 9pfs device to xenstore-stubdom

2024-02-02 Thread Juergen Gross
On 15.01.24 16:31, Anthony PERARD wrote: On Thu, Jan 04, 2024 at 10:00:43AM +0100, Juergen Gross wrote: 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" Is it ok to have here tag

Re: [PATCH v3 17/33] tools/xl: support new 9pfs backend xen-9pfsd

2024-02-02 Thread Juergen Gross
On 02.02.24 16:28, Juergen Gross wrote: On 31.01.24 16:20, Jürgen Groß wrote: On 15.01.24 16:14, Anthony PERARD wrote: On Thu, Jan 04, 2024 at 10:00:39AM +0100, Juergen Gross wrote: @@ -2242,6 +2256,28 @@ void parse_config_data(const char *config_source,  

[PATCH] xen/bitmap: Deduplicate __bitmap_weight() implementations

2024-02-02 Thread Andrew Cooper
We have two copies of __bitmap_weight() that differ by whether they make hweight32() or hweight64() calls, yet we already have hweight_long() which is the form that __bitmap_weight() wants. Fix hweight_long() to return unsigned int like all the other hweight helpers, and fix __bitmap_weight() to

Re: [PATCH v3 17/33] tools/xl: support new 9pfs backend xen-9pfsd

2024-02-02 Thread Juergen Gross
On 31.01.24 16:20, Jürgen Groß wrote: On 15.01.24 16:14, Anthony PERARD wrote: On Thu, Jan 04, 2024 at 10:00:39AM +0100, Juergen Gross wrote: @@ -2242,6 +2256,28 @@ void parse_config_data(const char *config_source,   libxl_string_list_dispose(); +    if (p9->type ==

Re: [PATCH v3 0/4] address violation of MISRA C:2012 Rule 13.1

2024-02-02 Thread Simone Ballarin
On 02/02/24 10:37, Simone Ballarin wrote: From: Maria Celeste Cesario The Xen sources contain violations of MISRA C:2012 Rule 13.1 whose headline states: "Initializer lists shall not contain persistent side effects". The file properties.json containing function and macro properties is

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

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

[XEN PATCH v4 2/4] xen/ns16550: address violations of MISRA C:2012 Rule 13.1

2024-02-02 Thread Simone Ballarin
Rule 13.1: Initializer lists shall not contain persistent side effects The assignment operation in: .irq = rc = uart->irq, is a persistent side effect in a struct initializer list. This patch assigns rc separately outside the structure. No functional change. Signed-off-by: Simone Ballarin

[XEN PATCH v4 0/4] address violation of MISRA C:2012 Rule 13.1

2024-02-02 Thread Simone Ballarin
The Xen sources contain violations of MISRA C:2012 Rule 13.1 whose headline states: "Initializer lists shall not contain persistent side effects". The file properties.json containing function and macro properties is introduced, as stated in v2 discussion. Some functions and macros are found

[XEN PATCH v4 4/4] eclair: move function and macro properties outside ECLAIR

2024-02-02 Thread Simone Ballarin
From: Maria Celeste Cesario Function and macro properties contained in ECLAIR/call_properties.ecl are of general interest: this patch moves these annotations in a generaric JSON file in docs. In this way, they can be exploited for other purposes (i.e. documentation, other tools). Add rst file

[XEN PATCH v4 3/4] xen/x86: address violations of MISRA C:2012 Rule 13.1

2024-02-02 Thread Simone Ballarin
Rule 13.1: Initializer lists shall not contain persistent side effects This patch moves expressions with side-effects into new variables before the initializer lists. No functional changes. Signed-off-by: Simone Ballarin --- xen/arch/x86/io_apic.c | 9 ++--- xen/arch/x86/mpparse.c | 3 ++-

[XEN PATCH v4 1/4] xen: add SAF deviation for debugging and logging effects

2024-02-02 Thread Simone Ballarin
Rule 13.1: Initializer lists shall not contain persistent side effects Effects caused by debug/logging macros and functions (like ASSERT, __bad_atomic_size, LOG, etc ...) that crash execution or produce logs are not dangerous in initializer lists. The evaluation order in abnormal conditions is

Community call recording: 1st February 2024

2024-02-02 Thread Kelly Choi
Hi all, Please find the community call recording below. https://www.youtube.com/watch?v=MJSTvwvNtF8_channel=TheXenProject These are unlisted and published on our new YouTube channel. Only users with the specific link below will be able to access the recording. This has also been saved in the

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

2024-02-02 Thread Oleksandr Tyshchenko
On 02.02.24 13:03, Viresh Kumar wrote: Hello Viresh > On 02-02-24, 12:49, Oleksandr Tyshchenko wrote: >> diff --git a/docs/man/xl-disk-configuration.5.pod.in >> b/docs/man/xl-disk-configuration.5.pod.in >> index bc945cc517..3c035456d5 100644 >> --- a/docs/man/xl-disk-configuration.5.pod.in

Re: [PATCH v2] x86/CPU: convert vendor hook invocations to altcall

2024-02-02 Thread Jan Beulich
On 02.02.2024 13:13, Andrew Cooper wrote: > On 23/01/2024 11:00 am, Jan Beulich wrote: >> While not performance critical, these hook invocations still want >> converting: This way all pre-filled struct cpu_dev instances can become >> __initconst_cf_clobber, thus allowing to eliminate further 8

Re: [PATCH v2] x86/CPU: convert vendor hook invocations to altcall

2024-02-02 Thread Andrew Cooper
On 23/01/2024 11:00 am, Jan Beulich wrote: > While not performance critical, these hook invocations still want > converting: This way all pre-filled struct cpu_dev instances can become > __initconst_cf_clobber, thus allowing to eliminate further 8 ENDBR > during the 2nd phase of alternatives

Re: [PATCH v3 4/4] eclair: add and manage properties

2024-02-02 Thread Simone Ballarin
On 02/02/24 10:37, Simone Ballarin wrote: From: Maria Celeste Cesario Add JSON file containing properties. Add rst file containing explanation on how to update properties.json. Add instruction to eclair_analysis/prepare.sh to parse the JSON file. Signed-off-by: Maria Celeste Cesario

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

2024-02-02 Thread Viresh Kumar
On 02-02-24, 12:49, Oleksandr Tyshchenko wrote: > diff --git a/docs/man/xl-disk-configuration.5.pod.in > b/docs/man/xl-disk-configuration.5.pod.in > index bc945cc517..3c035456d5 100644 > --- a/docs/man/xl-disk-configuration.5.pod.in > +++ b/docs/man/xl-disk-configuration.5.pod.in > @@ -404,6

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

2024-02-02 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 v3 2/4] xen/ns16550: address violations of MISRA C:2012 Rule 13.1

2024-02-02 Thread Simone Ballarin
Rule 13.1: Initializer lists shall not contain persistent side effects The assignment operation in: .irq = rc = uart->irq, is a persistent side effect in a struct initializer list. This patch assigns rc separately outside the structure. No functional change. Signed-off-by: Simone Ballarin

[PATCH v3 4/4] eclair: add and manage properties

2024-02-02 Thread Simone Ballarin
From: Maria Celeste Cesario Add JSON file containing properties. Add rst file containing explanation on how to update properties.json. Add instruction to eclair_analysis/prepare.sh to parse the JSON file. Signed-off-by: Maria Celeste Cesario Signed-off-by: Simone Ballarin ---

[PATCH v3 0/4] address violation of MISRA C:2012 Rule 13.1

2024-02-02 Thread Simone Ballarin
From: Maria Celeste Cesario The Xen sources contain violations of MISRA C:2012 Rule 13.1 whose headline states: "Initializer lists shall not contain persistent side effects". The file properties.json containing function and macro properties is introduced, as stated in v2 discussion. Some

[PATCH v3 1/4] xen: add SAF deviation for debugging and logging effects

2024-02-02 Thread Simone Ballarin
Rule 13.1: Initializer lists shall not contain persistent side effects Effects caused by debug/logging macros and functions (like ASSERT, __bad_atomic_size, LOG, etc ...) that crash execution or produce logs are not dangerous in initializer lists. The evaluation order in abnormal conditions is

[PATCH v3 3/4] xen/x86: address violations of MISRA C:2012 Rule 13.1

2024-02-02 Thread Simone Ballarin
Rule 13.1: Initializer lists shall not contain persistent side effects This patch moves expressions with side-effects into new variables before the initializer lists. No functional changes. Signed-off-by: Simone Ballarin --- xen/arch/x86/io_apic.c | 9 ++--- xen/arch/x86/mpparse.c | 3 ++-

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

2024-02-02 Thread Julien Grall
On 01/02/2024 16:17, John Ernberg wrote: On 2/1/24 13:20, Julien Grall wrote: On 31/01/2024 15:32, John Ernberg wrote: Hi Julien, Hi John, On 1/31/24 13:22, Julien Grall wrote: Hi, On 31/01/2024 11:50, John Ernberg wrote: When using Linux for dom0 there are a bunch of drivers that

[xen-4.18-testing test] 184553: tolerable FAIL - PUSHED

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

Re: Ping: [PATCH] x86/guest: finish conversion to altcall

2024-02-02 Thread Paul Durrant
On 02/02/2024 07:08, Jan Beulich wrote: On 17.01.2024 10:31, Jan Beulich wrote: While .setup() and .e820_fixup() don't need fiddling with for being run only very early, both .ap_setup() and .resume() want converting too: This way both pre-filled struct hypervisor_ops instances can become