Re: [PATCH v4 3/3] xsm: properly handle error from XSM init

2022-05-31 Thread Jan Beulich
On 31.05.2022 21:18, Andrew Cooper wrote: > On 31/05/2022 19:20, Daniel P. Smith wrote: >> diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c >> index 53a73010e0..ed67b50c9d 100644 >> --- a/xen/arch/x86/setup.c >> +++ b/xen/arch/x86/setup.c >> @@ -1700,7 +1701,11 @@ void __init noreturn __sta

Re: [RFC PATCH 5/6] xen/riscv: Add early_printk

2022-05-31 Thread Jan Beulich
On 01.06.2022 05:59, Alistair Francis wrote: > On Tue, May 31, 2022 at 5:09 PM Xie Xun wrote: >> --- /dev/null >> +++ b/xen/arch/riscv/early_printk.c > > This should be named differently. This file should be called > `sbi_console_early_printk.c` to better indicate that it's using the > sbi_consol

Re: [PATCH v4 7/8] xen/x86: add detection of memory interleaves for different nodes

2022-05-31 Thread Jan Beulich
On 01.06.2022 04:53, Wei Chen wrote: >> From: Jan Beulich >> Sent: 2022年5月31日 21:21 >> >> On 23.05.2022 08:25, Wei Chen wrote: >>> @@ -119,20 +125,45 @@ int valid_numa_range(paddr_t start, paddr_t end, >> nodeid_t node) >>> return 0; >>> } >>> >>> -static __init int conflicting_memblks(paddr_

Re: [PATCH v3 3/3] xsm: properly handle error from XSM init

2022-05-31 Thread Jan Beulich
On 31.05.2022 17:08, Daniel P. Smith wrote: > @@ -1690,7 +1691,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) > > open_softirq(NEW_TLBFLUSH_CLOCK_PERIOD_SOFTIRQ, > new_tlbflush_clock_period); > > -if ( opt_watchdog ) > +if ( opt_watchdog ) > nmi_watchdog = NM

Re: [PATCH v3 1/3] xsm: only search for a policy file when needed

2022-05-31 Thread Jan Beulich
On 31.05.2022 17:08, Daniel P. Smith wrote: > It is possible to select a few different build configurations that results in > the unnecessary walking of the boot module list looking for a policy module. > This specifically occurs when the flask policy is enabled but either the dummy > or the SILO p

Re: [PATCH v3 1/3] xsm: only search for a policy file when needed

2022-05-31 Thread Jan Beulich
On 31.05.2022 18:15, Daniel P. Smith wrote: > > On 5/31/22 11:51, Jan Beulich wrote: >> On 31.05.2022 17:08, Daniel P. Smith wrote: >>> It is possible to select a few different build configurations that results >>> in >>> the unnecessary walking of the boot module list looking for a policy module

[linux-linus test] 170791: regressions - FAIL

2022-05-31 Thread osstest service owner
flight 170791 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/170791/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-dom0pvh-xl-amd 14 guest-start fail REGR. vs. 170714 test-amd64-amd64-do

Re: [RFC PATCH 5/6] xen/riscv: Add early_printk

2022-05-31 Thread Alistair Francis
On Tue, May 31, 2022 at 5:09 PM Xie Xun wrote: > > Signed-off-by: Xie Xun > --- > xen/arch/riscv/Makefile | 1 + > xen/arch/riscv/early_printk.c | 48 +++ > xen/arch/riscv/include/asm/early_printk.h | 10 + > 3 files changed, 59 insertions(+

RE: [PATCH v4 7/8] xen/x86: add detection of memory interleaves for different nodes

2022-05-31 Thread Wei Chen
Hi Jan, > -Original Message- > From: Jan Beulich > Sent: 2022年5月31日 21:21 > To: Wei Chen > Cc: nd ; Andrew Cooper ; Roger Pau > Monné ; Wei Liu ; Jiamei Xie > ; xen-devel@lists.xenproject.org > Subject: Re: [PATCH v4 7/8] xen/x86: add detection of memory interleaves > for different nodes

[PATCH v2 2/2] docs/misra: add Rule 5.1

2022-05-31 Thread Stefano Stabellini
From: Stefano Stabellini Add Rule 5.1, with the additional note that the character limit for Xen is 40 characters. The max length identifiers found by ECLAIR are: __mitigate_spectre_bhb_clear_insn_start domain_pause_by_systemcontroller_nosync Both of them are 40 characters long. Explicitly me

[PATCH v2 1/2] docs/misra: introduce rules.rst

2022-05-31 Thread Stefano Stabellini
From: Stefano Stabellini Introduce a list of MISRA C rules that apply to the Xen hypervisor. The list is in RST format. Specify that rules deviations need to be documented. Introduce a documentation tag for in-code comments to mark them as deviations. Also mention that other documentation mechan

[PATCH v2 0/2] introduce docs/misra/rules.rst

2022-05-31 Thread Stefano Stabellini
Hi all, This patch series is a follow-up from the MISRA C meeting last Thursday, when we went through the list of MISRA C rules on the spreadsheet and agreed to accept into the Xen coding style the first ones, starting from Dir 2.1 up until Rule 5.1 (except for Rule 2.2) in descending popularity o

Re: [PATCH 1/2] docs/misra: introduce rules.rst

2022-05-31 Thread Stefano Stabellini
On Tue, 31 May 2022, Julien Grall wrote: > Hi, > > On 30/05/2022 14:35, Bertrand Marquis wrote: > > > Obviously something *else* we might want is a more convenient way to keep > > > that rationale for the future, when we start to officially document > > > deviations. Given that the scanner will p

Re: [PATCH v2 3/3] tools/xl: Allow specifying JSON for domain configuration file format

2022-05-31 Thread Elliott Mitchell
On Fri, May 20, 2022 at 03:12:46PM +0100, Anthony PERARD wrote: > On Tue, Apr 19, 2022 at 06:23:41PM -0700, Elliott Mitchell wrote: > > JSON is currently used when saving domains to mass storage. Being able > > to use JSON as the normal input to `xl create` has potential to be > > valuable. Add t

Re: [PATCH V2] libxl/arm: Create specific IOMMU node to be referred by virtio-mmio device

2022-05-31 Thread Stefano Stabellini
On Tue, 31 May 2022, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > Reuse generic IOMMU device tree bindings to communicate Xen specific > information for the virtio devices for which the restricted memory > access using Xen grant mappings need to be enabled. > > Insert "iommus" pr

Re: [PATCH V3 7/8] xen/grant-dma-ops: Retrieve the ID of backend's domain for DT devices

2022-05-31 Thread Stefano Stabellini
On Tue, 31 May 2022, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > Use the presence of "iommus" property pointed to the IOMMU node with > recently introduced "xen,grant-dma" compatible as a clear indicator > of enabling Xen grant mappings scheme for that device and read the ID

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

2022-05-31 Thread osstest service owner
flight 170790 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/170790/ 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 V3 6/8] xen/grant-dma-iommu: Introduce stub IOMMU driver

