Re: [XEN PATCH][for-next v2 5/8] x86/io_apic: address violation of MISRA C:2012 Rule 10.1

2023-10-16 Thread Jan Beulich
On 16.10.2023 18:36, Nicola Vetrini wrote: > On 16/10/2023 17:42, Jan Beulich wrote: >> On 12.10.2023 17:28, Nicola Vetrini wrote: >>> --- a/xen/arch/x86/include/asm/io_apic.h >>> +++ b/xen/arch/x86/include/asm/io_apic.h >>> @@ -14,9 +14,10 @@ >>> * Copyright (C) 1997, 1998, 1999, 2000 Ingo Molna

Re: [XEN PATCH v2 3/7] x86: add deviation comments for asm-only functions

2023-10-16 Thread Jan Beulich
On 17.10.2023 00:34, Stefano Stabellini wrote: > On Mon, 16 Oct 2023, Jan Beulich wrote: >> On 09.10.2023 08:54, Nicola Vetrini wrote: >>> As stated in rules.rst, functions used only in asm code >>> are allowed to have no prior declaration visible when being >>> defined, hence these functions are d

Re: [XEN PATCH][for-4.19 v2 1/1] xen: introduce a deviation for Rule 11.9

2023-10-16 Thread Jan Beulich
On 16.10.2023 18:49, Nicola Vetrini wrote: > On 16/10/2023 15:43, Jan Beulich wrote: >> On 11.10.2023 14:46, Nicola Vetrini wrote: >>> --- a/xen/include/xen/compiler.h >>> +++ b/xen/include/xen/compiler.h >>> @@ -109,13 +109,16 @@ >>> >>> #define offsetof(a,b) __builtin_offsetof(a,b) >>> >>> +/* A

Re: [XEN PATCH v2 1/7] xen: add declarations for variables where needed

2023-10-16 Thread Jan Beulich
On 16.10.2023 19:05, Nicola Vetrini wrote: > On 16/10/2023 16:50, Jan Beulich wrote: >> On 09.10.2023 08:54, Nicola Vetrini wrote: >>> --- a/xen/arch/x86/include/asm/compat.h >>> +++ b/xen/arch/x86/include/asm/compat.h >>> @@ -13,6 +13,7 @@ typedef unsigned long full_ptr_t; >>> >>> struct domain;

Re: [PATCH for-4.18] docs/sphinx: Lifecycle of a domid

2023-10-16 Thread Jan Beulich
On 16.10.2023 18:24, Andrew Cooper wrote: > +Creation > + > + > +Within Xen, the ``domain_create()`` function is used to allocate and perform > +bare minimum construction of a domain. The :term:`control domain` accesses > +this functionality via the ``DOMCTL_createdomain`` hypercall. > + >

[ovmf test] 183394: all pass - PUSHED

2023-10-16 Thread osstest service owner
flight 183394 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/183394/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf a445e1a42ccf3cb9f70537c7cd80ece689bf4d9a baseline version: ovmf 03d6569f70939d2a16532

Re: MISRA C:2012 D4.11 caution on staging

2023-10-16 Thread Jan Beulich
On 16.10.2023 20:06, Julien Grall wrote: > Instead, it would be best to find a way to help Eclair to detect this is > not an issue and also improve readability. Would the following help Eclair? > > diff --git a/xen/common/domain.c b/xen/common/domain.c > index 30c227967345..ab16124eabd6 100644 >

Re: [XEN PATCH][for-4.19 v2 8/8] xen/compat: use BUILD_BUG_ON in CHECK_SIZE macros

2023-10-16 Thread Jan Beulich
On 12.10.2023 17:28, Nicola Vetrini wrote: > BUILD_BUG_ON is the preferred way to induce a build error > upon statically determined incorrect conditions. > > This also fixes a MISRA C:2012 Rule 10.1 violation in the > previous formulation. > > Signed-off-by: Nicola Vetrini Hmm, looking back it'

Re: [PATCH v7 8/8] xen/arm: mmu: move MMU specific P2M code to mmu/p2m.{c,h}

2023-10-16 Thread Henry Wang
Hi Julien, > On Oct 14, 2023, at 02:22, Julien Grall wrote: > > Hi Henry, > > On 09/10/2023 02:03, Henry Wang wrote: >> >> diff --git a/xen/arch/arm/include/asm/p2m.h b/xen/arch/arm/include/asm/p2m.h >> index 940495d42b..a9622dac9a 100644 >> --- a/xen/arch/arm/include/asm/p2m.h >> +++ b/xen/ar

Re: [PATCH for-4.18] docs/sphinx: Lifecycle of a domid

2023-10-16 Thread Juergen Gross
On 16.10.23 18:24, Andrew Cooper wrote: Signed-off-by: Andrew Cooper --- CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Wei Liu CC: Julien Grall CC: Roger Pau Monné CC: Juergen Gross CC: Henry Wang Rendered form: https://andrewcoop-xen.readthedocs.io/en/docs-devel/hype

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Henry Wang
Hi Julien, > On Oct 16, 2023, at 22:46, Julien Grall wrote: > > CC Henry Thanks. > Hi Alexey, > > On 16/10/2023 15:24, Alexey Klimov wrote: >> On Mon, 16 Oct 2023 at 15:13, Luca Fancellu wrote >>> > On 16/10/2023 09:44, Michal Orzel wrote: >> On 13/10/2023 14:26, Leo Yan wrote:

Re: [for-4.18][PATCH] xen/arm: Check return code from recursive calls to scan_pfdt_node()

