Re: [PATCH v2] swiotlb-xen: provide the "max_mapping_size" method

2023-11-07 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH 20/29] tools: add 9pfs device to xenstore-stubdom

2023-11-07 Thread Juergen Gross
On 07.11.23 20:18, Jason Andryuk wrote: On Wed, Nov 1, 2023 at 8:23 AM 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" - type = "xenlogd" - path = "/var/lib/xen

Re: [PATCH 16/29] tools/xl: support new 9pfs backend xenlogd

2023-11-07 Thread Juergen Gross
On 07.11.23 17:55, Jason Andryuk wrote: On Wed, Nov 1, 2023 at 6:41 AM Juergen Gross wrote: Add support for the new 9pfs backend "xenlogd". For this backend type the tag defaults to "Xen" and the host side path to "/var/log/xen/guests/". Signed-off-by: Juergen Gross diff --git a/tools/xl/

[ovmf test] 183711: all pass - PUSHED

2023-11-07 Thread osstest service owner
flight 183711 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/183711/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf bb18fb80abb9d35d01be5d693086a9ed4b9d65b5 baseline version: ovmf c96b4da2a079eb837ab3a

xen | Successful pipeline for staging | bede1c7e

2023-11-07 Thread GitLab
Pipeline #1064344124 has passed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) Commit: bede1c7e ( https://gitlab.com/xen-project/xen/-/commit/bede1c7e3b790b63f1ff3ea3ee4e476b012fdf2c ) Commit Message: exclude-list:

[xen-unstable test] 183706: tolerable trouble: fail/pass/starved - PUSHED

2023-11-07 Thread osstest service owner
flight 183706 xen-unstable real [real] flight 183710 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/183706/ http://logs.test-lab.xenproject.org/osstest/logs/183710/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd6

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

2023-11-07 Thread osstest service owner
flight 183709 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/183709/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

xen | Successful pipeline for staging | 78a86b26

2023-11-07 Thread GitLab
Pipeline #1064177796 has passed! Project: xen ( https://gitlab.com/xen-project/xen ) Branch: staging ( https://gitlab.com/xen-project/xen/-/commits/staging ) Commit: 78a86b26 ( https://gitlab.com/xen-project/xen/-/commit/78a86b26868c12ae1cc3dd2a8bb9aa5eebaa41fd ) Commit Message: x86/spec-ctrl

[xen-4.18-testing test] 183704: tolerable trouble: fail/pass/starved - PUSHED

2023-11-07 Thread osstest service owner
flight 183704 xen-4.18-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/183704/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 183663 test-amd64-amd64-xl-qemuu-win7-a

Re: [XEN PATCH v3] xen/string: address violations of MISRA C:2012 Rules 8.2 and 8.3

2023-11-07 Thread Stefano Stabellini
On Tue, 7 Nov 2023, Federico Serafini wrote: > Add missing parameter names and make function declarations and > definitions consistent. > Mismatches between parameter names "count" and "n" are resolved > in favor of "n", being the same name used by the C standard. > > No functional change. > > Si

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

2023-11-07 Thread osstest service owner
flight 183707 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/183707/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

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

2023-11-07 Thread Stefano Stabellini
+Julien, Andrew Julien and Andrew raised concerns on this patch on the Xen Matrix channel. Please provide further details. On Mon, 2 Oct 2023, Stefano Stabellini wrote: > On Mon, 2 Oct 2023, Nicola Vetrini wrote: > > To be able to check for the existence of the necessary subsections in > > the

Re: [PATCH 29/29] tools/xenstored: have a single do_control_memreport()

2023-11-07 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 6:55 AM Juergen Gross wrote: > > 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

Re: [XEN PATCH 07/10] arm/traps: address a violation of MISRA C:2012 Rule 8.2

2023-11-07 Thread Stefano Stabellini
On Tue, 7 Nov 2023, Julien Grall wrote: > Hi Stefano, > > On 16/10/2023 10:02, Julien Grall wrote: > > Hi, > > > > On 13/10/2023 16:24, Federico Serafini wrote: > > > Add missing parameter name, no functional change. > > > > > > Signed-off-by: Federico Serafini > > > --- > > >   xen/arch/arm/tr

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

2023-11-07 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 6:49 AM 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. > > Signed-off-by: Jue

Re: [PATCH 27/29] tools/xenstored: add daemon_init() function

2023-11-07 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 5:50 AM Juergen Gross wrote: > > Some xenstored initialization needs to be done in the daemon case only, > so split it out into a new daemon_init() function being a stub in the > stubdom case. > > Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

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

