Re: [XEN][PATCH v12 20/20] tools/xl: Add new xl command overlay for device tree overlay support

2023-09-06 Thread Michal Orzel
On 06/09/2023 08:55, Jan Beulich wrote: > > > On 06.09.2023 03:16, Vikram Garhwal wrote: >> --- a/tools/xl/xl_vmcontrol.c >> +++ b/tools/xl/xl_vmcontrol.c >> @@ -1265,6 +1265,58 @@ int main_create(int argc, char **argv) >> return 0; >> } >> >> +int main_dt_overlay(int argc, char **argv)

Re: xen | Failed pipeline for staging-4.17 | 699de512

2023-09-05 Thread Michal Orzel
On 05/09/2023 10:36, Jan Beulich wrote: > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > On 05.09.2023 10:23, GitLab wrote: >> >> >> Pipeline #992747061 has failed! >> >> Project: xen (

[PATCH v2 1/2] xen/arm: smmuv3: Add missing U for shifted constant

2023-09-05 Thread Michal Orzel
there, also fix the same in GBPA_UPDATE. This should address MISRA Rule 7.2: A "u" or "U" suffix shall be applied to all integer constants that are represented in an unsigned type Signed-off-by: Michal Orzel Reviewed-by: Bertrand Marquis --- Changes in v2: - add Be

[PATCH v2 0/2] xen: fixes for UBSAN findings with SMMUv3 enabled

2023-09-05 Thread Michal Orzel
This series contains fixes for UBSAN findings reported when running with SMMUv3 enabled. Michal Orzel (2): xen/arm: smmuv3: Add missing U for shifted constant xen: Change parameter of generic_{fls,ffs}() to unsigned int xen/drivers/passthrough/arm/smmu-v3.h | 4 ++-- xen/include/xen

[PATCH v2 2/2] xen: Change parameter of generic_{fls,ffs}() to unsigned int

2023-09-05 Thread Michal Orzel
meter to unsigned int") To keep consistency between the helpers, take the opportunity to: - replace __inline__ with inline, - modify generic_ffs() to take parameter of type unsigned int as well (currently no user and the only wrapper generic_ffsl() passes unsigned long). Signed-off-by: Mi

Re: [PATCH 2/2] xen: Change parameter of generic_fls() to unsigned int

2023-09-04 Thread Michal Orzel
On 04/09/2023 15:28, Jan Beulich wrote: > > > On 04.09.2023 11:14, Michal Orzel wrote: >> --- a/xen/include/xen/bitops.h >> +++ b/xen/include/xen/bitops.h >> @@ -51,7 +51,7 @@ static inline int generic_ffs(int x) >> * fls: find last bit set. >> */ &

Re: [XEN][PATCH v11 15/20] arm/asm/setup.h: Update struct map_range_data to add rangeset.

