Re: [XEN PATCH] CI: Rework RISCV smoke test

2023-11-14 Thread Artem Mygaiev
Hi Stefano, Anthony On Mon, 13 Nov 2023, Anthony PERARD wrote: > On Thu, Nov 09, 2023 at 05:02:08PM -0800, Stefano Stabellini wrote: > > ### qemu_key.sh is using "expect", see below. I think we should be able > > ### to achieve the same by using expect to close on the expected string > > ### (inst

Re: [PATCH 5/7] xen/events: drop xen_allocate_irqs_dynamic()

2023-11-14 Thread Oleksandr Tyshchenko
On 16.10.23 09:28, Juergen Gross wrote: Hello Juergen > Instead of having a common function for allocating a single IRQ or a > consecutive number of IRQs, split up the functionality into the callers > of xen_allocate_irqs_dynamic(). > > This allows to handle any allocation error in xen_irq_in

Re: [PATCH 4/7] xen/events: remove some simple helpers from events_base.c

2023-11-14 Thread Juergen Gross
On 13.11.23 18:35, Oleksandr Tyshchenko wrote: On 16.10.23 09:28, Juergen Gross wrote: Hello Juergen. The helper functions type_from_irq() and cpu_from_irq() are just one line functions used only internally. Open code them where needed. At the same time modify and rename get_evtchn_to_irq

Re: [PATCH 5/7] xen/events: drop xen_allocate_irqs_dynamic()

2023-11-14 Thread Juergen Gross
On 14.11.23 09:20, Oleksandr Tyshchenko wrote: On 16.10.23 09:28, Juergen Gross wrote: Hello Juergen Instead of having a common function for allocating a single IRQ or a consecutive number of IRQs, split up the functionality into the callers of xen_allocate_irqs_dynamic(). This allows to h

Re: [PATCH v5 2/5] xen/vpci: move xen_domctl_createdomain vPCI flag to common

2023-11-14 Thread Jan Beulich
On 13.11.2023 20:05, Stewart Hildebrand wrote: > On 11/13/23 08:26, Jan Beulich wrote: >> On 02.11.2023 20:59, Stewart Hildebrand wrote: >>> @@ -575,6 +577,18 @@ static int sanitise_domain_config(struct >>> xen_domctl_createdomain *config) >>> return -EINVAL; >>> } >>> >>> +if

Re: [PATCH v2 25/29] tools/xenstored: map stubdom interface

2023-11-14 Thread Julien Grall
Hi, On 14/11/2023 06:33, Juergen Gross wrote: On 13.11.23 23:04, Julien Grall wrote: Hi Juergen, On 10/11/2023 16:08, Juergen Gross wrote: When running as stubdom, map the stubdom's Xenstore ring page in order to support using the 9pfs frontend. Signed-off-by: Juergen Gross ---   tools/xens

Re: [PATCH v5 4/5] [FUTURE] xen/arm: enable vPCI for domUs

2023-11-14 Thread Jan Beulich
On 13.11.2023 22:10, Stewart Hildebrand wrote: > On 11/6/23 04:26, Jan Beulich wrote: >> On 02.11.2023 20:59, Stewart Hildebrand wrote: >>> +/* PCI passthrough may be backed by qemu for non-PVH domains */ >>> +#define arch_needs_vpci(d) is_pvh_domain(d) >> >> Wouldn't we want to check for exactly w

Re: [PATCH v2 26/29] tools/xenstored: mount 9pfs device in stubdom

2023-11-14 Thread Julien Grall
Hi Juergen, On 14/11/2023 06:40, Juergen Gross wrote: On 13.11.23 23:09, Julien Grall wrote: Hi Juergen, On 10/11/2023 16:08, Juergen Gross wrote: diff --git a/tools/xenstored/domain.c b/tools/xenstored/domain.c index 162b87b460..4263c1360f 100644 --- a/tools/xenstored/domain.c +++ b/tools/xe

Re: [PATCH] automation: set architecture in docker files

2023-11-14 Thread Roger Pau Monné
On Mon, Nov 13, 2023 at 04:10:24PM -0800, Stefano Stabellini wrote: > On Mon, 13 Nov 2023, Roger Pau Monne wrote: > > Pass the desired architecture of the image in the FROM instruction if the > > image is possibly multi-platform. > > > > This allows using the x86 Dockerfiles on OS X on arm64 hardw

[PATCH v5 3/5] arm/dom0less: put dom0less feature code in a separate module

2023-11-14 Thread Luca Fancellu
Currently the dom0less feature code is mostly inside domain_build.c and setup.c, it is a feature that may not be useful to everyone so put the code in a different compilation module in order to make it easier to disable the feature in the future. Move gic_interrupt_t in domain_build.h to use it wi

[PATCH v5 1/5] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-11-14 Thread Luca Fancellu
Introduce Kconfig GICV2 to be able to compile the GICv2 driver only when needed, the option is active by default. Introduce Kconfig VGICV2 that compiles the Generic Interrupt Controller v2 emulation for domains, it is required only when using GICv2 driver, otherwise using the GICv3 driver it is op

[PATCH v5 5/5] arm/dom0less: introduce Kconfig for dom0less feature

2023-11-14 Thread Luca Fancellu
Introduce a Kconfig for the dom0less feature, enabled by default, to be able to choose if the feature should be compiled or not. Provide static inline stubs when the option is disabled for the functions externally visible. Use the new Kconfig to remove dom0less DT binding from the efi-boot.h code

[PATCH v5 4/5] xen/arm: Move static memory build code in separate modules

2023-11-14 Thread Luca Fancellu
Move static memory and static shared memory code in separate modules so that they are included only when the corresponding feature is enabled, doing that we modularise the features and we remove some ifdefs from the code to improve readability. Move process_shm_node function from bootfdt module an

[PATCH v5 0/5] Fine granular configuration