2023-11-07 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 7:29 AM Juergen Gross wrote: > > 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 /v

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

2023-11-07 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 7:48 AM Juergen Gross wrote: > > 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: Jaso

Re: Support situation for nestedhvm

2023-11-07 Thread Andrew Cooper
On 07/11/2023 7:53 pm, Elliott Mitchell wrote: > I ran into the nestedhvm via the following path. I was considering the > feasibility of shedding tasks from a desktop onto a server running Xen. > I was looking at `man xl.cfg` and noticed "nestedhvm". > > Since one of the tasks the computer handled

Re: [PATCH v5 9/9] xen/arm: Map ITS doorbell register to IOMMU page tables.

2023-11-07 Thread Stewart Hildebrand
On 10/20/23 14:02, Julien Grall wrote: > Hi Stewart, > > On 04/10/2023 15:55, Stewart Hildebrand wrote: >> From: Rahul Singh > > This wants an explanation why this is needed. I'll add an explanation > >> Signed-off-by: Rahul Singh > > Your signed-off-by is missing. I'll add it > >> --- >

Support situation for nestedhvm

2023-11-07 Thread Elliott Mitchell
I ran into the nestedhvm via the following path. I was considering the feasibility of shedding tasks from a desktop onto a server running Xen. I was looking at `man xl.cfg` and noticed "nestedhvm". Since one of the tasks the computer handled was running other OSes in fully simulated environments,

Re: [PATCH] x86/x2apic: introduce a mixed physical/cluster mode

2023-11-07 Thread Elliott Mitchell
On Mon, Oct 30, 2023 at 04:27:22PM +0100, Roger Pau Monné wrote: > On Mon, Oct 30, 2023 at 07:50:27AM -0700, Elliott Mitchell wrote: > > On Tue, Oct 24, 2023 at 03:51:50PM +0200, Roger Pau Monne wrote: > > > diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c > > > index 707d

Re: [PATCH 22/29] tools/xenstored:

2023-11-07 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 7:15 AM Juergen Gross wrote: > > When [un]mapping the ring page of a Xenstore client, different actions > are required for "normal" guests and dom0. Today this distinction is > made at call site. > > Move this distinction into [un]map_interface() instead, avoiding code > dup

Re: [PATCH 20/29] tools: add 9pfs device to xenstore-stubdom

2023-11-07 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 8:23 AM 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" > - type = "xenlogd" > - path = "/var/lib/xen/xenstore" > > For now don't

Re: [PATCH 19/29] stubdom: extend xenstore stubdom configs

2023-11-07 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 5:48 AM Juergen Gross wrote: > > 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

Re: [PATCH 17/29] tools/helpers: allocate xenstore event channel for xenstore stubdom

2023-11-07 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 5:53 AM Juergen Gross wrote: > > In order to prepare support of PV frontends in xenstore-stubdom, add > allocation of a Xenstore event channel to init-xenstore-domain.c. > > Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk

Re: [XEN PATCH 07/10] arm/traps: address a violation of MISRA C:2012 Rule 8.2

2023-11-07 Thread Julien Grall
Hi Stefano, On 16/10/2023 10:02, Julien Grall wrote: Hi, On 13/10/2023 16:24, Federico Serafini wrote: Add missing parameter name, no functional change. Signed-off-by: Federico Serafini ---   xen/arch/arm/traps.c | 2 +-   1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/a

Re: [RFC PATCH 4/4] automation/eclair: add deviation for certain backwards goto

2023-11-07 Thread Julien Grall
On 07/11/2023 14:45, Nicola Vetrini wrote: Hi Julien, Hi, On 2023-11-07 13:44, Julien Grall wrote: +in the community." +-config=MC3R1.R15.2,reports+={deliberate, "any_area(any_loc(text(^.*goto (again|retry).*$)))"} +-doc_end +   #   # Series 20.   # diff --git a/docs/misra/deviations.rst b

Re: [PATCH 16/29] tools/xl: support new 9pfs backend xenlogd

2023-11-07 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 6:41 AM Juergen Gross wrote: > > Add support for the new 9pfs backend "xenlogd". For this backend type > the tag defaults to "Xen" and the host side path to > "/var/log/xen/guests/". > > Signed-off-by: Juergen Gross > diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c

[PATCH 7/7] tools/xg: Simplify hypercall stubs

2023-11-07 Thread Alejandro Vallejo
Now there are no pending dependencies on the current form of the hypercall stubs. Replace them with simpler forms that only take the xc_cpu_policy object. This way the plumbing logic becomes a lot simpler, allowing the policy to be extended without touching the plumbing code. Signed-off-by: Alejan