2023-09-04 Thread Michal Orzel
_to_domain(struct domain *d, >struct dt_device_node *dev, > - bool need_mapping) > + bool need_mapping, > + struct rangeset *irq_ranges) > { > unsigned int i, nirq;

Re: [XEN][PATCH v11 14/20] common/device_tree: Add rwlock for dt_host

2023-09-04 Thread Michal Orzel
rite access. > > Signed-off-by: Vikram Garhwal > Reviewed-by: Michal Orzel > --- > Changes from v10: > Add ASSERT for iommu_assign_dt_device() and iommu_add_dt_device(). > Changes from v9: > Update commit message and fix indentation. > Add ASSERT() for iommu

Re: [XEN][PATCH v11 12/20] xen/smmu: Add remove_device callback for smmu_iommu ops

2023-09-04 Thread Michal Orzel
On 01/09/2023 06:59, Vikram Garhwal wrote: > Add remove_device callback for removing the device entry from smmu-master > using > following steps: > 1. Find if SMMU master exists for the device node. > 2. Check if device is currently in use. Just like in v10: you are not checking it. I asked

Re: [XEN][PATCH v11 11/20] xen/iommu: Introduce iommu_remove_dt_device()

2023-09-04 Thread Michal Orzel
om the IOMMU. > + * > + * Return values: > + * 0 : device is de-registerd from IOMMU. s/registerd/registered/ > + * <0 : error while removing the device from IOMMU. > + * >0 : IOMMU is not enabled/present or device is not connected to it. The first part refers to "iommu_enabled" but I cannot see how you check for the second part (and return >0). Apart from that: Reviewed-by: Michal Orzel ~Michal

[PATCH 1/2] xen/arm: smmuv3: Add missing U for shifted constant

2023-09-04 Thread Michal Orzel
there, also fix the same in GBPA_UPDATE. This should address MISRA Rule 7.2: A "u" or "U" suffix shall be applied to all integer constants that are represented in an unsigned type Signed-off-by: Michal Orzel --- xen/drivers/passthrough/arm/smmu-v3.h | 4 ++-- 1 file c

[PATCH 2/2] xen: Change parameter of generic_fls() to unsigned int

2023-09-04 Thread Michal Orzel
meter to unsigned int") Signed-off-by: Michal Orzel --- It looks like generic_fls() is only used by Arm and invoked only if the arguement passed is a compile time constant. This is true for SMMUv3 which makes use of ffs64() in FIELD_{PREP,GET} macros. --- xen/include/xen/bitops.h | 2 +- 1 file

[PATCH 0/2] xen: fixes for UBSAN findings with SMMUv3 enabled

2023-09-04 Thread Michal Orzel
This series contains fixes for UBSAN findings reported when running with SMMUv3 enabled. Michal Orzel (2): xen/arm: smmuv3: Add missing U for shifted constant xen: Change parameter of generic_fls() to unsigned int xen/drivers/passthrough/arm/smmu-v3.h | 4 ++-- xen/include/xen/bitops.h

Re: [XEN][PATCH v10 11/20] xen/iommu: Introduce iommu_remove_dt_device()

2023-08-31 Thread Michal Orzel
On 31/08/2023 09:23, Michal Orzel wrote: > > > On 30/08/2023 19:48, Vikram Garhwal wrote: >> Hi Michal, >> On Tue, Aug 29, 2023 at 10:23:30AM +0200, Michal Orzel wrote: >>> >>> >>> On 25/08/2023 10:02, Vikram Garhwal wrote: >>>> Re

Re: [XEN][PATCH v10 11/20] xen/iommu: Introduce iommu_remove_dt_device()

2023-08-31 Thread Michal Orzel
On 30/08/2023 19:48, Vikram Garhwal wrote: > Hi Michal, > On Tue, Aug 29, 2023 at 10:23:30AM +0200, Michal Orzel wrote: >> >> >> On 25/08/2023 10:02, Vikram Garhwal wrote: >>> Remove master device from the IOMMU. This will be helpful when removing the >>&g

Re: [XEN][PATCH v10 12/20] xen/smmu: Add remove_device callback for smmu_iommu ops

2023-08-30 Thread Michal Orzel
On 30/08/2023 00:45, Stefano Stabellini wrote: > > > On Tue, 29 Aug 2023, Michal Orzel wrote: >> On 25/08/2023 10:02, Vikram Garhwal wrote: >>> Add remove_device callback for removing the device entry from smmu-master >>> using >>> followin

Re: [XEN][PATCH v10 15/20] arm/asm/setup.h: Update struct map_range_data to add rangeset.

2023-08-29 Thread Michal Orzel
On 25/08/2023 10:02, Vikram Garhwal wrote: > Add rangesets for IRQs and IOMEMs. This was done to accommodate dynamic > overlay > node addition/removal operations. With overlay operations, new IRQs and IOMEMs > are added in dt_host and routed. While removing overlay nodes, nodes are > remove

Re: [XEN][PATCH v10 14/20] common/device_tree: Add rwlock for dt_host

2023-08-29 Thread Michal Orzel
rogramming is modifying >it. rwlock is better suitable for this task as spinlock won't be able > to >differentiate between read and write access. > > Signed-off-by: Vikram Garhwal Apart from that, the patch itself looks good: Reviewed-by: Michal Orzel althoug

Re: [XEN][PATCH v10 12/20] xen/smmu: Add remove_device callback for smmu_iommu ops

2023-08-29 Thread Michal Orzel
On 25/08/2023 10:02, Vikram Garhwal wrote: > > > Add remove_device callback for removing the device entry from smmu-master > using > following steps: > 1. Find if SMMU master exists for the device node. > 2. Check if device is currently in use. Since you removed a call to

Re: [XEN][PATCH v10 11/20] xen/iommu: Introduce iommu_remove_dt_device()

2023-08-29 Thread Michal Orzel
On 25/08/2023 10:02, Vikram Garhwal wrote: > Remove master device from the IOMMU. This will be helpful when removing the > overlay nodes using dynamic programming during run time. > > Signed-off-by: Vikram Garhwal > Acked-by: Jan Beulich You don't seem to handle Julien remarks for this

Re: [XEN][PATCH v10 09/20] xen/iommu: Move spin_lock from iommu_dt_device_is_assigned to caller

2023-08-29 Thread Michal Orzel
dt_node_full_name(dev)); > ret = -EINVAL; > } > + > +spin_unlock(_lock); > break; > } > > +spin_unlock(_lock); You could then remove this one. With the remarks addressed: Reviewed-by: Michal Orzel ~Michal

Re: [XEN][PATCH v10 08/20] xen/device-tree: Add device_tree_find_node_by_path() to find nodes in device tree

2023-08-29 Thread Michal Orzel
node_by_path() static inline. > > Signed-off-by: Vikram Garhwal With the remarks addressed: Reviewed-by: Michal Orzel ~Michal

Re: [XEN][PATCH v10 05/20] xen/arm: Add CONFIG_OVERLAY_DTB

2023-08-29 Thread Michal Orzel
support > for > Arm. > > Signed-off-by: Vikram Garhwal > Acked-by: Henry Wang > Reviewed-by: Michal Orzel > > --- > Changes from v9: > Fix style. > Changes from v7: > Add this feature as "experimental support" in CHANGELOG.md > --- > --- &g

Re: [XEN][PATCH v10 03/20] xen/arm/device: Remove __init from function type

