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

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

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

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

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

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

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

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

Re: [PATCH v5 5/8] softmmu: Replace check for RAMBlock offset 0 with xen_mr_is_memory

2024-05-15 Thread Stefano Stabellini
this has no > functional change for existing machines. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- > system/physmem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/system/physmem.c b/system/physmem.c > index 5e62

Re: [PATCH v5 4/8] softmmu: xen: Always pass offset + addr to xen_map_cache

2024-05-15 Thread Stefano Stabellini
functional changes. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- > system/physmem.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/system/physmem.c b/system/physmem.c > index 342b7a8fd4..5e6257ef65 100644 > --

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

2024-05-02 Thread Stefano Stabellini
On Thu, 2 May 2024, Edgar E. Iglesias wrote: > On Thu, May 2, 2024 at 8:53 PM Stefano Stabellini > wrote: > > > > +Xenia > > > > On Thu, 2 May 2024, Edgar E. Iglesias wrote: > > > On Wed, May 1, 2024 at 11:24 PM Stefano Stabellini > > > wro

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

2024-05-02 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > 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

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

2024-05-02 Thread Stefano Stabellini
+Xenia On Thu, 2 May 2024, Edgar E. Iglesias wrote: > On Wed, May 1, 2024 at 11:24 PM Stefano Stabellini > wrote: > > > > On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > > > From: "Edgar E. Iglesias" > > > > > > The current mapcache ass

Re: [PATCH v4 17/17] hw/arm: xen: Enable use of grant mappings

2024-05-01 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- > hw/arm/xen_arm.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/hw/arm/xen_arm.c b/h

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

2024-05-01 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > 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

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

2024-05-01 Thread Stefano Stabellini
n't want to map the entire memory in QEMU. > * In that case just map the requested area. > */ > -if (block->offset == 0) { > +if (xen_mr_is_memory(block->mr)) { This changes this check from block->offset == 0 to block->mr == _

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

2024-05-01 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > 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

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

2024-05-01 Thread Stefano Stabellini
> mapcache for transient grant mappings, we must unmap entries > when invalidated. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- > hw/xen/xen-mapcache.c | 12 > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff -

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

2024-05-01 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Make MCACHE_BUCKET_SHIFT runtime configurable per cache instance. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- &

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

2024-05-01 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Break out xen_map_cache_init_single() in preparation for > adding multiple map caches. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --

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

2024-05-01 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Break out xen_invalidate_map_cache_single(). > > No functional changes. > > Signed-off-by: Edgar E. Iglesias Reviewed-by: Stefano Stabellini > --- > hw/xen/xen-mapcache.

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

2024-05-01 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > 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

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

2024-05-01 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > 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

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

2024-05-01 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > 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

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

2024-05-01 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > 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 Reviewed-by: Stefano

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

2024-05-01 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > 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

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

2024-05-01 Thread Stefano Stabellini
On Tue, 30 Apr 2024, Edgar E. Iglesias wrote: > 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

Re: [PATCH] MAINTAINERS: Update my email address

2024-04-29 Thread Stefano Stabellini
On Mon, 29 Apr 2024, Anthony PERARD wrote: > From: Anthony PERARD > > Signed-off-by: Anthony PERARD Acked-by: Stefano Stabellini > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 30

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

2024-02-29 Thread Stefano Stabellini
On Tue, 27 Feb 2024, Vikram Garhwal wrote: > From: Juergen Gross > > Add the callbacks for mapping/unmapping guest memory via grants to the > special grant memory region. > > Signed-off-by: Juergen Gross > Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini

Re: [QEMU][PATCH v3 5/7] memory: add MemoryRegion map and unmap callbacks

2024-02-29 Thread Stefano Stabellini
be used e.g. for Xen grant mappings when performing guest > I/Os. > > Signed-off-by: Juergen Gross > Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini > --- > include/exec/memory.h | 21 ++ > system/physmem.c | 50

Re: [RFC QEMU PATCH v4 1/1] xen: Use gsi instead of irq for mapping pirq

2024-02-22 Thread Stefano Stabellini
/devices//irq in current code, so it > will fail when mapping. > > Add gsi into XenHostPCIDevice and use gsi number that > read from gsi sysfs if it exists. > > Co-developed-by: Huang Rui > Signed-off-by: Jiqian Chen Reviewed-by: Stefano Stabellini > --- > hw/xen/xen-h

