Re: [PATCH v2 3/7] xen/p2m: put reference for level 2 superpage

2024-05-16 Thread Michal Orzel
Hi Luca, On 15/05/2024 16:26, Luca Fancellu wrote: > > > From: Penny Zheng > > We are doing foreign memory mapping for static shared memory, and > there is a great possibility that it could be super mapped. > But today, p2m_put_l3_page could not handle superpages. s/could/can > > This

Re: [PATCH v2 2/7] xen/arm: Wrap shared memory mapping code in one function

2024-05-16 Thread Michal Orzel
; -if ( dt_property_read_string(shm_node, "role", _str) == 0 ) > - owner_dom_io = false; > +/* "role" property is optional */ > +dt_property_read_string(shm_node, "role", _str); This now violates a MISRA rule saying that if a function returns a value, this value needs to be checked. I think you should check if return value is non zero and if such, assign role_str NULL (thus removing such assignment from a definition). Other than that: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v2 1/7] xen/arm: Lookup bootinfo shm bank during the mapping

2024-05-16 Thread Michal Orzel
gt; { > -paddr_t bank_start = shmem->bank[bank].start; > -paddr_t bank_size = shmem->bank[bank].size; > - > -if ( (pbase == bank_start) && (psize == bank_size) ) > +if ( strncmp(shm_id, shmem->bank[bank].shmem_extra->shm_id, Does it really need to be strncmp? You validated it a few times already. Other than that: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v9 04/15] xen/bitops: put __ffs() into linux compatible header

2024-05-15 Thread Michal Orzel
ksii Kurochko > Acked-by: Shawn Anastasio > Reviewed-by: Jan Beulich Acked-by: Michal Orzel ~Michal

Re: [PATCH 7/7] xen/docs: Describe static shared memory when host address is not provided

2024-05-10 Thread Michal Orzel
; Take the occasion to fix some typos in the page. > > Signed-off-by: Penny Zheng > Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 6/7] xen/arm: Implement the logic for static shared memory from Xen heap

2024-05-10 Thread Michal Orzel
Hi Luca, On 10/05/2024 11:25, Luca Fancellu wrote: > > >> On 10 May 2024, at 10:17, Michal Orzel wrote: >> >> Hi Luca, >> >> On 23/04/2024 10:25, Luca Fancellu wrote: >>> >>> >>> This commit implements the logic to have the sta

Re: [PATCH 6/7] xen/arm: Implement the logic for static shared memory from Xen heap

2024-05-10 Thread Michal Orzel
Hi Luca, On 23/04/2024 10:25, Luca Fancellu wrote: > > > This commit implements the logic to have the static shared memory banks > from the Xen heap instead of having the host physical address passed from > the user. > > When the host physical address is not supplied, the physical memory is >

Re: [PATCH 1/3] xen/arm/dom0less-build: Alloc magic pages for Dom0less DomUs from hypervisor

2024-05-10 Thread Michal Orzel
Hi Henry, On 26/04/2024 05:14, Henry Wang wrote: > There are use cases (for example using the PV driver) in Dom0less > setup that require Dom0less DomUs start immediately with Dom0, but > initialize XenStore later after Dom0's successful boot and call to > the init-dom0less application. > > An

Re: [PATCH 5/7] xen/arm: Rework heap page allocation outside allocate_bank_memory

2024-05-09 Thread Michal Orzel
Hi Luca, On 23/04/2024 10:25, Luca Fancellu wrote: > > > The function allocate_bank_memory allocates pages from the heap and > map them to the guest using guest_physmap_add_page. s/map/maps > > As a preparation work to support static shared memory bank when the > host physical address is not

Re: [PATCH 4/7] xen/arm: Parse xen,shared-mem when host phys address is not provided

2024-05-08 Thread Michal Orzel
Hi Luca, On 23/04/2024 10:25, Luca Fancellu wrote: > > > Handle the parsing of the 'xen,shared-mem' property when the host physical > address is not provided, this commit is introducing the logic to parse it, > but the functionality is still not implemented and will be part of future > commits.

Re: [PATCH 2/7] xen/arm: Wrap shared memory mapping code in one function

2024-05-08 Thread Michal Orzel
On 07/05/2024 16:15, Luca Fancellu wrote: > > > Hi Michal, > > > > int __init process_shm(struct domain *d, struct kernel_info *kinfo, > const struct dt_device_node *node) > { > @@ -249,32 +290,10 @@ int __init process_shm(struct domain *d, struct

Re: [PATCH 2/7] xen/arm: Wrap shared memory mapping code in one function

2024-05-07 Thread Michal Orzel
On 07/05/2024 15:57, Luca Fancellu wrote: > > > Hi Michal, > >>> >>> +static int __init handle_shared_mem_bank(struct domain *d, paddr_t gbase, >>> + bool owner_dom_io, >>> + const char *role_str, >>> +

Re: [PATCH 1/7] xen/arm: Lookup bootinfo shm bank during the mapping

2024-05-07 Thread Michal Orzel
On 07/05/2024 15:44, Luca Fancellu wrote: > > > Hi Michal, > > Thanks for your review. > >> On 6 May 2024, at 14:24, Michal Orzel wrote: >> >> Hi Luca, >> >> On 23/04/2024 10:25, Luca Fancellu wrote: >>> >>> >

Re: [PATCH 3/7] xen/p2m: put reference for superpage

2024-05-07 Thread Michal Orzel
Hi Luca, On 23/04/2024 10:25, Luca Fancellu wrote: > > > From: Penny Zheng > > We are doing foreign memory mapping for static shared memory, and > there is a great possibility that it could be super mapped. > But today, p2m_put_l3_page could not handle superpages. > > This commits implements

Re: [PATCH 2/7] xen/arm: Wrap shared memory mapping code in one function

2024-05-06 Thread Michal Orzel
Hi Luca, On 23/04/2024 10:25, Luca Fancellu wrote: > > > Wrap the code and logic that is calling assign_shared_memory > and map_regions_p2mt into a new function 'handle_shared_mem_bank', > it will become useful later when the code will allow the user to > don't pass the host physical address. >

Re: [PATCH 1/7] xen/arm: Lookup bootinfo shm bank during the mapping

2024-05-06 Thread Michal Orzel
Hi Luca, On 23/04/2024 10:25, Luca Fancellu wrote: > > > The current static shared memory code is using bootinfo banks when it > needs to find the number of borrower, so every time assign_shared_memory s/borrower/borrowers > is called, the bank is searched in the bootinfo.shmem structure. > >

Re: [PATCH] arm/vpci: make prefetchable mem 64 bit

2024-04-25 Thread Michal Orzel
eld. > > [1] https://www.devicetree.org/open-firmware/bindings/pci/pci2_1.pdf > > Signed-off-by: Stewart Hildebrand Acked-by: Michal Orzel ~Michal > --- > xen/include/public/arch-arm.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/

[PATCH 3/3] automation: Add arm64 test for running Xen with GICv3

2024-04-23 Thread Michal Orzel
emu option to select the version to use. Unless the test variant is set to "gicv3", version 2 will be used. Signed-off-by: Michal Orzel --- automation/gitlab-ci/test.yaml| 8 .../scripts/qemu-smoke-dom0less-arm64.sh | 19 ++- 2 file

[PATCH 2/3] automation: Add arm{64,32} earlyprintk jobs

2024-04-23 Thread Michal Orzel
Introduce qemu based Arm earlyprintk test and build jobs to cover this feature in debug variant. The tests simply check for the presence of the last message printed by the bootstrap code before entering the C world. Signed-off-by: Michal Orzel --- automation/gitlab-ci/build.yaml

[PATCH 0/3] automation: improve Arm coverage

2024-04-23 Thread Michal Orzel
This came up as part of the following discussion: https://lore.kernel.org/xen-devel/alpine.DEB.2.22.394.2402291108290.853156@ubuntu-linux-20-04-desktop/ Michal Orzel (3): automation: Drop some of the non-debug variants of the same Arm jobs automation: Add arm{64,32} earlyprintk jobs

[PATCH 1/3] automation: Drop some of the non-debug variants of the same Arm jobs

2024-04-23 Thread Michal Orzel
(arm64) - gzip (arm32) More generic tests existing in both variants were left unmodified. Signed-off-by: Michal Orzel --- automation/gitlab-ci/build.yaml | 38 -- automation/gitlab-ci/test.yaml | 48 - 2 files changed, 86 deletions(-) diff

Re: [PATCH v3 12/12] xen/arm: List static shared memory regions as /memory nodes

2024-04-22 Thread Michal Orzel
t;>> + >>> +BUG_ON(!nr_cells || !reg); >>> + >>> +cells = [*nr_cells]; >>> +for ( i = 0; i < mem->nr_banks; i++ ) >>> +{ >>> +u64 start = mem->bank[i].start; >> ditto > > Will fix, here paddr_t should be ok isn’t it? yes > >> >> Rest LGTM: >> Reviewed-by: Michal Orzel > > Thanks, I will send the next one shortly. I don't think there is a need to respin the whole series just for these fixes. You should wait for the committers opinion. ~Michal

Re: [PATCH v3 12/12] xen/arm: List static shared memory regions as /memory nodes

2024-04-22 Thread Michal Orzel
+++ b/xen/arch/arm/static-shmem.c > @@ -1,5 +1,6 @@ > /* SPDX-License-Identifier: GPL-2.0-only */ > > +#include > #include > #include > #include > @@ -668,6 +669,28 @@ int __init remove_shm_holes_for_domU(const struct > kernel_info *kinfo, > return res; > } > > +void __init shm_mem_node_fill_reg_range(const struct kernel_info *kinfo, > +__be32 *reg, int *nr_cells, > +int addrcells, int sizecells) > +{ > +const struct membanks *mem = >shm_mem.common; > +unsigned int i; > +__be32 *cells; > + > +BUG_ON(!nr_cells || !reg); > + > +cells = [*nr_cells]; > +for ( i = 0; i < mem->nr_banks; i++ ) > +{ > +u64 start = mem->bank[i].start; ditto Rest LGTM: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v3 10/12] xen/arm: remove shm holes from extended regions

2024-04-18 Thread Michal Orzel
taken > care of through find_unallocated_memory, we do nothing. > > Signed-off-by: Penny Zheng > Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v3 06/12] xen/arm: Avoid code duplication in find_unallocated_memory

2024-04-18 Thread Michal Orzel
all the structures, this will be used to avoid > duplication when the static shared memory banks will be introduced > as a separate structure from reserved memory. > > Take the occasion to add the error code to the error message in > case 'rangeset_remove_range' fails. > > Signed-off-by: L

Re: [PATCH] public: xen: Define missing guest handle for int32_t

2024-04-18 Thread Michal Orzel
Hi Jan, On 18/04/2024 09:26, Jan Beulich wrote: > > > On 17.04.2024 14:14, Michal Orzel wrote: >> Commit afab29d0882f ("public: s/int/int32_t") replaced int with int32_t >> in XEN_GUEST_HANDLE() in memory.h but there is no guest handle defined >> for it. Thi

Re: [ImageBuilder 5/5] uboot-script-gen: Add ability to specify "nr_spis"

2024-04-17 Thread Michal Orzel
-off-by: Stefano Stabellini Reviewed-by: Michal Orzel ~Michal

Re: [ImageBuilder 4/5] uboot-script-gen: Add ability to unselect "vpl011"

2024-04-17 Thread Michal Orzel
On 17/04/2024 14:07, Oleksandr Tyshchenko wrote: > > > From: Oleksandr Tyshchenko > > Introduce new option DOMU_VPL011[nr] that can be set to 0 > or 1 (default). > > Also align "console=ttyAMA0" Linux cmd arg setting with "vpl011" presense. &

Re: [ImageBuilder 3/5] uboot-script-gen: Add ability to specify grant table params

2024-04-17 Thread Michal Orzel
;max_maptrack_frames" dt property. > > Signed-off-by: Oleksandr Tyshchenko Reviewed-by: Michal Orzel ~Michal

Re: [ImageBuilder 2/5] uboot-script-gen: Extend DOMU_ENHANCED to specify "no-xenstore"

2024-04-17 Thread Michal Orzel
> (XEN) Panic on CPU 0: > (XEN) At the moment, Xenstore support requires dom0 to be present > (XEN) > > Signed-off-by: Oleksandr Tyshchenko Reviewed-by: Michal Orzel ~Michal

Re: [ImageBuilder 1/5] uboot-script-gen: Update to deal with uImage which is not executable

2024-04-17 Thread Michal Orzel
s, Fri Sep 29 15:40:19 2023, > Load Address: 0X4000, Entry Point: 0X4000, Header CRC: 0XA0B7D051, > Data CRC: 0X42083F51 > > Suggested-by: Stefano Stabellini > Signed-off-by: Oleksandr Tyshchenko Reviewed-by: Michal Orzel ~Michal

[PATCH] public: xen: Define missing guest handle for int32_t

2024-04-17 Thread Michal Orzel
t;public: s/int/int32_t") Signed-off-by: Michal Orzel --- xen/include/public/xen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/public/xen.h b/xen/include/public/xen.h index b47d48d0e2d6..8fd0cec880d5 100644 --- a/xen/include/public/xen.h +++ b/xen/include/p

Re: [PATCH v2 13/13] xen/arm: List static shared memory regions as /memory nodes

2024-04-16 Thread Michal Orzel
Hi Julien, On 16/04/2024 10:50, Julien Grall wrote: > > > On 16/04/2024 07:27, Luca Fancellu wrote: >> Hi Julien, > > Hi Luca, > >> >>> On 15 Apr 2024, at 19:41, Julien Grall wrote: >>> >>> Hi Luca, >>> >>> On 09/04/2024 12:45, Luca Fancellu wrote: Currently Xen is not exporting the

[PATCH] docs: arm: Update where Xen should be loaded in memory

2024-04-12 Thread Michal Orzel
Since commit 6cd046c501bc ("xen/arm: Enlarge identity map space to 10TB") Xen can be loaded below 10 TiB. Update docs accordingly. Take the opportunity to update stale links to Linux docs. Signed-off-by: Michal Orzel --- docs/misc/arm/booting.txt | 6 +++--- 1 file changed, 3 insert

Re: [PATCH] xen/include: move definition of ASM_INT() to xen/linkage.h

2024-04-11 Thread Michal Orzel
for assembler code are living already. > > Adapt the generation of assembler sources via tools/binfile to include > the new home of ASM_INT(). > > Signed-off-by: Juergen Gross Acked-by: Michal Orzel ~Michal

Re: [XEN PATCH v1 4/5] xen/arm: allow dynamically assigned SGI handlers

2024-04-11 Thread Michal Orzel
Hi Jens, On 11/04/2024 08:12, Jens Wiklander wrote: > > > Hi Michal, > > On Wed, Apr 10, 2024 at 3:24 PM Michal Orzel wrote: >> >> Hi Jens, >> >> On 09/04/2024 17:36, Jens Wiklander wrote: >>> >>> >>> Updates so request_

Re: [PATCH v2 3/4] xen/virtual-region: Link the list build time

2024-04-11 Thread Michal Orzel
now move inside ifdef > CONFIG_LIVEPATCH like unregister_virtual_region(). > > Signed-off-by: Andrew Cooper Reviewed-by: Michal Orzel Maybe with ... > --- > CC: Jan Beulich > CC: Roger Pau Monné > CC: Wei Liu > CC: Stefano Stabellini > CC: Julien Grall >

Re: [PATCH v2 2/4] xen/virtual-region: Rework how bugframe linkage works

2024-04-11 Thread Michal Orzel
> Reviewed-by: Ross Lagerwall > Reviewed-by: Jan Beulich For Arm: Acked-by: Michal Orzel ~Michal

Re: [PATCH v2 1/4] xen/link: Introduce a common BUGFRAMES definition

2024-04-11 Thread Michal Orzel
their > structure. > > No functional change. > > Signed-off-by: Andrew Cooper > Reviewed-by: Jan Beulich For Arm: Acked-by: Michal Orzel ~Michal

Re: [PATCH v2 10/13] xen/arm: remove shm holes from extended regions

2024-04-10 Thread Michal Orzel
Hi Luca, On 10/04/2024 16:08, Luca Fancellu wrote: > > > Hi Michal, > >>> >>> For direct-map domain with iommu on, after we get guest shm info from >>> "kinfo", >>> we use "remove_shm_from_rangeset" to remove static shm. >>> >>> For direct-map domain with iommu off, as static shm has already

Re: [XEN PATCH v1 4/5] xen/arm: allow dynamically assigned SGI handlers

2024-04-10 Thread Michal Orzel
gt; do_IRQ() instead of do_sgi(). The latter still handles the statically > assigned SGI handlers like for instance GIC_SGI_CALL_FUNCTION. > > Signed-off-by: Jens Wiklander Other than that, it LGTM: Acked-by: Michal Orzel but I would like other maintainers (especially Julien) to cross check it. ~Michal

Re: [PATCH v2 09/13] xen/arm: Reduce struct membank size on static shared memory

2024-04-10 Thread Michal Orzel
On 10/04/2024 13:19, Luca Fancellu wrote: > > > > Afterwards, create a new structure 'struct shared_meminfo' which > has the same interface of 'struct meminfo', but requires less I would expect some justification for selecting 32 as the max number of shmem banks >>> >>>

Re: [PATCH v2 10/13] xen/arm: remove shm holes from extended regions

2024-04-10 Thread Michal Orzel
Hi Luca, On 09/04/2024 13:45, Luca Fancellu wrote: > > > From: Penny Zheng > > Static shared memory acts as reserved memory in guest, so it shall be > excluded from extended regions. > > Extended regions are taken care of under three different scenarios: > normal DomU, direct-map domain with

Re: [PATCH v2 09/13] xen/arm: Reduce struct membank size on static shared memory

2024-04-10 Thread Michal Orzel
On 10/04/2024 12:56, Luca Fancellu wrote: > > > Hi Michal, > >> On 10 Apr 2024, at 11:01, Michal Orzel wrote: >> >> Hi Luca, >> >> On 09/04/2024 13:45, Luca Fancellu wrote: >>> >>> >>> Currently the memory footprint of the

Re: [PATCH v2 09/13] xen/arm: Reduce struct membank size on static shared memory

2024-04-10 Thread Michal Orzel
a memory space > reduction also in 'struct kernel_info'. > > Signed-off-by: Luca Fancellu With the find_unallocated_memory() issue fixed: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v2 07/13] xen/arm: Avoid code duplication in check_reserved_regions_overlap

2024-04-10 Thread Michal Orzel
> Signed-off-by: Luca Fancellu Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue

2024-04-10 Thread Michal Orzel
Hi John, On 10/04/2024 08:53, John Ernberg wrote: > > > On 4/9/24 8:47 AM, Michal Orzel wrote: >> Hi John, >> >> On 08/04/2024 18:11, John Ernberg wrote: >>> >>> >>> When using Linux for dom0 there are a bunch of drivers that need to do

Re: [PATCH v2 06/13] xen/arm: Avoid code duplication in find_unallocated_memory

2024-04-09 Thread Michal Orzel
Hi Luca, On 09/04/2024 13:45, Luca Fancellu wrote: > > > The function find_unallocated_memory is using the same code to > loop through 3 structure of the same type, in order to avoid > code duplication, rework the code to have only one loop that > goes through all the structures. > >

Re: [PATCH v2 04/13] xen/arm: Introduce a generic way to access memory bank structures

2024-04-09 Thread Michal Orzel
t; +} > + > +static inline const struct membanks * > +kernel_info_get_mem_const(const struct kernel_info *kinfo) I'm not a fan of having 2 helpers named this way. Maybe macro (as in v1) would be better here. Other than that: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v2 03/13] xen/arm: Pass struct kernel_info parameter to make_resv_memory_node

2024-04-09 Thread Michal Orzel
f-by: Luca Fancellu Other than that: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH] xen/acpi: Allow xen/acpi.h to be included on non-ACPI archs

2024-04-09 Thread Michal Orzel
ort, > like ppc. > > This change revealed some missing #includes across the ARM tree, so fix > those as well. > > Suggested-by: Jan Beulich > Signed-off-by: Shawn Anastasio Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v4 1/3] xen/arm: Add imx8q{m,x} platform glue

2024-04-09 Thread Michal Orzel
ub.com/nxp-imx/imx-xen/blob/lf-5.10.y_4.13/xen/arch/arm/platforms/imx8qm.c > > Signed-off-by: Peng Fan > [jernberg: Add SIP call filtering] > Signed-off-by: John Ernberg Reviewed-by: Michal Orzel The commit msg can be fixed on commit. ~Michal

Re: [PATCH V4] Add requirements for Device Passthrough

2024-04-08 Thread Michal Orzel
> Signed-off-by: Oleksandr Tyshchenko Now, it LGTM. I will wait for Stewart to check PCI requirements Reviewed-by: Michal Orzel ~Michal

Re: [PATCH] drivers: char: Enable OMAP UART driver for TI K3 devices

2024-04-08 Thread Michal Orzel
g HAS_EXYNOS4210 > config HAS_OMAP > bool "Texas Instruments OMAP UART driver" > default y > - depends on ARM_32 > + depends on ARM_32 || ARM_64 depends on ARM please With that: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH v6 1/8] xen/spinlock: add explicit non-recursive locking functions