2023-08-29 Thread Michal Orzel
> + */ > +static int map_device_children(const struct dt_device_node *dev, > + struct map_range_data *mr_data) Parameter is not aligned. [...] > diff --git a/xen/arch/arm/include/asm/setup.h > b/xen/arch/arm/include/asm/setup.h > index 19dc637d55..1a052ed924 100644 > --- a/xen/arch/arm/include/asm/setup.h > +++ b/xen/arch/arm/include/asm/setup.h > @@ -165,9 +165,18 @@ void device_tree_get_reg(const __be32 **cell, uint32_t > address_cells, > u32 device_tree_get_u32(const void *fdt, int node, > const char *prop_name, u32 dflt); > > +int handle_device(struct domain *d, struct dt_device_node *dev, p2m_type_t > p2mt, > + struct rangeset *iomem_ranges, struct rangeset > *irq_ranges); Remove the rangeset parameters. AFAIK you'll introduce it later, so this is a mistake causing the build to fail. > + > +int handle_device_interrupts(struct domain *d, struct dt_device_node *dev, > + bool need_mapping); Don't forget to rename. With all the remarks above addressed: Reviewed-by: Michal Orzel ~Michal

Re: [XEN][PATCH v10 02/20] common/device_tree.c: unflatten_device_tree() propagate errors

2023-08-29 Thread Michal Orzel
On 25/08/2023 10:02, Vikram Garhwal wrote: > This will be useful in dynamic node programming when new dt nodes are > unflattend > during runtime. Invalid device tree node related errors should be propagated > back to the caller. > > Signed-off-by: Vikram Garhwal Reviewe

Re: xen-analysis ECLAIR support

2023-08-25 Thread Michal Orzel
Hi Stefano, On 25/08/2023 00:24, Stefano Stabellini wrote: > > > Hi Luca, > > We are looking into adding ECLAIR support for xen-analysis so that we > can use the SAF-n-safe tags also with ECLAIR. > > One question that came up is about multi-line statements. For instance, > in a case like the

Re: [PATCH] xen/arm: Handle empty grant table region in find_unallocated_memory()

2023-08-24 Thread Michal Orzel
Hi Julien, On 24/08/2023 11:10, Julien Grall wrote: > > > Hi, > > On 24/08/2023 10:06, Michal Orzel wrote: >> When creating dom0 with grant table support disabled in Xen and no IOMMU, >> the following assert is triggered (debug build): >> "Assertion 's

[PATCH] xen/arm: Handle empty grant table region in find_unallocated_memory()

2023-08-24 Thread Michal Orzel
_remove_range() for an empty grant table region. Fix it by checking if the size of region is not 0. Signed-off-by: Michal Orzel --- xen/arch/arm/domain_build.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_

Re: [XEN PATCH v2] arm64/vfp: address MISRA C:2012 Dir 4.3

2023-08-24 Thread Michal Orzel
16 * 6]\n\t" > - "ldp q8, q9, [%1, #16 * 8]\n\t" > - "ldp q10, q11, [%1, #16 * 10]\n\t" > - "ldp q12, q13, [%1, #16 * 12]\n\t" > - "ldp q14, q15, [%1, #16 * 14]\n\t" > - "ldp q16, q17, [%1, #16 * 16]\n\t" > - "ldp q18, q19, [%1, #16 * 18]\n\t" > - "ldp q20, q21, [%1, #16 * 20]\n\t" > - "ldp q22, q23, [%1, #16 * 22]\n\t" > - "ldp q24, q25, [%1, #16 * 24]\n\t" > - "ldp q26, q27, [%1, #16 * 26]\n\t" > - "ldp q28, q29, [%1, #16 * 28]\n\t" > - "ldp q30, q31, [%1, #16 * 30]\n\t" > - : : "Q" (*v->arch.vfp.fpregs), "r" > (v->arch.vfp.fpregs)); > +restore_state(v->arch.vfp.fpregs); > } > > WRITE_SYSREG(v->arch.vfp.fpsr, FPSR); Apart from that (up to maintainers if it can be done on commit): Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v3 0/8] Follow-up static shared memory PART I

2023-08-22 Thread Michal Orzel
Hi Penny, On 22/08/2023 07:32, Penny Zheng wrote: > > > Hi, michal > > On 2023/8/21 18:49, Michal Orzel wrote: >> Hi Penny, >> >> On 21/08/2023 06:00, Penny Zheng wrote: >>> >>> >>> There are some unsolving issues on current 4.17 st

Re: [PATCH v3 0/8] Follow-up static shared memory PART I

2023-08-21 Thread Michal Orzel
Hi Penny, On 21/08/2023 06:00, Penny Zheng wrote: > > > There are some unsolving issues on current 4.17 static shared memory > feature[1], including: > - In order to avoid keeping growing 'membank', having the shared memory > info in separate structures is preferred. > - Missing implementation

Re: [PATCH 2/3] xen/arm: vgic: Use 'unsigned int' rather than 'int' whenever it is possible

2023-08-18 Thread Michal Orzel
r > index) are always positive. It looks like you forgot to mention the modification done to 'vgic_get_rank()' With this addressed: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 3/3] automation: update jobs to use Debian Bookworm instead of unstable

2023-08-14 Thread Michal Orzel
On 12/08/2023 04:06, Stefano Stabellini wrote: > > > From: Stefano Stabellini > > Signed-off-by: Stefano Stabellini Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 2/3] automation: update test-artifacts to use Debian Bookworm instead of unstable

2023-08-14 Thread Michal Orzel
On 12/08/2023 04:06, Stefano Stabellini wrote: > > > From: Stefano Stabellini > > Signed-off-by: Stefano Stabellini Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 1/3] automation: switch from Debian unstable to bookworm

2023-08-14 Thread Michal Orzel
more. > > Signed-off-by: Stefano Stabellini You should also update "containerize" script to keep it up-to-date to allow making use of the newly created containers. With that fixed (no need for respin): Reviewed-by: Michal Orzel ~Michal

[PATCH 0/2] xen/arm: fixes around device tree generation