[PATCH 3/7] tools/xg: Add self-(de)serialisation functions for cpu_policy

2023-11-07 Thread Alejandro Vallejo
These allow a policy to internally (de)serialize itself, so that we don't have to carry around serialization buffers when perfectly good ones are present inside. Both moved on top of the xend overrides as they are needed there in future patches Signed-off-by: Alejandro Vallejo --- tools/libs/gu

[PATCH 0/7] Cleanup and code duplication removal in xenguest

2023-11-07 Thread Alejandro Vallejo
NOTE: This series is still under test This series tries to bind the current xc_cpu_policy_t and its serialization buffers. Having them separate makes it hard to extend of modify the serialized policy structure and needlessly leaks details in places that don't need them, causing a lot of boilerplat

[PATCH 5/7] tools/xg: Streamline xc_cpuid_apply_policy()

2023-11-07 Thread Alejandro Vallejo
Instantiates host, default and domain policies in order to clean up a lot of boilerplate hypercalls. This is partial work in order to deduplicate the same hypercalls being used when updating CPUID and MSR parts of the policy. Signed-off-by: Alejandro Vallejo --- tools/include/xenguest.h|

[PATCH 4/7] tools/xg: Split xc_cpu_policy_set_domain()

2023-11-07 Thread Alejandro Vallejo
xc_cpu_policy_set_domain_from_serialised() converts the cpu policy into its serialised form first and then sends that to Xen. Meanwhile, xc_cpu_policy_domain_set_from_deserialised() uses whatever is already in the internal serialisation buffer of the policy object. This split helps in a future pat

[PATCH 2/7] tools/xg: Simplify write_x86_cpu_policy_records()

2023-11-07 Thread Alejandro Vallejo
With the policy automatically getting appropriate serialised buffer sizes, we can remove boilerplate from this function. Furthermore, the extra dynamic allocations aren't needed anymore as the serialised buffers inside the policy can be used instead. Signed-off-by: Alejandro Vallejo --- tools/li

[PATCH 6/7] tools/xg: Simplify xc_cpuid_xend_policy() and xc_msr_policy()

2023-11-07 Thread Alejandro Vallejo
Remove all duplication in CPUID and MSR xend-style overrides. They had an incredible amount of overhead for no good reason. After this patch, CPU policy application takes a number of hypercalls to recover the policy state and then those are passed to the xend-style override code so it can avoid th

[PATCH 1/7] tools/xenguest: Dynamically allocate xc_cpu_policy_t contents

2023-11-07 Thread Alejandro Vallejo
This is part of a larger effort to reduce technical debt in this area and prevent policy internals from leaking in plumbing code that needs not be aware of them. This patch turns the internal static buffers into dynamic ones and performs the allocations based on policy sizes probed using a hyperca

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

2023-11-07 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 5:51 AM Juergen Gross wrote: > > 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 "xenlogd" with the related Xenstore backend-side > directory "xen_9pfs". > > As

[xen-unstable test] 183703: tolerable trouble: fail/pass/starved - PUSHED

2023-11-07 Thread osstest service owner
flight 183703 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/183703/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 183695 test-amd64-amd64-xl-qemut-win7-amd64

Re: [PATCH 14/29] tools/xenlogd: add 9pfs read request support

2023-11-07 Thread Jason Andryuk
On Tue, Nov 7, 2023 at 9:49 AM Juergen Gross wrote: > > On 07.11.23 15:31, Jason Andryuk wrote: > > On Wed, Nov 1, 2023 at 5:35 AM Juergen Gross wrote: > >> > >> Add the read request of the 9pfs protocol. > >> > >> For now support only reading plain files (no directories). > >> > >> Signed-off-by

Re: [PATCH 12/29] tools/xenlogd: add 9pfs stat request support

2023-11-07 Thread Jason Andryuk
On Tue, Nov 7, 2023 at 9:48 AM Jason Andryuk wrote: > > On Tue, Nov 7, 2023 at 9:42 AM Juergen Gross wrote: > > > > On 07.11.23 15:04, Jason Andryuk wrote: > > > On Wed, Nov 1, 2023 at 5:34 AM Juergen Gross wrote: > > >> > > >> Add the stat request of the 9pfs protocol. > > >> > > >> Signed-off-

Re: [PATCH 13/29] tools/xenlogd: add 9pfs write request support