Re: [PATCH V2] xen: Drop out of coroutine context xen_invalidate_map_cache_entry

2024-01-23 Thread Stefano Stabellini
c:1559 > --Type for more, q to quit, c to continue without paging-- > at ../qemu-xen-dir-remote/block/block-backend.c:1614 > i1=) at > ../qemu-xen-dir-remote/util/coroutine-ucontext.c:177 > at ../sysdeps/unix/sysv/linux/aarch64/setcontext.S:123 > > Signed-off-by:

Re: [PATCH] xen: Drop out of coroutine context xen_invalidate_map_cache_entry

2024-01-23 Thread Stefano Stabellini
On Tue, 16 Jan 2024, Peng Fan (OSS) wrote: > From: Peng Fan > > xen_invalidate_map_cache_entry is not expected to run in a > coroutine. Without this, there is crash: > > signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44 > threadid=) at pthread_kill.c:78 > at

Re: [PATCH] xen: fix condition for enabling the Xen accelerator

2023-12-11 Thread Stefano Stabellini
G_XEN'] similar to what is > already there for KVM, and fix xen_native.h. > > Cc: Stefano Stabellini > Cc: Richard W.M. Jones > Cc: Daniel P. Berrangé > Reported-by: Michael Young > Supersedes: > <277e21fc78b75ec459efc7f5fde628a0222c63b0.1701989261.git.m.a.yo...@durh

Re: [PATCH] fix qemu build with xen-4.18.0

2023-12-08 Thread Stefano Stabellini
On Fri, 8 Dec 2023, Daniel P. Berrangé wrote: > CC'ing the Xen folks > > On Thu, Dec 07, 2023 at 11:12:48PM +, Michael Young wrote: > > Builds of qemu-8.2.0rc2 with xen-4.18.0 are currently failing > > with errors like > > ../hw/arm/xen_arm.c:74:5: error: ‘GUEST_VIRTIO_MMIO_SPI_LAST’

Re: Adding MSI support for virtio-pci to QEMU as Xen backend on ARM

2023-12-08 Thread Stefano Stabellini
+Stewart On Fri, 8 Dec 2023, Mykyta Poturai wrote: > Hello everyone, > > I am currently working on adding MSI support to virtio-pci on ARM with Xen. Excellent! > As far as I understand QEMU Xen ARM machine that is used for virtio-pci > device emulation does not initialize any interrupt

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-22 Thread Stefano Stabellini
On Wed, 22 Nov 2023, David Woodhouse wrote: > On Wed, 2023-11-22 at 15:09 -0800, Stefano Stabellini wrote: > > On Wed, 22 Nov 2023, David Woodhouse wrote: > > > On Wed, 2023-11-22 at 14:29 -0800, Stefano Stabellini wrote: > > > > On Wed, 22 Nov 2023, Paul Durrant wro

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-22 Thread Stefano Stabellini
On Wed, 22 Nov 2023, David Woodhouse wrote: > On Wed, 2023-11-22 at 14:29 -0800, Stefano Stabellini wrote: > > On Wed, 22 Nov 2023, Paul Durrant wrote: > > > On 21/11/2023 22:10, Volodymyr Babchuk wrote: > > > > From: Oleksandr Tyshchenko > > > > >

Re: [PATCH v2 6/6] xen_arm: Add virtual PCIe host bridge support

2023-11-22 Thread Stefano Stabellini
+Vikram On Tue, 21 Nov 2023, Volodymyr Babchuk wrote: > From: Oleksandr Tyshchenko > > The bridge is needed for virtio-pci support, as QEMU can emulate the > whole bridge with any virtio-pci devices connected to it. > > This patch provides a flexible way to configure PCIe brige resources >

Re: [PATCH v2 4/6] xen_pvdev: Do not assume Dom0 when creating a directory

2023-11-22 Thread Stefano Stabellini
On Wed, 22 Nov 2023, Paul Durrant wrote: > On 21/11/2023 22:10, Volodymyr Babchuk wrote: > > From: Oleksandr Tyshchenko > > > > Instead of forcing the owner to domid 0, use XS_PRESERVE_OWNER to > > inherit the owner of the directory. > > Ah... so that's why the previous patch is there. > >