2023-08-10 Thread Michal Orzel
Michal Orzel (2): xen/arm: Fix initrd placeholders generation in make_chosen_node() xen/arm: Skip inclusion of domU nodes into hwdom dt /chosen node xen/arch/arm/domain_build.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.25.1

[PATCH 2/2] xen/arm: Skip inclusion of domU nodes into hwdom dt /chosen node

2023-08-10 Thread Michal Orzel
it by adding "xen,domain" compatible into the list of nodes to skip in handle_node(). Signed-off-by: Michal Orzel --- xen/arch/arm/domain_build.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index c6881de8bd85..54bf5623c

[PATCH 1/2] xen/arm: Fix initrd placeholders generation in make_chosen_node()

2023-08-10 Thread Michal Orzel
for presence of kernel bootmodule (always present) instead of initrd bootmodule. Fix it along with renaming the variable from "mod" to "initrd" to prevent similar mistakes in the future. Fixes: 48f4bf6bdeb4 ("arm/acpi: Create min DT stub for Dom0") Signed-off-by: M

Re: [PATCH 2/2] automation: use Alpine 3.18 instead of 3.12 for all gitlab jobs

2023-08-10 Thread Michal Orzel
Hi Stefano, On 10/08/2023 03:18, Stefano Stabellini wrote: > > > From: Stefano Stabellini > > Signed-off-by: Stefano Stabellini Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 1/2] automation: upgrade Alpine build and test artifact containers to 3.18

2023-08-10 Thread Michal Orzel
Hi Stefano, On 10/08/2023 03:18, Stefano Stabellini wrote: > > > From: Stefano Stabellini > > Alpine 3.12 is EOL. Also update the containerize script. > > Signed-off-by: Stefano Stabellini You could mention the python upgrade in alpine test artifacts. Reviewed-by: Michal Orzel ~Michal

Re: Moving Dom0less to common, Was: [PATCH 0/5] Fine granular configuration

2023-08-10 Thread Michal Orzel
On 09/08/2023 21:51, Stefano Stabellini wrote: > > > Adding hyperlaunch and x86 maintainers. > > > Hi Luca, > > This patch series is very timely. You might not have realized but we > were just discussing with the hyperlaunch guys to move dom0less code to > common. > > Your series is a

[PATCH] xen/arm64: head: Introduce a helper to flush local TLBs

2023-08-08 Thread Michal Orzel
in enable_mmu more clear and consistent. Signed-off-by: Michal Orzel --- xen/arch/arm/arm64/head.S | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S index 31cdb54d74e5..8bca9afa27b2 100644 --- a/xen

[PATCH] automation: Fix missing smoke.serial in artifacts of qemu arm32 jobs

2023-08-08 Thread Michal Orzel
binaries/. Fix it so that smoke.serial gets created in project directory just like for every other test job. Signed-off-by: Michal Orzel --- automation/scripts/qemu-smoke-dom0-arm32.sh | 8 +--- automation/scripts/qemu-smoke-dom0less-arm32.sh | 8 +--- 2 files changed, 10 insertions(+), 6

[PATCH] automation: Advertise that ECLAIR jobs do not need prerequisites

2023-08-07 Thread Michal Orzel
While not required today (ECLAIR jobs come first), add "needs: []" for future-proofing and consistency with other jobs in the pipeline. Signed-off-by: Michal Orzel --- automation/gitlab-ci/analyze.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/automation/gitlab-ci/analy

Re: [PATCH] automation: add missing "needs"

2023-08-04 Thread Michal Orzel
for previous jobs (ECLAIR jobs) to complete > before continuing. > > Signed-off-by: Stefano Stabellini Reviewed-by: Michal Orzel Looking at the whole pipeline, I can see that now only ECLAIR jobs do not specify needs. Shouldn't we also add "needs: []" for them? ~Michal

Re: [PATCH v2 1/2] docs: update hyperlaunch device tree

2023-08-04 Thread Michal Orzel
Hi Daniel, On 03/08/2023 18:57, Daniel P. Smith wrote: > > > On 8/3/23 07:45, Michal Orzel wrote: >> Hi Daniel, >> >> On 03/08/2023 12:44, Daniel P. Smith wrote: >>> >>> >>> With on going development of hyperlaunch, changes to the device tre

Re: [PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-04 Thread Michal Orzel
is required only when using > GICv2 driver, otherwise using the GICv3 driver it is optional and can > be deselected if the user doesn't want to offer the v2 emulation to > domains or maybe its GICv3 hardware can't offer the GICv2 compatible > mode. > > Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v2 2/2] fdt: make fdt handling reusable across arch

2023-08-03 Thread Michal Orzel
Hi Daniel, On 03/08/2023 12:44, Daniel P. Smith wrote: > > > This refactors reusable code from Arm's bootfdt.c and device-tree.h that is > general fdt handling code. The Kconfig parameter CORE_DEVICE_TREE is IIUC, you just try to untangle the code for fdt from dt (unflattened).

Re: [PATCH v2 1/2] docs: update hyperlaunch device tree

2023-08-03 Thread Michal Orzel
Hi Daniel, On 03/08/2023 12:44, Daniel P. Smith wrote: > > > With on going development of hyperlaunch, changes to the device tree > definitions > has been necessary. This commit updates the specification for all current > changes > along with changes expected to be made in finalizing the