2023-11-14 Thread Luca Fancellu
This serie aims to add more modularity to some feature that can be excluded without issues from the build. The first patch is already reviewed. v2 update: So I've tried to see how to put the dom0less code in the common code, but the amount of modifications are not trivial, even putting only the c

[PATCH v5 2/5] xen/arm: Add asm/domain.h include to kernel.h

2023-11-14 Thread Luca Fancellu
The 'enum domain_type' is defined by 'asm/domain.h' which is not included (directly or indirectly) by 'asm/kernel.h'. This currently doesn't break the compilation because asm/domain.h will included by the user of 'kernel.h'. But it would be better to avoid relying on it. So add the include in 'asm

Re: [PATCH v2 28/29] tools/xenstored: support complete log capabilities in stubdom

2023-11-14 Thread Julien Grall
Hi, On 14/11/2023 06:45, Juergen Gross wrote: On 13.11.23 23:40, Julien Grall wrote: Hi Juergen, On 10/11/2023 16:08, 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

Re: [PATCH v2 27/29] tools/xenstored: add helpers for filename handling

2023-11-14 Thread Julien Grall
Hi Juergen, On 14/11/2023 06:45, Juergen Gross wrote: On 13.11.23 23:25, Julien Grall wrote: Hi Juergen, On 10/11/2023 16:08, Juergen Gross wrote: Add some helpers for handling filenames which might need different implementations between stubdom and daemon environments: - expansion of relati

Re: [PATCH v6 2/5] xen/vpci: move xen_domctl_createdomain vPCI flag to common

