Re: [PATCH v2 08/13] xen/bitops: Implement ffsl() in common logic

2024-05-30 Thread Stefano Stabellini
oper > > Reviewed-by: Jan Beulich Acked-by: Stefano Stabellini

Re: [PATCH v2 06/13] xen/bitops: Implement ffs() in common logic

2024-05-30 Thread Stefano Stabellini
nstant_p and always_inline to docs/misra/C-language-toolchain.rst as they don't seem to be currently documented and they are not part of the C standard Patch welcome :-) Reviewed-by: Stefano Stabellini > --- > CC: Jan Beulich > CC: Roger Pau Monné > CC: Wei Liu > CC: Stefano Stabe

Re: [PATCH v2 05/13] xen/bitops: Implement generic_f?sl() in lib/

2024-05-30 Thread Stefano Stabellini
if generic_f?sl() are > > used > > elsewhere in Xen. > > > > Signed-off-by: Andrew Cooper > > Reviewed-by: Jan Beulich > with a suggestion and a question. Acked-by: Stefano Stabellini > > I suspect we want to swap CONFIG_DEBUG for CONFIG_BOOT_UNIT_TESTS in due > > course. These ought to be able to be used in a release build too. > > +1 +1

Re: [PATCH v2 03/13] ARM/bitops: Change find_first_set_bit() to be a define

2024-05-30 Thread Stefano Stabellini
On Fri, 24 May 2024, Andrew Cooper wrote: > This is in order to maintain bisectability through the subsequent changes, as > the order of definitions is altered. > > Signed-off-by: Andrew Cooper Acked-by: Stefano Stabellini

Re: [PATCH 1/3] CI: Remove CI_COMMIT_REF_PROTECTED requirement for HW jobs

2024-05-30 Thread Stefano Stabellini
On Thu, 30 May 2024, Marek Marczykowski-Górecki wrote: > On Wed, May 29, 2024 at 03:19:43PM +0100, Andrew Cooper wrote: > > This restriction doesn't provide any security because anyone with suitable > > permissions on the HW runners can bypass it with this local patch. > > > > Requiring branches

Re: [PATCH 3/3] CI: Improve serial handling in qemu-smoke-ppc64le.sh

2024-05-30 Thread Stefano Stabellini
On Wed, 29 May 2024, Andrew Cooper wrote: > Have PPC put serial to stdout like all other tests, so it shows up in the main > job log. > > Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini > --- > CC: Roger Pau Monné > CC: Stefano Stabellini > CC: M

Re: [PATCH 2/3] CI: Use a debug build of Xen for the Xilinx HW tests

2024-05-30 Thread Stefano Stabellini
On Wed, 29 May 2024, Michal Orzel wrote: > Hi Andrew, > > On 29/05/2024 16:19, Andrew Cooper wrote: > > > > > > ... like the other hardware tests. This gets more value out of the testing. > > > > Signed-off-by: Andrew Cooper > > --- > > CC:

Re: [PATCH 2/3] CI: Use a debug build of Xen for the Xilinx HW tests

2024-05-30 Thread Stefano Stabellini
On Wed, 29 May 2024, Andrew Cooper wrote: > ... like the other hardware tests. This gets more value out of the testing. > > Signed-off-by: Andrew Cooper Acked-by: Stefano Stabellini > --- > CC: Roger Pau Monné > CC: Stefano Stabellini > CC: Michal Orzel > CC: Ma

Re: [XEN PATCH 2/4] automation/eclair_analysis: avoid an ECLAIR warning about escaping

2024-05-27 Thread Stefano Stabellini
s. I fixed it on commit: Acked-by: Stefano Stabellini > > Signed-off-by: Nicola Vetrini > > --- > > automation/eclair_analysis/ECLAIR/deviations.ecl | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/automation/eclair_anal

Re: [PATCH] docs/misra: add D4.12

2024-05-27 Thread Stefano Stabellini
On Wed, 15 May 2024, Stefano Stabellini wrote: > On Wed, 15 May 2024, Jan Beulich wrote: > > On 15.05.2024 01:15, Stefano Stabellini wrote: > > > Add D4.12 with the same explanation as the rules of the R21 series. > > > D4.12 refers to the standard library

Re: [PATCH v3 2/4] xen/arm: Alloc XenStore page for Dom0less DomUs from hypervisor

2024-05-27 Thread Stefano Stabellini
On Mon, 27 May 2024, Jürgen Groß wrote: > On 25.05.24 01:19, Stefano Stabellini wrote: > > On Fri, 24 May 2024, Jürgen Groß wrote: > > > On 24.05.24 15:58, Julien Grall wrote: > > > > Hi Henry, > > > > > > > > + Juergen as the Xenstore mai

Re: [PATCH v3 2/4] xen/arm: Alloc XenStore page for Dom0less DomUs from hypervisor

2024-05-24 Thread Stefano Stabellini
On Fri, 24 May 2024, Jürgen Groß wrote: > On 24.05.24 15:58, Julien Grall wrote: > > Hi Henry, > > > > + Juergen as the Xenstore maintainers. I'd like his opinion on the approach. > > The documentation of the new logic is in: > > > >

Re: [PATCH v3 2/4] xen/arm: Alloc XenStore page for Dom0less DomUs from hypervisor