2023-11-07 Thread Jason Andryuk
On Tue, Nov 7, 2023 at 9:43 AM Juergen Gross wrote: > > On 07.11.23 15:10, Jason Andryuk wrote: > > On Wed, Nov 1, 2023 at 5:54 AM Juergen Gross wrote: > >> > >> Add the write request of the 9pfs protocol. > >> > >> Signed-off-by: Juergen Gross > >> --- > >> tools/xenlogd/io.c | 50 +++

[XEN PATCH v3] xen/string: address violations of MISRA C:2012 Rules 8.2 and 8.3

2023-11-07 Thread Federico Serafini
Add missing parameter names and make function declarations and definitions consistent. Mismatches between parameter names "count" and "n" are resolved in favor of "n", being the same name used by the C standard. No functional change. Signed-off-by: Federico Serafini --- Changes in v3: - applie

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

2023-11-07 Thread osstest service owner
flight 183705 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/183705/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

Re: [PATCH 14/29] tools/xenlogd: add 9pfs read request support

2023-11-07 Thread Juergen Gross
On 07.11.23 15:31, Jason Andryuk wrote: On Wed, Nov 1, 2023 at 5:35 AM Juergen Gross wrote: Add the read request of the 9pfs protocol. For now support only reading plain files (no directories). Signed-off-by: Juergen Gross --- tools/xenlogd/io.c | 60 ++

Re: [PATCH 12/29] tools/xenlogd: add 9pfs stat request support

2023-11-07 Thread Jason Andryuk
On Tue, Nov 7, 2023 at 9:42 AM Juergen Gross wrote: > > On 07.11.23 15:04, Jason Andryuk wrote: > > On Wed, Nov 1, 2023 at 5:34 AM Juergen Gross wrote: > >> > >> Add the stat request of the 9pfs protocol. > >> > >> Signed-off-by: Juergen Gross > >> --- > >> tools/xenlogd/io.c | 89

Re: [RFC PATCH 4/4] automation/eclair: add deviation for certain backwards goto

2023-11-07 Thread Nicola Vetrini
Hi Julien, On 2023-11-07 13:44, Julien Grall wrote: Hi Nicola, On 07/11/2023 10:33, Nicola Vetrini wrote: As explained in the deviation record, code constructs such as "goto retry" and "goto again" are sometimes the best balance between code complexity and the understandability of the control

Re: [PATCH 13/29] tools/xenlogd: add 9pfs write request support

2023-11-07 Thread Juergen Gross
On 07.11.23 15:10, Jason Andryuk wrote: On Wed, Nov 1, 2023 at 5:54 AM Juergen Gross wrote: Add the write request of the 9pfs protocol. Signed-off-by: Juergen Gross --- tools/xenlogd/io.c | 50 ++ 1 file changed, 50 insertions(+) diff --git a/t

Re: [PATCH 12/29] tools/xenlogd: add 9pfs stat request support

2023-11-07 Thread Juergen Gross
On 07.11.23 15:04, Jason Andryuk wrote: On Wed, Nov 1, 2023 at 5:34 AM Juergen Gross wrote: Add the stat request of the 9pfs protocol. Signed-off-by: Juergen Gross --- tools/xenlogd/io.c | 89 ++ 1 file changed, 89 insertions(+) diff --git a/to

Re: [PATCH 14/29] tools/xenlogd: add 9pfs read request support

2023-11-07 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 5:35 AM Juergen Gross wrote: > > Add the read request of the 9pfs protocol. > > For now support only reading plain files (no directories). > > Signed-off-by: Juergen Gross > --- > tools/xenlogd/io.c | 60 ++ > 1 file changed, 60

Re: Informal voting proposal

2023-11-07 Thread Kelly Choi
Thanks for the feedback Julien, see my reply below. Many thanks, Kelly Choi Open Source Community Manager XenServer, Cloud Software Group On Tue, Nov 7, 2023 at 8:23 AM Julien Grall wrote: > Hi Stefano, > > On 07/11/2023 04:18, Stefano Stabellini wrote: > > On Mon, 6 Nov 2023, Julien Grall wr

Re: [PATCH 13/29] tools/xenlogd: add 9pfs write request support

2023-11-07 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 5:54 AM Juergen Gross wrote: > > Add the write request of the 9pfs protocol. > > Signed-off-by: Juergen Gross > --- > tools/xenlogd/io.c | 50 ++ > 1 file changed, 50 insertions(+) > > diff --git a/tools/xenlogd/io.c b/tools/xenl

Re: [PATCH 12/29] tools/xenlogd: add 9pfs stat request support