2024-04-04 Thread Michal Orzel
used recursively, too. >> >> Signed-off-by: Juergen Gross >> Acked-by: Jan Beulich > > Could any of the Arm maintainers please have a look at this patch? I can see that Julien took a look at this patch and he was ok, so: Acked-by: Michal Orzel ~Michal

Re: [PATCH 08/11] xen/arm: Reduce struct membank size on static shared memory

2024-04-04 Thread Michal Orzel
Hi Luca, On 04/04/2024 11:33, Luca Fancellu wrote: > > >> On 22 Mar 2024, at 10:30, Michal Orzel wrote: >> >> Hi Luca, >> >> On 12/03/2024 14:03, Luca Fancellu wrote: >>> >>> >>> Currently the memory footprint of the stati

Re: [PATCH 04/11] xen/arm: Conditional compilation of kernel_info.shm_mem member

2024-04-04 Thread Michal Orzel
Hi Luca, On 04/04/2024 11:27, Luca Fancellu wrote: > > >> On 19 Mar 2024, at 14:58, Michal Orzel wrote: >> >> Hi Luca, >> >> On 12/03/2024 14:03, Luca Fancellu wrote: >>> >>> >>> The user of shm_mem member of the 'struct kern

Re: [PATCH 1/2] drivers: char: Drop useless suspend/resume stubs in Arm drivers