2024-05-24 Thread Stefano Stabellini
On Fri, 24 May 2024, Julien Grall wrote: > Hi Stefano, > > On 24/05/2024 23:49, Stefano Stabellini wrote: > > On Fri, 24 May 2024, Julien Grall wrote: > > > Hi Henry, > > > > > > + Juergen as the Xenstore maintainers. I'd like his opinion on the > >

[PATCH v4 2/4] xen/arm: Alloc XenStore page for Dom0less DomUs from hypervisor

2024-05-24 Thread Stefano Stabellini
ec Kwapis Suggested-by: Daniel P. Smith Signed-off-by: Henry Wang Signed-off-by: Stefano Stabellini --- xen/arch/arm/dom0less-build.c | 55 ++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/dom0less-buil

[PATCH v4 3/4] tools/init-dom0less: Avoid hardcoding GUEST_MAGIC_BASE

2024-05-24 Thread Stefano Stabellini
From: Henry Wang Currently the GUEST_MAGIC_BASE in the init-dom0less application is hardcoded, which will lead to failures for 1:1 direct-mapped Dom0less DomUs. Since the guest magic region allocation from init-dom0less is for XenStore, and the XenStore page is now allocated from the

[PATCH v4 0/4] Guest XenStore page allocation for 11 Dom0less domUs