Re: [PATCH v2 3/6] xen: xenstore: add possibility to preserve owner

2023-11-22 Thread Stefano Stabellini
On Wed, 22 Nov 2023, Paul Durrant wrote: > On 21/11/2023 22:10, Volodymyr Babchuk wrote: > > Add option to preserve owner when creating an entry in Xen Store. This > > may be needed in cases when Qemu is working as device model in a > > *may* be needed? > > I don't undertstand why this patch is

Re: [QEMU][PATCHv2 0/8] Xen: support grant mappings.

2023-11-14 Thread Stefano Stabellini
On Tue, 14 Nov 2023, Juergen Gross wrote: > On 13.11.23 21:24, David Woodhouse wrote: > > On Fri, 2023-10-27 at 07:27 +0200, Juergen Gross wrote: > > > On 26.10.23 22:56, Stefano Stabellini wrote: > > > > On Thu, 26 Oct 2023, David Woodhouse wrote: > > >

[PULL 1/1] Xen: Fix xen_set_irq() and xendevicemodel_set_irq_level()

2023-11-07 Thread Stefano Stabellini
Remove '=' from 'if CONFIG_XEN_CTRL_INTERFACE_VERSION <= 41500'. Because xendevicemodel_set_irq_level() was introduced in 4.15 version. Also, update xendevicemodel_set_irq_level() to return -1 for older versions. Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini --- hw/

[PULL 0/1] xen-virtio-fix-1-tag

2023-11-07 Thread Stefano Stabellini
Minor bug fix for Virtio/Xen support The following changes since commit 462ad017ed76889d46696a3581e1b52343f9b683: Merge tag 'xen-virtio-fix-1-tag' of https://gitlab.com/marcandre.lureau/qemu into staging (2023-11-07 19:00:03 +0800) are available in the Git repository at:

Re: [QEMU][PATCH v1] Xen: Fix xen_set_irq() and xendevicemodel_set_irq_level()

2023-11-01 Thread Stefano Stabellini
ff-by: Vikram Garhwal Reviewed-by: Stefano Stabellini > --- > hw/arm/xen_arm.c| 4 +++- > include/hw/xen/xen_native.h | 4 ++-- > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c > index f83b983ec5..a5631529

Re: [QEMU][PATCHv2 0/8] Xen: support grant mappings.

2023-10-26 Thread Stefano Stabellini
On Thu, 26 Oct 2023, David Woodhouse wrote: > On Thu, 2023-10-26 at 13:36 -0700, Stefano Stabellini wrote: > > > > > This seems like a lot of code to replace that simpler option... is > > > there a massive performance win from doing it this way? Would we want > >

Re: [QEMU][PATCHv2 0/8] Xen: support grant mappings.

2023-10-26 Thread Stefano Stabellini
On Thu, 26 Oct 2023, David Woodhouse wrote: > On Thu, 2023-10-26 at 11:07 -0700, Stefano Stabellini wrote: > > On Thu, 26 Oct 2023, David Woodhouse wrote: > > > On Wed, 2023-10-25 at 14:24 -0700, Vikram Garhwal wrote: > > > > Hi, > > > > This patch series

Re: [QEMU][PATCHv2 0/8] Xen: support grant mappings.

2023-10-26 Thread Stefano Stabellini
On Thu, 26 Oct 2023, David Woodhouse wrote: > On Wed, 2023-10-25 at 14:24 -0700, Vikram Garhwal wrote: > > Hi, > > This patch series add support for grant mappings as a pseudo RAM region for > > Xen. > > > > Enabling grant mappings patches(first 6) are written by Juergen in 2021. > > > > QEMU

Re: [QEMU][PATCH v1 5/7] memory: add MemoryRegion map and unmap callbacks

2023-10-25 Thread Stefano Stabellini
On Wed, 11 Oct 2023, Juergen Gross wrote: > On 10.10.23 02:17, Stefano Stabellini wrote: > > On Thu, 5 Oct 2023, Vikram Garhwal wrote: > > > From: Juergen Gross > > > > > > In order to support mapping and unmapping guest memory dynamically to > > &g

Re: [QEMU][PATCHv2 7/8] xen: add map and unmap callbacks for grant region