2023-11-07 Thread Jason Andryuk
On Wed, Nov 1, 2023 at 5:34 AM Juergen Gross wrote: > > Add the stat request of the 9pfs protocol. > > Signed-off-by: Juergen Gross > --- > tools/xenlogd/io.c | 89 ++ > 1 file changed, 89 insertions(+) > > diff --git a/tools/xenlogd/io.c b/tools/xenlo

Re: [PULL 00/15] xenfv.for-upstream queue

2023-11-07 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [RFC PATCH 4/4] automation/eclair: add deviation for certain backwards goto

2023-11-07 Thread Julien Grall
Hi Nicola, On 07/11/2023 10:33, Nicola Vetrini wrote: As explained in the deviation record, code constructs such as "goto retry" and "goto again" are sometimes the best balance between code complexity and the understandability of the control flow by developers; as such, these construct are allow

Re: [XEN PATCH][for-4.19 v2] xen: replace occurrences of SAF-1-safe with asmlinkage attribute

2023-11-07 Thread Julien Grall
Hi Nicola, On 07/11/2023 10:30, Nicola Vetrini wrote: The comment-based justifications for MISRA C:2012 Rule 8.4 are replaced by the asmlinkage pseudo-attribute, for the sake of uniformity. Add missing 'xen/compiler.h' #include-s where needed. The text in docs/misra/deviations.rst and docs/mis

Re: [RFC PATCH 3/4] xen/arm: GICv3: address MISRA C:2012 Rule 15.2

2023-11-07 Thread Julien Grall
Hi Nicola, On 07/11/2023 10:33, Nicola Vetrini wrote: The backwards jump due to the "goto retry;" statement can be transformed into a loop, without losing much in terms of readability. Signed-off-by: Stefano Stabellini Signed-off-by: Nicola Vetrini --- This specific patch was provided by Stef

Re: [PATCH v3 2/2] xen/arm32: head Split and move MMU-specific head.S to mmu/head.S

2023-11-07 Thread Michal Orzel
Hi Ayan, On 07/11/2023 12:02, Ayan Kumar Halder wrote: > > > The MMU specific code in head.S will not be used on MPU systems. > Instead of introducing more #ifdefs which will bring complexity > to the code, move MMU related code to mmu/head.S and keep common > code in head.S. Two notes while mov

Re: [RFC PATCH 1/4] xen/vsprintf: replace backwards jump with loop

2023-11-07 Thread Andrew Cooper
On 07/11/2023 10:33 am, Nicola Vetrini wrote: > The backwards goto in the vsnprintf function can be replaced > with a loop, thereby fixing a violation of MISRA C:2012 Rule 15.2. > > Signed-off-by: Nicola Vetrini > --- > xen/common/vsprintf.c | 20 > 1 file changed, 12 inserti

Re: [PATCH v3 1/2] xen/arm32: head: Introduce enable_{boot,secondary}_cpu_mm()

2023-11-07 Thread Michal Orzel
Hi Ayan, On 07/11/2023 12:02, Ayan Kumar Halder wrote: > All the MMU related functionality have been clubbed together in > enable_boot_cpu_mm() for booting primary cpu and enable_secondary_cpu_mm() for > booting secondary cpus. > This is done in preparation for moving the code related to MMU in MM

[libvirt test] 183702: tolerable all pass - PUSHED

2023-11-07 Thread osstest service owner
flight 183702 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/183702/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt-qcow2 15 saverestore-support-check fail like 183679 test-armhf-armhf-libvirt-raw 15 saveresto

Re: [RFC PATCH 0/4] address MISRA C:2012 Rule 15.2

2023-11-07 Thread Nicola Vetrini
On 2023-11-07 11:52, Jan Beulich wrote: On 07.11.2023 11:33, Nicola Vetrini wrote: This series is aimed at presenting some strategies that can be used to deal with violations of Rule 15.2: "The goto statement shall jump to a label declared later in the same function". I don't recall this rul

[PATCH v3 2/2] xen/arm32: head Split and move MMU-specific head.S to mmu/head.S

2023-11-07 Thread Ayan Kumar Halder
The MMU specific code in head.S will not be used on MPU systems. Instead of introducing more #ifdefs which will bring complexity to the code, move MMU related code to mmu/head.S and keep common code in head.S. Two notes while moving: - As "fail" in original head.S is very simple and this name is t

[PATCH v3 1/2] xen/arm32: head: Introduce enable_{boot,secondary}_cpu_mm()

2023-11-07 Thread Ayan Kumar Halder
All the MMU related functionality have been clubbed together in enable_boot_cpu_mm() for booting primary cpu and enable_secondary_cpu_mm() for booting secondary cpus. This is done in preparation for moving the code related to MMU in MMU specific file and in order to support non MMU cpus in future.

