[PATCH v4 13/17] softmmu: Pass RAM MemoryRegion and is_write xen_map_cache()

2024-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Propagate MR and is_write to xen_map_cache(). This is in preparation for adding support for grant mappings. No functional change. Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-mapcache.c | 10 ++ include/sysemu/xen-mapca

[PATCH v4 09/17] xen: mapcache: Break out xen_invalidate_map_cache_single()

2024-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Break out xen_invalidate_map_cache_single(). No functional changes. Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-mapcache.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/hw/xen/xen-mapcache.c b/

[PATCH v4 15/17] xen: mapcache: Remove assumption of RAMBlock with 0 offset

2024-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" The current mapcache assumes that all memory is mapped in a single RAM MR (the first one with offset 0). Remove this assumption and propagate the offset to the mapcache so it can do reverse mappings (from hostptr -> ram_addr). This is in preparation for

[PATCH v4 05/17] xen: mapcache: Refactor xen_remap_bucket for multi-instance

2024-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add MapCache argument to xen_remap_bucket in preparation to support multiple map caches. No functional changes. Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-mapcache.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/

[PATCH v4 07/17] xen: mapcache: Refactor xen_replace_cache_entry_unlocked

2024-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add MapCache argument to xen_replace_cache_entry_unlocked in preparation for supporting multiple map caches. No functional change. Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-mapcache.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-)

[PATCH v4 11/17] xen: mapcache: Make MCACHE_BUCKET_SHIFT runtime configurable

2024-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Make MCACHE_BUCKET_SHIFT runtime configurable per cache instance. Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-mapcache.c | 52 ++- 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/hw/xen/xen-mapca

[PATCH v4 02/17] xen: let xen_ram_addr_from_mapcache() return -1 in case of not found entry

2024-04-30 Thread Edgar E. Iglesias
From: Juergen Gross Today xen_ram_addr_from_mapcache() will either abort() or return 0 in case it can't find a matching entry for a pointer value. Both cases are bad, so change that to return an invalid address instead. Signed-off-by: Juergen Gross Signed-off-by: Edgar E. Iglesias Reviewed

[PATCH v4 16/17] xen: mapcache: Add support for grant mappings

2024-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add a second mapcache for grant mappings. The mapcache for grants needs to work with XC_PAGE_SIZE granularity since we can't map larger ranges than what has been granted to us. Like with foreign mappings (xen_memory), machines using grants are expected to

[PATCH v4 14/17] xen: Add xen_mr_is_memory()

2024-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add xen_mr_is_memory() to abstract away tests for the xen_memory MR. Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-hvm-common.c | 8 +++- include/sysemu/xen.h| 8 system/physmem.c| 2 +- 3 files changed, 16 insertions(+), 2

[PATCH v4 12/17] xen: mapcache: Unmap first entries in buckets

2024-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" When invalidating memory ranges, if we happen to hit the first entry in a bucket we were never unmapping it. This was harmless for foreign mappings but now that we're looking to reuse the mapcache for transient grant mappings, we must unmap entries when i

[PATCH v4 03/17] xen: mapcache: Refactor lock functions for multi-instance

2024-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Make the lock functions take MapCache * as argument. This is in preparation for supporting multiple caches. No functional changes. Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-mapcache.c | 34 +- 1 file changed, 17

[PATCH v4 10/17] xen: mapcache: Break out xen_map_cache_init_single()

2024-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Break out xen_map_cache_init_single() in preparation for adding multiple map caches. Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-mapcache.c | 53 ++- 1 file changed, 32 insertions(+), 21 deletions(-) diff --gi

[PATCH v4 06/17] xen: mapcache: Break out xen_ram_addr_from_mapcache_single

2024-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Break out xen_ram_addr_from_mapcache_single(), a multi-cache aware version of xen_ram_addr_from_mapcache. No functional changes. Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-mapcache.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletion

[PATCH v4 08/17] xen: mapcache: Refactor xen_invalidate_map_cache_entry_unlocked

2024-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add MapCache argument to xen_invalidate_map_cache_entry_unlocked. This is in preparation for supporting multiple map caches. No functional changes. Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-mapcache.c | 21 +++-- 1 file changed, 11

[PATCH v4 04/17] xen: mapcache: Refactor xen_map_cache for multi-instance