2022-05-31 Thread Stefano Stabellini
On Tue, 31 May 2022, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > In order to reuse generic IOMMU device tree bindings by Xen grant > DMA-mapping layer we need to add this stub driver from a fw_devlink > perspective (grant-dma-ops cannot be converted into the proper > IOMMU driver

Re: [PATCH V3 5/8] dt-bindings: Add xen,grant-dma IOMMU description for xen-grant DMA ops

2022-05-31 Thread Stefano Stabellini
On Tue, 31 May 2022, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > The main purpose of this binding is to communicate Xen specific > information using generic IOMMU device tree bindings (which is > a good fit here) rather than introducing a custom property. > > Introduce Xen speci

Re: [PATCH V3 3/8] xen/grant-dma-ops: Add option to restrict memory access under Xen

2022-05-31 Thread Stefano Stabellini
On Tue, 31 May 2022, Oleksandr Tyshchenko wrote: > From: Juergen Gross > > Introduce Xen grant DMA-mapping layer which contains special DMA-mapping > routines for providing grant references as DMA addresses to be used by > frontends (e.g. virtio) in Xen guests. > > Add the needed functionality b

Re: [PATCH] xen: replace xen_remap() with memremap()

2022-05-31 Thread Stefano Stabellini
On Mon, 30 May 2022, Juergen Gross wrote: > xen_remap() is used to establish mappings for frames not under direct > control of the kernel: for Xenstore and console ring pages, and for > grant pages of non-PV guests. > > Today xen_remap() is defined to use ioremap() on x86 (doing uncached > mapping

Re: [Xen-devel] SMMU permission fault on Dom0 when init vpu_decoder

2022-05-31 Thread Stefano Stabellini
On Mon, 30 May 2022, Julien Grall wrote: > (+ Stefano) > > On 30/05/2022 16:21, Oleksii Moisieiev wrote: > > Hello, > > Hi Oleksii, > > > I'm getting permission fault from SMMU when trying to init > > VPU_Encoder/Decoder > > in Dom0 on IMX8QM board: > > (XEN) smmu: /iommu@5140: Unhandled con

[linux-linus test] 170788: regressions - FAIL

2022-05-31 Thread osstest service owner
flight 170788 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/170788/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-dom0pvh-xl-amd 14 guest-start fail REGR. vs. 170714 test-amd64-amd64-do

Re: [PATCH v8 16/27] m68k: Switch to new sys-off handler API

2022-05-31 Thread Dmitry Osipenko
On 5/31/22 22:04, Geert Uytterhoeven wrote: > Hi Dmitry, > > On Tue, May 10, 2022 at 1:34 AM Dmitry Osipenko > wrote: >> Kernel now supports chained power-off handlers. Use >> register_power_off_handler() that registers power-off handlers and >> do_kernel_power_off() that invokes chained power-of

[PATCH] x86/spec-ctrl: Enumeration for new Intel BHI controls

2022-05-31 Thread Andrew Cooper
https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/technical-documentation/branch-history-injection.html Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu These are defined now, but support in hardware hasn't been rel

Re: [PATCH v4 3/3] xsm: properly handle error from XSM init

2022-05-31 Thread Andrew Cooper
On 31/05/2022 19:20, Daniel P. Smith wrote: > diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c > index 53a73010e0..ed67b50c9d 100644 > --- a/xen/arch/x86/setup.c > +++ b/xen/arch/x86/setup.c > @@ -1700,7 +1701,11 @@ void __init noreturn __start_xen(unsigned long mbi_p) > mmio_ro_ranges

Re: [PATCH v4 2/3] xsm: consolidate loading the policy buffer

2022-05-31 Thread Andrew Cooper
On 31/05/2022 19:20, Daniel P. Smith wrote: > diff --git a/xen/xsm/xsm_policy.c b/xen/xsm/xsm_policy.c > index 8dafbc9381..690fd23e9f 100644 > --- a/xen/xsm/xsm_policy.c > +++ b/xen/xsm/xsm_policy.c > @@ -8,7 +8,7 @@ > * Contributors: > * Michael LeMay, > * George Coker, > - * > + * >

Re: [PATCH v8 16/27] m68k: Switch to new sys-off handler API

2022-05-31 Thread Geert Uytterhoeven
Hi Dmitry, On Tue, May 10, 2022 at 1:34 AM Dmitry Osipenko wrote: > Kernel now supports chained power-off handlers. Use > register_power_off_handler() that registers power-off handlers and > do_kernel_power_off() that invokes chained power-off handlers. Legacy > pm_power_off() will be removed onc

Re: [PATCH v4 2/3] xsm: consolidate loading the policy buffer

2022-05-31 Thread Daniel P. Smith
On 5/31/22 14:20, Daniel P. Smith wrote: > Previously, initializing the policy buffer was split between two functions, > xsm_{multiboot,dt}_policy_init() and xsm_core_init(). The latter for loading > the policy from boot modules and the former for falling back to built-in > policy. > > This patch

Re: [PATCH v4 1/3] xsm: only search for a policy file when needed

2022-05-31 Thread Jason Andryuk
On Tue, May 31, 2022 at 2:22 PM Daniel P. Smith wrote: > > It is possible to select a few different build configurations that results in > the unnecessary walking of the boot module list looking for a policy module. > This specifically occurs when the flask policy is enabled but either the dummy >

[xtf test] 170789: all pass - PUSHED

2022-05-31 Thread osstest service owner
flight 170789 xtf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170789/ Perfect :-) All tests in this flight passed as required version targeted for testing: xtf 37ea4e513a2ce0cd22f9c9a32b18d5c022e38e12 baseline version: xtf bc0abf2a5498d4691538bf

[PATCH v4 3/3] xsm: properly handle error from XSM init

2022-05-31 Thread Daniel P. Smith
This commit is to move towards providing a uniform interface across architectures to initialize the XSM framework. Specifically, it provides a common handling of initialization failure by providing the printing of a warning message. For Arm, xsm_dt_init() was tailored to have an Arm specific expan

[PATCH v4 2/3] xsm: consolidate loading the policy buffer

2022-05-31 Thread Daniel P. Smith
Previously, initializing the policy buffer was split between two functions, xsm_{multiboot,dt}_policy_init() and xsm_core_init(). The latter for loading the policy from boot modules and the former for falling back to built-in policy. This patch moves all policy buffer initialization logic under th

[PATCH v4 1/3] xsm: only search for a policy file when needed

2022-05-31 Thread Daniel P. Smith
It is possible to select a few different build configurations that results in the unnecessary walking of the boot module list looking for a policy module. This specifically occurs when the flask policy is enabled but either the dummy or the SILO policy is selected as the enforcing policy. This is n

[PATCH v4 0/3] xsm: refactor and optimize policy loading

2022-05-31 Thread Daniel P. Smith
This series was born out of some cleanup work done while crafting the hyperlaunch boot modules patch series. The primary purpose of this series was to stop walking all boot modules when it was not necessary, but the scope creeped during review. Changes in v4: * rewroked xsm_{multiboot,dt}_init() t

Re: [PATCH] xen: replace xen_remap() with memremap()

2022-05-31 Thread Boris Ostrovsky
On 5/30/22 4:26 AM, Juergen Gross wrote: xen_remap() is used to establish mappings for frames not under direct control of the kernel: for Xenstore and console ring pages, and for grant pages of non-PV guests. Today xen_remap() is defined to use ioremap() on x86 (doing uncached mappings), and i

Re: [PATCH] libxl: Don't leak self pipes

2022-05-31 Thread Anthony PERARD
On Tue, May 24, 2022 at 12:31:52PM -0400, Jason Andryuk wrote: > libxl is leaking self pipes to child processes. These can be seen when > running with env var _LIBXL_DEBUG_EXEC_FDS=1: > > libxl: debug: libxl_aoutils.c:593:libxl__async_exec_start: forking to > execute: /etc/xen/scripts/vif-bridge

Re: [PATCH V3 5/8] dt-bindings: Add xen,grant-dma IOMMU description for xen-grant DMA ops

2022-05-31 Thread Oleksandr
On 31.05.22 14:52, Krzysztof Kozlowski wrote: Hello Krzysztof On 30/05/2022 23:00, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Thank you for your patch. There is something to discuss/improve. diff --git a/Documentation/devicetree/bindings/iommu/xen,grant-dma.yaml b/Documentat

Re: [PATCH v3 2/3] xsm: consolidate loading the policy buffer

2022-05-31 Thread Daniel P. Smith
On 5/31/22 12:05, Jan Beulich wrote: > On 31.05.2022 17:08, Daniel P. Smith wrote: >> Previously, initializing the policy buffer was split between two functions, >> xsm_{multiboot,dt}_policy_init() and xsm_core_init(). The latter for loading >> the policy from boot modules and the former for fallin

Re: [PATCH v5 03/15] IOMMU/x86: support freeing of pagetables

2022-05-31 Thread Roger Pau Monné
On Fri, May 27, 2022 at 01:13:09PM +0200, Jan Beulich wrote: > For vendor specific code to support superpages we need to be able to > deal with a superpage mapping replacing an intermediate page table (or > hierarchy thereof). Consequently an iommu_alloc_pgtable() counterpart is > needed to free in

Re: [PATCH v3 1/3] xsm: only search for a policy file when needed

2022-05-31 Thread Daniel P. Smith
On 5/31/22 11:51, Jan Beulich wrote: > On 31.05.2022 17:08, Daniel P. Smith wrote: >> It is possible to select a few different build configurations that results in >> the unnecessary walking of the boot module list looking for a policy module. >> This specifically occurs when the flask policy is

Re: [PATCH v5 01/15] IOMMU/x86: restrict IO-APIC mappings for PV Dom0

2022-05-31 Thread Roger Pau Monné
On Tue, May 31, 2022 at 05:40:03PM +0200, Jan Beulich wrote: > On 31.05.2022 16:40, Roger Pau Monné wrote: > > On Fri, May 27, 2022 at 01:12:06PM +0200, Jan Beulich wrote: > >> @@ -289,44 +290,75 @@ static bool __hwdom_init hwdom_iommu_map > >> * that fall in unusable ranges for PV Dom0. > >>

Re: [PATCH v3 2/3] xsm: consolidate loading the policy buffer

2022-05-31 Thread Jan Beulich
On 31.05.2022 17:08, Daniel P. Smith wrote: > Previously, initializing the policy buffer was split between two functions, > xsm_{multiboot,dt}_policy_init() and xsm_core_init(). The latter for loading > the policy from boot modules and the former for falling back to built-in > policy. > > This pa

Re: [PATCH v5 02/15] IOMMU/x86: perform PV Dom0 mappings in batches

2022-05-31 Thread Roger Pau Monné
On Fri, May 27, 2022 at 01:12:48PM +0200, Jan Beulich wrote: > For large page mappings to be easily usable (i.e. in particular without > un-shattering of smaller page mappings) and for mapping operations to > then also be more efficient, pass batches of Dom0 memory to iommu_map(). > In dom0_constru

[linux-linus test] 170785: regressions - FAIL

2022-05-31 Thread osstest service owner
flight 170785 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/170785/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-dom0pvh-xl-amd 14 guest-start fail REGR. vs. 170714 test-amd64-amd64-do

Re: [PATCH v3 1/3] xsm: only search for a policy file when needed

2022-05-31 Thread Jan Beulich
On 31.05.2022 17:08, Daniel P. Smith wrote: > It is possible to select a few different build configurations that results in > the unnecessary walking of the boot module list looking for a policy module. > This specifically occurs when the flask policy is enabled but either the dummy > or the SILO p

Re: [PATCH v5 01/15] IOMMU/x86: restrict IO-APIC mappings for PV Dom0

2022-05-31 Thread Jan Beulich
On 31.05.2022 16:40, Roger Pau Monné wrote: > On Fri, May 27, 2022 at 01:12:06PM +0200, Jan Beulich wrote: >> While already the case for PVH, there's no reason to treat PV >> differently here, though of course the addresses get taken from another >> source in this case. Except that, to match CPU si

RE : Xen Project management working group

2022-05-31 Thread Marc Ungeschikts
Hello, Following previous meeting of the 18th May 2022, I updated the report in Cryptpad(https://cryptpad.fr/pad/#/2/pad/edit/jIxKbWO9tQYhWQHb4w+gcgpk/) For the next meeting, here is the doodle to pick the date : - https://doodle.com/meeting/participate/id/elYKAv7a Here are some home

Re: [PATCH v8 1/2] xsm: create idle domain privileged and demote after setup

2022-05-31 Thread Jan Beulich
On 31.05.2022 17:19, Daniel P. Smith wrote: > > On 5/31/22 11:16, Jan Beulich wrote: >> On 31.05.2022 16:56, Daniel P. Smith wrote: >>> There are new capabilities, dom0less and hyperlaunch, that introduce >>> internal >>> hypervisor logic, which needs to make resource allocation calls that are >>

Re: [PATCH v8 1/2] xsm: create idle domain privileged and demote after setup

2022-05-31 Thread Daniel P. Smith
On 5/31/22 11:16, Jan Beulich wrote: > On 31.05.2022 16:56, Daniel P. Smith wrote: >> There are new capabilities, dom0less and hyperlaunch, that introduce internal >> hypervisor logic, which needs to make resource allocation calls that are >> protected by XSM access checks. The need for these res

Re: [PATCH v8 1/2] xsm: create idle domain privileged and demote after setup

2022-05-31 Thread Jan Beulich
On 31.05.2022 16:56, Daniel P. Smith wrote: > There are new capabilities, dom0less and hyperlaunch, that introduce internal > hypervisor logic, which needs to make resource allocation calls that are > protected by XSM access checks. The need for these resource allocations are > necessary for dom0le

[PATCH v3 3/3] xsm: properly handle error from XSM init

2022-05-31 Thread Daniel P. Smith
This commit is to move towards providing a uniform interface across architectures to initialize the XSM framework. Specifically, it provides a common handling of initialization failure by providing the printing of a warning message. For Arm, xsm_dt_init() was tailored to have an Arm specific expan

[PATCH v3 2/3] xsm: consolidate loading the policy buffer

2022-05-31 Thread Daniel P. Smith
Previously, initializing the policy buffer was split between two functions, xsm_{multiboot,dt}_policy_init() and xsm_core_init(). The latter for loading the policy from boot modules and the former for falling back to built-in policy. This patch moves all policy buffer initialization logic under th

[PATCH v3 0/3] xsm: refactor and optimize policy loading

2022-05-31 Thread Daniel P. Smith
This series was born out of some cleanup work done while crafting the hyperlaunch boot modules patch series. The primary purpose of this series was to stop walking all boot modules when it was not necessary, but the scope creeped during review. Changes in v3: * added arm Rb for patch #3 * mainly a

[PATCH v3 1/3] xsm: only search for a policy file when needed

2022-05-31 Thread Daniel P. Smith
It is possible to select a few different build configurations that results in the unnecessary walking of the boot module list looking for a policy module. This specifically occurs when the flask policy is enabled but either the dummy or the SILO policy is selected as the enforcing policy. This is n

[PATCH v8 2/2] flask: implement xsm_set_system_active

2022-05-31 Thread Daniel P. Smith
This commit implements full support for starting the idle domain privileged by introducing a new flask label xenboot_t which the idle domain is labeled with at creation. It then provides the implementation for the XSM hook xsm_set_system_active to relabel the idle domain to the existing xen_t flas

[PATCH v8 1/2] xsm: create idle domain privileged and demote after setup

2022-05-31 Thread Daniel P. Smith
There are new capabilities, dom0less and hyperlaunch, that introduce internal hypervisor logic, which needs to make resource allocation calls that are protected by XSM access checks. The need for these resource allocations are necessary for dom0less and hyperlaunch when they are constructing the in

[PATCH v8 0/2] Adds starting the idle domain privileged

2022-05-31 Thread Daniel P. Smith
This series makes it so that the idle domain is started privileged under the default policy, which the SILO policy inherits, and under the flask policy. It then introduces a new one-way XSM hook, xsm_transition_running, that is hooked by an XSM policy to transition the idle domain to its running pr

Re: [PATCH] xen: Add MISRA support to cppcheck make rule

2022-05-31 Thread Bertrand Marquis
Hi, > On 31 May 2022, at 15:28, Jan Beulich wrote: > > On 31.05.2022 16:14, Bertrand Marquis wrote: >>> On 31 May 2022, at 14:50, Jan Beulich wrote: >>> On 31.05.2022 15:30, Bertrand Marquis wrote: +# Replace current by goal in the dependency to generate an analysis for all +# r

Re: [PATCH v5 01/15] IOMMU/x86: restrict IO-APIC mappings for PV Dom0

2022-05-31 Thread Roger Pau Monné
On Fri, May 27, 2022 at 01:12:06PM +0200, Jan Beulich wrote: > While already the case for PVH, there's no reason to treat PV > differently here, though of course the addresses get taken from another > source in this case. Except that, to match CPU side mappings, by default > we permit r/o ones. Thi

Re: [PATCH] xen: Add MISRA support to cppcheck make rule

2022-05-31 Thread Jan Beulich
On 31.05.2022 16:14, Bertrand Marquis wrote: >> On 31 May 2022, at 14:50, Jan Beulich wrote: >> On 31.05.2022 15:30, Bertrand Marquis wrote: >>> +# Replace current by goal in the dependency to generate an analysis for all >>> +# rules we would like to respect. >>> +cppcheck-misra.json cppcheck-mis

Re: [PATCH] xen: Add MISRA support to cppcheck make rule

2022-05-31 Thread Bertrand Marquis
Hi Jan, > On 31 May 2022, at 14:50, Jan Beulich wrote: > > On 31.05.2022 15:30, Bertrand Marquis wrote: >> --- a/.gitignore >> +++ b/.gitignore >> @@ -297,6 +297,8 @@ xen/.banner >> xen/.config >> xen/.config.old >> xen/.xen.elf32 >> +xen/cppcheck-misra.txt >> +xen/cppcheck-misra.json >> xen/xen

Re: [PATCH v2] tools/libs/ctrl: rename and export do_memory_op as xc_memory_op

2022-05-31 Thread Tamas K Lengyel
On Tue, May 31, 2022 at 9:43 AM Anthony PERARD wrote: > > On Thu, May 19, 2022 at 01:16:35PM -0400, Tamas K Lengyel wrote: > > Make the do_memory_op function accessible to tools linking with libxc. > > Similar functions are already available for both domctl and sysctl. As part > > of this patch we

Re: [RFC PATCH 1/4] kconfig: allow configuration of maximum modules

2022-05-31 Thread Jan Beulich
On 31.05.2022 15:52, Roger Pau Monné wrote: > On Tue, May 31, 2022 at 06:45:52AM -0400, Daniel P. Smith wrote: >> On 5/31/22 05:07, Bertrand Marquis wrote: >>> Hi Daniel, >> >> Greetings Bertrand. >> On 31 May 2022, at 03:41, Daniel P. Smith wrote: For x86 the number of allowa

Re: [RFC PATCH 1/4] kconfig: allow configuration of maximum modules

2022-05-31 Thread Roger Pau Monné
On Tue, May 31, 2022 at 06:45:52AM -0400, Daniel P. Smith wrote: > On 5/31/22 05:07, Bertrand Marquis wrote: > > Hi Daniel, > > Greetings Bertrand. > > >> On 31 May 2022, at 03:41, Daniel P. Smith > >> wrote: > >> > >> For x86 the number of allowable multiboot modules varies between the > >> d

Re: [PATCH] xen: Add MISRA support to cppcheck make rule

2022-05-31 Thread Jan Beulich
On 31.05.2022 15:30, Bertrand Marquis wrote: > --- a/.gitignore > +++ b/.gitignore > @@ -297,6 +297,8 @@ xen/.banner > xen/.config > xen/.config.old > xen/.xen.elf32 > +xen/cppcheck-misra.txt > +xen/cppcheck-misra.json > xen/xen-cppcheck.xml > xen/System.map > xen/arch/x86/boot/mkelf32 Pleas

[ovmf test] 170786: all pass - PUSHED

2022-05-31 Thread osstest service owner
flight 170786 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/170786/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf df1c7e91b46db364ba1ce5e21660987c29c35334 baseline version: ovmf fa2b212d61dfeb9c00a17

Re: [PATCH v2] tools/libs/ctrl: rename and export do_memory_op as xc_memory_op

2022-05-31 Thread Anthony PERARD
On Thu, May 19, 2022 at 01:16:35PM -0400, Tamas K Lengyel wrote: > Make the do_memory_op function accessible to tools linking with libxc. > Similar functions are already available for both domctl and sysctl. As part > of this patch we also change the input 'cmd' to be unsigned int to accurately > r

[PATCH] xen: Add MISRA support to cppcheck make rule

2022-05-31 Thread Bertrand Marquis
cppcheck MISRA addon can be used to check for non compliance to some of the MISRA standard rules. Add a CPPCHECK_MISRA variable that can be set to "y" using make command line to generate a cppcheck report including cppcheck misra checks. When MISRA checking is enabled, a file with a text descript

Re: [PATCH v4 7/8] xen/x86: add detection of memory interleaves for different nodes

2022-05-31 Thread Jan Beulich
On 23.05.2022 08:25, Wei Chen wrote: > @@ -119,20 +125,45 @@ int valid_numa_range(paddr_t start, paddr_t end, > nodeid_t node) > return 0; > } > > -static __init int conflicting_memblks(paddr_t start, paddr_t end) > +static > +enum conflicts __init conflicting_memblks(nodeid_t nid, paddr_

[qemu-mainline test] 170783: tolerable FAIL - PUSHED

2022-05-31 Thread osstest service owner
flight 170783 qemu-mainline real [real] flight 170787 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/170783/ http://logs.test-lab.xenproject.org/osstest/logs/170787/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-am

Re: [PATCH] MAINTAINERS: Update Xen maintainership

2022-05-31 Thread Juergen Gross
On 27.05.22 19:57, Boris Ostrovsky wrote: Due to time constraints I am stepping down as maintainter. I will stay as reviewer for x86 code (for which create a separate category). Stefano is now maintainer for Xen hypervisor interface and Oleksandr has graciously agreed to become a reviewer. Sign

Re: [PATCH] xen/netback: fix incorrect usage of RING_HAS_UNCONSUMED_REQUESTS()

2022-05-31 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (master) by Paolo Abeni : On Mon, 30 May 2022 13:34:59 +0200 you wrote: > Commit 6fac592cca60 ("xen: update ring.h") missed to fix one use case > of RING_HAS_UNCONSUMED_REQUESTS(). > > Reported-by: Jan Beulich > Fixes: 6fac592cca60 ("xen: update r

Re: [PATCH V3 5/8] dt-bindings: Add xen,grant-dma IOMMU description for xen-grant DMA ops

2022-05-31 Thread Krzysztof Kozlowski
On 30/05/2022 23:00, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko Thank you for your patch. There is something to discuss/improve. > diff --git a/Documentation/devicetree/bindings/iommu/xen,grant-dma.yaml > b/Documentation/devicetree/bindings/iommu/xen,grant-dma.yaml > new file mode

Re: [PATCH v7 1/2] xsm: create idle domain privileged and demote after setup

2022-05-31 Thread Daniel P. Smith
On 5/31/22 03:56, Roger Pau Monné wrote: > On Wed, May 11, 2022 at 07:30:34AM -0400, Daniel P. Smith wrote: >> There are new capabilities, dom0less and hyperlaunch, that introduce internal >> hypervisor logic which needs to make resource allocation calls that are >> protected by XSM access checks

Re: [RFC PATCH 2/2] tools/misc: Add xen-stats tool

2022-05-31 Thread Anthony PERARD
Hi Matias, On Tue, May 17, 2022 at 04:33:15PM +0200, Matias Ezequiel Vara Larsen wrote: > Add a demostration tool that uses the stats_table resource to > query vcpu time for a DomU. > > Signed-off-by: Matias Ezequiel Vara Larsen > --- > diff --git a/tools/misc/Makefile b/tools/misc/Makefile > in

Re: [RFC PATCH 1/4] kconfig: allow configuration of maximum modules

2022-05-31 Thread Daniel P. Smith
On 5/31/22 06:49, Bertrand Marquis wrote: > Hi Daniel, > >> On 31 May 2022, at 11:45, Daniel P. Smith >> wrote: >> >> On 5/31/22 05:07, Bertrand Marquis wrote: >>> Hi Daniel, >> >> Greetings Bertrand. >> On 31 May 2022, at 03:41, Daniel P. Smith wrote: For x86 the number

Re: [RFC PATCH 1/4] kconfig: allow configuration of maximum modules

2022-05-31 Thread Daniel P. Smith
On 5/31/22 05:25, Julien Grall wrote: > Hi, > > On 31/05/2022 03:41, Daniel P. Smith wrote: >> diff --git a/xen/arch/Kconfig b/xen/arch/Kconfig >> index f16eb0df43..57b14e22c9 100644 >> --- a/xen/arch/Kconfig >> +++ b/xen/arch/Kconfig >> @@ -17,3 +17,15 @@ config NR_CPUS >>     For CPU cores w

Re: [RFC PATCH 1/4] kconfig: allow configuration of maximum modules

2022-05-31 Thread Bertrand Marquis
Hi Daniel, > On 31 May 2022, at 11:45, Daniel P. Smith > wrote: > > On 5/31/22 05:07, Bertrand Marquis wrote: >> Hi Daniel, > > Greetings Bertrand. > >>> On 31 May 2022, at 03:41, Daniel P. Smith >>> wrote: >>> >>> For x86 the number of allowable multiboot modules varies between the >>> d

[libvirt test] 170784: regressions - FAIL

2022-05-31 Thread osstest service owner
flight 170784 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/170784/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-libvirt 6 libvirt-buildfail REGR. vs. 151777 build-amd64-libvirt

Re: [RFC PATCH 1/4] kconfig: allow configuration of maximum modules

2022-05-31 Thread Daniel P. Smith
On 5/31/22 05:07, Bertrand Marquis wrote: > Hi Daniel, Greetings Bertrand. >> On 31 May 2022, at 03:41, Daniel P. Smith >> wrote: >> >> For x86 the number of allowable multiboot modules varies between the >> different >> entry points, non-efi boot, pvh boot, and efi boot. In the case of both A

[PATCH v2 2/4] xen/arm: Add sb instruction support

2022-05-31 Thread Bertrand Marquis
This patch is adding sb instruction support when it is supported by a CPU on arm64. A new cpu feature capability system is introduced to enable alternative code using sb instruction when it is supported by the processor. This is decided based on the isa64 system register value and use a new hardwar

[PATCH v2 3/4] arm: add ISAR2, MMFR0 and MMFR1 fields in cpufeature

2022-05-31 Thread Bertrand Marquis
Complete AA64ISAR2 and AA64MMFR[0-1] with more fields. While there add a comment for MMFR bitfields as for other registers in the cpuinfo structure definition. Signed-off-by: Bertrand Marquis --- Changes in v2: - patch introduced to isolate changes in cpufeature.h - complete MMFR0 and ISAR2 to sy

[PATCH v2 4/4] arm: Define kconfig symbols used by arm64 cpufeatures

2022-05-31 Thread Bertrand Marquis
Define kconfig symbols which are used by arm64 cpufeatures to prevent using undefined symbols and rely on IS_ENABLED returning false. All the features related to those symbols are unsupported by Xen: - pointer authentication - sve - memory tagging - branch target identification Signed-off-by: Bert

[PATCH v2 0/4] Spectre BHB follow up

2022-05-31 Thread Bertrand Marquis
Following up the handling of Spectre BHB on Arm (XSA-398), this serie contain several changes which were not needed in the XSA patches but should be done in Xen: - Sync sysregs and cpuinfo with latest version of Linux (5.18-rc3) - Add new fields inside cpufeature - Add sb instruction support. Some

[PATCH v2 1/4] xen/arm: Sync sysregs and cpuinfo with Linux 5.18-rc3

2022-05-31 Thread Bertrand Marquis
Sync existing ID registers sanitization with the status of Linux kernel version 5.18-rc3 and add sanitization of ISAR2 registers. Sync sysregs.h bit shift defintions with the status of Linux kernel version 5.18-rc3. Changes in this patch are splitted in a number of patches in Linux kernel and, as

Re: [v2 0/3] xsm: refactor and optimize policy loading

2022-05-31 Thread Daniel P. Smith
On 5/31/22 04:25, Jan Beulich wrote: > On 31.05.2022 04:39, Daniel P. Smith wrote: >> This series was born out of some cleanup work done while crafting the >> hyperlaunch boot modules patch series. The primary purpose of this series was >> to stop walking all boot modules when it was not necessary,

Re: [PATCH v5 9/9] xen: retrieve reserved pages on populate_physmap

2022-05-31 Thread Julien Grall
Hi, On 31/05/2022 10:40, Jan Beulich wrote: On 31.05.2022 11:35, Julien Grall wrote: On 31/05/2022 09:54, Jan Beulich wrote: On 31.05.2022 05:12, Penny Zheng wrote: --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -245,6 +245,29 @@ static void populate_physmap(struct memop_args *a)

Re: [PATCH 1/2] docs/misra: introduce rules.rst

2022-05-31 Thread Julien Grall
Hi, On 30/05/2022 14:35, Bertrand Marquis wrote: Obviously something *else* we might want is a more convenient way to keep that rationale for the future, when we start to officially document deviations. Given that the scanner will point out all the places where deviations happen, I don’t thi

Re: [PATCH v5 9/9] xen: retrieve reserved pages on populate_physmap

2022-05-31 Thread Jan Beulich
On 31.05.2022 11:35, Julien Grall wrote: > On 31/05/2022 09:54, Jan Beulich wrote: >> On 31.05.2022 05:12, Penny Zheng wrote: >>> --- a/xen/common/memory.c >>> +++ b/xen/common/memory.c >>> @@ -245,6 +245,29 @@ static void populate_physmap(struct memop_args *a) >>> >>> mfn = _m

Re: [PATCH v5 9/9] xen: retrieve reserved pages on populate_physmap

2022-05-31 Thread Julien Grall
Hi Jan, On 31/05/2022 09:54, Jan Beulich wrote: On 31.05.2022 05:12, Penny Zheng wrote: --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -245,6 +245,29 @@ static void populate_physmap(struct memop_args *a) mfn = _mfn(gpfn); } +else if ( is_d

Re: [RFC PATCH 1/4] kconfig: allow configuration of maximum modules

2022-05-31 Thread Julien Grall
Hi, On 31/05/2022 03:41, Daniel P. Smith wrote: diff --git a/xen/arch/Kconfig b/xen/arch/Kconfig index f16eb0df43..57b14e22c9 100644 --- a/xen/arch/Kconfig +++ b/xen/arch/Kconfig @@ -17,3 +17,15 @@ config NR_CPUS For CPU cores which support Simultaneous Multi-Threading or similar

Re: [v2 3/3] xsm: properly handle error from XSM init

2022-05-31 Thread Bertrand Marquis
Hi Daniel, > On 31 May 2022, at 03:39, Daniel P. Smith > wrote: > > This commit is to move towards providing a uniform interface across > architectures to initialize the XSM framework. Specifically, it provides a > common handling of initialization failure by providing the printing of a > warni

[xen-unstable test] 170780: tolerable FAIL

2022-05-31 Thread osstest service owner
flight 170780 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/170780/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-xl-qemut-debianhvm-i386-xsm 12 debian-hvm-install fail in 170772 pass in 170780 test-amd64-amd

Re: [RFC PATCH 1/4] kconfig: allow configuration of maximum modules

2022-05-31 Thread Bertrand Marquis
Hi Daniel, > On 31 May 2022, at 03:41, Daniel P. Smith > wrote: > > For x86 the number of allowable multiboot modules varies between the different > entry points, non-efi boot, pvh boot, and efi boot. In the case of both Arm > and > x86 this value is fixed to values based on generalized assump

Re: [RFC PATCH 4/6] xen/riscv: Add sbi.c, sbi.h

2022-05-31 Thread Jan Beulich
On 31.05.2022 10:59, Xie Xun wrote: > On Tue, 31 May 2022 at 15:54, Jan Beulich wrote: >> On 31.05.2022 08:57, Xie Xun wrote: >>> Signed-off-by: Xie Xun >> >> Is this correct / complete, considering > > Thank you for pointing out this problem. > > I have read the submitting guide > https:/

Re: [PATCH 1/1] tools/symbols: fix memory leak in build_initial_tok_table()

2022-05-31 Thread Jan Beulich
On 31.05.2022 10:23, Yuanjun Gong wrote: > Free the table[i].sym field of the invalid sym_entry since > it is malloc'ed data. It would help if you said whether this was just an observation from e.g. static code analysis vs you actually having observed the tool running out of memory. This is a shor

Re: [RFC PATCH 4/6] xen/riscv: Add sbi.c, sbi.h

2022-05-31 Thread Xie Xun
Hi Jan, On Tue, 31 May 2022 at 15:54, Jan Beulich wrote: > > On 31.05.2022 08:57, Xie Xun wrote: > > Signed-off-by: Xie Xun > > Is this correct / complete, considering Thank you for pointing out this problem. I have read the submitting guide https://wiki.xenproject.org/wiki/Submitting_Xen

Re: [PATCH v5 9/9] xen: retrieve reserved pages on populate_physmap

2022-05-31 Thread Jan Beulich
On 31.05.2022 05:12, Penny Zheng wrote: > --- a/xen/common/memory.c > +++ b/xen/common/memory.c > @@ -245,6 +245,29 @@ static void populate_physmap(struct memop_args *a) > > mfn = _mfn(gpfn); > } > +else if ( is_domain_using_staticmem(d) ) > +

Re: [PATCH v5 8/9] xen: introduce prepare_staticmem_pages

2022-05-31 Thread Jan Beulich
On 31.05.2022 05:12, Penny Zheng wrote: > Later, we want to use acquire_domstatic_pages() for populating memory > for static domain on runtime, however, there are a lot of pointless work > (checking mfn_valid(), scrubbing the free part, cleaning the cache...) > considering we know the page is valid

  1   2   >