[PATCH v3 0/2] xen/arm: Split MMU code as the prepration of MPU work form Arm32

2023-11-07 Thread Ayan Kumar Halder
Hi, These are the set of patches based on top of "[PATCH v8 0/8] xen/arm: Split MMU code as the prepration of MPU work". This is the preparation work to add MPU support on Arm32. There are two more dependencies for this series :- 1. "[XEN v1 1/4] xen/arm: arm32: Move pt_enforce_wxn() so that it

Re: [kernel-6.5-bug] with xen-4.18~rc4 on ub-24.04 noble, booting xen domU shows UBSAN errors in blkback & netback drivers

2023-11-07 Thread Jan Beulich
On 06.11.2023 20:20, Pry Mar wrote: > These 2 errors show in dmesg late in boot process when xen domU launch: > 1) blkback > UBSAN: array-index-out-of-bounds in > /build/linux-D15vQj/linux-6.5.0/drivers/block/xen-blkback/blkback.c:1227:4 > > 2) netback > [ 55.209063] UBSAN: array-index-out-of-b

Re: [RFC PATCH 0/4] address MISRA C:2012 Rule 15.2

2023-11-07 Thread Jan Beulich
On 07.11.2023 11:33, Nicola Vetrini wrote: > This series is aimed at presenting some strategies that can be used to deal > with > violations of Rule 15.2: > "The goto statement shall jump to a label declared later in the same > function". I don't recall this rule being discussed on any of the me

[RFC PATCH 3/4] xen/arm: GICv3: address MISRA C:2012 Rule 15.2

2023-11-07 Thread Nicola Vetrini
The backwards jump due to the "goto retry;" statement can be transformed into a loop, without losing much in terms of readability. Signed-off-by: Stefano Stabellini Signed-off-by: Nicola Vetrini --- This specific patch was provided by Stefano, I just added the commit message. --- xen/arch/arm/g

[RFC PATCH 2/4] x86/dom0: make goto jump forward

2023-11-07 Thread Nicola Vetrini
The jump to the label 'parse_error' becomes forward, rather than backward; at the same time, the else branch can be eliminated. This also fixes a violation of MISRA C:2012 Rule 15.2. Signed-off-by: Nicola Vetrini --- xen/arch/x86/dom0_build.c | 14 +++--- 1 file changed, 7 insertions(+)

[RFC PATCH 4/4] automation/eclair: add deviation for certain backwards goto

2023-11-07 Thread Nicola Vetrini
As explained in the deviation record, code constructs such as "goto retry" and "goto again" are sometimes the best balance between code complexity and the understandability of the control flow by developers; as such, these construct are allowed to deviate from Rule 15.2. Signed-off-by: Nicola Vetr

[RFC PATCH 0/4] address MISRA C:2012 Rule 15.2

2023-11-07 Thread Nicola Vetrini
This series is aimed at presenting some strategies that can be used to deal with violations of Rule 15.2: "The goto statement shall jump to a label declared later in the same function". The rule's rationale is about possible developer confusion, therefore it could be argued that there is no substa

[RFC PATCH 1/4] xen/vsprintf: replace backwards jump with loop

2023-11-07 Thread Nicola Vetrini
The backwards goto in the vsnprintf function can be replaced with a loop, thereby fixing a violation of MISRA C:2012 Rule 15.2. Signed-off-by: Nicola Vetrini --- xen/common/vsprintf.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/xen/common/vsprintf.c

[XEN PATCH][for-4.19 v2] xen: replace occurrences of SAF-1-safe with asmlinkage attribute

2023-11-07 Thread Nicola Vetrini
The comment-based justifications for MISRA C:2012 Rule 8.4 are replaced by the asmlinkage pseudo-attribute, for the sake of uniformity. Add missing 'xen/compiler.h' #include-s where needed. The text in docs/misra/deviations.rst and docs/misra/safe.json is modified to reflect this change. Signed-

Re: [XEN PATCH][for-4.19] xen: replace occurrences of SAF-1-safe with asmlinkage attribute

2023-11-07 Thread Nicola Vetrini
On 2023-11-07 10:49, Julien Grall wrote: Hi, On 07/11/2023 08:36, Nicola Vetrini wrote: On 2023-11-06 23:57, Julien Grall wrote: Hi Nicola, On 03/11/2023 18:05, Nicola Vetrini wrote: The comment-based justifications for MISRA C:2012 Rule 8.4 are replaced by the asmlinkage pseudo-attribute,