2024-05-24 Thread Stefano Stabellini
Hi all, This series is trying to fix the reported guest magic region alloc issue for 11 Dom0less domUs, an error message can seen from the init-dom0less application on 1:1 direct-mapped Dom0less DomUs: ``` Allocating magic pages memory.c:238:d0v0 mfn 0x39000 doesn't belong to d1 Error on alloc

[PATCH v4 4/4] docs/features/dom0less: Update the late XenStore init protocol

2024-05-24 Thread Stefano Stabellini
From: Henry Wang With the new allocation strategy of Dom0less DomUs XenStore page, update the doc of the late XenStore init protocol accordingly. Signed-off-by: Henry Wang --- docs/features/dom0less.pandoc | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git

[PATCH v4 1/4] xen/arm/static-shmem: Static-shmem should be direct-mapped for direct-mapped domains

2024-05-24 Thread Stefano Stabellini
be direct-mapped for direct-mapped domains. Check the host physical address to be matched with guest physical address when parsing the device tree. Document this restriction in the doc. Signed-off-by: Henry Wang Signed-off-by: Stefano Stabellini Acked-by: Michal Orzel --- docs/misc/arm/device-tree

Re: [PATCH v3 3/4] tools/init-dom0less: Avoid hardcoding GUEST_MAGIC_BASE

2024-05-24 Thread Stefano Stabellini
ents when possible. > > > > Reported-by: Alec Kwapis > > Signed-off-by: Henry Wang > > Reviewed-by: Jason Andryuk Reviewed-by: Stefano Stabellini

Re: [PATCH v3 4/4] docs/features/dom0less: Update the late XenStore init protocol

2024-05-24 Thread Stefano Stabellini
On Fri, 17 May 2024, Henry Wang wrote: > With the new allocation strategy of Dom0less DomUs XenStore page, > update the doc of the late XenStore init protocol accordingly. > > Signed-off-by: Henry Wang Reviewed-by: Stefano Stabellini > --- > v3: > - Wording change

Re: [PATCH v3 2/4] xen/arm: Alloc XenStore page for Dom0less DomUs from hypervisor

2024-05-24 Thread Stefano Stabellini
On Fri, 24 May 2024, Julien Grall wrote: > Hi Henry, > > + Juergen as the Xenstore maintainers. I'd like his opinion on the approach. > The documentation of the new logic is in: > > https://lore.kernel.org/xen-devel/20240517032156.1490515-5-xin.wa...@amd.com/ > > FWIW I am happy in principle

Re: [PATCH v3 1/4] xen/arm/static-shmem: Static-shmem should be direct-mapped for direct-mapped domains

2024-05-24 Thread Stefano Stabellini
On Tue, 21 May 2024, Henry Wang wrote: > Hi Michal, > > On 5/21/2024 12:09 AM, Michal Orzel wrote: > > > > > Thanks. I will take the tag if you are ok with above diff (for the > > > > > case > > > > > if this series goes in later than Luca's). > > > > I would move this check to process_shm()

[PATCH v6 7/7] docs: Add device tree overlay documentation

2024-05-24 Thread Stefano Stabellini
From: Vikram Garhwal Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Signed-off-by: Henry Wang --- docs/misc/arm/overlay.txt | 82 +++ 1 file changed, 82 insertions(+) create mode 100644 docs/misc/arm/overlay.txt diff --git a/docs/misc

[PATCH v6 5/7] xen/arm: Add XEN_DOMCTL_dt_overlay and device attachment to domains

2024-05-24 Thread Stefano Stabellini
for not-1:1 mapped domains. Signed-off-by: Henry Wang Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini --- xen/arch/arm/domctl.c| 3 + xen/common/dt-overlay.c | 211 ++- xen/include/public/domctl.h | 16 ++- xen/include/public/sysctl.h

[PATCH v6 6/7] tools: Introduce the "xl dt-overlay attach" command

2024-05-24 Thread Stefano Stabellini
ttach. Slightly rework the command option parsing logic. Signed-off-by: Henry Wang Signed-off-by: Stefano Stabellini Reviewed-by: Jason Andryuk Reviewed-by: Stefano Stabellini --- tools/include/libxl.h | 15 +++ tools/include/xenctrl.h | 3 +++ tools/libs/ctrl/

[PATCH v6 1/7] tools/xl: Correct the help information and exit code of the dt-overlay command

2024-05-24 Thread Stefano Stabellini
: 61765a07e3d8 ("tools/xl: Add new xl command overlay for device tree overlay support") Suggested-by: Anthony PERARD Signed-off-by: Henry Wang Reviewed-by: Jason Andryuk Reviewed-by: Stefano Stabellini --- tools/xl/xl_cmdtable.c | 2 +- tools/xl/xl_vmcontrol.c | 6 +++--- 2 fil

[PATCH v6 2/7] xen/arm, doc: Add a DT property to specify IOMMU for Dom0less domUs

2024-05-24 Thread Stefano Stabellini
From: Henry Wang There are some use cases in which the dom0less domUs need to have the XEN_DOMCTL_CDF_iommu set at the domain construction time. For example, the dynamic dtbo feature allows the domain to be assigned a device that is behind the IOMMU at runtime. For these use cases, we need to

[PATCH v6 3/7] tools/arm: Introduce the "nr_spis" xl config entry

2024-05-24 Thread Stefano Stabellini
to provide a method for user to decide the number of SPIs. This would help to avoid bumping the `config->arch.nr_spis` in libxl everytime there is a new platform with increased SPI numbers. Update the doc and the golang bindings accordingly. Signed-off-by: Henry Wang Signed-off-by: Stefano Stabell

[PATCH v6 4/7] xen/arm/gic: Allow adding interrupt to running VMs

2024-05-24 Thread Stefano Stabellini
this will introduce interrupt state unsync issues for cases when the interrupt is active or pending in the guest, therefore for these cases we simply reject the operation. Do it for both new and old vGIC implementations. Signed-off-by: Henry Wang Signed-off-by: Stefano Stabellini Reviewed-by: Julien Grall

[PATCH v6 0/7] Remaining patches for dynamic node programming using overlay dtbo

2024-05-24 Thread Stefano Stabellini
Hi all, This is the remaining series for the full functional "dynamic node programming using overlay dtbo" feature. The first part [1] has already been merged. Quoting from the original series, the first part has already made Xen aware of new device tree node which means updating the dt_host

Re: [PATCH v5 7/7] docs: Add device tree overlay documentation

2024-05-24 Thread Stefano Stabellini
On Fri, 24 May 2024, Julien Grall wrote: > Hi Stefano, > > On 24/05/2024 03:18, Stefano Stabellini wrote: > > From: Vikram Garhwal > > > > Signed-off-by: Vikram Garhwal > > Signed-off-by: Stefano Stabellini > > Signed-off-by: Henry Wang >

Re: [PATCH v5 6/7] tools: Introduce the "xl dt-overlay attach" command

2024-05-24 Thread Stefano Stabellini
On Fri, 24 May 2024, Julien Grall wrote: > Hi Stefano, > > On 24/05/2024 03:18, Stefano Stabellini wrote: > > From: Henry Wang > > > > With the XEN_DOMCTL_dt_overlay DOMCTL added, users should be able to > > attach (in the future also detach) devices from the p

Re: [PATCH v5 5/7] xen/arm: Add XEN_DOMCTL_dt_overlay and device attachment to domains

2024-05-24 Thread Stefano Stabellini
On Fri, 24 May 2024, Julien Grall wrote: > Hi Stefano, > > On 24/05/2024 03:18, Stefano Stabellini wrote: > > From: Henry Wang > > > > In order to support the dynamic dtbo device assignment to a running > > VM, the add/remove of the DT overlay and the attach/det

Re: [PATCH v5 3/7] tools/arm: Introduce the "nr_spis" xl config entry

2024-05-24 Thread Stefano Stabellini
On Fri, 23 May 2024, Julien Grall wrote: > Hi, > > On 24/05/2024 03:18, Stefano Stabellini wrote: > > From: Henry Wang > > > > Currently, the number of SPIs allocated to the domain is only > > configurable for Dom0less DomUs. Xen domains are supposed to be >

Re: [PATCH v4 3/9] tools/arm: Introduce the "nr_spis" xl config entry

2024-05-23 Thread Stefano Stabellini
On Fri, 24 May 2024, Julien Grall wrote: > Hi Henry, > > On 23/05/2024 08:40, Henry Wang wrote: > > Currently, the number of SPIs allocated to the domain is only > > configurable for Dom0less DomUs. Xen domains are supposed to be > > platform agnostics and therefore the numbers of SPIs for libxl

Re: [PATCH v4 5/9] xen/arm: Add XEN_DOMCTL_dt_overlay and device attachment to domains

2024-05-23 Thread Stefano Stabellini
On Thu, 23 May 2024, Julien Grall wrote: > Hi Henry, > > On 23/05/2024 08:40, Henry Wang wrote: > > In order to support the dynamic dtbo device assignment to a running > > VM, the add/remove of the DT overlay and the attach/detach of the > > device from the DT overlay should happen separately.

Re: [PATCH v4 9/9] docs: Add device tree overlay documentation

2024-05-23 Thread Stefano Stabellini
On Thu, 23 May 2024, Julien Grall wrote: > Hi Henry, > > On 23/05/2024 08:40, Henry Wang wrote: > > From: Vikram Garhwal > > > > Signed-off-by: Vikram Garhwal > > Signed-off-by: Stefano Stabellini > > Signed-off-by: Henry Wang > > --- > > v

Re: [PATCH v4 8/9] tools: Introduce the "xl dt-overlay {attach,detach}" commands

2024-05-23 Thread Stefano Stabellini
a new set of "xl dt-overlay" commands and > > related documentation, i.e. "xl dt-overlay {attach,detach}". Slightly > > rework the command option parsing logic. > > > > Signed-off-by: Henry Wang > > Reviewed-by: Jason Andryuk Reviewed-by: St

[PATCH v5 7/7] docs: Add device tree overlay documentation

2024-05-23 Thread Stefano Stabellini
From: Vikram Garhwal Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Signed-off-by: Henry Wang --- docs/misc/arm/overlay.txt | 82 +++ 1 file changed, 82 insertions(+) create mode 100644 docs/misc/arm/overlay.txt diff --git a/docs/misc

[PATCH v5 1/7] tools/xl: Correct the help information and exit code of the dt-overlay command

2024-05-23 Thread Stefano Stabellini
: 61765a07e3d8 ("tools/xl: Add new xl command overlay for device tree overlay support") Suggested-by: Anthony PERARD Signed-off-by: Henry Wang Reviewed-by: Jason Andryuk Reviewed-by: Stefano Stabellini --- tools/xl/xl_cmdtable.c | 2 +- tools/xl/xl_vmcontrol.c | 6 +++--- 2 fil

[PATCH v5 5/7] xen/arm: Add XEN_DOMCTL_dt_overlay and device attachment to domains

2024-05-23 Thread Stefano Stabellini
in the overlay are assigned to a single domain. Also take the opportunity to make one coding style fix in sysctl.h. xen,reg is to be used to handle non-1:1 mappings but it is currently unsupported. Signed-off-by: Henry Wang Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini --- xen

[PATCH v5 4/7] xen/arm/gic: Allow adding interrupt to running VMs

2024-05-23 Thread Stefano Stabellini
this will introduce interrupt state unsync issues for cases when the interrupt is active or pending in the guest, therefore for these cases we simply reject the operation. Do it for both new and old vGIC implementations. Signed-off-by: Henry Wang Signed-off-by: Stefano Stabellini Reviewed-by: Julien Grall

[PATCH v5 6/7] tools: Introduce the "xl dt-overlay attach" command

2024-05-23 Thread Stefano Stabellini
ttach. Slightly rework the command option parsing logic. Signed-off-by: Henry Wang Signed-off-by: Stefano Stabellini Reviewed-by: Jason Andryuk Reviewed-by: Stefano Stabellini --- tools/include/libxl.h | 15 +++ tools/include/xenctrl.h | 3 +++ tools/libs/ctrl/

[PATCH v5 3/7] tools/arm: Introduce the "nr_spis" xl config entry

2024-05-23 Thread Stefano Stabellini
to provide a method for user to decide the number of SPIs. This would help to avoid bumping the `config->arch.nr_spis` in libxl everytime there is a new platform with increased SPI numbers. Update the doc and the golang bindings accordingly. Signed-off-by: Henry Wang Signed-off-by: Stefano Stabell

[PATCH v5 2/7] xen/arm, doc: Add a DT property to specify IOMMU for Dom0less domUs

2024-05-23 Thread Stefano Stabellini
From: Henry Wang There are some use cases in which the dom0less domUs need to have the XEN_DOMCTL_CDF_iommu set at the domain construction time. For example, the dynamic dtbo feature allows the domain to be assigned a device that is behind the IOMMU at runtime. For these use cases, we need to

[PATCH v5 0/7] Remaining patches for dynamic node programming using overlay dtbo

2024-05-23 Thread Stefano Stabellini
Hi all, This is the remaining series for the full functional "dynamic node programming using overlay dtbo" feature. The first part [1] has already been merged. Quoting from the original series, the first part has already made Xen aware of new device tree node which means updating the dt_host

Re: [PATCH v4 1/9] tools/xl: Correct the help information and exit code of the dt-overlay command

2024-05-23 Thread Stefano Stabellini
and, use EXIT_FAILURE > instead of ERROR_FAIL. > > Fixes: 61765a07e3d8 ("tools/xl: Add new xl command overlay for device tree > overlay support") > Suggested-by: Anthony PERARD > Signed-off-by: Henry Wang > Reviewed-by: Jason Andryuk Reviewed-by: Stefano Stabellini >

Re: [XEN PATCH v2 07/15] x86: guard cpu_has_{svm/vmx} macros with CONFIG_{SVM/VMX}

2024-05-23 Thread Stefano Stabellini
On Thu, 23 May 2024, Jan Beulich wrote: > On 23.05.2024 15:07, Sergiy Kibrik wrote: > > 16.05.24 14:12, Jan Beulich: > >> On 15.05.2024 11:12, Sergiy Kibrik wrote: > >>> --- a/xen/arch/x86/include/asm/cpufeature.h > >>> +++ b/xen/arch/x86/include/asm/cpufeature.h > >>> @@ -81,7 +81,8 @@ static

Re: [PATCH v6 7/8] xen: mapcache: Add support for grant mappings

2024-05-23 Thread Stefano Stabellini
using grants > >are expected to initialize the xen_grants MR and map it > >into their address-map accordingly. > > > >Signed-off-by: Edgar E. Iglesias > >Reviewed-by: Stefano Stabellini > >--- > > hw/xen/xen-hvm-common.c         |  12 +

Re: [PATCH for-4.19 v3 2/3] xen: enable altp2m at create domain domctl

2024-05-23 Thread Stefano Stabellini
tools/ocaml/libs/xc/xenctrl_stubs.c | 2 +- > > xen/arch/arm/domain.c | 6 ++ > > Could I get an Ack from one of the Arm maintainers for the trivial Arm > change? Acked-by: Stefano Stabellini

[PATCH] docs/misra: rules for mass adoption

2024-05-22 Thread Stefano Stabellini
This patch adds a bunch of rules to rules.rst that are uncontroversial and have zero violations in Xen. As such, they have been approved for adoption. All the ones that regard the standard library have the link to the existing footnote in the notes. Signed-off-by: Stefano Stabellini diff --git

Re: [XEN PATCH v4 2/3] x86/MCE: add default switch case in init_nonfatal_mce_checker()

2024-05-22 Thread Stefano Stabellini
an Beulich Reviewed-by: Stefano Stabellini > --- > changes in v4: > - return 0 instead of -ENODEV and put a comment > - update description a bit > --- > xen/arch/x86/cpu/mcheck/non-fatal.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/xen/arch/

Re: [PATCH] Revert "evtchn: refuse EVTCHNOP_status for Xen-bound event channels"

2024-05-21 Thread Stefano Stabellini
On Tue, 21 May 2024, Jan Beulich wrote: > On 17.05.2024 22:28, Stefano Stabellini wrote: > > On Fri, 17 May 2024, Jan Beulich wrote: > >> On 17.05.2024 03:21, Stefano Stabellini wrote: > >>> On Thu, 16 May 2024, Jan Beulich wrote: > >>>> 1) In the d

Re: [PATCH 3/3] xen/x86: Address two misc MISRA 17.7 violations

2024-05-21 Thread Stefano Stabellini
On Tue, 21 May 2024, Andrew Cooper wrote: > Neither text_poke() nor watchdog_setup() have return value consulted. Switch > them to being void. > > Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini > --- > CC: George Dunlap > CC: Jan Beulich > CC:

Re: [PATCH 2/3] xen/x86: Drop useless non-Kconfig CONFIG_* variables

2024-05-21 Thread Stefano Stabellini
On Tue, 21 May 2024, Andrew Cooper wrote: > These are all either completely unused, or do nothing useful. > > Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini > --- > CC: George Dunlap > CC: Jan Beulich > CC: Stefano Stabellini > CC: Julien Grall >

Re: [PATCH 1/3] xen/lzo: Implement COPY{4,8} using memcpy()

2024-05-21 Thread Stefano Stabellini
he compiled binary. > > Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini > --- > CC: George Dunlap > CC: Jan Beulich > CC: Stefano Stabellini > CC: Julien Grall > CC: Roberto Bagnara > CC: consult...@bugseng.com > CC: Oleksii Kurochko > --- >

Re: [PATCH v3 5/8] xen/arm/gic: Allow routing/removing interrupt to running VMs

2024-05-21 Thread Stefano Stabellini
On Wed, 22 May 2024, Henry Wang wrote: > Hi Julien, > > On 5/21/2024 8:30 PM, Julien Grall wrote: > > Hi, > > > > On 21/05/2024 05:35, Henry Wang wrote: > > > diff --git a/xen/arch/arm/gic-vgic.c b/xen/arch/arm/gic-vgic.c > > > index 56490dbc43..956c11ba13 100644 > > > ---

Re: [XEN PATCH] automation/eclair_analysis: add already clean rules to the analysis

2024-05-21 Thread Stefano Stabellini
y. > > Signed-off-by: Nicola Vetrini Acked-by: Stefano Stabellini > --- > .../eclair_analysis/ECLAIR/monitored.ecl | 17 > automation/eclair_analysis/ECLAIR/tagging.ecl | 78 ++- > 2 files changed, 94 insertions(+), 1 deletion(-) > > diff

Re: [PATCH v2 5/8] xen/arm/gic: Allow routing/removing interrupt to running VMs

2024-05-20 Thread Stefano Stabellini
On Mon, 20 May 2024, Julien Grall wrote: > Hi Henry, > > On 20/05/2024 02:01, Henry Wang wrote: > > Hi Julien, > > > > On 5/19/2024 7:08 PM, Julien Grall wrote: > > > Hi, > > > > > > On 17/05/2024 07:03, Henry Wang wrote: > > > > > @@ -444,14 +444,18 @@ int vgic_connect_hw_irq(struct domain *d,

Re: [PATCH 10/12] automation: stubdom test with PCI passthrough

2024-05-17 Thread Stefano Stabellini
With the caveat that if we do tftp boot this might have to change: Acked-by: Stefano Stabellini > --- > automation/gitlab-ci/test.yaml | 8 > automation/scripts/qubes-x86-64.sh | 30 +- > 2 files changed, 33 insertions(+), 5 deletions(-) > >

Re: [PATCH 06/12] RFC: automation: Add linux stubdom build and smoke test

2024-05-17 Thread Stefano Stabellini
On Thu, 16 May 2024, Marek Marczykowski-Górecki wrote: > Add minimal linux-stubdom smoke test. It starts a simple HVM with > linux-stubdom. The actual stubdom implementation is taken from Qubes OS > and then stripped off Qubes-specific code. In particular, the remaining > code does _not_ support:

Re: [PATCH 03/12] automation: switch to alpine:3.19

2024-05-17 Thread Stefano Stabellini
86_64 builds, switch Alpine version everywhere for uniformity. > Note this bumps kernel version requirement on docker runners - > dracut-install uses faccessat2() syscall which was introduced in Linux > 5.8. > > Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Stefano Stabellini

Re: [PATCH 08/12] automation: update kernel for x86 tests

2024-05-17 Thread Stefano Stabellini
ff-by: Marek Marczykowski-Górecki Reviewed-by: Stefano Stabellini > --- > automation/gitlab-ci/build.yaml | 4 +- > automation/gitlab-ci/test.yaml | 2 +- > automation/tests-artifacts/kernel/6.1.19.dockerfile | 40 +-- >

Re: [PATCH 04/12] automation: increase verbosity of starting a domain

2024-05-17 Thread Stefano Stabellini
On Thu, 16 May 2024, Marek Marczykowski-Górecki wrote: > And start collecting qemu log earlier, so it isn't lost in case of a > timeout during domain startup. > > Signed-off-by: Marek Marczykowski-Górecki Acked-by: Stefano Stabellini > --- > automation/scripts/qemu-alpin

Re: [PATCH 05/12] automation: prevent grub unpacking initramfs

2024-05-17 Thread Stefano Stabellini
On Thu, 16 May 2024, Marek Marczykowski-Górecki wrote: > It fails on larger initramfs (~250MB one), let Linux do it. > > Signed-off-by: Marek Marczykowski-Górecki Acked-by: Stefano Stabellini > --- > automation/scripts/qubes-x86-64.sh | 2 +- > 1 file changed, 1 insert

Re: [PATCH 02/12] automation: update fedora build to F39

2024-05-17 Thread Stefano Stabellini
On Thu, 16 May 2024, Marek Marczykowski-Górecki wrote: > Fedora 29 is long EOL > > Signed-off-by: Marek Marczykowski-Górecki Acked-by: Stefano Stabellini > --- > automation/build/fedora/29.dockerfile | 46 + > automation/build/fedora/

Re: [PATCH 01/12] automation: include domU kernel messages in the console output log

2024-05-17 Thread Stefano Stabellini
On Thu, 16 May 2024, Marek Marczykowski-Górecki wrote: > Signed-off-by: Marek Marczykowski-Górecki Acked-by: Stefano Stabellini > --- > automation/scripts/qubes-x86-64.sh | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/automation/scripts/qubes-x86-64.sh >

Re: [XEN PATCH] automation/eclair_analysis: set MISRA C Rule 10.2 as clean

2024-05-17 Thread Stefano Stabellini
On Fri, 17 May 2024, Nicola Vetrini wrote: > This rule has no more violations in the codebase, so it can be > set as clean. > > No functional change. > > Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini > --- > automation/eclair_analysis/ECLAIR/tagg

Re: [PATCH] Revert "evtchn: refuse EVTCHNOP_status for Xen-bound event channels"

2024-05-17 Thread Stefano Stabellini
On Fri, 17 May 2024, Jan Beulich wrote: > On 17.05.2024 03:21, Stefano Stabellini wrote: > > On Thu, 16 May 2024, Jan Beulich wrote: > >> 1) In the discussion George claimed that exposing status information in > >> an uncontrolled manner is okay. I'm afraid I have t

Re: [PATCH v2] drivers/xen: Improve the late XenStore init protocol

2024-05-16 Thread Stefano Stabellini
("xen: add support for initializing xenstore later as HVM > domain") > Signed-off-by: Henry Wang > Signed-off-by: Michal Orzel Reviewed-by: Stefano Stabellini > --- > v2: > - Use -EINVAL for the memremap() check. (Stefano) > - Add Fixes: tag. (Stefano) > - Rework

Re: [PATCH] Revert "evtchn: refuse EVTCHNOP_status for Xen-bound event channels"

2024-05-16 Thread Stefano Stabellini
On Thu, 16 May 2024, Jan Beulich wrote: > 1) In the discussion George claimed that exposing status information in > an uncontrolled manner is okay. I'm afraid I have to disagree, seeing > how a similar assumption by CPU designers has led to a flood of > vulnerabilities over the last 6+ years.

Re: [PATCH] drivers/xen: Improve the late XenStore init protocol

2024-05-16 Thread Stefano Stabellini
On Thu, 16 May 2024, Henry Wang wrote: > Hi Stefano, > > On 5/16/2024 6:30 AM, Stefano Stabellini wrote: > > On Wed, 15 May 2024, Henry Wang wrote: > > > Currently, the late XenStore init protocol is only triggered properly > > > for the case that HVM_

Re: [PATCH v6 6/8] xen: mapcache: Pass the ram_addr offset to xen_map_cache()

2024-05-16 Thread Stefano Stabellini
> Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini

Re: [XEN PATCH v2 14/15] iommu/vt-d: guard vmx_pi_hooks_* calls with cpu_has_vmx

2024-05-16 Thread Stefano Stabellini
On Thu, 16 May 2024, Jan Beulich wrote: > On 16.05.2024 02:54, Stefano Stabellini wrote: > > On Wed, 15 May 2024, Sergiy Kibrik wrote: > >> VMX posted interrupts support can now be excluded from x86 build along with > >> VMX code itself, but still we may want to keep the

Re: [PATCH v2 1/4] LICENSES: Add MIT-0 (MIT No Attribution)

2024-05-16 Thread Stefano Stabellini
On Thu, 16 May 2024, Andrew Cooper wrote: > We are about to import code licensed under MIT-0. It's compatible for us to > use, so identify it as a permitted license. > > Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini > --- > CC: Anthony PERARD > CC

Re: [RFC KERNEL PATCH v7 2/2] xen/privcmd: Add new syscall to get gsi from dev

2024-05-16 Thread Stefano Stabellini
On Thu, 16 May 2024, Chen, Jiqian wrote: > On 2024/5/16 06:42, Stefano Stabellini wrote: > > On Wed, 15 May 2024, Jiqian Chen wrote: > >> In PVH dom0, it uses the linux local interrupt mechanism, > >> when it allocs irq for a gsi, it is dynamic, and follow > >

Re: [XEN PATCH v2 15/15] x86/hvm: make AMD-V and Intel VT-x support configurable

2024-05-15 Thread Stefano Stabellini
options depend on HVM and > default to value of HVM. > > To prevent users from unknowingly disabling virtualization support, make the > controls user selectable only if EXPERT is enabled. > > No functional change intended. > > Signed-off-by: Xenia Ragiadakou > Signed-off-by: Sergiy Kibrik Reviewed-by: Stefano Stabellini

Re: [XEN PATCH v2 14/15] iommu/vt-d: guard vmx_pi_hooks_* calls with cpu_has_vmx

2024-05-15 Thread Stefano Stabellini
On Wed, 15 May 2024, Sergiy Kibrik wrote: > VMX posted interrupts support can now be excluded from x86 build along with > VMX code itself, but still we may want to keep the possibility to use > VT-d IOMMU driver in non-HVM setups. > So we guard vmx_pi_hooks_{assign/deassign} with some checks for

Re: [XEN PATCH v2 13/15] x86/ioreq: guard VIO_realmode_completion with CONFIG_VMX

2024-05-15 Thread Stefano Stabellini
; > No functional change intended. > > Signed-off-by: Xenia Ragiadakou > Signed-off-by: Sergiy Kibrik Reviewed-by: Stefano Stabellini

Re: [XEN PATCH v2 12/15] x86/vmx: guard access to cpu_has_vmx_* in common code

2024-05-15 Thread Stefano Stabellini
On Wed, 15 May 2024, Sergiy Kibrik wrote: > There're several places in common code, outside of arch/x86/hvm/vmx, > where cpu_has_vmx_* get accessed without checking if VMX present first. > We may want to guard these macros, as they read global variables defined > inside vmx-specific files -- so

Re: [XEN PATCH v2 10/15] x86/domain: clean up superfluous #idef-s

2024-05-15 Thread Stefano Stabellini
> > Signed-off-by: Sergiy Kibrik Reviewed-by: Stefano Stabellini

Re: [XEN PATCH v2 09/15] x86/traps: clean up superfluous #idef-s

2024-05-15 Thread Stefano Stabellini
> > Signed-off-by: Sergiy Kibrik Nice! Reviewed-by: Stefano Stabellini

Re: [XEN PATCH v2 08/15] x86/vpmu: guard vmx/svm calls with cpu_has_{vmx,svm}

2024-05-15 Thread Stefano Stabellini
On Wed, 15 May 2024, Sergiy Kibrik wrote: > If VMX/SVM disabled in the build, we may still want to have vPMU drivers for > PV guests. Yet some calls to vmx/svm-related routines needs to be guarded > then. > > Signed-off-by: Sergiy Kibrik Question to the x86 maintainers: are we sure we want to

Re: [XEN PATCH v2 07/15] x86: guard cpu_has_{svm/vmx} macros with CONFIG_{SVM/VMX}

2024-05-15 Thread Stefano Stabellini
have to add extra #ifdef-s to check whether svm/vmx has been enabled, > while DCE cleans up calls to vmx/svm functions, if their code not being built. > > Signed-off-by: Sergiy Kibrik > CC: Jan Beulich Reviewed-by: Stefano Stabellini

Re: [XEN PATCH v2 06/15] x86/p2m: guard altp2m code with CONFIG_ALTP2M option

2024-05-15 Thread Stefano Stabellini
On Wed, 15 May 2024, Sergiy Kibrik wrote: > Instead of using generic CONFIG_HVM option switch to a bit more specific > CONFIG_ALTP2M option for altp2m support. Also guard altp2m routines, so that > they can be disabled completely in the build -- when target platform does not > actually support

Re: [XEN PATCH v2 04/15] x86/p2m: move altp2m-related code to separate file

2024-05-15 Thread Stefano Stabellini
; No functional change intended. > > Signed-off-by: Sergiy Kibrik > CC: Tamas K Lengyel > CC: Jan Beulich Reviewed-by: Stefano Stabellini > --- > changes in v2: > - no double blank lines > - no unrelated re-formatting > - header #include-s ordering > - chang

Re: [XEN PATCH v2 05/15] x86: introduce CONFIG_ALTP2M Kconfig option

2024-05-15 Thread Stefano Stabellini
On Wed, 15 May 2024, Sergiy Kibrik wrote: > Add new option to make altp2m code inclusion optional. > Currently altp2m support provided for VT-d only, so option is dependant on > VMX. > > No functional change intended. > > Signed-off-by: Sergiy Kibrik > CC: Tamas K Lengyel > --- >

Re: [XEN PATCH v2 03/15] x86/p2m: guard altp2m routines

2024-05-15 Thread Stefano Stabellini
mm/p2m-ept.c > @@ -986,7 +986,7 @@ out: > if ( is_epte_present(_entry) ) > ept_free_entry(p2m, _entry, target); > > -if ( entry_written && p2m_is_hostp2m(p2m) ) > +if ( entry_written && p2m_is_hostp2m(p2m) && hvm_altp2m_supported()) > { > ret = p2m_altp2m_propagate_change(d, _gfn(gfn), mfn, order, p2mt, > p2ma); > if ( !rc ) This is a matter of taste but I would put hvm_altp2m_supported() first. Reviewed-by: Stefano Stabellini

Re: [XEN PATCH v2 02/15] x86/monitor: guard altp2m usage

2024-05-15 Thread Stefano Stabellini
altp2m support and > exclude its code from the build completely, when not supported by target > platform (as of now it's supported for VT-d only). > > Signed-off-by: Sergiy Kibrik > CC: Tamas K Lengyel > CC: Jan Beulich Reviewed-by: Stefano Stabellini > --- > change

Re: [PATCH v4 7/9] xen/arm64: mmu/head: Add missing code symbol annotations

2024-05-15 Thread Stefano Stabellini
On Sat, 4 May 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Use the generic xen/linkage.h macros to annotate code symbols > and add missing annotations. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- >

Re: [PATCH v4 1/9] xen/arm64: entry: Add missing code symbol annotations

2024-05-15 Thread Stefano Stabellini
On Sat, 4 May 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Use the generic xen/linkage.h macros to annotate code symbols > and add missing annotations. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- >

Re: [PATCH v4 6/9] xen/arm64: bpi: Add missing code symbol annotations

2024-05-15 Thread Stefano Stabellini
On Sat, 4 May 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Use the generic xen/linkage.h macros to annotate code symbols > and add missing annotations. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- &

Re: [PATCH v4 4/9] xen/arm64: head: Add missing code symbol annotations

2024-05-15 Thread Stefano Stabellini
On Sat, 4 May 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Use the generic xen/linkage.h macros to annotate code symbols > and add missing annotations. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- &g

Re: [XEN PATCH 4/4] x86_64/cpu_idle: address violations of MISRA C Rule 20.7

2024-05-15 Thread Stefano Stabellini
rrent and future users will be safe with respect to expansions that > can possibly alter the semantics of the passed-in macro parameter. > > No functional change. > > Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini

Re: [XEN PATCH 3/4] x86_64/uaccess: address violations of MISRA C Rule 20.7

2024-05-15 Thread Stefano Stabellini
rrent and future users will be safe with respect to expansions that > can possibly alter the semantics of the passed-in macro parameter. > > xlat_malloc_init is touched for consistency, despite the construct > being already deviated. > > No functional change. > > Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini

Re: [XEN PATCH 2/4] x86/hvm: address violations of MISRA C Rule 20.7

2024-05-15 Thread Stefano Stabellini
rrent and future users will be safe with respect to expansions that > can possibly alter the semantics of the passed-in macro parameter. > > No functional change. > > Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini > --- > xen/arch/x86/hvm/mtrr.c | 2 +-

Re: [XEN PATCH 1/4] x86/vpmu: address violations of MISRA C Rule 20.7

2024-05-15 Thread Stefano Stabellini
rrent and future users will be safe with respect to expansions that > can possibly alter the semantics of the passed-in macro parameter. > > No functional change. > > Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini > --- > xen/arch/x86/cpu/vpmu_amd.c | 4 ++-- >

Re: [PATCH v5 7/8] xen: mapcache: Add support for grant mappings

2024-05-15 Thread Stefano Stabellini
> Like with foreign mappings (xen_memory), machines using grants > are expected to initialize the xen_grants MR and map it > into their address-map accordingly. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini

Re: [PATCH v5 6/8] xen: mapcache: Pass the ram_addr offset to xen_map_cache()

2024-05-15 Thread Stefano Stabellini
On Fri, 3 May 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Pass the ram_addr offset to xen_map_cache. > This is in preparation for adding grant mappings that need > to compute the address within the RAMBlock. > > No functional changes. > > Signed-off-by: Edgar E. Iglesias >

[PATCH v2] include/ctype.h: fix MISRA R10.2 violation

2024-05-15 Thread Stefano Stabellini
The value returned by __toupper is used in arithmetic operations causing MISRA C 10.2 violations. Cast to plain char in the toupper macro. Also do the same in tolower for consistency. Signed-off-by: Stefano Stabellini --- Changes in v2: - fix the toupper macro instead diff --git a/xen/include

  1   2   3   4   5   6   7   8   9   10   >