Re: [RFC PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-03 Thread Michal Orzel
On 03/08/2023 09:35, Julien Grall wrote: > > > Hi, > > On 03/08/2023 08:15, Michal Orzel wrote: >> On 02/08/2023 19:39, Julien Grall wrote: >>> >>> >>> Hi Luca, >>> >>> On 02/08/2023 16:05, Luca Fancellu wrote:

Re: [RFC PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-03 Thread Michal Orzel
On 02/08/2023 19:39, Julien Grall wrote: > > > Hi Luca, > > On 02/08/2023 16:05, Luca Fancellu wrote: >>> On 2 Aug 2023, at 15:48, Michal Orzel wrote: >>> >>> Hi, >>> >>> On 02/08/2023 16:42, Luca Fancellu wrote: >>>>

Re: [RFC PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-02 Thread Michal Orzel
Hi, On 02/08/2023 16:42, Luca Fancellu wrote: > > >> On 2 Aug 2023, at 15:26, Michal Orzel wrote: >> >> Hi Luca, >> >> On 02/08/2023 15:53, Luca Fancellu wrote: >>> >>> >>> Introduce Kconfig GICV2 to be able to compile the GIC

Re: [RFC PATCH] arm/gicv2: make GICv2 driver and vGICv2 optional

2023-08-02 Thread Michal Orzel
Hi Luca, On 02/08/2023 15:53, Luca Fancellu wrote: > > > Introduce Kconfig GICV2 to be able to compile the GICv2 driver only > when needed, the option is active by default. > > Introduce Kconfig VGICV2 that depends on GICV2 or GICV3 and compiles > the GICv2 emulation for guests, it is required

Re: [PATCH v2] arm32: Avoid using solaris syntax for .section directive

2023-08-02 Thread Michal Orzel
sourceware.org/bugzilla/show_bug.cgi?id=11601 > [2] https://sourceware.org/binutils/docs-2.41/as.html#Section > > Signed-off-by: Khem Raj With the changes suggested by Julien: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH] arm32: Avoid using solaris syntax for .section directive

2023-08-01 Thread Michal Orzel
Hi, On 01/08/2023 02:28, Khem Raj wrote: > > > Assembler from binutils 2.41 rejects this syntax > > .section "name"[, flags...] > > where flags could be #alloc, #write, #execstr s/execstr/execinstr + there is also #exclude and #tls if you want to list them all > Switch to using ELF syntax >

Re: [PATCH 2/2] xen/arm: Account for domU dtb bootmodule size separately

2023-07-14 Thread Michal Orzel
Hi Julien, On 13/07/2023 20:15, Julien Grall wrote: > > > On 12/07/2023 08:01, Michal Orzel wrote: >> Hi Julien, > > Hi Michal, >> >> On 11/07/2023 18:07, Julien Grall wrote: >>> >>> >>> Hi Michal, >>> >>> On 11/

Re: [PATCH] docs: Fix style in misc/arm/silicon-errata.txt table

2023-07-12 Thread Michal Orzel
Hi Luca, On 12/07/2023 14:04, Luca Fancellu wrote: > > > Fix the right border of the silicon-errata.txt table > > Fixes: 1814a626fb58 ("xen/arm: Update silicon-errata.txt with the Neovers AT > erratum") Fixes tag is for bugs and this one is clearly not. With that

Re: [PATCH 2/2] xen/arm: Account for domU dtb bootmodule size separately

2023-07-12 Thread Michal Orzel
Hi Julien, On 11/07/2023 18:07, Julien Grall wrote: > > > Hi Michal, > > On 11/07/2023 09:29, Michal Orzel wrote: >> At the moment, we limit the allocation size when creating a domU dtb to >> 4KB, which is not enough when using a passthrough dtb with several nod

[PATCH 2/2] xen/arm: Account for domU dtb bootmodule size separately

2023-07-11 Thread Michal Orzel
of space for new nodes). Also, cap the allocation size to 2MB, which is the max dtb size allowed. Signed-off-by: Michal Orzel --- Note for the future: As discussed with Julien, really the best way would be to generate dtb directly in the guest memory, where no allocation would be necessary

[PATCH 1/2] xen/arm: Fix domain_handle_dtb_bootmodule() error path

2023-07-11 Thread Michal Orzel
, so having memory not unmapped is not a bug, but it can change. Similarly, fix prepare_dtb_domU() so that the memory allocated is freed before returning the error code from domain_handle_dtb_bootmodule(). Signed-off-by: Michal Orzel --- xen/arch/arm/domain_build.c | 9 + 1 file changed

[PATCH 0/2] xen/arm: Support for bigger domU passthrough dtbs

2023-07-11 Thread Michal Orzel
First patch with a fix (more for a logic than a bug) added to series for ease of merging. Michal Orzel (2): xen/arm: Fix domain_handle_dtb_bootmodule() error path xen/arm: Account for domU dtb bootmodule size separately xen/arch/arm/domain_build.c | 27 ++- 1 file

Re: [v2 4/4] xen/arm: Allow the user to build Xen with UBSAN

2023-06-30 Thread Michal Orzel
s in v2: > - Fix typoes > - Add Michal's reviewed-by tag I cannot see one, so: Reviewed-by: Michal Orzel ~Michal

Re: [v2 3/4] xen/arm: Rework the code mapping Xen to avoid relying on the size of Xen

2023-06-30 Thread Michal Orzel
gt; page-table to allocate/map. > > While at it, replace any reference to 4KB mappings with a more > generic word because the page-size may change in the future. > > Also fix the typo s/tlb/tbl/ in code move in arm32/head.S as well as in arm64 (can be done on commit) > > Signed-off-by: Julien Grall Reviewed-by: Michal Orzel ~Michal

Re: [v2 1/4] xen/arm64: head: Don't map too much in boot_third

2023-06-30 Thread Michal Orzel
unity to confirm that _start is equal to > XEN_VIRT_START as the assembly is using both interchangeably. > > Signed-off-by: Julien Grall NIT: it looks like other maintainers are not CCed on this series. Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 8/9] xen/arm: Allow the user to build Xen with USBAN

2023-06-29 Thread Michal Orzel
On 28/06/2023 22:39, Julien Grall wrote: > > > On 27/06/2023 09:09, Michal Orzel wrote: >> Hi Julien, >> >> On 26/06/2023 14:56, Julien Grall wrote: >>> >>> >>> Hi, >>> >>> On 26/06/2023 12:56, Michal Orzel wrote: >&g

Re: [PATCH 5/9] xen/arm: Rework the code mapping Xen to avoid relying on the size of Xen

2023-06-29 Thread Michal Orzel
On 28/06/2023 22:02, Julien Grall wrote: > > > Hi, > > On 26/06/2023 12:43, Michal Orzel wrote: >> >> >> On 25/06/2023 22:49, Julien Grall wrote: >>> >>> >>> From: Julien Grall >>> >>> At the moment, the

Re: [PATCH 2/9] xen/arm64: head: Don't map too much in boot_third

2023-06-29 Thread Michal Orzel
On 28/06/2023 20:21, Julien Grall wrote: > > > Hi, > > On 26/06/2023 12:28, Michal Orzel wrote: >> On 25/06/2023 22:49, Julien Grall wrote: >>> From: Julien Grall >>> >>> At the moment, we are mapping the size of the reserved area for Xen

[PATCH] docs/misra: rules: Remove incorrect deviation guidance

2023-06-28 Thread Michal Orzel
It creates confusion since the new format of documenting violations can be found in: docs/misra/documenting-violations.rst. Signed-off-by: Michal Orzel --- docs/misra/rules.rst | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/misra/rules.rst b/docs/misra

Re: [PATCH 8/9] xen/arm: Allow the user to build Xen with USBAN

2023-06-27 Thread Michal Orzel
Hi Julien, On 26/06/2023 14:56, Julien Grall wrote: > > > Hi, > > On 26/06/2023 12:56, Michal Orzel wrote: >> >> >> On 25/06/2023 22:49, Julien Grall wrote: >>> >>> >>> From: Julien Grall >>> >>> UBSAN has been ena

Re: [PATCH 6/9] xen/arm64: entry: Don't jump outside of an alternative

2023-06-27 Thread Michal Orzel
come up with a solution that would not change the number > of instructions executed in the entry path. It looks like the max offset is indeed 1MB for conditional branches and I cannot think of any better way of doing this, so: Reviewed-by: Michal Orzel > --- > xen/arch/arm/arm64/entry.S | 21

Re: [PATCH 8/9] xen/arm: Allow the user to build Xen with USBAN

2023-06-26 Thread Michal Orzel
On 25/06/2023 22:49, Julien Grall wrote: > > > From: Julien Grall > > UBSAN has been enabled a few years ago on x86 but was never > enabled on Arm because the final binary is bigger than 2MB ( > the maximum we can currently handled). > > With the recent rework, it is now possible to grow

Re: [PATCH 7/9] xen/arm64: head: Rework PRINT() to work when the string is not withing +/- 1MB

2023-06-26 Thread Michal Orzel
the > current setup. So there is no guarantee that the instruction can > load the string address (stored in rodata). > > So replace the instruction ADR with the pseudo-instruction ADR_L > which is able to handle symbol within the range +/- 4GB. > > Signed-off-by: Julien Grall Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 5/9] xen/arm: Rework the code mapping Xen to avoid relying on the size of Xen