Re: [XEN PATCH][for-4.19] xen: replace occurrences of SAF-1-safe with asmlinkage attribute

2023-11-07 Thread Julien Grall
Hi, On 07/11/2023 08:36, Nicola Vetrini wrote: On 2023-11-06 23:57, Julien Grall wrote: Hi Nicola, On 03/11/2023 18:05, Nicola Vetrini wrote: The comment-based justifications for MISRA C:2012 Rule 8.4 are replaced by the asmlinkage pseudo-attribute, for the sake of uniformity. The deviation w

Re: [PATCH v4 14/17] net: do not delete nics in net_cleanup()

2023-11-07 Thread David Woodhouse
On Mon, 2023-11-06 at 14:35 +, David Woodhouse wrote: > From: David Woodhouse > > In net_cleanup() we only need to delete the netdevs, as those may have > state which outlives Qemu when it exits, and thus may actually need to > be cleaned up on exit. > > The nics, on the other hand, are owne

Re: [PATCH] ubsan: Fix pointer overflow error message

2023-11-07 Thread Andrew Cooper
On 07/11/2023 9:14 am, Michal Orzel wrote: > In __ubsan_handle_pointer_overflow(), fix the condition for determining > whether a pointer operation overflowed or underflowed. Currently, the > function reports "underflowed" when it should be reporting "overflowed" > and vice versa. > > Example of inc

Re: [PATCH v4 16/17] doc/sphinx/hxtool.py: add optional label argument to SRST directive

2023-11-07 Thread David Woodhouse
On Mon, 2023-11-06 at 14:35 +, David Woodhouse wrote: > From: David Woodhouse > > We can't just embed labels directly into files like qemu-options.hx which > are included from multiple top-level RST files, because Sphinx sees the > labels as duplicate: https://github.com/sphinx-doc/sphinx/iss

[PULL 08/15] hw/xen: do not repeatedly try to create a failing backend device

2023-11-07 Thread David Woodhouse
From: David Woodhouse If xen_backend_device_create() fails to instantiate a device, the XenBus code will just keep trying over and over again each time the bus is re-enumerated, as long as the backend appears online and in XenbusStateInitialising. The only thing which prevents the XenBus code fr

[PULL 14/15] xen-platform: unplug AHCI disks

2023-11-07 Thread David Woodhouse
From: David Woodhouse To support Xen guests using the Q35 chipset, the unplug protocol needs to also remove AHCI disks. Make pci_xen_ide_unplug() more generic, iterating over the children of the PCI device and destroying the "ide-hd" devices. That works the same for both AHCI and IDE, as does th

[PULL 03/15] include: update Xen public headers to Xen 4.17.2 release

2023-11-07 Thread David Woodhouse
From: David Woodhouse ... in order to advertise the XEN_HVM_CPUID_UPCALL_VECTOR feature, which will come in a subsequent commit. Signed-off-by: David Woodhouse Acked-by: Paul Durrant --- hw/i386/kvm/xen_xenstore.c| 2 +- include/hw/xen/interface/arch-arm.h | 37

[PULL 07/15] hw/xen: add get_frontend_path() method to XenDeviceClass

2023-11-07 Thread David Woodhouse
From: David Woodhouse The primary Xen console is special. The guest's side is set up for it by the toolstack automatically and not by the standard PV init sequence. Accordingly, its *frontend* doesn't appear in …/device/console/0 either; instead it appears under …/console in the guest's XenStore

[PULL 10/15] hw/xen: add support for Xen primary console in emulated mode

2023-11-07 Thread David Woodhouse
From: David Woodhouse The primary console is special because the toolstack maps a page into the guest for its ring, and also allocates the guest-side event channel. The guest's grant table is even primed to export that page using a known grant ref#. Add support for all that in emulated mode, so t

[PULL 05/15] hw/xen: populate store frontend nodes with XenStore PFN/port

2023-11-07 Thread David Woodhouse
From: David Woodhouse This is kind of redundant since without being able to get these through some other method (HVMOP_get_param) the guest wouldn't be able to access XenStore in order to find them. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_xenstore.c | 11 +

[PULL 11/15] hw/xen: only remove peers of PCI NICs on unplug

2023-11-07 Thread David Woodhouse
From: David Woodhouse When the Xen guest asks to unplug *emulated* NICs, it's kind of unhelpful also to unplug the peer of the *Xen* PV NIC. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/xen/xen_platform.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-)

[PULL 13/15] hw/i386/pc: support '-nic' for xen-net-device