2023-10-16 Thread Henry Wang
Hi Michal, > On Oct 16, 2023, at 21:28, Bertrand Marquis wrote: > > Hi Michal, > >> On 16 Oct 2023, at 14:45, Michal Orzel wrote: >> >> At the moment, we do not check a return code from scan_pfdt_node() >> called recursively. This means that any issue that may occur while >> parsing and copyi

Xen 4.18 rc3

2023-10-16 Thread Henry Wang
Hi all, Xen 4.18 rc3 is tagged. You can check that out from xen.git: git://xenbits.xen.org/xen.git 4.18.0-rc3 For your convenience there is also a tarball at: https://downloads.xenproject.org/release/xen/4.18.0-rc3/xen-4.18.0-rc3.tar.gz And the signature is at: https://downloads.xenproject.org/

Re: SAF-x-safe rename

2023-10-16 Thread Stefano Stabellini
On Mon, 16 Oct 2023, Jan Beulich wrote: > On 06.10.2023 00:01, Andrew Cooper wrote: > > On 05/10/2023 10:38 pm, andrew.coop...@citrix.com wrote: > >> On 05/10/2023 8:43 am, Luca Fancellu wrote: > On 5 Oct 2023, at 00:46, Stefano Stabellini > wrote: > > Hi MISRA C working group

Re: [PATCH v7 8/8] xen/arm: mmu: move MMU specific P2M code to mmu/p2m.{c,h}

2023-10-16 Thread Henry Wang
Hi Julien, > On Oct 17, 2023, at 00:41, Julien Grall wrote: > On 14/10/2023 02:26, Henry Wang wrote: >> Hi Julien, > > Hi Henry, > >>> On Oct 14, 2023, at 02:22, Julien Grall wrote: >>> >>> Hi Henry, >>> >>> On 09/10/2023 02:03, Henry Wang wrote: From: Penny Zheng Current P2M impl

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

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

Re: [XEN PATCH 02/10] arm/cpufeature: address violations of MISRA C:2012 Rule 8.2

2023-10-16 Thread Stefano Stabellini
On Mon, 16 Oct 2023, Julien Grall wrote: > On 14/10/2023 00:34, Stefano Stabellini wrote: > > On Fri, 13 Oct 2023, Stefano Stabellini wrote: > > > On Fri, 13 Oct 2023, Federico Serafini wrote: > > > > Add missing parameter names, no functional change. > > > > > > > > Signed-off-by: Federico Serafi

Re: [PATCH] cxenstored: wait until after reset to notify dom0less domains

2023-10-16 Thread Henry Wang
Hi Stefano, > On Oct 17, 2023, at 07:14, Stefano Stabellini wrote: > > +Henry for release ack Thanks, I think we did have Juergen for reviewing this patch so: Release-acked-by: Henry Wang Kind regards, Henry > > > On Fri, 13 Oct 2023, Stefano Stabellini wrote: >> From: George Dunlap >>

Re: [XEN PATCH] xen/irq: address violations of MISRA C:2012 Rule 8.2

2023-10-16 Thread Henry Wang
> On Oct 16, 2023, at 23:14, Jan Beulich wrote: > > On 03.10.2023 02:19, Henry Wang wrote: >>> On Oct 3, 2023, at 06:45, Stefano Stabellini wrote: >>> >>> On Mon, 2 Oct 2023, Federico Serafini wrote: Add missing parameter names. No functional change. Signed-off-by: Federico S

Re: [XEN PATCH] x86/paging: address a violation of MISRA C:2012 Rule 8.3

2023-10-16 Thread Henry Wang
Hi Jan, > On Oct 16, 2023, at 23:12, Jan Beulich wrote: > > On 03.10.2023 02:19, Henry Wang wrote: >>> On Oct 3, 2023, at 06:46, Stefano Stabellini wrote: >>> >>> On Mon, 2 Oct 2023, Federico Serafini wrote: Make function declaration and definition consistent. No functional change. >

Re: [XEN PATCH][for-next][for-4.19 v2 1/8] xen/include: add macro LOWEST_BIT

2023-10-16 Thread Stefano Stabellini
On Mon, 16 Oct 2023, Jan Beulich wrote: > On 16.10.2023 18:17, Nicola Vetrini wrote: > > On 16/10/2023 17:33, Jan Beulich wrote: > >> On 12.10.2023 17:28, Nicola Vetrini wrote: > >>> --- a/automation/eclair_analysis/ECLAIR/deviations.ecl > >>> +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl

[ovmf test] 183390: all pass - PUSHED

2023-10-16 Thread osstest service owner
flight 183390 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/183390/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 03d6569f70939d2a1653265367121212459a6b89 baseline version: ovmf 326b9e1d815c4ae4b0b20

Re: [PATCH] cxenstored: wait until after reset to notify dom0less domains

2023-10-16 Thread Stefano Stabellini
+Henry for release ack On Fri, 13 Oct 2023, Stefano Stabellini wrote: > From: George Dunlap > > Commit fc2b57c9a ("xenstored: send an evtchn notification on > introduce_domain") introduced the sending of an event channel to the > guest when first introduced, so that dom0less domains waiting for

Re: [XEN PATCH v2 3/7] x86: add deviation comments for asm-only functions

2023-10-16 Thread Stefano Stabellini
On Mon, 16 Oct 2023, Jan Beulich wrote: > On 09.10.2023 08:54, Nicola Vetrini wrote: > > As stated in rules.rst, functions used only in asm code > > are allowed to have no prior declaration visible when being > > defined, hence these functions are deviated. > > This also fixes violations of MISRA C

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