2024-04-04 Thread Michal Orzel
Hi Jan, On 04/04/2024 10:06, Jan Beulich wrote: > > > On 04.04.2024 09:51, Michal Orzel wrote: >> On Arm we don't use console_{suspend,resume} and the corresponding >> stubs in serial drivers are being redundantly copied whenever a new >> driver is added. Drop them

[PATCH 2/2] char: lpuart: Drop useless variables from UART structure

2024-04-04 Thread Michal Orzel
These variables are useless. They are being assigned a value which is never used since UART is expected to be pre-configured. No functional change. Signed-off-by: Michal Orzel --- xen/drivers/char/imx-lpuart.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/xen/drivers/char/imx

[PATCH 0/2] drivers: char: simple cleanup

2024-04-04 Thread Michal Orzel
Simple serial drivers cleanup. No functional change intended. Michal Orzel (2): drivers: char: Drop useless suspend/resume stubs in Arm drivers char: lpuart: Drop useless variables from UART structure xen/drivers/char/cadence-uart.c| 13 - xen/drivers/char/exynos4210-uart.c

[PATCH 1/2] drivers: char: Drop useless suspend/resume stubs in Arm drivers

2024-04-04 Thread Michal Orzel
On Arm we don't use console_{suspend,resume} and the corresponding stubs in serial drivers are being redundantly copied whenever a new driver is added. Drop them as well as useless .endboot = NULL assignment. Signed-off-by: Michal Orzel --- xen/drivers/char/cadence-uart.c| 13