2023-06-26 Thread Michal Orzel
pt.xn = 0; > > -/* Break up the Xen mapping into 4k pages and protect them separately. */ > -for ( i = 0; i < XEN_PT_LPAE_ENTRIES; i++ ) > +/* Break up the Xen mapping into pages and protect them separately. */ > +for ( i = 0; i < XEN_NR_ENTRIES(3); i++ ) > { > vaddr_t va = XEN_VIRT_START + (i << PAGE_SHIFT); > > if ( !is_kernel(va) ) > break; > pte = pte_of_xenaddr(va); > -pte.pt.table = 1; /* 4k mappings always have this bit set */ > +pte.pt.table = 1; /* third level mappings always have this bit set */ > if ( is_kernel_text(va) || is_kernel_inittext(va) ) > { > pte.pt.xn = 0; > @@ -539,10 +539,14 @@ void __init setup_pagetables(unsigned long > boot_phys_offset) > > /* Initialise xen second level entries ... */ > /* ... Xen's text etc */ > +for ( i = 0; i < XEN_NR_ENTRIES(2); i++ ) > +{ > +vaddr_t va = XEN_VIRT_START + i * XEN_PT_LEVEL_SIZE(2); For consistency with the upper loop, maybe (i << XEN_PT_LEVEL_SHIFT(2)) ? These are all just minor comments, so: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 4/9] xen/arm32: head: Remove 'r6' from the clobber list of create_page_tables()

2023-06-26 Thread Michal Orzel
emove it from the documentation. > > Signed-off-by: Julien Grall Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 3/9] xen/arm32: head: Don't map too much in boot_third

2023-06-26 Thread Michal Orzel
he same comments apply as for the previous patch. But all in all: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 2/9] xen/arm64: head: Don't map too much in boot_third