2023-10-16 Thread Stefano Stabellini
On Mon, 16 Oct 2023, Bertrand Marquis wrote: > > On 16 Oct 2023, at 15:38, Julien Grall wrote: > > > > > > > > On 16/10/2023 14:31, Bertrand Marquis wrote: > >> Hi Julien, > > > > Hi Bertrand, > > > >>> On 16 Oct 2023, at 11:07, Julien Grall wrote: > >>> > >>> Hi, > >>> > >>> On 13/10/2023

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

2023-10-16 Thread osstest service owner
flight 183389 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/183389/ 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 v1 3/4] xen/arm32: Split and move MMU-specific head.S to mmu/head.S

2023-10-16 Thread Julien Grall
Hi, On 11/09/2023 14:59, Ayan Kumar Halder wrote: This is based on "[PATCH v6 03/13] xen/arm64: Split and move MMU-specific head.S to mmu/head.S" https://www.mail-archive.com/xen-devel@lists.xenproject.org/msg151920.html Same remark as patch #1. Please provide a proper commit message. [...]

Re: [XEN v1 2/4] xen/arm32: head.S: Introduce enable_{boot,secondary}_cpu_mm()

2023-10-16 Thread Julien Grall
Hi Ayan, On 11/09/2023 14:59, Ayan Kumar Halder wrote: This is based on:- "[PATCH v6 01/13] xen/arm64: head.S: Introduce enable_{boot,secondary}_cpu_mm()" https://www.mail-archive.com/xen-devel@lists.xenproject.org/msg151918.html Most of the explanation in that commit message doesn't apply her

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

2023-10-16 Thread Rahul Singh
Hi Bertrand > On 16 Oct 2023, at 2:31 pm, Bertrand Marquis wrote: > > Hi Julien, > >> On 16 Oct 2023, at 11:07, Julien Grall wrote: >> >> Hi, >> >> On 13/10/2023 16:24, Federico Serafini wrote: >>> Add missing parameter names, no functional change. >>> Signed-off-by: Federico Serafini >>> -

Re: MISRA C:2012 D4.11 caution on staging

2023-10-16 Thread Julien Grall
Hi Nicola, On 13/10/2023 16:11, Nicola Vetrini wrote: On 13/10/2023 11:27, Julien Grall wrote: Hi Andrew, On 11/10/2023 08:51, Andrew Cooper wrote: On 11/10/2023 3:47 pm, Nicola Vetrini wrote: On 11/10/2023 02:15, Andrew Cooper wrote: On 10/10/2023 5:31 pm, Nicola Vetrini wrote: Hi, as yo

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

2023-10-16 Thread osstest service owner
flight 183385 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/183385/ 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 v2 1/7] xen: add declarations for variables where needed

2023-10-16 Thread Nicola Vetrini
On 16/10/2023 16:50, Jan Beulich wrote: On 09.10.2023 08:54, Nicola Vetrini wrote: Some variables with external linkage used in C code do not have a visible declaration where they are defined. Providing such declaration also resolves violations of MISRA C:2012 Rule 8.4. Signed-off-by: Nicola Ve

Re: [XEN PATCH][for-4.19 v2 1/1] xen: introduce a deviation for Rule 11.9

2023-10-16 Thread Nicola Vetrini
On 16/10/2023 15:43, Jan Beulich wrote: On 11.10.2023 14:46, Nicola Vetrini wrote: --- a/xen/include/xen/compiler.h +++ b/xen/include/xen/compiler.h @@ -109,13 +109,16 @@ #define offsetof(a,b) __builtin_offsetof(a,b) +/* Access the field of structure type, without defining a local variable *

Re: [PATCH v7 8/8] xen/arm: mmu: move MMU specific P2M code to mmu/p2m.{c,h}

2023-10-16 Thread Julien Grall
On 14/10/2023 02:26, Henry Wang wrote: Hi Julien, Hi Henry, On Oct 14, 2023, at 02:22, Julien Grall wrote: Hi Henry, On 09/10/2023 02:03, Henry Wang wrote: From: Penny Zheng Current P2M implementation is designed for MMU system only. We move the MMU-specific codes into mmu/p2m.c, and

Re: [XEN PATCH][for-next v2 5/8] x86/io_apic: address violation of MISRA C:2012 Rule 10.1

2023-10-16 Thread Nicola Vetrini
On 16/10/2023 17:42, Jan Beulich wrote: On 12.10.2023 17:28, Nicola Vetrini wrote: The definition of IO_APIC_BASE contains a sum of an essentially enum value (FIX_IO_APIC_BASE_0) that is positive with an index that, in all instances, is unsigned, therefore the former is cast to unsigned, so tha

Re: [XEN PATCH][for-next v2 5/8] x86/io_apic: address violation of MISRA C:2012 Rule 10.1

2023-10-16 Thread Nicola Vetrini
On 16/10/2023 17:42, Jan Beulich wrote: On 12.10.2023 17:28, Nicola Vetrini wrote: The definition of IO_APIC_BASE contains a sum of an essentially enum value (FIX_IO_APIC_BASE_0) that is positive with an index that, in all instances, is unsigned, therefore the former is cast to unsigned, so tha

Re: [XEN PATCH][for-next][for-4.19 v2 1/8] xen/include: add macro LOWEST_BIT