2023-10-25 Thread Stefano Stabellini
On Wed, 25 Oct 2023, Vikram Garhwal wrote: > From: Juergen Gross > > Add the callbacks for mapping/unmapping guest memory via grants to the > special grant memory region. > > Signed-off-by: Juergen Gross > Signed-off-by: Vikram Garhwal > --- > hw/xen/xen-mapcache.c | 175

Re: [QEMU][PATCHv2 4/8] softmmu: let qemu_map_ram_ptr() use qemu_ram_ptr_length()

2023-10-25 Thread Stefano Stabellini
d-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini > --- > system/physmem.c | 58 +++- > 1 file changed, 23 insertions(+), 35 deletions(-) > > diff --git a/system/physmem.c b/system/physmem.c > index 7a7f95b8b9..667a695078 1006

Re: [QEMU][PATCHv2 3/8] xen: add pseudo RAM region for grant mappings

2023-10-25 Thread Stefano Stabellini
xen.ram memory region is expanded, which has no > further impact as it is used just as a container of the real RAM > regions and now the grant region. > > Signed-off-by: Juergen Gross > Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini > --- > hw/i386/xen/xen-

Re: [QEMU][PATCHv2 2/8] softmmu: physmem: Split ram_block_add()

2023-10-25 Thread Stefano Stabellini
Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini > --- > include/exec/ram_addr.h | 1 + > system/physmem.c| 62 ++--- > 2 files changed, 40 insertions(+), 23 deletions(-) > > diff --git a/include/exec/ram_addr.h b/inc

Re: [QEMU][PATCHv2 1/8] xen: when unplugging emulated devices skip virtio devices

2023-10-25 Thread Stefano Stabellini
On Thu, 26 Oct 2023, David Woodhouse wrote: > On Wed, 2023-10-25 at 14:24 -0700, Vikram Garhwal wrote: > > From: Juergen Gross > > > > Virtio devices should never be unplugged at boot time, as they are > > similar to pci passthrough devices. > > > > Signed-off-by: Juergen Gross > >

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

2023-10-10 Thread Stefano Stabellini
On Tue, 10 Oct 2023, Vikram Garhwal wrote: > On Mon, Oct 09, 2023 at 05:02:14PM -0700, Stefano Stabellini wrote: > > On Thu, 5 Oct 2023, Vikram Garhwal wrote: > > > From: Juergen Gross > > > > > > Add a memory region which can be used to automatically map

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

2023-10-09 Thread Stefano Stabellini
On Mon, 9 Oct 2023, Stefano Stabellini wrote: > On Thu, 5 Oct 2023, Vikram Garhwal wrote: > > From: Juergen Gross > > > > Add a memory region which can be used to automatically map granted > > memory. It is starting at 0x8000ULL in order to be able to >

Re: [QEMU][PATCH v1 7/7] hw: arm: Add grant mapping.

2023-10-09 Thread Stefano Stabellini
On Thu, 5 Oct 2023, Vikram Garhwal wrote: > Enable grant ram mapping support for Xenpvh machine on ARM. > > Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini > --- > hw/arm/xen_arm.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/arm/xen_

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

2023-10-09 Thread Stefano Stabellini
On Thu, 5 Oct 2023, Vikram Garhwal wrote: > From: Juergen Gross > > Add the callbacks for mapping/unmapping guest memory via grants to the > special grant memory region. > > Signed-off-by: Juergen Gross > Signed-off-by: Vikram Garhwal This looks good. We need to add a check to make sure we

Re: [QEMU][PATCH v1 5/7] memory: add MemoryRegion map and unmap callbacks

2023-10-09 Thread Stefano Stabellini
On Thu, 5 Oct 2023, Vikram Garhwal wrote: > From: Juergen Gross > > In order to support mapping and unmapping guest memory dynamically to > and from qemu during address_space_[un]map() operations add the map() > and unmap() callbacks to MemoryRegionOps. > > Those will be used e.g. for Xen grant

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

2023-10-09 Thread Stefano Stabellini
> > Signed-off-by: Juergen Gross Reviewed-by: Stefano Stabellini > --- > hw/xen/xen-mapcache.c | 12 +++- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c > index 8115c44c00..8a61c7dde6 100644 > ---

Re: [QEMU][PATCH v1 3/7] softmmu: let qemu_map_ram_ptr() use qemu_ram_ptr_length()