2023-06-26 Thread Michal Orzel
LIGNED(__bss_end,POINTER_ALIGN), "__bss_end is > misaligned") > +/* To simplify the logic in head.S, we want to _end to be page aligned */ > +ASSERT(IS_ALIGNED(_end,PAGE_SIZE), "_end is not page aligned") one more space if you want to align PAGE_SIZE to POINTER_ALIGN All in all: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 1/9] xen/arm: Check Xen size when linking

2023-06-26 Thread Michal Orzel
dated way of calculating xen size across arch linker scripts and C code? It makes it easier for grepping. All in all, Reviewed-by: Michal Orzel ~Michal

Re: [XEN PATCH] xen/arm: fixed violations of MISRA C:2012 R8.3 on parameter names.

2023-06-22 Thread Michal Orzel
Hi Federico, On top of Julien remarks, only one more from my side. On 22/06/2023 10:37, Julien Grall wrote: > > > Hi, > > On 22/06/2023 09:13, Federico Serafini wrote: >> To comply with Rule 8.3 ("All declarations of an object or function >> shall use the same names and type qualifiers")

Re: [PATCH 3/7] xen/arm64: head: Add missing isb in setup_fixmap()

2023-06-21 Thread Michal Orzel
On 21/06/2023 12:02, Julien Grall wrote: > > > Hi, > > On 21/06/2023 10:33, Michal Orzel wrote: >> >> >> On 19/06/2023 19:01, Julien Grall wrote: >>> >>> >>> From: Julien Grall >>> >>> On older version o

Re: [PATCH 3/7] xen/arm64: head: Add missing isb in setup_fixmap()

2023-06-21 Thread Michal Orzel
need to ensure the 'dsb' has completed > before continuing. Therefore add an 'isb'. > > Fixes: 2b11c3646105 ("xen/arm64: head: Remove 1:1 mapping as soon as it is > not used") > Signed-off-by: Julien Grall Reviewed-by: Michal Orzel I'm happy with the whole series but

Re: [XEN v8 1/5] xen/arm: p2m: Use the pa_range_info table to support ARM_32 and ARM_64

2023-06-16 Thread Michal Orzel
deal with them on commit? I thought I added my tag but clearly not. With the remarks addressed on commit: Reviewed-by: Michal Orzel ~Michal

Re: [XEN PATCH] xen/arch/arm/traps: remove inlining of handle_ro_raz()

2023-06-15 Thread Michal Orzel
12 Rule 8.10 ("An inline function shall be > declared with the static storage class"), remove inline function > specifier from handle_ro_raz() since asking the compiler to inline > such function does not seem to add any kind of value. > > Signed-off-by: Federico Serafini Reviewed-by: Michal Orzel ~Michal

Re: [PATCH] xen/misra: add rules 1.4 and 2.1

2023-06-15 Thread Michal Orzel
Hi Stefano, On 15/06/2023 01:03, Stefano Stabellini wrote: > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > From: Stefano Stabellini > > Signed-off-by: Stefano Stabellini > --- >

Re: [PATCH v4] docs/misra: new rules addition

2023-06-15 Thread Michal Orzel
that "Solution 1" is compatible with the > + intended semantics. > + > * - `Rule 7.3 > <https://gitlab.com/MISRA/MISRA-C/MISRA-C-2012/Example-Suite/-/blob/master/R_07_03.c>`_ > - Required > - The lowercase character l shall not be used in a literal suffix > @@ -314,6 +359,11 @@ existing codebase are work-in-progress. > used following a subsequent call to the same function > - > > + * - Rule 21.21 This is incorrect as it should be surrounded by `` similar to other lines. Otherwise it will not be taken into account by convert_misra_doc.py which converts this document into cppcheck rule list. With that fixed (i.e. on commit): Reviewed-by: Michal Orzel ~Michal

Re: [XEN v8 5/5] xen/arm: p2m: Enable support for 32bit IPA for ARM_32

2023-06-15 Thread Michal Orzel
; > Thus VTCR.SL0 = 1 (maximum value) and VTCR.T0SZ = 0 when the size of > input address region is 2^32 bytes. > > Signed-off-by: Ayan Kumar Halder Reviewed-by: Michal Orzel ~Michal

Re: [XEN v8 1/5] xen/arm: p2m: Use the pa_range_info table to support ARM_32 and ARM_64

2023-06-15 Thread Michal Orzel
Hi Ayan, On 02/06/2023 14:07, Ayan Kumar Halder wrote: > > > Restructure the code so that one can use pa_range_info[] table for both > ARM_32 as well as ARM_64. I grepped for ARM_{32,64} in our code base and could not find any use in source files except for things introduced by this commit.

Re: [PATCH 1/4] xen/arm: debug-pl011: Use correct accessors

2023-06-15 Thread Michal Orzel
Hi Stefano, On 15/06/2023 03:36, Stefano Stabellini wrote: > > > On Wed, 7 Jun 2023, Michal Orzel wrote: >> Although most PL011 UARTs can cope with 32-bit accesses, some of the old >> legacy ones might not. PL011 registers are 8/16-bit wide and this shall >> be perce

[PATCH] xen/arm: Remove stray semicolon at VREG_REG_HELPERS/TLB_HELPER* callers