Re: [PATCH 2/2] xen/arm: Add i.MX UART driver

2024-04-04 Thread Michal Orzel
Hi Oleksandr, On 02/04/2024 14:05, Oleksandr Tyshchenko wrote: > > > From: Oleksandr Tyshchenko > > The i.MX UART Documentation: > https://www.nxp.com/webapp/Download?colCode=IMX8MMRM > Chapter 16.2 Universal Asynchronous Receiver/Transmitter (UART) > > Tested on i.MX 8M Mini only, but I

Re: [PATCH 2/3] drivers: serial: add Qualcomm GENI-based serial driver

2024-04-04 Thread Michal Orzel
Hi, On 02/04/2024 12:25, Michal Orzel wrote: > > > Hello, > > On 29/03/2024 01:08, Volodymyr Babchuk wrote: >> >> >> Generic Interface (GENI) is a newer interface for low speed interfaces >> like UART, I2C or SPI. This patch adds the simple driver

Re: [PATCH 1/2] xen/arm: Add i.MX UART early printk support

2024-04-03 Thread Michal Orzel
#define UCR4 (0x8c) /* Control Register 4 */ > +#define UFCR (0x90) /* FIFO Control Register */ > +#define USR1 (0x94) /* Status Register 1 */ > +#define USR2 (0x98) /* Status Register 2 */ > +#define IMX21_UTS(0xb4) /* Test Register */ > + > +#define URXD_ERRBIT(14, UL) /* Error detect */ > +#define URXD_RX_DATAGENMASK(7, 0) /* Received data mask */ > + > +#define UCR1_TRDYEN BIT(13, UL) /* Transmitter ready interrupt enable */ > +#define UCR1_RRDYEN BIT(9, UL) /* Receiver ready interrupt enable */ NIT: please align comments within a block Other than that: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 3/3] arm: platform: qcom: add basic support SA8155P SoC