2023-11-07 Thread David Woodhouse
From: David Woodhouse The default NIC creation seems a bit hackish to me. I don't understand why each platform has to call pci_nic_init_nofail() from a point in the code where it actually has a pointer to the PCI bus, and then we have the special cases for things like ne2k_isa. If qmp_device_add

[PULL 12/15] hw/xen: update Xen PV NIC to XenDevice model

2023-11-07 Thread David Woodhouse
From: David Woodhouse This allows us to use Xen PV networking with emulated Xen guests, and to add them on the command line or hotplug. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/net/meson.build| 2 +- hw/net/trace-events | 11 + hw/net/xen_nic.c

[PULL 00/15] xenfv.for-upstream queue

2023-11-07 Thread David Woodhouse
The following changes since commit 8aba939e77daca10eac99d9d467f65ba7df5ab3e: Merge tag 'pull-riscv-to-apply-20231107' of https://github.com/alistair23/qemu into staging (2023-11-07 11:08:16 +0800) are available in the Git repository at: git://git.infradead.org/users/dwmw2/qemu

[PULL 06/15] hw/xen: automatically assign device index to block devices

2023-11-07 Thread David Woodhouse
From: David Woodhouse There's no need to force the user to assign a vdev. We can automatically assign one, starting at xvda and searching until we find the first disk name that's unused. This means we can now allow '-drive if=xen,file=xxx' to work without an explicit separate -driver argument, j

[PULL 09/15] hw/xen: update Xen console to XenDevice model

2023-11-07 Thread David Woodhouse
From: David Woodhouse This allows (non-primary) console devices to be created on the command line and hotplugged. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/char/trace-events| 8 + hw/char/xen_console.c | 532 +++- hw/xen/xe

[PULL 04/15] i386/xen: advertise XEN_HVM_CPUID_UPCALL_VECTOR in CPUID

2023-11-07 Thread David Woodhouse
From: David Woodhouse This will allow Linux guests (since v6.0) to use the per-vCPU upcall vector delivered as MSI through the local APIC. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- target/i386/kvm/kvm.c | 4 1 file changed, 4 insertions(+) diff --git a/target/i386/kvm

[PULL 01/15] i386/xen: Ignore VCPU_SSHOTTMR_future flag in set_singleshot_timer()

2023-11-07 Thread David Woodhouse
From: David Woodhouse Upstream Xen now ignores this flag¹, since the only guest kernel ever to use it was buggy. ¹ https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=19c6cbd909 Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- target/i386/kvm/xen-emu.c | 20 ++---

[PULL 02/15] hw/xen: Clean up event channel 'type_val' handling to use union

2023-11-07 Thread David Woodhouse
From: David Woodhouse A previous implementation of this stuff used a 64-bit field for all of the port information (vcpu/type/type_val) and did atomic exchanges on them. When I implemented that in Qemu I regretted my life choices and just kept it simple with locking instead. So there's no need fo

[PULL 15/15] docs: update Xen-on-KVM documentation

2023-11-07 Thread David Woodhouse
From: David Woodhouse Add notes about console and network support, and how to launch PV guests. Clean up the disk configuration examples now that that's simpler, and remove the comment about IDE unplug on q35/AHCI now that it's fixed. Update the -initrd option documentation to explain how to quo

[PATCH] ubsan: Fix pointer overflow error message

2023-11-07 Thread Michal Orzel
In __ubsan_handle_pointer_overflow(), fix the condition for determining whether a pointer operation overflowed or underflowed. Currently, the function reports "underflowed" when it should be reporting "overflowed" and vice versa. Example of incorrect error reporting: void *foo = (void *)__UINTPTR_

Re: [XEN PATCH][for-4.19] xen: replace occurrences of SAF-1-safe with asmlinkage attribute

2023-11-07 Thread Nicola Vetrini
On 2023-11-06 23:57, Julien Grall wrote: Hi Nicola, On 03/11/2023 18:05, Nicola Vetrini wrote: The comment-based justifications for MISRA C:2012 Rule 8.4 are replaced by the asmlinkage pseudo-attribute, for the sake of uniformity. The deviation with a comment based on the SAF framework is also

Re: Informal voting proposal

2023-11-07 Thread Julien Grall
Hi Stefano, On 07/11/2023 04:18, Stefano Stabellini wrote: On Mon, 6 Nov 2023, Julien Grall wrote: Hi Kelly, On 06/11/2023 16:40, Kelly Choi wrote: Hi all, As an open-source community, there will always be differences of opinion in approaches and the way we think. It is imperative, however,