2024-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Make xen_map_cache take a MapCache as argument. This is in prepaparation to support multiple map caches. No functional changes. Signed-off-by: Edgar E. Iglesias --- hw/xen/xen-mapcache.c | 35 ++- 1 file changed, 18 inserti

Re: [RFC PATCH v1 1/2] xen/arm64: entry: Use xen/linkage.h to annotate symbols

2024-04-18 Thread Edgar E. Iglesias
On Thu, Apr 18, 2024 at 8:10 AM Jan Beulich wrote: > > On 10.04.2024 12:24, Edgar E. Iglesias wrote: > > On Wed, Apr 10, 2024 at 12:21 PM Andrew Cooper > > wrote: > > > >> On 10/04/2024 10:19 am, Edgar E. Iglesias wrote: > >>> From: "Edgar E. Ig

[PATCH v2 1/1] xen/arm64: entry: Add missing code symbol annotations

2024-04-16 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Use the generic xen/linkage.h macros when and add missing code symbol annotations. Signed-off-by: Edgar E. Iglesias --- xen/arch/arm/arm64/entry.S | 72 +- 1 file changed, 48 insertions(+), 24 deletions(-) diff --git

[PATCH v2 0/1] xen/arm: Annotate code symbols

2024-04-16 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" On the way towards Xen safety certification we're evaluating the use of tools to collect code-coverage/profiling information from execution traces. Some tools rely on ELF symbols for code being declared with type FUNC and having a symbol size. We currentl

Re: [VirtIO] Support for various devices in Xen

2024-04-12 Thread Edgar E. Iglesias
On Fri, Apr 12, 2024 at 1:23 AM Stefano Stabellini wrote: > > -Vikram +Edgar > > On Thu, 11 Apr 2024, Andrei Cherechesu wrote: > > Hi Stefano, Vikram, Viresh, > > > > Thank you for your answers and support, and sorry for my late reply. > > > > > > On 12/01/2024 02:56, Vikram Garhwal wrote: > > >

Re: [QEMU][PATCH v3 4/7] xen: let xen_ram_addr_from_mapcache() return -1 in case of not found entry

2024-04-10 Thread Edgar E. Iglesias
reventry->vaddr_req); > > -} > > If these tracepoints aren't useful they need removing from trace-events. > However I suspect it would be better to keep them in as they are fairly > cheap. > > Otherwise: > > Reviewed-by: Alex Bennée > > Reviewed-by: Edgar E. Iglesias

Re: [QEMU][PATCH v3 2/7] xen: add pseudo RAM region for grant mappings

2024-04-10 Thread Edgar E. Iglesias
> distinguish it from normal RAM. > > Is the Xen memory map for HVM guests documented anywhere? I couldn't > find anything googling or on the Xen wiki. I'm guessing this is going to > be shared across all 64 bit HVM arches in Xen? > > Anyway: > > Reviewed-by: Alex Bennée > > Reviewed-by: Edgar E. Iglesias

Re: [QEMU][PATCH v3 6/7] xen: add map and unmap callbacks for grant region

2024-04-10 Thread Edgar E. Iglesias
d-off-by: Juergen Gross > > Signed-off-by: Vikram Garhwal > > Reviewed-by: Stefano Stabellini > > Reviewed-by: Edgar E. Iglesias

Re: [RFC PATCH v1 1/2] xen/arm64: entry: Use xen/linkage.h to annotate symbols

2024-04-10 Thread Edgar E. Iglesias
On Wed, Apr 10, 2024 at 12:21 PM Andrew Cooper wrote: > On 10/04/2024 10:19 am, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Use the generic xen/linkage.h macros when annotating symbols. > > > > Signed-off-by: Edgar E. Iglesias &

[RFC PATCH v1 0/2] xen/arm: Annotate code symbols

2024-04-10 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" On the way towards Xen safety certification we're evaluating the use of tools to collect code-coverage/profiling information from execution traces. Some tools rely on ELF symbols for code being declared with type FUNC and having a symbol size. We currentl

[RFC PATCH v1 2/2] xen/arm64: entry: Add missing code symbol annotations

2024-04-10 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Add missing code symbol annotations. Signed-off-by: Edgar E. Iglesias --- xen/arch/arm/arm64/entry.S | 60 ++ 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/xen/arch/arm/arm64/entry.S b/xen/arch/arm/arm