2024-04-03 Thread Michal Orzel
Hello, On 29/03/2024 01:08, Volodymyr Babchuk wrote: > > > Qualcomm SA8155P is the automotive variant of SM8150 aka Snapdragon > 855. > > This patch adds very basic support for the platform. We need to handle > Qualcomm-specific SMC to workaround quirk in the QCOM SCM driver in > the Linux

Re: [PATCH 2/3] drivers: serial: add Qualcomm GENI-based serial driver

2024-04-03 Thread Michal Orzel
On 02/04/2024 23:19, Volodymyr Babchuk wrote: > > > Hi Michal, > > Michal Orzel writes: > >> Hello, >> >> On 29/03/2024 01:08, Volodymyr Babchuk wrote: >>> >>> >>> Generic Interface (GENI) is a newer interface for low speed i

Re: [PATCH 2/3] drivers: serial: add Qualcomm GENI-based serial driver

2024-04-02 Thread Michal Orzel
Hello, On 29/03/2024 01:08, Volodymyr Babchuk wrote: > > > Generic Interface (GENI) is a newer interface for low speed interfaces > like UART, I2C or SPI. This patch adds the simple driver for the UART > instance of GENI. Code is based on similar drivers in U-Boot and Linux > kernel. Do you

Re: [PATCH 1/3] arm: smmu: allow SMMU to have more IRQs than context banks