2023-10-09 Thread Stefano Stabellini
On Thu, 5 Oct 2023, Vikram Garhwal wrote: > From: Juergen Gross > > qemu_map_ram_ptr() and qemu_ram_ptr_length() share quite some code, so > modify qemu_ram_ptr_length() a little bit and use it for > qemu_map_ram_ptr(), too. > > Signed-off-by: Juergen Gross > Signed-off-by: Vikram Garhwal

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

2023-10-09 Thread Stefano Stabellini
On Thu, 5 Oct 2023, Vikram Garhwal wrote: > From: Juergen Gross > > Add a memory region which can be used to automatically map granted > memory. It is starting at 0x8000ULL in order to be able to > distinguish it from normal RAM. > > For this reason the xen.ram memory region is

Re: [QEMU][PATCH v1 1/7] xen: when unplugging emulated devices skip virtio devices

2023-10-09 Thread Stefano Stabellini
On Thu, 5 Oct 2023, Vikram Garhwal wrote: > From: Juergen Gross > > Virtio devices should never be unplugged at boot time, as they are > similar to pci passthrough devices. > > Signed-off-by: Juergen Gross > Signed-off-by: Vikram Garhwal > --- > hw/i386/xen/xen_platform.c | 8 +++- > 1

[PULL v2 2/2] xen_arm: Initialize RAM and add hi/low memory regions

2023-08-30 Thread Stefano Stabellini
machine usable for /etc/init.d/xencommons. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini Signed-off-by: Stefano Stabellini --- hw/arm/xen_arm.c| 45 + include/hw/xen/xen_native.h | 8 +

[PULL v2 1/2] xen_arm: Create virtio-mmio devices during initialization

2023-08-30 Thread Stefano Stabellini
is 10. For the interrupts triggering use already existing on Arm device-model hypercall. The toolstack should then insert the same amount of device nodes into guest device-tree. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini Signed-off

[PULL v2 0/2] xen-virtio-2-tag

2023-08-30 Thread Stefano Stabellini
The following changes since commit 156618d9ea67f2f2e31d9dedd97f2dcccbe6808c: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-08-30 09:20:27 -0400) are available in the Git repository at: https://gitlab.com/sstabellini/qemu.git xen-virtio-2-tag for you

Re: [QEMU][PATCH v4 1/2] xen_arm: Create virtio-mmio devices during initialization