[RFC PATCH v1 1/2] xen/arm64: entry: Use xen/linkage.h to annotate symbols

2024-04-10 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Use the generic xen/linkage.h macros when annotating symbols. Signed-off-by: Edgar E. Iglesias --- xen/arch/arm/arm64/entry.S | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/arch/arm/arm64/entry.S b/xen/arch/arm/arm

Re: [PATCH] xen/arm32: SPSR_hyp/SPSR

2021-06-09 Thread Edgar E. Iglesias
. > > Please provide a reference to the spec. This helps reviewer and/or future > developper to figure out quickly where this comes from. > > > > > This fixes booting Xen/arm32 on QEMU. > > > > Signed-off-by: Stefano Stabellini > > With the reference added:

Re: [Xen-devel] [Qemu-devel] [qemu-s390x] [PATCH v7 33/42] exec: Replace device_endian with MemOp

2019-08-19 Thread Edgar E. Iglesias
On Mon, 19 Aug. 2019, 23:01 Richard Henderson, wrote: > On 8/19/19 11:29 AM, Paolo Bonzini wrote: > > On 19/08/19 20:28, Paolo Bonzini wrote: > >> On 16/08/19 12:12, Thomas Huth wrote: > >>> This patch is *huge*, more than 800kB. It keeps being stuck in the the > >>> filter of the qemu-s390x

Re: [Xen-devel] [PATCH RFC 03/15] xen/arm: extend device tree based multiboot protocol

2018-07-03 Thread Edgar E. Iglesias
Hi, Sorry for the top post (I'm not managing todo in line reply with my phone). Yes, in the long run it there are some benefits if the format could be kept similar when possible. We could reuse some of the documentation and perhaps some of the code to parse. Allthough I'm guessing that most of

Re: [Xen-devel] [PATCH RFC 00/15] dom0less step1: boot multiple domains from device tree

2018-06-14 Thread Edgar E. Iglesias
On Wed, Jun 13, 2018 at 03:15:09PM -0700, Stefano Stabellini wrote: > Hi all, > > This is first step toward "dom0less" as discussed in the various > certifications related threads and discussions. > > The goal of this series is to enable Xen to boot multiple domains in > parallel, in addition to

Re: [Xen-devel] [RFC v2] xen/arm: Suspend to RAM Support in Xen for ARM

2018-03-26 Thread Edgar E. Iglesias
On Mon, Mar 26, 2018 at 09:51:40AM +, Peng Fan wrote: > Hi Mirela, > > Good to know that you are working suspend/resume support. Currently we are > also trying > to support this on i.MX8, just wonder do you have any open source available to > support suspend to ram? > > > + > > +Suspend to

Re: [Xen-devel] [PATCH v2] xen/arm: Fix platform name to xilinx_zynqmp from xgene_storm

2018-03-18 Thread Edgar E. Iglesias
On Sun, Mar 18, 2018 at 02:50:26PM +0530, Amit Singh Tomar wrote: > Signed-off-by: Amit Singh Tomar <amittome...@gmail.com> Reviewed-by: Edgar E. Iglesias <edgar.igles...@xilinx.com> > --- > Changes since v1: > * Addressed Andre's comment. > --- > xen/arch

Re: [Xen-devel] [RFC v2] xen/arm: Suspend to RAM Support in Xen for ARM

2018-01-25 Thread Edgar E. Iglesias
On Wed, Jan 24, 2018 at 07:04:35PM +0100, Mirela Simonovic wrote: > Hi Oleksandr, Edgar, > > > Thanks, you're right. > > > On 01/23/2018 12:58 PM, Edgar E. Iglesias wrote: > >On Tue, Jan 23, 2018 at 01:52:50PM +0200, Oleksandr Tyshchenko wrote: > >>H

Re: [Xen-devel] [RFC v2] xen/arm: Suspend to RAM Support in Xen for ARM

2018-01-23 Thread Edgar E. Iglesias
On Tue, Jan 23, 2018 at 01:52:50PM +0200, Oleksandr Tyshchenko wrote: > Hi Mirela, > > Just some remarks regarding the scope of work: > > +In addition, the following have to be implemented: > +* Suspend/resume vCPU (triggered by vSYSTEM_SUSPEND call) > +* Suspend/resume Xen (triggered by