2024-04-02 Thread Michal Orzel
Hello, On 29/03/2024 01:08, Volodymyr Babchuk wrote: > > > I encountered platform, namely Qualcomm SA8155P where SMMU-compatible NIT: a commit msg should be written in imperative mood > IO-MMU advertises more context IQRs than there are context banks. This > should not be an issue, we need to

Re: [PATCH v3 1/3] xen/arm: Add imx8q{m,x} platform glue

2024-04-02 Thread Michal Orzel
in NXP Xen tree located here: > https://github.com/nxp-imx/imx-xen/blob/lf-5.10.y_4.13/xen/arch/arm/platforms/imx8qm.c > > Signed-off-by: Peng Fan > [jernberg: Add SIP call filtering] > Signed-off-by: John Ernberg > > --- > > v3: > - Adhere to style guidelin

Re: [PATCH v7 04/14] xen/arm: add Dom0 cache coloring support

2024-03-27 Thread Michal Orzel
On 27/03/2024 12:39, Carlo Nonato wrote: > > > Hi guys, > > On Fri, Mar 22, 2024 at 8:26 AM Jan Beulich wrote: >> >> On 21.03.2024 18:31, Carlo Nonato wrote: >>> On Thu, Mar 21, 2024 at 4:57 PM Jan Beulich wrote: On 21.03.2024 16:04, Carlo Nonato wrote: > On Tue, Mar 19, 2024

Re: [PATCH 11/11] xen/arm: List static shared memory regions as /memory nodes

2024-03-27 Thread Michal Orzel
Hi Luca, On 26/03/2024 15:19, Luca Fancellu wrote: > > >> On 25 Mar 2024, at 08:58, Michal Orzel wrote: >> >> Hi Luca, >> > > Hi Michal, > >> On 12/03/2024 14:03, Luca Fancellu wrote: >>> >>> >>> Currently Xen

Re: [PATCH 11/11] xen/arm: List static shared memory regions as /memory nodes

2024-03-25 Thread Michal Orzel
Hi Luca, On 12/03/2024 14:03, Luca Fancellu wrote: > > > Currently Xen is not exporting the static shared memory regions > to the device tree as /memory node, this commit is fixing this > issue. Looking at the implementation, you will always call make_shm_memory_node() twice. For the first

Re: [PATCH 10/11] xen/arm: fix duplicate /reserved-memory node in Dom0

2024-03-25 Thread Michal Orzel
ruct > kernel_info *kinfo, > return 0; > } > > -static int __init make_shm_memory_node(const struct domain *d, void *fdt, > - int addrcells, int sizecells, > - const struct membanks *mem) > +int __init make_shm_memory_node(const struct domain *d, > +const struct kernel_info *kinfo, int > addrcells, > +int sizecells) Strictly speaking, changing the function signature is not mandatory for this change, so I would at least mention it in the commit msg. Other than that: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 09/11] xen/arm: remove shm holes for extended regions

2024-03-22 Thread Michal Orzel
Hi Luca, NIT: title s/for/from? On 12/03/2024 14:03, Luca Fancellu wrote: > > > From: Penny Zheng > > Static shared memory acts as reserved memory in guest, so it shall be > excluded from extended regions. > > Extended regions are taken care of under three different scenarios: > normal

Re: [PATCH 08/11] xen/arm: Reduce struct membank size on static shared memory

2024-03-22 Thread Michal Orzel
Hi Luca, On 12/03/2024 14:03, Luca Fancellu wrote: > > > Currently the memory footprint of the static shared memory feature > is impacting all the struct meminfo instances with memory space > that is not going to be used. > > To solve this issue, rework the static shared memory extra >

Re: [PATCH 06/11] xen/arm: Avoid code duplication in find_unallocated_memory

2024-03-21 Thread Michal Orzel
Hi Luca, On 20/03/2024 15:53, Luca Fancellu wrote: > > >> On 20 Mar 2024, at 10:57, Michal Orzel wrote: >> >> Hi Luca, >> >> On 12/03/2024 14:03, Luca Fancellu wrote: >>> >>> >>> The function find_unallocated_memory is using