2023-08-30 Thread Stefano Stabellini
t; Signed-off-by: Oleksandr Tyshchenko > Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini > --- > hw/arm/xen_arm.c| 35 +++ > include/hw/xen/xen_native.h | 16 > 2 files changed, 51 insertions(+

Re: [QEMU][PATCH v4 2/2] xen_arm: Initialize RAM and add hi/low memory regions

2023-08-30 Thread Stefano Stabellini
a QEMU machine without IOREQ and other > emulated devices like TPM and VIRTIO. This is done to keep this QEMU machine > usable for /etc/init.d/xencommons. > > Signed-off-by: Oleksandr Tyshchenko > Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini > --- > hw/ar

Re: QEMU features useful for Xen development?

2023-08-30 Thread Stefano Stabellini
Hi Alex, Thanks for reaching out. QEMU is an important development tool for the Xen community and we are using QEMU as part of our upstream gitlab-ci testing, see automation/scripts/qemu-*. As Xen is gaining R52 and R82 support, it would be great to be able to use QEMU for development and

Re: [QEMU][PATCH v3 2/2] xen_arm: Initialize RAM and add hi/low memory regions

2023-08-28 Thread Stefano Stabellini
On Fri, 25 Aug 2023, Vikram Garhwal wrote: > From: Oleksandr Tyshchenko > > In order to use virtio backends we need to initialize RAM for the > xen-mapcache (which is responsible for mapping guest memory using foreign > mapping) to work. Calculate and add hi/low memory regions based on >

Re: [QEMU][PATCH v3 1/2] xen_arm: Create virtio-mmio devices during initialization

2023-08-28 Thread Stefano Stabellini
On Fri, 25 Aug 2023, Vikram Garhwal wrote: > From: Oleksandr Tyshchenko > > In order to use virtio backends we need to allocate virtio-mmio > parameters (irq and base) and register corresponding buses. > > Use the constants defined in public header arch-arm.h to be > aligned with the toolstack.

[PULL 1/2] xen_arm: Create virtio-mmio devices during initialization

2023-07-21 Thread Stefano Stabellini
is 10. For the interrupts triggering use already existing on Arm device-model hypercall. The toolstack should then insert the same amount of device nodes into guest device-tree. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini --- hw/arm

[PULL 2/2] xen_arm: Initialize RAM and add hi/low memory regions

2023-07-21 Thread Stefano Stabellini
machine usable for /etc/init.d/xencommons. Signed-off-by: Oleksandr Tyshchenko Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini --- hw/arm/xen_arm.c | 45 + 1 file changed, 45 insertions(+) diff --git a/hw/arm/xen_arm.c b/hw/arm/xen

[PULL 0/2] xen-virtio-1-tag

2023-07-21 Thread Stefano Stabellini
The following changes since commit d1181d29370a4318a9f11ea92065bea6bb159f83: Merge tag 'pull-nbd-2023-07-19' of https://repo.or.cz/qemu/ericb into staging (2023-07-20 09:54:07 +0100) are available in the Git repository at: https://gitlab.com/sstabellini/qemu.git xen-virtio-1-tag for you

Re: [QEMU][PATCH v2 2/2] xen_arm: Initialize RAM and add hi/low memory regions

2023-07-07 Thread Stefano Stabellini
a QEMU machine without IOREQ and other > emulated devices like TPM and VIRTIO. This is done to keep this QEMU machine > usable for /etc/init.d/xencommons. > > Signed-off-by: Oleksandr Tyshchenko > Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini > --- > hw/arm

Re: [QEMU][PATCH v2 1/2] xen_arm: Create virtio-mmio devices during initialization

2023-07-07 Thread Stefano Stabellini
t; Signed-off-by: Oleksandr Tyshchenko > Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini > --- > hw/arm/xen_arm.c | 35 +++ > 1 file changed, 35 insertions(+) > > diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c > index

Re: [RESEND][PATCH v1 2/2] xen_arm: Initialize RAM and add hi/low memory regions

2023-06-29 Thread Stefano Stabellini
On Thu, 29 Jun 2023, Vikram Garhwal wrote: > From: Oleksandr Tyshchenko > > In order to use virtio backends we need to initialize RAM for the > xen-mapcache (which is responsible for mapping guest memory using foreign > mapping) to work. Calculate and add hi/low memory regions based on >

Re: [RESEND][PATCH v1 1/2] xen_arm: Create virtio-mmio devices during initialization

2023-06-29 Thread Stefano Stabellini
On Thu, 29 Jun 2023, Vikram Garhwal wrote: > From: Oleksandr Tyshchenko > > In order to use virtio backends we need to allocate virtio-mmio > parameters (irq and base) and register corresponding buses. > > Use the constants defined in public header arch-arm.h to be > aligned with the toolstack.

[PULL v5 10/11] meson.build: enable xenpv machine build for ARM

2023-06-15 Thread Stefano Stabellini
From: Vikram Garhwal Add CONFIG_XEN for aarch64 device to support build for ARM targets. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Reviewed-by: Alex Bennée --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build

[PULL v5 09/11] hw/arm: introduce xenpvh machine

2023-06-15 Thread Stefano Stabellini
tpm2/swtpm-sock & Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Reviewed-by: Stefano Stabellini --- docs/system/arm/xenpvh.rst| 34 +++ docs/system/target-arm.rst| 1 + hw/arm/meson.build| 2 + hw/arm/xen_arm.c

[PULL v5 03/11] hw/i386/xen/xen-hvm: move x86-specific fields out of XenIOState

2023-06-15 Thread Stefano Stabellini
From: Stefano Stabellini In preparation to moving most of xen-hvm code to an arch-neutral location, move: - shared_vmport_page - log_for_dirtybit - dirty_bitmap - suspend - wakeup out of XenIOState struct as these are only used on x86, especially the ones related to dirty logging. Updated

[PULL v5 02/11] hw/i386/xen: rearrange xen_hvm_init_pc

2023-06-15 Thread Stefano Stabellini
ioreq functions in one place which will be moved to new function in next patch in order to make it common to both x86 and aarch64 machines. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Reviewed-by: Paul Durrant --- hw/i386/xen/xen-hvm.c | 49

[PULL v5 05/11] include/hw/xen/xen_common: return error from xen_create_ioreq_server

2023-06-15 Thread Stefano Stabellini
From: Stefano Stabellini This is done to prepare for enabling xenpv support for ARM architecture. On ARM it is possible to have a functioning xenpv machine with only the PV backends and no IOREQ server. If the IOREQ server creation fails, continue to the PV backends initialization. Signed-off

[PULL v5 06/11] hw/xen/xen-hvm-common: skip ioreq creation on ioreq registration failure

2023-06-15 Thread Stefano Stabellini
From: Stefano Stabellini On ARM it is possible to have a functioning xenpv machine with only the PV backends and no IOREQ server. If the IOREQ server creation fails continue to the PV backends initialization. Also, moved the IOREQ registration and mapping subroutine to new function

[PULL v5 07/11] hw/xen/xen-hvm-common: Use g_new and error_report

2023-06-15 Thread Stefano Stabellini
From: Vikram Garhwal Replace g_malloc with g_new and perror with error_report. Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini Reviewed-by: Paul Durrant --- hw/xen/xen-hvm-common.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/xen/xen-hvm

[PULL v5 11/11] test/qtest: add xepvh to skip list for qtest

2023-06-15 Thread Stefano Stabellini
From: Vikram Garhwal Like existing xen machines, xenpvh also cannot be used for qtest. Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini --- tests/qtest/libqtest.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/libqtest.c b/tests/qtest

[PULL v5 01/11] hw/i386/xen/: move xen-mapcache.c to hw/xen/

2023-06-15 Thread Stefano Stabellini
From: Vikram Garhwal xen-mapcache.c contains common functions which can be used for enabling Xen on aarch64 with IOREQ handling. Moving it out from hw/i386/xen to hw/xen to make it accessible for both aarch64 and x86. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Reviewed

[PULL v5 08/11] meson.build: do not set have_xen_pci_passthrough for aarch64 targets

2023-06-15 Thread Stefano Stabellini
From: Stefano Stabellini have_xen_pci_passthrough is only used for Xen x86 VMs. Signed-off-by: Stefano Stabellini Reviewed-by: Alex Bennée --- meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meson.build b/meson.build index 34306a6205..481865bfa9 100644 --- a/meson.build

[PULL v5 04/11] xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common

2023-06-15 Thread Stefano Stabellini
From: Stefano Stabellini This patch does following: 1. creates arch_handle_ioreq() and arch_xen_set_memory(). This is done in preparation for moving most of xen-hvm code to an arch-neutral location, move the x86-specific portion of xen_set_memory to arch_xen_set_memory. Also, move

[PULL v5 00/11] xenpvh5-tag

2023-06-15 Thread Stefano Stabellini
) Stefano Stabellini (5): hw/i386/xen/xen-hvm: move x86-specific fields out of XenIOState xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common include/hw/xen/xen_common: return error from