2023-10-16 Thread Jan Beulich
On 16.10.2023 18:17, Nicola Vetrini wrote: > On 16/10/2023 17:33, Jan Beulich wrote: >> On 12.10.2023 17:28, Nicola Vetrini wrote: >>> --- a/automation/eclair_analysis/ECLAIR/deviations.ecl >>> +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl >>> @@ -274,6 +274,12 @@ still non-negative." >>>

[PATCH for-4.18] docs/sphinx: Lifecycle of a domid

2023-10-16 Thread Andrew Cooper
Signed-off-by: Andrew Cooper --- CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Wei Liu CC: Julien Grall CC: Roger Pau Monné CC: Juergen Gross CC: Henry Wang Rendered form: https://andrewcoop-xen.readthedocs.io/en/docs-devel/hypervisor-guide/domid-lifecycle.html I'm not

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Julien Grall
On 16/10/2023 16:39, Bertrand Marquis wrote: On 16 Oct 2023, at 17:31, Julien Grall wrote: On 16/10/2023 16:07, Bertrand Marquis wrote: Hi, On 16 Oct 2023, at 16:46, Julien Grall wrote: CC Henry Hi Alexey, On 16/10/2023 15:24, Alexey Klimov wrote: On Mon, 16 Oct 2023 at 15:13, Lu

Re: [XEN PATCH][for-next][for-4.19 v2 1/8] xen/include: add macro LOWEST_BIT