Re: [PATCH 06/11] xen/arm: Avoid code duplication in find_unallocated_memory

2024-03-20 Thread Michal Orzel
Hi Luca, On 12/03/2024 14:03, Luca Fancellu wrote: > > > The function find_unallocated_memory is using the same code to > loop through 3 structure of the same type, in order to avoid > code duplication, rework the code to have only one loop that > goes through all the structures. > >

Re: [PATCH 05/11] xen/arm: Introduce helper for static memory pages

2024-03-20 Thread Michal Orzel
> > +static inline void init_staticmem_bank(const struct membank *bank) > +{ > +mfn_t bank_start = _mfn(PFN_UP(bank->start)); The header should be self-contained so you should add that is not included in asm/kernel.h path. Other than that: Reviewed-by: Michal Orzel ~Michal

Re: [PATCH 04/11] xen/arm: Conditional compilation of kernel_info.shm_mem member

2024-03-19 Thread Michal Orzel
mber won't be used and will waste memory > space. > > To address this issue, protect the member with the Kconfig parameter > and modify the signature of the only function using it to remove > any reference to the member from outside the static-shmem module. > > Signed-off

Re: [PATCH 03/11] xen/arm: Introduce a generic way to access memory bank structures

2024-03-19 Thread Michal Orzel
Hi Luca, On 12/03/2024 14:03, Luca Fancellu wrote: > > > Currently the 'stuct meminfo' is defining a static defined array of > 'struct membank' of NR_MEM_BANKS elements, some feature like > shared memory don't require such amount of memory allocation but > might want to reuse existing code to

Re: [PATCH 02/11] xen/arm: avoid repetitive checking in process_shm_node

2024-03-19 Thread Michal Orzel
within MAX_SHM_ID_LENGTH at the beginning of the function with strnlen. Other than that: Reviewed-by: Michal Orzel ~Michal

[PATCH] xen/nospec: Include

2024-03-19 Thread Michal Orzel
Signed-off-by: Michal Orzel --- xen/include/xen/nospec.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/include/xen/nospec.h b/xen/include/xen/nospec.h index e8d73f9538e5..9fb15aa26aa9 100644 --- a/xen/include/xen/nospec.h +++ b/xen/include/xen/nospec.h @@ -7,6 +7,8 @@ #ifndef XE

Re: [PATCH v2 4/5] xen/arm: Find unallocated spaces for magic pages of direct-mapped domU

2024-03-11 Thread Michal Orzel
On 11/03/2024 14:46, Michal Orzel wrote: > > > Hi Henry, > > On 08/03/2024 02:54, Henry Wang wrote: >> For 1:1 direct-mapped dom0less DomUs, the magic pages should not clash >> with any RAM region. To find a proper region for guest magic pages, >> we can

Re: [PATCH v2 4/5] xen/arm: Find unallocated spaces for magic pages of direct-mapped domU

2024-03-11 Thread Michal Orzel
Hi Henry, On 08/03/2024 02:54, Henry Wang wrote: > For 1:1 direct-mapped dom0less DomUs, the magic pages should not clash > with any RAM region. To find a proper region for guest magic pages, > we can reuse the logic of finding domain extended regions. > > Extract the logic of finding domain

Re: [PATCH v2 3/5] xen/domctl, tools: Introduce a new domctl to get guest memory map

2024-03-11 Thread Michal Orzel
Hi Henry, On 08/03/2024 02:54, Henry Wang wrote: > There are some use cases where the toolstack needs to know the guest > memory map. For example, the toolstack helper application > "init-dom0less" needs to know the guest magic page regions for 1:1 > direct-mapped dom0less DomUs to allocate magic

Re: [PATCH v2 2/5] xen/domain.h: Centrialize is_domain_direct_mapped()

2024-03-08 Thread Michal Orzel
efine a stub is_domain_direct_mapped() in arch > header. > > Move is_domain_direct_mapped() to a centralized place at xen/domain.h > and evaluate CDF_directmap for non-Arm architecture to 0. > > Signed-off-by: Henry Wang Shouldn't you add Suggested-by: Jan? Reviewed-by: Michal Orz

Re: [PATCH] xen/arm: Set correct per-cpu cpu_core_mask

2024-03-08 Thread Michal Orzel
Hi Henry, On 08/03/2024 03:05, Henry Wang wrote: > Hi everyone, > > On 2/26/2024 6:43 PM, Michal Orzel wrote: >>>>> xen/arch/arm/smpboot.c | 6 +- >>>>> 1 file changed, 5 insertions(+), 1 deletion(-) >>>>> >>>>

Re: [PATCH v2 1/5] xen/arm: Rename assign_static_memory_11() for consistency

2024-03-08 Thread Michal Orzel
Hi Henry, On 08/03/2024 02:54, Henry Wang wrote: > Currently on Arm there are 4 functions to allocate memory as domain > RAM at boot time for different types of domains: > (1) allocate_memory(): To allocate memory for Dom0less DomUs that > do not use static memory. > (2)

Re: [RFC PATCH v2] xen/arm: improve handling of load/store instruction decoding

2024-03-07 Thread Michal Orzel
On 07/03/2024 11:02, Manos Pitsidianakis wrote: > > > Hi Michal, Alex, > > I'm responding to Michel but also giving my own review comments here. > > On Thu, 07 Mar 2024 10:40, Michal Orzel wrote: >> Hi Alex, >> >> NIT: RFC tag is no longer needed.

Re: [RFC PATCH v2] xen/arm: improve handling of load/store instruction decoding

2024-03-07 Thread Michal Orzel
Hi Alex, NIT: RFC tag is no longer needed. On 06/03/2024 17:56, Alex Bennée wrote: > > > While debugging VirtIO on Arm we ran into a warning due to memory > being memcpy'd across MMIO space. While the bug was in the mappings > the warning was a little confusing: > > (XEN) d47v2 Rn should

Re: [PATCH] x86+Arm: drop (rename) __virt_to_maddr() / __maddr_to_virt()

2024-03-05 Thread Michal Orzel
On 05/03/2024 20:24, Julien Grall wrote: > > > Hi Jan, > > The title is quite confusing. I would have expected the macro... > > On 05/03/2024 08:33, Jan Beulich wrote: >> There's no use of them anymore except in the definitions of the non- >> underscore-prefixed aliases. Rename the inline

[PATCH] docs/misra/rules.rst: Fix entry for 20.12 rule

2024-03-01 Thread Michal Orzel
/rules.rst: add rule 16.6 and 20.12") Signed-off-by: Michal Orzel --- Failed pipeline: https://gitlab.com/xen-project/xen/-/pipelines/1196428827 --- docs/misra/rules.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index c1853669669d..

Re: [PATCH v2 1/3] docs/misra/rules.rst: add rule 16.6 and 20.12

2024-03-01 Thread Michal Orzel
On 01/03/2024 02:56, Stefano Stabellini wrote: > > > Hi all, > > This patch broke gitlab-ci. The jobs failing are the cppcheck jobs. > > xen/scripts/xen-analysis.py --run-cppcheck --cppcheck-misra -- -j80 > No summary for rule 20.12 This is the error message. For rule 20.12, the summary and

Re: [PATCH] SUPPORT.md: clarify support of booting 32-bit Xen on ARMv8

2024-02-29 Thread Michal Orzel
On 29/02/2024 13:40, Julien Grall wrote: > > > On 29/02/2024 12:37, Michal Orzel wrote: >> Hi Julien, > > Hi Michal, > >> >> On 29/02/2024 13:35, Julien Grall wrote: >>> On 29/02/2024 12:13, Michal Orzel wrote: >>>> Sinc

Re: [PATCH] SUPPORT.md: clarify support of booting 32-bit Xen on ARMv8

2024-02-29 Thread Michal Orzel
Hi Julien, On 29/02/2024 13:35, Julien Grall wrote: > > > Hi Michal, > > On 29/02/2024 12:13, Michal Orzel wrote: >> Since commit bd1001db0af1 ("xen/arm: arm32: Allow Xen to boot on >> unidentified CPUs"), it's been possible to boot 32-bit Xen on ARMv8A

Re: [PATCH] xen/arm: Fix arm32 build failure when early printk is enabled

2024-02-29 Thread Michal Orzel
On 29/02/2024 11:10, Julien Grall wrote: > > > Hi, > > On 29/02/2024 10:07, Michal Orzel wrote: >> >> >> On 28/02/2024 23:27, Stefano Stabellini wrote: >>> >>> >>> On Wed, 28 Feb 2024, Michal Orzel wrote: >>>> Hi Julien,

[PATCH] SUPPORT.md: clarify support of booting 32-bit Xen on ARMv8

2024-02-29 Thread Michal Orzel
s uncommon and hasn't really been tested/hardened. Signed-off-by: Michal Orzel --- SUPPORT.md | 1 + 1 file changed, 1 insertion(+) diff --git a/SUPPORT.md b/SUPPORT.md index a90d1108c9d9..acc61230bb5e 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -40,6 +40,7 @@ supported in this document. Status:

Re: [PATCH] xen/arm: Fix arm32 build failure when early printk is enabled

2024-02-29 Thread Michal Orzel
On 28/02/2024 23:27, Stefano Stabellini wrote: > > > On Wed, 28 Feb 2024, Michal Orzel wrote: >> Hi Julien, >> >> On 28/02/2024 12:42, Julien Grall wrote: >>> >>> >>> Hi Michal, >>> >>> On 28/02/2024 10:35, Mich

Re: [PATCH] xen/arm: Fix arm32 build failure when early printk is enabled

2024-02-28 Thread Michal Orzel
Hi Julien, On 28/02/2024 12:42, Julien Grall wrote: > > > Hi Michal, > > On 28/02/2024 10:35, Michal Orzel wrote: >> Commit 0441c3acc7e9 forgot to rename FIXMAP_CONSOLE to FIX_CONSOLE in >> TEMPORARY_EARLY_UART_VIRTUAL_ADDRESS macro. This results in a build >

[PATCH] xen/arm: Fix arm32 build failure when early printk is enabled

2024-02-28 Thread Michal Orzel
("xen/arm: fixmap: Rename the fixmap slots to follow the x86 convention") Signed-off-by: Michal Orzel --- xen/arch/arm/include/asm/early_printk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/include/asm/early_printk.h b/xen/arch/arm/include/asm/earl

  1   2   3   4   5   6   7   8   9   10   >