Re: [QEMU][PATCH v8 11/11] test/qtest: add xepvh to skip list for qtest

2023-06-15 Thread Stefano Stabellini
On Wed, 14 Jun 2023, Vikram Garhwal wrote: > Like existing xen machines, xenpvh also cannot be used for qtest. > > Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini > --- > tests/qtest/libqtest.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >

[PULL v4 10/10] meson.build: enable xenpv machine build for ARM

2023-06-09 Thread Stefano Stabellini
From: Vikram Garhwal Add CONFIG_XEN for aarch64 device to support build for ARM targets. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Reviewed-by: Alex Bennée --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build

[PULL v4 02/10] hw/i386/xen: rearrange xen_hvm_init_pc

2023-06-09 Thread Stefano Stabellini
ioreq functions in one place which will be moved to new function in next patch in order to make it common to both x86 and aarch64 machines. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Reviewed-by: Paul Durrant --- hw/i386/xen/xen-hvm.c | 49

[PULL v4 06/10] hw/xen/xen-hvm-common: skip ioreq creation on ioreq registration failure

2023-06-09 Thread Stefano Stabellini
From: Stefano Stabellini On ARM it is possible to have a functioning xenpv machine with only the PV backends and no IOREQ server. If the IOREQ server creation fails continue to the PV backends initialization. Also, moved the IOREQ registration and mapping subroutine to new function