2023-06-14 Thread Michal Orzel
. Signed-off-by: Michal Orzel --- Discussion: https://lore.kernel.org/xen-devel/17c59d5c-795e-4591-a7c9-a4c5179bf...@arm.com/ Other empty declarations appear at callers of TYPE_SAFE and Linux module macros like EXPORT_SYMBOL for which we need some sort of agreement. --- xen/arch/arm/include/asm

Re: [PATCH] xen: Append a newline character to panic() where missing

2023-06-14 Thread Michal Orzel
On 14/06/2023 11:02, Julien Grall wrote: > > > On 14/06/2023 09:09, Michal Orzel wrote: >> >> >> On 14/06/2023 10:04, Andrew Cooper wrote: >>> >>> >>> On 14/06/2023 8:30 am, Michal Orzel wrote: >>>> Missing newline is inc

Re: [PATCH] xen: Append a newline character to panic() where missing

2023-06-14 Thread Michal Orzel
On 14/06/2023 10:04, Andrew Cooper wrote: > > > On 14/06/2023 8:30 am, Michal Orzel wrote: >> Missing newline is inconsistent with the rest of the callers, since >> panic() expects it. >> >> Signed-off-by: Michal Orzel > > Acked-by: Andrew Cooper >

[PATCH] xen: Append a newline character to panic() where missing

2023-06-14 Thread Michal Orzel
Missing newline is inconsistent with the rest of the callers, since panic() expects it. Signed-off-by: Michal Orzel --- xen/arch/arm/bootfdt.c| 2 +- xen/arch/arm/domain_build.c | 6 +++--- xen/arch/x86/cpu/microcode/core.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions

Re: [PATCH] CI: Add Ocaml to the alpine containers

2023-06-09 Thread Michal Orzel
On 09/06/2023 18:02, Andrew Cooper wrote: > > > This gets more coverage of optional parts of the build, and makes it easier to > trial Ocaml related changes in the smoke tests. > > Signed-off-by: Andrew Cooper > --- > CC: Roger Pau Monné > CC: Stefano Stabellin

Re: Xen reliance on non-standard GCC features

2023-06-09 Thread Michal Orzel
On 09/06/2023 11:47, Jan Beulich wrote: > > > On 09.06.2023 11:36, Michal Orzel wrote: >> On 09/06/2023 10:54, Jan Beulich wrote: >>> On 08.06.2023 14:18, Roberto Bagnara wrote: >>>> On 07/06/23 09:39, Jan Beulich wrote: >>>>> On 05.06.2023

Re: Xen reliance on non-standard GCC features

2023-06-09 Thread Michal Orzel
On 09/06/2023 10:54, Jan Beulich wrote: > > > On 08.06.2023 14:18, Roberto Bagnara wrote: >> On 07/06/23 09:39, Jan Beulich wrote: >>> On 05.06.2023 15:26, Roberto Bagnara wrote: On 05/06/23 11:28, Jan Beulich wrote: > On 05.06.2023 07:28, Roberto Bagnara wrote: You are right:

Re: [PATCH] docs: Fix xl.cfg documentation

2023-06-07 Thread Michal Orzel
ested and looks good. Reviewed-by: Michal Orzel Tested-by: Michal Orzel ~Michal

[PATCH 3/4] xen/arm: pl011: Use correct accessors

2023-06-07 Thread Michal Orzel
ister size) according to mmio32 value. By default this property is set to false, unless: - reg-io-width is specified with value 4, - SBSA UART is in use. For now, no changes done for ACPI due to lack of testing possibilities (i.e. current behavior maintained resulting in 32-bit accesses). Signed-off-

[PATCH 2/4] xen/arm: debug-pl011: Add support for 32-bit only MMIO

2023-06-07 Thread Michal Orzel
of 32-bit only accessors in PL011 early printk code. Define macros PL011_{STRH,STRB,LDRH} to distinguish accessors for normal case from 32-bit MMIO one and use them in arm32/arm64 pl011 early printk code. Update documentation accordingly. Signed-off-by: Michal Orzel --- I might want to align

[PATCH 4/4] xen/arm: pl011: Add SBSA UART device-tree support

2023-06-07 Thread Michal Orzel
and DT_DEVICE_START as SBSA is a subset of PL011), - from pl011_dt_uart_init(), check for SBSA UART compatible to determine the UART type in use. Signed-off-by: Michal Orzel --- After this series the last thing not to be in spec for newer UARTs (well, for rev1.5 introduced in 2007 I believe

[PATCH 1/4] xen/arm: debug-pl011: Use correct accessors

2023-06-07 Thread Michal Orzel
ARM DDI 0183G, Table 3.1). Signed-off-by: Michal Orzel --- Next patch will override strX,ldrX with macros but I prefer to keep the history clean (+ possibiltity for a backport if needed). --- xen/arch/arm/arm32/debug-pl011.inc | 12 ++-- xen/arch/arm/arm64/debug-pl011.inc | 6 +++--- 2

[PATCH 0/4] xen/arm: pl011: Use correct accessors

2023-06-07 Thread Michal Orzel
resulting in accessing the registers that shall not be touched (as oppose to just failing). Discussion: https://lore.kernel.org/xen-devel/b31a9f06-1ad8-b882-2fb0-84a84a1ac...@xen.org/T/# Michal Orzel (4): xen/arm: debug-pl011: Use correct accessors xen/arm: debug-pl011: Add support for 32-bit only

<    1   2   3   4   5   6   7   8   9   10   >