2023-11-14 Thread Jan Beulich
On 13.11.2023 23:21, Stewart Hildebrand wrote: > @@ -709,10 +710,17 @@ int arch_sanitise_domain_config(struct > xen_domctl_createdomain *config) > return -EINVAL; > } > > +if ( vpci && !hvm ) > +{ > +dprintk(XENLOG_INFO, "vPCI requested for non-HVM guest\n"); > +

Re: [PATCH v2 25/29] tools/xenstored: map stubdom interface

2023-11-14 Thread Juergen Gross
On 14.11.23 09:56, Julien Grall wrote: Hi, On 14/11/2023 06:33, Juergen Gross wrote: On 13.11.23 23:04, Julien Grall wrote: Hi Juergen, On 10/11/2023 16:08, Juergen Gross wrote: When running as stubdom, map the stubdom's Xenstore ring page in order to support using the 9pfs frontend. Signed

Re: [PATCH v6 4/5] [FUTURE] xen/arm: enable vPCI for domUs

2023-11-14 Thread Jan Beulich
On 13.11.2023 23:21, Stewart Hildebrand wrote: > --- a/xen/arch/x86/include/asm/domain.h > +++ b/xen/arch/x86/include/asm/domain.h > @@ -503,6 +503,8 @@ struct arch_domain > #define has_vpit(d)(!!((d)->arch.emulation_flags & X86_EMU_PIT)) > #define has_pirq(d)(!!((d)->arch.emulati

Re: [PATCH v2 26/29] tools/xenstored: mount 9pfs device in stubdom

2023-11-14 Thread Juergen Gross
On 14.11.23 10:00, Julien Grall wrote: Hi Juergen, On 14/11/2023 06:40, Juergen Gross wrote: On 13.11.23 23:09, Julien Grall wrote: Hi Juergen, On 10/11/2023 16:08, Juergen Gross wrote: diff --git a/tools/xenstored/domain.c b/tools/xenstored/domain.c index 162b87b460..4263c1360f 100644 --- a

Re: [PATCH 1/5] tools/xenstored: remove "-D" command line parameter

2023-11-14 Thread Julien Grall
Hi Juergen, On 13/11/2023 12:43, Juergen Gross wrote: Remove the "-D" command parameter, which is disabling initialization of the mandatory domain data handling. I looked at the code when -D was introduced. It is not clear how it was working back then. Signed-off-by: Juergen Gross Revi

Re: [PATCH v2 28/29] tools/xenstored: support complete log capabilities in stubdom

2023-11-14 Thread Juergen Gross
On 14.11.23 10:05, Julien Grall wrote: Hi, On 14/11/2023 06:45, Juergen Gross wrote: On 13.11.23 23:40, Julien Grall wrote: Hi Juergen, On 10/11/2023 16:08, Juergen Gross wrote: With 9pfs being fully available in Xenstore-stubdom now, there is no reason to not fully support all logging capab

Re: [PATCH v2 27/29] tools/xenstored: add helpers for filename handling

2023-11-14 Thread Juergen Gross
On 14.11.23 10:10, Julien Grall wrote: Hi Juergen, On 14/11/2023 06:45, Juergen Gross wrote: On 13.11.23 23:25, Julien Grall wrote: Hi Juergen, On 10/11/2023 16:08, Juergen Gross wrote: Add some helpers for handling filenames which might need different implementations between stubdom and dae

Re: [PATCH] docs/misra: add R11.1 R11.2 R11.3 R11.6

2023-11-14 Thread Jan Beulich
On 14.11.2023 00:44, Stefano Stabellini wrote: > --- a/docs/misra/rules.rst > +++ b/docs/misra/rules.rst > @@ -383,6 +383,38 @@ maintainers if you want to suggest a change. > > CFLAGS="-Warith-conversion -Wno-error=arith-conversion" make -C xen > > + * - `Rule 11.1 >

Re: [XEN PATCH][for-4.19 v4] xen: address violations of Rule 11.9

2023-11-14 Thread Nicola Vetrini
On 2023-11-14 08:19, Jan Beulich wrote: On 14.11.2023 00:58, Stefano Stabellini wrote: On Mon, 13 Nov 2023, Jan Beulich wrote: On 19.10.2023 09:55, Nicola Vetrini wrote: The constant 0 is used instead of NULL in '__ACCESS_ONCE' as a compile-time check to detect non-scalar types; its usage for

Re: [PATCH v2 04/15] xen/asm-generic: introduce generic hypercall.h

2023-11-14 Thread Oleksii
On Mon, 2023-11-13 at 17:50 +0100, Jan Beulich wrote: > On 13.11.2023 17:45, Jan Beulich wrote: > > On 10.11.2023 17:30, Oleksii Kurochko wrote: > > > Introduce an empty generic hypercall.h for archs which don't > > > implement it. > > > > > > Signed-off-by: Oleksii Kurochko > > > > Since - judg

Re: [PATCH v2 05/15] xen/asm-generic: introduce generic header iocap.h

2023-11-14 Thread Oleksii
On Mon, 2023-11-13 at 17:48 +0100, Jan Beulich wrote: > On 10.11.2023 17:30, Oleksii Kurochko wrote: > > iocap.h is common for Arm, PPC and RISC-V architectures thereby > > it was moved to asm-generic. > > > > Signed-off-by: Oleksii Kurochko > > --- > > The same question as with device.h. Should

Re: [PATCH] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-14 Thread Jan Beulich
On 13.11.2023 18:53, Roger Pau Monné wrote: > On Mon, Nov 13, 2023 at 04:50:23PM +, Alejandro Vallejo wrote: >> Both Intel and AMD manuals agree that on x2APIC mode, the APIC LDR and ID >> registers are derivable from each other through a fixed formula. >> >> Xen uses that formula, but applies

Re: Informal voting proposal

2023-11-14 Thread Kelly Choi
Thanks for your feedback @Jan Beulich and @Stefano Stabellini . Let's go ahead with your suggestion of using "component". I am sure this is a step in the right direction, and the time saved here will benefit from fixing other areas in the project. Many thanks, Kelly Choi Open Source Community M

[xen-unstable test] 183748: trouble: broken/fail/pass

2023-11-14 Thread osstest service owner
flight 183748 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/183748/ Failures and problems with tests :-( Tests which did not succeed and are blocking, including tests which could not be run: test-xtf-amd64-amd64-1 broken Tests which are fail

Re: [PATCH] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-14 Thread Andrew Cooper
On 14/11/2023 10:14 am, Jan Beulich wrote: > On 13.11.2023 18:53, Roger Pau Monné wrote: >> On Mon, Nov 13, 2023 at 04:50:23PM +, Alejandro Vallejo wrote: >>> Signed-off-by: Alejandro Vallejo >> I do wonder whether we need to take any precautions with guests being >> able to trigger an APIC re

FOSDEM 2024 - CfP

2023-11-14 Thread Kelly Choi
Hi all, I'd love to know your interest in attending/speaking at FOSDEM 2024 . The event takes place on 3rd and 4th February 2024. If you are interested and would like to speak about The Xen Project but have travel funding restrictions, please reach out to see if we can h

Re: [PATCH] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-14 Thread Alejandro Vallejo
On Mon, Nov 13, 2023 at 06:53:00PM +0100, Roger Pau Monné wrote: > On Mon, Nov 13, 2023 at 04:50:23PM +, Alejandro Vallejo wrote: > > Both Intel and AMD manuals agree that on x2APIC mode, the APIC LDR and ID > > registers are derivable from each other through a fixed formula. > > > > Xen uses

Re: [PATCH] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-14 Thread Alejandro Vallejo
On Tue, Nov 14, 2023 at 11:14:22AM +0100, Jan Beulich wrote: > On 13.11.2023 18:53, Roger Pau Monné wrote: > > On Mon, Nov 13, 2023 at 04:50:23PM +, Alejandro Vallejo wrote: > >> Both Intel and AMD manuals agree that on x2APIC mode, the APIC LDR and ID > >> registers are derivable from each oth

Re: [PATCH-for-9.0 07/10] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE

2023-11-14 Thread Philippe Mathieu-Daudé
On 13/11/23 20:52, David Woodhouse wrote: On Mon, 2023-11-13 at 16:21 +0100, Philippe Mathieu-Daudé wrote: "sysemu/xen.h" defines CONFIG_XEN_IS_POSSIBLE as a target-agnostic version of CONFIG_XEN. Use it in order to use "sysemu/xen-mapcache.h" in target-agnostic files. Signed-off-by: Philippe M

Re: [PATCH] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-14 Thread Jan Beulich
On 14.11.2023 13:18, Alejandro Vallejo wrote: > On Tue, Nov 14, 2023 at 11:14:22AM +0100, Jan Beulich wrote: >> On 13.11.2023 18:53, Roger Pau Monné wrote: >>> On Mon, Nov 13, 2023 at 04:50:23PM +, Alejandro Vallejo wrote: Both Intel and AMD manuals agree that on x2APIC mode, the APIC LDR

Re: [PATCH] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-14 Thread Andrew Cooper
On 14/11/2023 12:32 pm, Jan Beulich wrote: > On 14.11.2023 13:18, Alejandro Vallejo wrote: >> On Tue, Nov 14, 2023 at 11:14:22AM +0100, Jan Beulich wrote: >>> On 13.11.2023 18:53, Roger Pau Monné wrote: On Mon, Nov 13, 2023 at 04:50:23PM +, Alejandro Vallejo wrote: > Both Intel and AMD

Re: [XEN PATCH v3 2/3] docs: make the docs for MISRA C:2012 Dir 4.1 visible to ECLAIR

2023-11-14 Thread Nicola Vetrini
On 2023-11-09 13:05, Julien Grall wrote: Hi, On 08/11/2023 17:12, Nicola Vetrini wrote: On 2023-11-08 17:25, Julien Grall wrote: Hi Stefano, On 07/11/2023 20:41, Stefano Stabellini wrote: +Julien, Andrew Julien and Andrew raised concerns on this patch on the Xen Matrix channel. Please provi

Re: [PATCH-for-9.0 07/10] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE

2023-11-14 Thread David Woodhouse
On Tue, 2023-11-14 at 13:25 +0100, Philippe Mathieu-Daudé wrote: > > As is CONFIG_XEN. > > Maybe be worth renaming CONFIG_ACCEL_XEN if you think we need > guest hw specific CONFIG_foo_XEN variables. I don't think so. We have CONFIG_XEN_BUS and CONFIG_XEN_EMU (from commit 820c1aba519b) which I th

xen | Successful pipeline for staging | a48bb129

2023-11-14 Thread GitLab
Pipeline #1071943174 has passed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) Commit: a48bb129 ( https://gitlab.com/xen-project/xen/-/commit/a48bb129f1b9ff55c22cf6d2b589247c8ba3b10e ) Commit Message: x86/spec-ctrl

[PATCH v2] xen/sched: fix sched_move_domain()

2023-11-14 Thread Juergen Gross
When moving a domain out of a cpupool running with the credit2 scheduler and having multiple run-queues, the following ASSERT() can be observed: (XEN) Xen call trace: (XEN)[] R credit2.c#csched2_unit_remove+0xe3/0xe7 (XEN)[] S sched_move_domain+0x2f3/0x5b1 (XEN)[] S cpupool.c#cpupool_m

Re: [PATCH 6/7] xen/events: modify internal [un]bind interfaces

2023-11-14 Thread Oleksandr Tyshchenko
On 16.10.23 09:28, Juergen Gross wrote: Hello Juergen > Modify the internal bind- and unbind-interfaces to take a struct > irq_info parameter. When allocating a new IRQ pass the pointer from > the allocating function further up. > > This will reduce the number of info_for_irq() calls and make

Re: [PATCH] arm/mm: add option to prefer IOMMU ops for DMA on Xen

2023-11-14 Thread Robin Murphy
On 11/11/2023 6:45 pm, Chuck Zmudzinski wrote: Enabling the new option, ARM_DMA_USE_IOMMU_XEN, fixes this error when attaching the Exynos mixer in Linux dom0 on Xen on the Chromebook Snow (and probably on other devices that use the Exynos mixer): [drm] Exynos DRM: using 1440.fimd device for

Re: [PATCH-for-9.0 04/10] hw/xen: Factor xen_arch_align_ioreq_data() out of handle_ioreq()

2023-11-14 Thread David Woodhouse
On Tue, 2023-11-14 at 08:58 +0100, Philippe Mathieu-Daudé wrote: > > > Reviewing quickly hw/block/dataplane/xen-block.c, this code doesn't > > > seem target specific at all IMHO. Otherwise I'd really expect it to > > > fail compiling. But I don't know much about Xen, so I'll let block & > > > xen e

Re: [PATCH-for-9.0 07/10] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE

2023-11-14 Thread Philippe Mathieu-Daudé
Cc'ing Paolo On 14/11/23 13:25, Philippe Mathieu-Daudé wrote: On 13/11/23 20:52, David Woodhouse wrote: On Mon, 2023-11-13 at 16:21 +0100, Philippe Mathieu-Daudé wrote: "sysemu/xen.h" defines CONFIG_XEN_IS_POSSIBLE as a target-agnostic version of CONFIG_XEN. Use it in order to use "sysemu/xen-

Xen Security Advisory 445 v3 (CVE-2023-46835) - x86/AMD: mismatch in IOMMU quarantine page table levels

2023-11-14 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2023-46835 / XSA-445 version 3 x86/AMD: mismatch in IOMMU quarantine page table levels UPDATES IN VERSION 3 Public release. ISSUE DESCRIPTION ==

Xen Security Advisory 446 v2 (CVE-2023-46836) - x86: BTC/SRSO fixes not fully effective

2023-11-14 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory CVE-2023-46836 / XSA-446 version 2 x86: BTC/SRSO fixes not fully effective UPDATES IN VERSION 2 Grammar fixes. Public release. ISSUE DESCRIPTIO

xen | Failed pipeline for staging-4.15 | b918c4cd

2023-11-14 Thread GitLab
Pipeline #1071943316 has failed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging-4.15 ( https://gitlab.com/xen-project/xen/-/commits/staging-4.15 ) Commit: b918c4cd ( https://gitlab.com/xen-project/xen/-/commit/b918c4cdc7ab2c1c9e9a9b54fa9d9c595913e028 ) Commit Message: x8

Re: [PATCH] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-14 Thread Roger Pau Monné
On Tue, Nov 14, 2023 at 12:55:46PM +, Andrew Cooper wrote: > On 14/11/2023 12:32 pm, Jan Beulich wrote: > > On 14.11.2023 13:18, Alejandro Vallejo wrote: > >> On Tue, Nov 14, 2023 at 11:14:22AM +0100, Jan Beulich wrote: > >>> On 13.11.2023 18:53, Roger Pau Monné wrote: > On Mon, Nov 13, 20

Re: [PATCH] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-14 Thread Alejandro Vallejo
Hi, On Tue, Nov 14, 2023 at 03:11:28PM +0100, Roger Pau Monné wrote: > On Tue, Nov 14, 2023 at 12:55:46PM +, Andrew Cooper wrote: > > On 14/11/2023 12:32 pm, Jan Beulich wrote: > > > On 14.11.2023 13:18, Alejandro Vallejo wrote: > > >> On Tue, Nov 14, 2023 at 11:14:22AM +0100, Jan Beulich wrot

[PATCH-for-9.0 v2 01/19] tests/avocado: Add 'guest:xen' tag to tests running Xen guest

2023-11-14 Thread Philippe Mathieu-Daudé
Add a tag to run all Xen-specific tests using: $ make check-avocado AVOCADO_TAGS='guest:xen' Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/boot_xen.py | 3 +++ tests/avocado/kvm_xen_guest.py | 1 + 2 files changed, 4 insertions(+) diff --git a/tests/avocado/boot_xen.py b/tests

[PATCH-for-9.0 v2 03/19] sysemu/xen-mapcache: Check Xen availability with CONFIG_XEN_IS_POSSIBLE

2023-11-14 Thread Philippe Mathieu-Daudé
"sysemu/xen.h" defines CONFIG_XEN_IS_POSSIBLE as a target-agnostic version of CONFIG_XEN accelerator. Use it in order to use "sysemu/xen-mapcache.h" in target-agnostic files. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse --- include/sysemu/xen-mapcache.h | 3 ++- 1 file cha

[PATCH-for-9.0 v2 02/19] sysemu/xen: Forbid using Xen headers in user emulation

2023-11-14 Thread Philippe Mathieu-Daudé
Xen is a system specific accelerator, it makes no sense to include its headers in user emulation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: David Woodhouse --- include/sysemu/xen.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH-for-9.0 v2 05/19] hw/display: Restrict xen_register_framebuffer() call to Xen

2023-11-14 Thread Philippe Mathieu-Daudé
Only call xen_register_framebuffer() when Xen is enabled. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/vga.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/display/vga.c b/hw/display/vga.c index 37557c3442..f9cf3d6f77 100644 --- a/hw/display/vga.c +++ b/hw/dis

[PATCH-for-9.0 v2 00/19] hw/xen: Have most of Xen files become target-agnostic

2023-11-14 Thread Philippe Mathieu-Daudé
Missing review: 4-10,13,16,18-19 Since v1: - Rework handle_ioreq() patch (Richard) - Call xen_enabled() and remove various stubs - Use QEMU_ALIGNED() in xen_blkif header - Rename ram_memory -> xen_memory - Have files using Xen API also use its CPPFLAGS - Add missing license - Added Avocado tag - A

[PATCH-for-9.0 v2 07/19] hw/xen: Remove unnecessary xen_hvm_inject_msi() stub

2023-11-14 Thread Philippe Mathieu-Daudé
Since commit 04b0de0ee8 ("xen: factor out common functions") xen_hvm_inject_msi() stub is not required. Signed-off-by: Philippe Mathieu-Daudé --- stubs/xen-hw-stub.c | 4 1 file changed, 4 deletions(-) diff --git a/stubs/xen-hw-stub.c b/stubs/xen-hw-stub.c index 7d7ffe83a9..6cf0e9a4c1 1006

[PATCH-for-9.0 v2 04/19] system/physmem: Do not include 'hw/xen/xen.h' but 'sysemu/xen.h'

2023-11-14 Thread Philippe Mathieu-Daudé
physmem.c doesn't use any declaration from "hw/xen/xen.h", it only requires "sysemu/xen.h" and "system/xen-mapcache.h". Suggested-by: David Woodhouse Signed-off-by: Philippe Mathieu-Daudé --- system/physmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/physmem.c b

[PATCH-for-9.0 v2 06/19] hw/pci/msi: Restrict xen_is_pirq_msi() call to Xen

2023-11-14 Thread Philippe Mathieu-Daudé
Similarly to the restriction in hw/pci/msix.c (see commit e1e4bf2252 "msix: fix msix_vector_masked"), restrict the xen_is_pirq_msi() call in msi_is_masked() to Xen. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci/msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci

[RFC PATCH-for-9.0 v2 09/19] hw/block/xen_blkif: Align structs with QEMU_ALIGNED() instead of #pragma

2023-11-14 Thread Philippe Mathieu-Daudé
Except imported source files, QEMU code base uses the QEMU_ALIGNED() macro to align its structures. Signed-off-by: Philippe Mathieu-Daudé --- hw/block/xen_blkif.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/block/xen_blkif.h b/hw/block/xen_blkif.h index 9973352

[PATCH-for-9.0 v2 08/19] hw/xen: Remove unused Xen stubs

2023-11-14 Thread Philippe Mathieu-Daudé
All these stubs are protected by a 'if (xen_enabled())' check. Signed-off-by: Philippe Mathieu-Daudé --- stubs/xen-hw-stub.c | 24 1 file changed, 24 deletions(-) diff --git a/stubs/xen-hw-stub.c b/stubs/xen-hw-stub.c index 6cf0e9a4c1..53c6a6f2a0 100644 --- a/stubs/xen-

[PATCH-for-9.0 v2 10/19] hw/xen: Rename 'ram_memory' global variable as 'xen_memory'

2023-11-14 Thread Philippe Mathieu-Daudé
To avoid a potential global variable shadow in hw/i386/pc_piix.c::pc_init1(), rename Xen's "ram_memory" as "xen_memory". Signed-off-by: Philippe Mathieu-Daudé --- include/hw/xen/xen-hvm-common.h | 2 +- hw/arm/xen_arm.c| 6 +++--- hw/i386/xen/xen-hvm.c | 10 +-

[PATCH-for-9.0 v2 14/19] hw/xen: Use target-agnostic qemu_target_page_bits()

2023-11-14 Thread Philippe Mathieu-Daudé
Instead of the target-specific TARGET_PAGE_BITS definition, use qemu_target_page_bits() which is target agnostic. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: David Woodhouse --- hw/xen/xen-hvm-common.c | 6 -- 1 file changed, 4 insertions(+), 2 deletio

Re: [PATCH] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-14 Thread Andrew Cooper
On 14/11/2023 2:11 pm, Roger Pau Monné wrote: > On Tue, Nov 14, 2023 at 12:55:46PM +, Andrew Cooper wrote: >> On 14/11/2023 12:32 pm, Jan Beulich wrote: >>> On 14.11.2023 13:18, Alejandro Vallejo wrote: On Tue, Nov 14, 2023 at 11:14:22AM +0100, Jan Beulich wrote: > On 13.11.2023 18:53,

[RFC PATCH-for-9.0 v2 13/19] hw/xen: Remove use of 'target_ulong' in handle_ioreq()

2023-11-14 Thread Philippe Mathieu-Daudé
Per commit f17068c1c7 ("xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common"), handle_ioreq() is expected to be target-agnostic. However it uses 'target_ulong', which is a target specific definition. Per xen/include/public/hvm/ioreq.h header: struct ioreq { uint64_t addr;

[PATCH-for-9.0 v2 18/19] hw/i386/xen: Compile 'xen-hvm.c' with Xen CPPFLAGS

2023-11-14 Thread Philippe Mathieu-Daudé
xen-hvm.c calls xc_set_hvm_param() from , so better compile it with Xen CPPFLAGS. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/xen/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/i386/xen/meson.build b/hw/i386/xen/meson.build index 3dc4c4f106..3f0df8bc0

Re: [PATCH-for-9.0 v2 01/19] tests/avocado: Add 'guest:xen' tag to tests running Xen guest

2023-11-14 Thread David Woodhouse
On 14 November 2023 09:37:57 GMT-05:00, "Philippe Mathieu-Daudé" wrote: >Add a tag to run all Xen-specific tests using: > > $ make check-avocado AVOCADO_TAGS='guest:xen' > >Signed-off-by: Philippe Mathieu-Daudé >--- > tests/avocado/boot_xen.py | 3 +++ > tests/avocado/kvm_xen_guest.py | 1 +

[PATCH-for-9.0 v2 12/19] hw/xen: Merge 'hw/xen/arch_hvm.h' in 'hw/xen/xen-hvm-common.h'

2023-11-14 Thread Philippe Mathieu-Daudé
We don't need a target-specific header for common target-specific prototypes. Declare xen_arch_handle_ioreq() and xen_arch_set_memory() in "hw/xen/xen-hvm-common.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Reviewed-by: Richard Henderson --- include/hw/arm/xen_arch_hv

[PATCH-for-9.0 v2 17/19] hw/xen: Extract 'xen_igd.h' from 'xen_pt.h'

2023-11-14 Thread Philippe Mathieu-Daudé
"hw/xen/xen_pt.h" requires "hw/xen/xen_native.h" which is target specific. It also declares IGD methods, which are not target specific. Target-agnostic code can use IGD methods. To allow that, extract these methos into a new "hw/xen/xen_igd.h" header. Signed-off-by: Philippe Mathieu-Daudé Review

[PATCH-for-9.0 v2 16/19] hw/xen/xen_pt: Add missing license

2023-11-14 Thread Philippe Mathieu-Daudé
Commit eaab4d60d3 ("Introduce Xen PCI Passthrough, qdevice") introduced both xen_pt.[ch], but only added the license to xen_pt.c. Use the same license for xen_pt.h. Suggested-by: David Woodhouse Signed-off-by: Philippe Mathieu-Daudé --- hw/xen/xen_pt.h | 10 ++ 1 file changed, 10 insert

[PATCH-for-9.0 v2 11/19] hw/xen/xen_arch_hvm: Rename prototypes using 'xen_arch_' prefix

2023-11-14 Thread Philippe Mathieu-Daudé
Use a common 'xen_arch_' prefix for architecture-specific functions. Rename xen_arch_set_memory() and xen_arch_handle_ioreq(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse Reviewed-by: Richard Henderson --- include/hw/arm/xen_arch_hvm.h | 4 ++-- include/hw/i386/xen_arch

Re: [PATCH-for-9.0 v2 04/19] system/physmem: Do not include 'hw/xen/xen.h' but 'sysemu/xen.h'

2023-11-14 Thread David Woodhouse
On 14 November 2023 09:38:00 GMT-05:00, "Philippe Mathieu-Daudé" wrote: >physmem.c doesn't use any declaration from "hw/xen/xen.h", >it only requires "sysemu/xen.h" and "system/xen-mapcache.h". > >Suggested-by: David Woodhouse >Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse

[PATCH-for-9.0 v2 15/19] hw/xen: Reduce inclusion of 'cpu.h' to target-specific sources

2023-11-14 Thread Philippe Mathieu-Daudé
We rarely need to include "cpu.h" in headers. Including it 'taint' headers to be target-specific. Here only the i386/arm implementations requires "cpu.h", so include it there and remove from the "hw/xen/xen-hvm-common.h" *common* header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard

Re: [PATCH-for-9.0 v2 01/19] tests/avocado: Add 'guest:xen' tag to tests running Xen guest

2023-11-14 Thread Philippe Mathieu-Daudé
On 14/11/23 15:50, David Woodhouse wrote: On 14 November 2023 09:37:57 GMT-05:00, "Philippe Mathieu-Daudé" wrote: Add a tag to run all Xen-specific tests using: $ make check-avocado AVOCADO_TAGS='guest:xen' Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/boot_xen.py | 3 +++ t

Re: Clang-format configuration discussion - pt 1

2023-11-14 Thread Luca Fancellu
> On 13 Nov 2023, at 16:27, Jan Beulich wrote: > > On 13.11.2023 16:20, Luca Fancellu wrote: >>> On 13 Nov 2023, at 11:31, Jan Beulich wrote: >>> On 08.11.2023 10:53, Luca Fancellu wrote: >>> --

Re: [PATCH] automation: set architecture in docker files

2023-11-14 Thread Anthony PERARD
On Tue, Nov 14, 2023 at 10:01:06AM +0100, Roger Pau Monné wrote: > On Mon, Nov 13, 2023 at 04:10:24PM -0800, Stefano Stabellini wrote: > > On Mon, 13 Nov 2023, Roger Pau Monne wrote: > > > Pass the desired architecture of the image in the FROM instruction if the > > > image is possibly multi-platfo

[PATCH-for-9.0 v2 19/19] hw/xen: Have most of Xen files become target-agnostic

2023-11-14 Thread Philippe Mathieu-Daudé
Previous commits re-organized the target-specific bits from Xen files. We can now build the common files once instead of per-target. Only 4 files call libxen API (thus its CPPFLAGS): - xen-hvm-common.c, - xen_pt.c, xen_pt_graphics.c, xen_pt_msi.c Signed-off-by: Philippe Mathieu-Daudé --- Reworke

xen | Successful pipeline for staging-4.16 | 4dfe9517

2023-11-14 Thread GitLab
Pipeline #1071943394 has passed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging-4.16 ( https://gitlab.com/xen-project/xen/-/commits/staging-4.16 ) Commit: 4dfe9517 ( https://gitlab.com/xen-project/xen/-/commit/4dfe95177b948d1f3ed27a801f603ed7f1bc36e8 ) Commit Message: x8

Re: [PATCH] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-14 Thread Roger Pau Monné
On Tue, Nov 14, 2023 at 02:44:09PM +, Andrew Cooper wrote: > On 14/11/2023 2:11 pm, Roger Pau Monné wrote: > > On Tue, Nov 14, 2023 at 12:55:46PM +, Andrew Cooper wrote: > >> On 14/11/2023 12:32 pm, Jan Beulich wrote: > >>> On 14.11.2023 13:18, Alejandro Vallejo wrote: > On Tue, Nov 14

Re: [PATCH-for-9.0 v2 01/19] tests/avocado: Add 'guest:xen' tag to tests running Xen guest

2023-11-14 Thread David Woodhouse
On 14 November 2023 10:00:09 GMT-05:00, "Philippe Mathieu-Daudé" wrote: >On 14/11/23 15:50, David Woodhouse wrote: >> On 14 November 2023 09:37:57 GMT-05:00, "Philippe Mathieu-Daudé" >> wrote: >>> Add a tag to run all Xen-specific tests using: >>> >>> $ make check-avocado AVOCADO_TAGS='guest

Re: [PATCH-for-9.0 v2 01/19] tests/avocado: Add 'guest:xen' tag to tests running Xen guest

2023-11-14 Thread Philippe Mathieu-Daudé
On 14/11/23 16:08, David Woodhouse wrote: On 14 November 2023 10:00:09 GMT-05:00, "Philippe Mathieu-Daudé" wrote: On 14/11/23 15:50, David Woodhouse wrote: On 14 November 2023 09:37:57 GMT-05:00, "Philippe Mathieu-Daudé" wrote: Add a tag to run all Xen-specific tests using: $ make chec

[PATCH v3] xen/asm-generic: ifdef inclusion of

2023-11-14 Thread Oleksii Kurochko
ifdefing inclusion of in allows to avoid generation of empty header for the case when !CONFIG_MEM_ACCESS. For Arm it was explicitly added inclusion of for p2m.c and traps.c because they require some functions from which aren't available in case of !CONFIG_MEM_ACCESS. Suggested-by: Jan Beulic

Re: [PATCH-for-9.0 v2 06/19] hw/pci/msi: Restrict xen_is_pirq_msi() call to Xen

2023-11-14 Thread David Woodhouse
On 14 November 2023 09:38:02 GMT-05:00, "Philippe Mathieu-Daudé" wrote: >Similarly to the restriction in hw/pci/msix.c (see commit >e1e4bf2252 "msix: fix msix_vector_masked"), restrict the >xen_is_pirq_msi() call in msi_is_masked() to Xen. > >Signed-off-by: Philippe Mathieu-Daudé Hm, we do also

Re: [PATCH-for-9.0 v2 04/19] system/physmem: Do not include 'hw/xen/xen.h' but 'sysemu/xen.h'

2023-11-14 Thread David Hildenbrand
On 14.11.23 15:38, Philippe Mathieu-Daudé wrote: physmem.c doesn't use any declaration from "hw/xen/xen.h", it only requires "sysemu/xen.h" and "system/xen-mapcache.h". Suggested-by: David Woodhouse Signed-off-by: Philippe Mathieu-Daudé --- Reviewed-by: David Hildenbrand -- Cheers, David

[PATCH v3] xen: ifdef inclusion of in

2023-11-14 Thread Oleksii Kurochko
Ifdef-ing inclusion of allows to avoid generation of empty for cases when CONFIG_GRANT_TABLE is not enabled. The following changes were done for Arm: should be included directly because it contains gnttab_dom0_frames() macros which is unique for Arm and is used in arch/arm/domain_build.c. is #

[ImageBuilder] Add 'bootz' to a list of supported boot commands

2023-11-14 Thread Michal Orzel
At the moment, in order to boot 32-bit images, we need to set BOOT_CMD to 'bootm' which results in adding a u-boot header on top of an image. Add 'bootz' to a list of supported boot commands, so that we can skip this extra step. In most cases, specifying 'bootm' should only be needed for images wit

Re: [PATCH-for-9.0 v2 01/19] tests/avocado: Add 'guest:xen' tag to tests running Xen guest

2023-11-14 Thread David Woodhouse
On 14 November 2023 10:13:14 GMT-05:00, "Philippe Mathieu-Daudé" wrote: >On 14/11/23 16:08, David Woodhouse wrote: >> On 14 November 2023 10:00:09 GMT-05:00, "Philippe Mathieu-Daudé" >> wrote: >>> On 14/11/23 15:50, David Woodhouse wrote: On 14 November 2023 09:37:57 GMT-05:00, "Philippe M

Re: [PATCH-for-9.0 v2 06/19] hw/pci/msi: Restrict xen_is_pirq_msi() call to Xen

2023-11-14 Thread Philippe Mathieu-Daudé
On 14/11/23 16:13, David Woodhouse wrote: On 14 November 2023 09:38:02 GMT-05:00, "Philippe Mathieu-Daudé" wrote: Similarly to the restriction in hw/pci/msix.c (see commit e1e4bf2252 "msix: fix msix_vector_masked"), restrict the xen_is_pirq_msi() call in msi_is_masked() to Xen. Signed-off-by:

Re: [PATCH v2 02/15] xen/asm-generic: introduce generic device.h

2023-11-14 Thread Oleksii
On Mon, 2023-11-13 at 17:43 +0100, Jan Beulich wrote: > On 10.11.2023 17:30, Oleksii Kurochko wrote: > > --- /dev/null > > +++ b/xen/include/asm-generic/device.h > > @@ -0,0 +1,140 @@ > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > +#ifndef __ASM_GENERIC_DEVICE_H__ > > +#define __ASM_GENERIC_D

Re: Clang-format configuration discussion - pt 1

2023-11-14 Thread Alejandro Vallejo
Hi, On Tue, Nov 14, 2023 at 02:59:35PM +, Luca Fancellu wrote: > > > > On 13 Nov 2023, at 16:27, Jan Beulich wrote: > > > > On 13.11.2023 16:20, Luca Fancellu wrote: > >>> On 13 Nov 2023, at 11:31, Jan Beulich wrote: > >>> On 08.11.2023 10:53, Luca Fancellu wrote: > >>> --

Re: [PATCH-for-9.0 v2 07/19] hw/xen: Remove unnecessary xen_hvm_inject_msi() stub

2023-11-14 Thread David Woodhouse
On 14 November 2023 09:38:03 GMT-05:00, "Philippe Mathieu-Daudé" wrote: >Since commit 04b0de0ee8 ("xen: factor out common functions") >xen_hvm_inject_msi() stub is not required. > >Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse

Re: [RFC PATCH-for-9.0 v2 09/19] hw/block/xen_blkif: Align structs with QEMU_ALIGNED() instead of #pragma

2023-11-14 Thread David Woodhouse
On 14 November 2023 09:38:05 GMT-05:00, "Philippe Mathieu-Daudé" wrote: >Except imported source files, QEMU code base uses >the QEMU_ALIGNED() macro to align its structures. > >Signed-off-by: Philippe Mathieu-Daudé Can we have a BUILD_BUG_ON(sizeof==) for these please?

[XEN PATCH v4 1/2] automation/eclair: make the docs for MISRA C:2012 Dir 4.1 visible to ECLAIR

2023-11-14 Thread Nicola Vetrini
To be able to check for the existence of the necessary subsections in the documentation for MISRA C:2012 Dir 4.1, ECLAIR needs to have a source file that is built. This file is generated from 'C-runtime-failures.rst' in docs/misra and the configuration is updated accordingly. Signed-off-by: Nicol

[XEN PATCH v4 0/2] use the documentation for MISRA C:2012 Dir 4.1

2023-11-14 Thread Nicola Vetrini
This series addresses some concerns raised on patches 2 and 3 from [1]. Note that patch 1 from that series has already been applied. Patch 1 comprises a modified version of patches 2 and 3 of the previous series. Patch 2 is brand new, as it merely clarifies how to write such documentation. [1] h

[XEN PATCH v4 2/2] docs/misra: add guidance on the format of Dir 4.1 docs for ECLAIR

2023-11-14 Thread Nicola Vetrini
Additional guidance on the formatting of the document for ECLAIR is supplied. Signed-off-by: Nicola Vetrini --- docs/misra/C-runtime-failures.rst | 8 1 file changed, 8 insertions(+) diff --git a/docs/misra/C-runtime-failures.rst b/docs/misra/C-runtime-failures.rst index 1052b2afca13.

Re: [PATCH-for-9.0 v2 01/19] tests/avocado: Add 'guest:xen' tag to tests running Xen guest

2023-11-14 Thread Philippe Mathieu-Daudé
On 14/11/23 16:19, David Woodhouse wrote: On 14 November 2023 10:13:14 GMT-05:00, "Philippe Mathieu-Daudé" wrote: On 14/11/23 16:08, David Woodhouse wrote: On 14 November 2023 10:00:09 GMT-05:00, "Philippe Mathieu-Daudé" wrote: On 14/11/23 15:50, David Woodhouse wrote: On 14 November 2023

Re: [PATCH-for-9.0 v2 06/19] hw/pci/msi: Restrict xen_is_pirq_msi() call to Xen

2023-11-14 Thread David Woodhouse
On 14 November 2023 10:22:23 GMT-05:00, "Philippe Mathieu-Daudé" wrote: >On 14/11/23 16:13, David Woodhouse wrote: >> On 14 November 2023 09:38:02 GMT-05:00, "Philippe Mathieu-Daudé" >> wrote: >>> Similarly to the restriction in hw/pci/msix.c (see commit >>> e1e4bf2252 "msix: fix msix_vector_ma

Re: [PATCH-for-9.0 v2 10/19] hw/xen: Rename 'ram_memory' global variable as 'xen_memory'

2023-11-14 Thread David Woodhouse
On 14 November 2023 09:38:06 GMT-05:00, "Philippe Mathieu-Daudé" wrote: >To avoid a potential global variable shadow in >hw/i386/pc_piix.c::pc_init1(), rename Xen's >"ram_memory" as "xen_memory". > >Signed-off-by: Philippe Mathieu-Daudé Well OK, but aren't you going to be coming back later to e

Re: [PATCH-for-9.0 v2 16/19] hw/xen/xen_pt: Add missing license

2023-11-14 Thread David Woodhouse
On 14 November 2023 09:38:12 GMT-05:00, "Philippe Mathieu-Daudé" wrote: >Commit eaab4d60d3 ("Introduce Xen PCI Passthrough, qdevice") >introduced both xen_pt.[ch], but only added the license to >xen_pt.c. Use the same license for xen_pt.h. > >Suggested-by: David Woodhouse >Signed-off-by: Philipp

Re: [PATCH-for-9.0 v2 18/19] hw/i386/xen: Compile 'xen-hvm.c' with Xen CPPFLAGS

2023-11-14 Thread David Woodhouse
On 14 November 2023 09:38:14 GMT-05:00, "Philippe Mathieu-Daudé" wrote: >xen-hvm.c calls xc_set_hvm_param() from , >so better compile it with Xen CPPFLAGS. > >Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Woodhouse

  1   2   >