[PULL v4 05/10] include/hw/xen/xen_common: return error from xen_create_ioreq_server

2023-06-09 Thread Stefano Stabellini
From: Stefano Stabellini From: Stefano Stabellini This is done to prepare for enabling xenpv support for ARM architecture. On ARM it is possible to have a functioning xenpv machine with only the PV backends and no IOREQ server. If the IOREQ server creation fails, continue to the PV backends

[PULL v4 09/10] hw/arm: introduce xenpvh machine

2023-06-09 Thread Stefano Stabellini
tpm2/swtpm-sock & Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Reviewed-by: Stefano Stabellini --- docs/system/arm/xenpvh.rst| 34 +++ docs/system/target-arm.rst| 1 + hw/arm/meson.build| 2 + hw/arm/xen_arm.c

[PULL v4 08/10] meson.build: do not set have_xen_pci_passthrough for aarch64 targets

2023-06-09 Thread Stefano Stabellini
From: Stefano Stabellini have_xen_pci_passthrough is only used for Xen x86 VMs. Signed-off-by: Stefano Stabellini Reviewed-by: Alex Bennée --- meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meson.build b/meson.build index 34306a6205..481865bfa9 100644 --- a/meson.build

[PULL v4 07/10] hw/xen/xen-hvm-common: Use g_new and error_report

2023-06-09 Thread Stefano Stabellini
From: Vikram Garhwal Replace g_malloc with g_new and perror with error_report. Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini Reviewed-by: Paul Durrant --- hw/xen/xen-hvm-common.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/xen/xen-hvm

[PULL v4 04/10] xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common

2023-06-09 Thread Stefano Stabellini
From: Stefano Stabellini This patch does following: 1. creates arch_handle_ioreq() and arch_xen_set_memory(). This is done in preparation for moving most of xen-hvm code to an arch-neutral location, move the x86-specific portion of xen_set_memory to arch_xen_set_memory. Also, move

[PULL v4 01/10] hw/i386/xen/: move xen-mapcache.c to hw/xen/

2023-06-09 Thread Stefano Stabellini
From: Vikram Garhwal xen-mapcache.c contains common functions which can be used for enabling Xen on aarch64 with IOREQ handling. Moving it out from hw/i386/xen to hw/xen to make it accessible for both aarch64 and x86. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Reviewed

[PULL v4 03/10] hw/i386/xen/xen-hvm: move x86-specific fields out of XenIOState

2023-06-09 Thread Stefano Stabellini
From: Stefano Stabellini In preparation to moving most of xen-hvm code to an arch-neutral location, move: - shared_vmport_page - log_for_dirtybit - dirty_bitmap - suspend - wakeup out of XenIOState struct as these are only used on x86, especially the ones related to dirty logging. Updated

[PULL v4 0/10] xenpvh4-tag

2023-06-09 Thread Stefano Stabellini
changes up to 236c27fd61dd0961631076a56286dd108fe5ef1f: meson.build: enable xenpv machine build for ARM (2023-06-08 16:54:31 -0700) Stefano Stabellini (5): hw/i386/xen/xen-hvm: move x86-specific fields out of XenIOState

Re: [PATCH v4 0/7] Resolve TYPE_PIIX3_XEN_DEVICE

2023-06-08 Thread Stefano Stabellini
On Thu, 8 Jun 2023, Stefano Stabellini wrote: > On Mon, 5 Jun 2023, Bernhard Beschow wrote: > > Am 22. Mai 2023 15:42:03 UTC schrieb Bernhard Beschow : > > > > > > > > >Am 15. Mai 2023 20:52:40 UTC schrieb Stefano Stabellini > > >: > > >>O

Re: [PATCH v4 0/7] Resolve TYPE_PIIX3_XEN_DEVICE

2023-06-08 Thread Stefano Stabellini
On Mon, 5 Jun 2023, Bernhard Beschow wrote: > Am 22. Mai 2023 15:42:03 UTC schrieb Bernhard Beschow : > > > > > >Am 15. Mai 2023 20:52:40 UTC schrieb Stefano Stabellini > >: > >>On Sat, 13 May 2023, Bernhard Beschow wrote: > >>> Am 21. Apr

  1   2   3   4   5   6   7   8   9   10   >