2023-10-16 Thread Nicola Vetrini
On 16/10/2023 17:33, Jan Beulich wrote: On 12.10.2023 17:28, Nicola Vetrini wrote: --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -274,6 +274,12 @@ still non-negative." -config=MC3R1.R10.1,etypes+={safe, "stmt(operator(logical)|

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

2023-10-16 Thread osstest service owner
flight 183380 linux-linus real [real] flight 183386 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/183380/ http://logs.test-lab.xenproject.org/osstest/logs/183386/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-

Re: [XEN PATCH][for-next v2 6/8] x86/mce: Move MC_NCLASSES into the enum mctelem_class

2023-10-16 Thread Nicola Vetrini
On 16/10/2023 17:45, Jan Beulich wrote: On 12.10.2023 17:28, Nicola Vetrini wrote: The definition of MC_NCLASSES contained a violation of MISRA C:2012 Rule 10.1, therefore by moving it as an enumeration constant resolves the violation and makes it more resilient to possible additions to that e

Re: [XEN PATCH][for-4.19 v2 7/8] xen/types: address Rule 10.1 for DECLARE_BITMAP use

2023-10-16 Thread Jan Beulich
On 12.10.2023 17:28, Nicola Vetrini wrote: > --- a/xen/include/xen/types.h > +++ b/xen/include/xen/types.h > @@ -22,6 +22,14 @@ typedef signed long ssize_t; > > typedef __PTRDIFF_TYPE__ ptrdiff_t; > > +/* > + * Users of this macro are expected to pass a positive value. Is passing 0 going to c

Re: [XEN PATCH][for-next v2 6/8] x86/mce: Move MC_NCLASSES into the enum mctelem_class

2023-10-16 Thread Jan Beulich
On 12.10.2023 17:28, Nicola Vetrini wrote: > The definition of MC_NCLASSES contained a violation of MISRA C:2012 > Rule 10.1, therefore by moving it as an enumeration constant resolves the > violation and makes it more resilient to possible additions to that enum. And using an enumerator as array

Re: [XEN PATCH][for-next v2 5/8] x86/io_apic: address violation of MISRA C:2012 Rule 10.1

2023-10-16 Thread Jan Beulich
On 12.10.2023 17:28, Nicola Vetrini wrote: > The definition of IO_APIC_BASE contains a sum of an essentially enum > value (FIX_IO_APIC_BASE_0) that is positive with an index that, in all > instances, is unsigned, therefore the former is cast to unsigned, so that > the operands are of the same essen

Re: [XEN PATCH][for-next v2 5/8] x86/io_apic: address violation of MISRA C:2012 Rule 10.1

2023-10-16 Thread Jan Beulich
On 12.10.2023 17:28, Nicola Vetrini wrote: > The definition of IO_APIC_BASE contains a sum of an essentially enum > value (FIX_IO_APIC_BASE_0) that is positive with an index that, in all > instances, is unsigned, therefore the former is cast to unsigned, so that > the operands are of the same essen

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Bertrand Marquis
> On 16 Oct 2023, at 17:31, Julien Grall wrote: > > > > On 16/10/2023 16:07, Bertrand Marquis wrote: >> Hi, >>> On 16 Oct 2023, at 16:46, Julien Grall wrote: >>> >>> CC Henry >>> >>> Hi Alexey, >>> >>> On 16/10/2023 15:24, Alexey Klimov wrote: On Mon, 16 Oct 2023 at 15:13, Luca Fance

Re: [XEN PATCH][for-next][for-4.19 v2 1/8] xen/include: add macro LOWEST_BIT

2023-10-16 Thread Jan Beulich
On 12.10.2023 17:28, Nicola Vetrini wrote: > --- a/automation/eclair_analysis/ECLAIR/deviations.ecl > +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl > @@ -274,6 +274,12 @@ still non-negative." > -config=MC3R1.R10.1,etypes+={safe, > "stmt(operator(logical)||node(conditional_operator||binar

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Julien Grall
On 16/10/2023 16:07, Bertrand Marquis wrote: Hi, On 16 Oct 2023, at 16:46, Julien Grall wrote: CC Henry Hi Alexey, On 16/10/2023 15:24, Alexey Klimov wrote: On Mon, 16 Oct 2023 at 15:13, Luca Fancellu wrote: On 16 Oct 2023, at 15:00, Bertrand Marquis wrote: Hi +Luca and Rahul

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

2023-10-16 Thread Jan Beulich
On 03.10.2023 17:24, Federico Serafini wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -5901,17 +5901,17 @@ int destroy_xen_mappings(unsigned long s, unsigned > long e) > * a problem. > */ > void init_or_livepatch modify_xen_mappings_lite( > -unsigned long s, unsigned long

[PATCH 04/12] i386/xen: advertise XEN_HVM_CPUID_UPCALL_VECTOR in CPUID

2023-10-16 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 --- target/i386/kvm/kvm.c | 4 1 file changed, 4 insertions(+) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kv

[PATCH 06/12] hw/xen: add get_frontend_path() method to XenDeviceClass

2023-10-16 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

[PATCH 12/12] hw/xen: add support for Xen primary console in emulated mode

2023-10-16 Thread David Woodhouse
From: David Woodhouse The primary console is special because the toolstack maps a page at a fixed GFN and also allocates the guest-side event channel. Add support for that in emulated mode, so that we can have a primary console. Add a *very* rudimentary stub of foriegnmem ops for emulated mode,

[PATCH 09/12] hw/xen: prevent duplicate device registrations

2023-10-16 Thread David Woodhouse
From: David Woodhouse Ensure that we have a XenBackendInstance for every device regardless of whether it was "discovered" in XenStore or created directly in QEMU. This allows the backend_list to be a source of truth about whether a given backend exists, and allows us to reject duplicates. This

[PATCH 0/12] Get Xen PV shim running in qemu

2023-10-16 Thread David Woodhouse
I hadn't got round to getting the PV shim running yet; I thought it would need work on the multiboot loader. Turns out it doesn't. I *did* need to fix a couple of brown-paper-bag bugs in the per-vCPU upcall vector support, and implement Xen console support though. Now I can test PV guests: $ qemu

[PATCH 02/12] hw/xen: select kernel mode for per-vCPU event channel upcall vector

2023-10-16 Thread David Woodhouse
From: David Woodhouse A guest which has configured the per-vCPU upcall vector may set the HVM_PARAM_CALLBACK_IRQ param to fairly much anything other than zero. For example, Linux v6.0+ after commit b1c3497e604 ("x86/xen: Add support for HVMOP_set_evtchn_upcall_vector") will just do this after se

[PATCH 03/12] include: update Xen public headers to Xen 4.17.2 release

2023-10-16 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 --- hw/i386/kvm/xen_xenstore.c| 2 +- include/hw/xen/interface/arch-arm.h | 37 +++--- include/

[PATCH 07/12] hw/xen: update Xen console to XenDevice model

2023-10-16 Thread David Woodhouse
This allows (non-primary) console devices to be created on the command line. Signed-off-by: David Woodhouse --- hw/char/trace-events| 8 + hw/char/xen_console.c | 502 +++- hw/xen/xen-legacy-backend.c | 1 - 3 files changed, 381 insertions(+), 13

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

2023-10-16 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

[PATCH 05/12] hw/xen: populate store frontend nodes with XenStore PFN/port

2023-10-16 Thread David Woodhouse
From: David Woodhouse This is kind of redundant since without being able to get these through ome other method (HVMOP_get_param) the guest wouldn't be able to access XenStore in order to find them. But Xen populates them, and it does allow guests to *rebind* to the event channel port after a rese

[PATCH 10/12] hw/xen: automatically assign device index to console devices

2023-10-16 Thread David Woodhouse
From: David Woodhouse Now that we can reliably tell whether a given device already exists, we can allow the user to add console devices on the command line with just '-device xen-console,chardev=foo'. Start at 1, because we can't add the *primary* console; that's special because the toolstack ha

[PATCH 11/12] hw/xen: automatically assign device index to block devices

2023-10-16 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

[PATCH 01/12] i386/xen: fix per-vCPU upcall vector for Xen emulation

2023-10-16 Thread David Woodhouse
From: David Woodhouse The per-vCPU upcall vector support had two problems. Firstly it was using the wrong hypercall argument and would always return -EFAULT. And secondly it was using the wrong ioctl() to pass the vector to the kernel and thus the *kernel* would always return -EINVAL. Linux does

Re: [XEN PATCH] xen/irq: address violations of MISRA C:2012 Rule 8.2

2023-10-16 Thread Jan Beulich
On 03.10.2023 02:19, Henry Wang wrote: >> On Oct 3, 2023, at 06:45, Stefano Stabellini wrote: >> >> On Mon, 2 Oct 2023, Federico Serafini wrote: >>> Add missing parameter names. No functional change. >>> >>> Signed-off-by: Federico Serafini >> >> Reviewed-by: Stefano Stabellini > > Release-acke

Re: [XEN PATCH] xen/irq: address violations of MISRA C:2012 Rule 8.2

2023-10-16 Thread Jan Beulich
On 03.10.2023 00:45, Stefano Stabellini wrote: > On Mon, 2 Oct 2023, Federico Serafini wrote: >> Add missing parameter names. No functional change. >> >> Signed-off-by: Federico Serafini > > Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich

Re: [XEN PATCH] x86/paging: address a violation of MISRA C:2012 Rule 8.3

2023-10-16 Thread Jan Beulich
On 03.10.2023 02:19, Henry Wang wrote: >> On Oct 3, 2023, at 06:46, Stefano Stabellini wrote: >> >> On Mon, 2 Oct 2023, Federico Serafini wrote: >>> Make function declaration and definition consistent. >>> No functional change. >>> >>> Signed-off-by: Federico Serafini >> >> Reviewed-by: Stefano S

Re: [XEN PATCH] x86/paging: address a violation of MISRA C:2012 Rule 8.3

2023-10-16 Thread Jan Beulich
On 03.10.2023 00:46, Stefano Stabellini wrote: > On Mon, 2 Oct 2023, Federico Serafini wrote: >> Make function declaration and definition consistent. >> No functional change. >> >> Signed-off-by: Federico Serafini > > Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Bertrand Marquis
Hi, > On 16 Oct 2023, at 16:46, Julien Grall wrote: > > CC Henry > > Hi Alexey, > > On 16/10/2023 15:24, Alexey Klimov wrote: >> On Mon, 16 Oct 2023 at 15:13, Luca Fancellu wrote: >>> >>> >>> On 16 Oct 2023, at 15:00, Bertrand Marquis wrote: Hi +Luca and R

Re: [XEN PATCH 4/4] x86/psr: address a violation of MISRA C:2012 Rule 8.3

2023-10-16 Thread Jan Beulich
On 29.09.2023 22:54, Stefano Stabellini wrote: > On Fri, 29 Sep 2023, Federico Serafini wrote: >> Make function declaration and definition consistent. >> No functional change. >> >> Signed-off-by: Federico Serafini > > Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich

Re: [XEN PATCH 3/4] x86/xstate: address a violation of MISRA C:2012 Rule 8.3

2023-10-16 Thread Jan Beulich
On 29.09.2023 22:53, Stefano Stabellini wrote: > On Fri, 29 Sep 2023, Federico Serafini wrote: >> Make function declaration and definition consistent. >> No functional change. >> >> Signed-off-by: Federico Serafini > > Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich

Re: [XEN PATCH 2/4] x86/uaccess: address violations of MISRA C:2012 Rule 8.3

2023-10-16 Thread Jan Beulich
On 29.09.2023 22:53, Stefano Stabellini wrote: > On Fri, 29 Sep 2023, Federico Serafini wrote: >> Make function declarations and definitions consistent. >> No functional change. >> >> Signed-off-by: Federico Serafini > > Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich

Re: [RFC PATCH v3 08/78] hw/block: add fallthrough pseudo-keyword

2023-10-16 Thread Stefan Hajnoczi
On Fri, Oct 13, 2023 at 11:45:36AM +0300, Emmanouil Pitsidianakis wrote: > In preparation of raising -Wimplicit-fallthrough to 5, replace all > fall-through comments with the fallthrough attribute pseudo-keyword. > > Signed-off-by: Emmanouil Pitsidianakis > --- > hw/block/dataplane/xen-block.c |

Re: [XEN PATCH] x86/msi: address violations of MISRA C:2012 Rules 8.2 and 8.3

2023-10-16 Thread Jan Beulich
On 29.09.2023 22:51, Stefano Stabellini wrote: > On Fri, 29 Sep 2023, Federico Serafini wrote: >> Add missing parameter names and make function declarations and >> definitions consistent. >> No functional change. >> >> Signed-off-by: Federico Serafini > > Reviewed-by: Stefano Stabellini Acked-b

Re: [XEN PATCH v2 3/7] x86: add deviation comments for asm-only functions

2023-10-16 Thread Jan Beulich
On 09.10.2023 08:54, Nicola Vetrini wrote: > As stated in rules.rst, functions used only in asm code > are allowed to have no prior declaration visible when being > defined, hence these functions are deviated. > This also fixes violations of MISRA C:2012 Rule 8.4. > > Signed-off-by: Nicola Vetrini

Re: [XEN PATCH v2 2/7] x86: add deviations for variables only used in asm code

2023-10-16 Thread Jan Beulich
On 09.10.2023 08:54, Nicola Vetrini wrote: > These variables are only used by asm code, and therefore > the lack of a declaration is justified by the corresponding > deviation comment. Hmm, you say "declaration" here, but according to my understanding ... > --- a/xen/arch/x86/include/asm/asm_defn

Re: [PATCH for-4.18 v2] x86/pvh: fix identity mapping of low 1MB

2023-10-16 Thread Jan Beulich
On 16.10.2023 16:51, Roger Pau Monné wrote: > On Mon, Oct 16, 2023 at 04:07:22PM +0200, Jan Beulich wrote: >> On 16.10.2023 15:51, Roger Pau Monné wrote: >>> On Mon, Oct 16, 2023 at 03:32:54PM +0200, Jan Beulich wrote: On 13.10.2023 10:56, Roger Pau Monne wrote: > The mapping of memory reg

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Julien Grall
Hi Leo, On 16/10/2023 14:54, Leo Yan wrote: On Mon, Oct 16, 2023 at 01:40:26PM +, Bertrand Marquis wrote: [...] This patch enlarges identity map space to 10TB, allowing module loading within the range of [0x0 .. 0x09ff__]. Fixes: 1c78d76b67 ("xen/arm64: mm: Introduce helpers

Re: [XEN PATCH][for-4.19 v2 6/7] xen/console: make function static inline

2023-10-16 Thread Jan Beulich
On 09.10.2023 08:54, Nicola Vetrini wrote: > --- a/xen/include/xen/consoled.h > +++ b/xen/include/xen/consoled.h > @@ -12,7 +12,7 @@ size_t consoled_guest_tx(char c); > > #else > > -size_t consoled_guest_tx(char c) { return 0; } > +static inline size_t consoled_guest_tx(char c) { return 0; }

Re: [PATCH for-4.18 v2] x86/pvh: fix identity mapping of low 1MB

2023-10-16 Thread Roger Pau Monné
On Mon, Oct 16, 2023 at 04:07:22PM +0200, Jan Beulich wrote: > On 16.10.2023 15:51, Roger Pau Monné wrote: > > On Mon, Oct 16, 2023 at 03:32:54PM +0200, Jan Beulich wrote: > >> On 13.10.2023 10:56, Roger Pau Monne wrote: > >>> The mapping of memory regions below the 1MB mark was all done by the PVH

Re: [XEN PATCH v2 1/7] xen: add declarations for variables where needed

2023-10-16 Thread Jan Beulich
On 09.10.2023 08:54, Nicola Vetrini wrote: > Some variables with external linkage used in C code do not have > a visible declaration where they are defined. Providing such > declaration also resolves violations of MISRA C:2012 Rule 8.4. > > Signed-off-by: Nicola Vetrini This is a mix of differen

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Julien Grall
CC Henry Hi Alexey, On 16/10/2023 15:24, Alexey Klimov wrote: On Mon, 16 Oct 2023 at 15:13, Luca Fancellu wrote: On 16 Oct 2023, at 15:00, Bertrand Marquis wrote: Hi +Luca and Rahul On 16 Oct 2023, at 15:54, Julien Grall wrote: On 16/10/2023 09:44, Michal Orzel wrote: Hi, Hi,

Re: [PATCH v2 2/2] domain: expose newly introduced hypercalls as XENFEAT

2023-10-16 Thread Roger Pau Monné
On Mon, Oct 16, 2023 at 04:04:34PM +0200, Jan Beulich wrote: > On 16.10.2023 16:01, Roger Pau Monné wrote: > > On Mon, Oct 16, 2023 at 03:58:22PM +0200, Jan Beulich wrote: > >> On 16.10.2023 15:00, Roger Pau Monné wrote: > >>> On Mon, Oct 16, 2023 at 02:35:44PM +0200, Jan Beulich wrote: > On 0

Re: [XEN PATCH][for-next v2 7/7] x86/mem_access: make function static

2023-10-16 Thread Jan Beulich
On 09.10.2023 08:54, Nicola Vetrini wrote: > --- a/xen/arch/x86/mm/mem_access.c > +++ b/xen/arch/x86/mm/mem_access.c > @@ -249,7 +249,7 @@ bool p2m_mem_access_check(paddr_t gpa, unsigned long gla, > return (p2ma != p2m_access_n2rwx); > } > > -int p2m_set_altp2m_mem_access(struct domain *d,

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Luca Fancellu
>>> >>> @Rahul or Luca: could you give an answer here ? >>> I know you used Xen on an AVA platform but was it booting out of the box ? >> >> I can’t say for Xen 4.17, but our nightly job has run successfully on AVA >> for the commit 730406ab81094115d9fb5ca00ba8d53cec1279b3 >> (docs/misra: add de

Re: [PATCH for-4.19] x86/cpu-policy: Adjust CPUID_MAX_SERIALISED_LEAVES to placate MISRA

2023-10-16 Thread Jan Beulich
On 10.10.2023 11:57, Andrew Cooper wrote: > MISRA doesn't like !!CONST being used in place of a 1 (Rule 10.1). Update the > expression to just be a plain 1, which still matches the description. > > No functional change. > > Reported-by: Nicola Vetrini > Signed-off-by: Andrew Cooper Acked-by:

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Alexey Klimov
On Mon, 16 Oct 2023 at 15:13, Luca Fancellu wrote: > > > > > On 16 Oct 2023, at 15:00, Bertrand Marquis wrote: > > > > Hi > > > > +Luca and Rahul > > > >> On 16 Oct 2023, at 15:54, Julien Grall wrote: > >> > >> > >> > >> On 16/10/2023 09:44, Michal Orzel wrote: > >>> Hi, > >> > >> Hi, > >> > >>>

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Luca Fancellu
> On 16 Oct 2023, at 15:00, Bertrand Marquis wrote: > > Hi > > +Luca and Rahul > >> On 16 Oct 2023, at 15:54, Julien Grall wrote: >> >> >> >> On 16/10/2023 09:44, Michal Orzel wrote: >>> Hi, >> >> Hi, >> >>> On 13/10/2023 14:26, Leo Yan wrote: On ADLink AVA platform (Am

Re: [PATCH for-4.18 v2] x86/pvh: fix identity mapping of low 1MB

2023-10-16 Thread Jan Beulich
On 16.10.2023 15:51, Roger Pau Monné wrote: > On Mon, Oct 16, 2023 at 03:32:54PM +0200, Jan Beulich wrote: >> On 13.10.2023 10:56, Roger Pau Monne wrote: >>> The mapping of memory regions below the 1MB mark was all done by the PVH >>> dom0 >>> builder code, causing the region to be avoided by the

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Alexey Klimov
On Mon, 16 Oct 2023 at 14:54, Julien Grall wrote: > > > > On 16/10/2023 09:44, Michal Orzel wrote: > > Hi, > > Hi, > > > On 13/10/2023 14:26, Leo Yan wrote: > >> > >> > >> On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), > >> the physical memory regions are: > >> > >>DR

Re: [PATCH v2 2/2] domain: expose newly introduced hypercalls as XENFEAT

2023-10-16 Thread Jan Beulich
On 16.10.2023 16:01, Roger Pau Monné wrote: > On Mon, Oct 16, 2023 at 03:58:22PM +0200, Jan Beulich wrote: >> On 16.10.2023 15:00, Roger Pau Monné wrote: >>> On Mon, Oct 16, 2023 at 02:35:44PM +0200, Jan Beulich wrote: On 06.10.2023 15:00, Roger Pau Monne wrote: > --- a/xen/common/domain.c

Re: [PATCH for-4.18 v5] xen/pdx: Make CONFIG_PDX_COMPRESSION a common Kconfig option

2023-10-16 Thread Jan Beulich
On 16.10.2023 15:40, Roger Pau Monné wrote: > On Mon, Oct 16, 2023 at 03:19:22PM +0200, Jan Beulich wrote: >> On 06.10.2023 17:27, Roger Pau Monné wrote: >>> On Fri, Oct 06, 2023 at 04:09:19PM +0100, Julien Grall wrote: On 06/10/2023 15:44, Andrew Cooper wrote: > From: Alejandro Vallejo >

Re: [PATCH v2 2/2] domain: expose newly introduced hypercalls as XENFEAT

2023-10-16 Thread Roger Pau Monné
On Mon, Oct 16, 2023 at 03:58:22PM +0200, Jan Beulich wrote: > On 16.10.2023 15:00, Roger Pau Monné wrote: > > On Mon, Oct 16, 2023 at 02:35:44PM +0200, Jan Beulich wrote: > >> On 06.10.2023 15:00, Roger Pau Monne wrote: > >>> --- a/xen/common/domain.c > >>> +++ b/xen/common/domain.c > >>> @@ -1998

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Bertrand Marquis
Hi +Luca and Rahul > On 16 Oct 2023, at 15:54, Julien Grall wrote: > > > > On 16/10/2023 09:44, Michal Orzel wrote: >> Hi, > > Hi, > >> On 13/10/2023 14:26, Leo Yan wrote: >>> >>> >>> On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), >>> the physical memory regions

Re: [PATCH v2 2/2] domain: expose newly introduced hypercalls as XENFEAT

2023-10-16 Thread Jan Beulich
On 16.10.2023 15:00, Roger Pau Monné wrote: > On Mon, Oct 16, 2023 at 02:35:44PM +0200, Jan Beulich wrote: >> On 06.10.2023 15:00, Roger Pau Monne wrote: >>> --- a/xen/common/domain.c >>> +++ b/xen/common/domain.c >>> @@ -1998,6 +1998,10 @@ long common_vcpu_op(int cmd, struct vcpu *v, >>> XEN_GUES

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Leo Yan
On Mon, Oct 16, 2023 at 01:40:26PM +, Bertrand Marquis wrote: [...] > > This patch enlarges identity map space to 10TB, allowing module loading > > within the range of [0x0 .. 0x09ff__]. > > > > Fixes: 1c78d76b67 ("xen/arm64: mm: Introduce helpers to > > prepare/enable/disable")

Re: [PATCH v4 2/2] xen/arm: Enlarge identity map space to 10TB

2023-10-16 Thread Julien Grall
On 16/10/2023 09:44, Michal Orzel wrote: Hi, Hi, On 13/10/2023 14:26, Leo Yan wrote: On ADLink AVA platform (Ampere Altra SoC with 32 Arm Neoverse N1 cores), the physical memory regions are: DRAM memory regions: Node[0] Region[0]: 0x8000 - 0x Node[0] Re

Re: [PATCH for-4.18 v2] x86/pvh: fix identity mapping of low 1MB

2023-10-16 Thread Roger Pau Monné
On Mon, Oct 16, 2023 at 03:32:54PM +0200, Jan Beulich wrote: > On 13.10.2023 10:56, Roger Pau Monne wrote: > > The mapping of memory regions below the 1MB mark was all done by the PVH > > dom0 > > builder code, causing the region to be avoided by the arch specific IOMMU > > hardware domain initial

Re: [XEN PATCH][for-4.19 v2 1/1] xen: introduce a deviation for Rule 11.9

2023-10-16 Thread Jan Beulich
On 11.10.2023 18:56, andrew.coop...@citrix.com wrote: > On 11/10/2023 8:46 pm, Nicola Vetrini wrote: >> diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst >> index ee7aed0609d2..1b00e4e3e9b7 100644 >> --- a/docs/misra/deviations.rst >> +++ b/docs/misra/deviations.rst >> @@ -199,6 +1

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

2023-10-16 Thread Bertrand Marquis
Hi Julien, > On 16 Oct 2023, at 15:38, Julien Grall wrote: > > > > On 16/10/2023 14:31, Bertrand Marquis wrote: >> Hi Julien, > > Hi Bertrand, > >>> On 16 Oct 2023, at 11:07, Julien Grall wrote: >>> >>> Hi, >>> >>> On 13/10/2023 16:24, Federico Serafini wrote: Add missing parameter n

Re: [XEN PATCH][for-4.19 v2 1/1] xen: introduce a deviation for Rule 11.9

2023-10-16 Thread Jan Beulich
On 11.10.2023 14:46, Nicola Vetrini wrote: > --- a/xen/include/xen/compiler.h > +++ b/xen/include/xen/compiler.h > @@ -109,13 +109,16 @@ > > #define offsetof(a,b) __builtin_offsetof(a,b) > > +/* Access the field of structure type, without defining a local variable */ > +#define access_field(ty

  1   2   >