Re: [PATCH] hw/xen: Fix trace_xs_node_read() params

2025-05-26 Thread Anthony PERARD
_chk (__pri, __USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack > ()); > | > ^~ > > Add a check that 'value' is not null before passing it to > trace_xs_node_read(). > > Fixes: e6cdeee95990 ("hw/xen: Add x

Re: [PATCH v6 13/18] system/xen: remove inline stubs

2025-03-19 Thread Anthony PERARD
On Mon, Mar 17, 2025 at 11:34:12AM -0700, Pierrick Bouvier wrote: > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Pierrick Bouvier Reviewed-by: Anthony PERARD Thanks, -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech

Re: [PATCH v5 00/17] make system memory API available for common code

2025-03-14 Thread Anthony PERARD
On Fri, Mar 14, 2025 at 10:33:08AM -0700, Pierrick Bouvier wrote: > Hi, > > one patch is missing review: > [PATCH v5 12/17] hw/xen: add stubs for various functions. My "Acked-by" wasn't enough? Feel free try change it to "Reviewed-by" instead. Cheers

Re: [PATCH v4 12/17] hw/xen: add stubs for various functions

2025-03-14 Thread Anthony PERARD
e_map_cache(void) > +{ Is this stub actually necessary? xen_invalidate_map_cache() doesn't seems to be used outside of xen's code. In anycase: Acked-by: Anthony PERARD Thanks, -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech

[PULL 1/3] xen/passthrough: use gsi to map pirq when dom0 is PVH

2025-03-11 Thread Anthony PERARD
so pirq mapping fails. To solve above problem, use new interface of Xen, xc_pcidev_get_gsi to get gsi and use xc_physdev_map_pirq_gsi to map pirq when dom0 is PVH. Signed-off-by: Jiqian Chen Signed-off-by: Huang Rui Signed-off-by: Jiqian Chen Acked-by: Anthony PERARD Reviewed-by: Stewart Hildebr

[PULL 0/3] xen queue 2025-03-10

2025-03-11 Thread Anthony PERARD
anged, 66 insertions(+), 1 deletion(-) Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech

[PULL 2/3] hw/xen: Add "mode" parameter to xen-block devices

2025-03-11 Thread Anthony PERARD
From: David Woodhouse Block devices don't work in PV Grub (0.9x) if there is no mode specified. It complains: "Error ENOENT when reading the mode" Signed-off-by: David Woodhouse Message-Id: <20250207143724.30792-2-dw...@infradead.org> Signed-off-by: Anthony PERARD ---

[PULL 3/3] xen: No need to flush the mapcache for grants

2025-03-11 Thread Anthony PERARD
;t do that. So remove the function call. Fixes: 9ecdd4bf08 (xen: mapcache: Add support for grant mappings) Cc: qemu-sta...@nongnu.org Reported-by: Olaf Hering Reviewed-by: Edgar E. Iglesias Signed-off-by: Stefano Stabellini Signed-off-by: Edgar E. Iglesias Reviewed-by: Anthony PERARD Messa

Re: [PATCH v1 1/1] xen: No need to flush the mapcache for grants

2025-03-07 Thread Anthony PERARD
ed-by: Edgar E. Iglesias > Signed-off-by: Stefano Stabellini > Signed-off-by: Edgar E. Iglesias Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH 2/2] hw/xen: Add "mode" parameter to xen-block devices

2025-03-07 Thread Anthony PERARD
On Fri, Feb 07, 2025 at 02:37:24PM +, David Woodhouse wrote: > From: David Woodhouse > > Block devices don't work in PV Grub (0.9x) if there is no mode specified. It > complains: "Error ENOENT when reading the mode" > > Signed-off-by: David Woodhouse Rev

Re: [PATCH 6/8] hw/xen/xen-bus: Reduce included headers

2025-02-28 Thread Anthony PERARD
On Tue, Feb 18, 2025 at 05:26:16PM +0100, Philippe Mathieu-Daudé wrote: > Have "hw/xen/xen-bus" include the bare minimal set of headers. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH 8/8] meson: Remove support for Xen on 32-bit ARM hosts

2025-02-28 Thread Anthony PERARD
#x27;''''''''''''''''''''''''''''''''''''' > + > +Untested for more than 4 years. Well, not quite, we used to have some test of Xen on armhf hosts (one of arndale or cubietrunk, I don't remember which one we had to stop and never start testing again) until last year, and that included tests with qcow2 disk, so using QEMU. But that testing infra is gone so the patch is fine: Reviewed-by: Anthony PERARD Cheers, -- Anthony PERARD

Re: [PATCH 7/8] hw/xen/xen-legacy-backend: Remove unused 'net/net.h' header

2025-02-28 Thread Anthony PERARD
On Tue, Feb 18, 2025 at 05:26:17PM +0100, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH 5/8] hw/xen/xen-hvm: Reduce included headers

2025-02-28 Thread Anthony PERARD
> hw/i386/xen/xen-hvm.c:492:15: error: ‘R_EAX’ undeclared (first use in this > function) > 492 | env->regs[R_EAX] = req->data; > | ^ > | REG_RAX > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v3 7/7] hw/xen: Fix errp handling in xen_console

2025-01-15 Thread Anthony PERARD
check, with ERRP_GUARD() macro `errp` is never NULL. > +error_free(*errp); After this, I think you still need *errp = NULL; > +} > +if (number) { > +cd = serial_hd(number); > +if (!cd) { > +error_setg(errp,

Re: [PATCH v3 2/7] xen: do not use '%ms' scanf specifier

2025-01-15 Thread Anthony PERARD
ce-s...') > Fixes: 9b7737469080 ('hw/xen: update Xen console to XenDevice model') > Signed-off-by: Roger Pau Monné > Signed-off-by: David Woodhouse Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v3 1/7] hw/xen: Add xs_node_read() helper function

2025-01-15 Thread Anthony PERARD
aving to do so for themselves (and > from using xs_node_scanf() with the non-portable %ms format string. > > Signed-off-by: David Woodhouse > [remove double newline and constify trace parameters] > Signed-off-by: Roger Pau Monné Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH 1/4] hw/xen: Use xs_node_read() from xs_node_vscanf()

2025-01-15 Thread Anthony PERARD
On Fri, Jan 10, 2025 at 10:03:23AM +, David Woodhouse wrote: > From: David Woodhouse > > Reduce some duplication. > > Signed-off-by: David Woodhouse Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH 4/4] hw/xen: Use xs_node_read() from xenstore_read_str() instead of open-coding it

2025-01-15 Thread Anthony PERARD
On Fri, Jan 10, 2025 at 10:03:26AM +, David Woodhouse wrote: > From: David Woodhouse > > Signed-off-by: David Woodhouse Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH 2/4] hw/xen: Use xs_node_read() from xen_console_get_name()

2025-01-15 Thread Anthony PERARD
On Fri, Jan 10, 2025 at 10:03:24AM +, David Woodhouse wrote: > From: David Woodhouse > > Now that xs_node_read() can construct a node path, no need to open-code it. > > Signed-off-by: David Woodhouse Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH 3/4] hw/xen: Use xs_node_read() from xen_netdev_get_name()

2025-01-15 Thread Anthony PERARD
On Fri, Jan 10, 2025 at 10:03:25AM +, David Woodhouse wrote: > From: David Woodhouse > > Now that xs_node_read() can construct a node path, no need to open-code it. > > Signed-off-by: David Woodhouse Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v2 2/2] xen: do not use '%ms' scanf specifier

2025-01-15 Thread Anthony PERARD
or_prepend()` and use `error_setg` instead when `serial_hd()` fails. > +if (output) { > /* > * FIXME: sure we want to support implicit > * muxed monitors here? Thanks, -- Anthony PERARD

Re: [PATCH v2 1/2] hw/xen: Add xs_node_read() helper function

2025-01-15 Thread Anthony PERARD
very other function use "${node}/${key}" (As explain in the comment above xs_node_vscanf()), but this one uses a printf format in `node_fmt` (which could probably better be named `path_fmt` instead). Otherwise, patch looks fine to me. Cheers, -- Anthony PERARD

Re: [PATCH 2/2] xen: do not use '%ms' scanf specifier

2025-01-09 Thread Anthony PERARD
"type", errp, "%ms", &type) != 1) { > +node_path = g_strdup_printf("%s/type", fe); > +type = qemu_xen_xs_read(xsh, XBT_NULL, node_path, NULL); > +g_free(node_path); I feel like we want "xs_node_read()" which would be similair to xs_node_vscanf() but would simply return the result of qemu_xen_xs_read(). This would avoid the need format of the node path in several place in the code. But it's OK like that as well. Cheers, -- Anthony PERARD

Re: [PATCH 1/2] xen/console: fix error handling in xen_console_device_create()

2025-01-09 Thread Anthony PERARD
ber) { > cd = serial_hd(number); > if (!cd) { > -error_prepend(errp, "console: No serial device #%ld found: ", > +error_setg(errp, "console: No serial device #%ld found: ", >number); This change looks correct, ableit we could remove ": " from the end of the string since they shouldn't be anything after it. Cheers, -- Anthony PERARD

Re: [QEMU PATCH v10] xen/passthrough: use gsi to map pirq when dom0 is PVH

2024-12-12 Thread Anthony PERARD
On Tue, Dec 10, 2024 at 07:17:30AM +, Chen, Jiqian wrote: > On 2024/11/19 00:05, Anthony PERARD wrote: > > On Wed, Nov 06, 2024 at 02:14:18PM +0800, Jiqian Chen wrote: > >> In PVH dom0, when passthrough a device to domU, QEMU code > >> xen_pt_realize->xc_physdev_

Re: [QEMU PATCH v10] xen/passthrough: use gsi to map pirq when dom0 is PVH

2024-11-18 Thread Anthony PERARD
: Huang Rui > Signed-off-by: Jiqian Chen Acked-by: Anthony PERARD But, this following change probably needs an ack from PCI maintaners, CCed. > diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h > index eb26cac81098..07805aa8a5f3 100644 > --- a/include/hw/pci/pci.h > +++

[PATCH 2/2] hw/block/xen-block: Update sector-size handling

2024-09-26 Thread Anthony PERARD
02c4c899 So change QEMU to follow the updated specification. Frontends that exposes "feature-large-sector-size" will most certainly misbehave if "sector-size" is different than 512, so don't even try. (Windows driver is likely to be the only one having impl

[PATCH 1/2] include: update Xen public headers io/blkif.h

2024-09-26 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- include/hw/xen/interface/io/blkif.h | 52 + 1 file changed, 39 insertions(+), 13 deletions(-) diff --git a/include/hw/xen/interface/io/blkif.h b/include/hw/xen/interface/io/blkif.h index 22f1eef0c0..9b00d633d3 100644 --- a/include

[PATCH 0/2] Xen: Update sector-size handling in block backend

2024-09-26 Thread Anthony PERARD
org/gitweb/?p=xen.git;a=commit;h=221f2748e8dabe8361b8cdfcffbeab9102c4c899 This update the header and the backend. Thanks, Anthony PERARD (2): include: update Xen public headers io/blkif.h hw/block/xen-block: Update sector-size handling hw/block/dataplane/xen-block.c | 31 +

Re: [PATCH] hw/xen: Remove deadcode

2024-09-17 Thread Anthony PERARD
nused since 2018's > 6d7c06c213 ("Remove broken Xen PV domain builder") > > Remove them. > > Signed-off-by: Dr. David Alan Gilbert Acked-by: Anthony PERARD Thanks, -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech

Re: [PATCH v3 3/3] Do not access /dev/mem in MSI-X PCI passthrough on Xen

2024-08-28 Thread Anthony PERARD
ons[bar_index].base_addr; > XEN_PT_LOG(d, "get MSI-X table BAR base 0x%"PRIx64"\n", > msix->table_base); > > +/* Accessing /dev/mem is needed only on older Xen. */ > +if (!(xc_version_info.submap & (1U << XENFEAT_dm_msix_all_writes))) { Would it be ok to use test_bit() instead? Thanks, -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech

Re: [PATCH v3 2/3] Update Xen's features.h header

2024-08-28 Thread Anthony PERARD
On Mon, May 06, 2024 at 02:33:21AM +0200, Marek Marczykowski-Górecki wrote: > Update it to get XENFEAT_dm_msix_all_writes for the next patch. > > Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Anthony PERARD Thanks, -- Anthony Perard | Vates XCP-ng Developer XCP-ng &

Re: [PATCH v3 1/3] hw/xen/xen_pt: Save back data only for declared registers

2024-08-28 Thread Anthony PERARD
saving register values > - fix int overflow when calculating write mask Reviewed-by: Anthony PERARD Thanks, -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech

Re: [PATCH] MAINTAINERS: add Edgar as Xen maintainer

2024-07-11 Thread Anthony PERARD
725913c8b..63e11095a2 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -536,6 +536,7 @@ X86 Xen CPUs > M: Stefano Stabellini > M: Anthony PERARD > M: Paul Durrant > +M: Edgar E. Iglesias > L: xen-de...@lists.xenproject.org > S: Supported > F: */xen* Acked-by: Anthony PERARD Welcome! Cheers, -- Anthony PERARD

Re: [PATCH v1 2/2] xen: mapcache: Fix unmapping of first entries in buckets

2024-07-04 Thread Anthony PERARD
irst entries in buckets") > Reported-by: Anthony PERARD > Signed-off-by: Edgar E. Iglesias > --- > hw/xen/xen-mapcache.c | 12 +++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/hw/xen/xen-mapcache.c b/hw/xen/xen-mapcache.c > index 5f23b

Re: [PATCH v8 2/8] xen: mapcache: Unmap first entries in buckets

2024-07-01 Thread Anthony PERARD
validate mapping. */ > +entry->paddr_index = 0; > +entry->vaddr_base = NULL; > +entry->size = 0; > +entry->valid_mapping = NULL; > +entry->flags = 0; > +/* Keep entry->next pointing to the rest of the list. */ > }

Re: [PATCH v8 2/8] xen: mapcache: Unmap first entries in buckets

2024-07-01 Thread Anthony PERARD
y->size) != 0) { > perror("unmap fails"); > exit(-1); > } > + > g_free(entry->valid_mapping); > -g_free(entry); > +if (pentry) { > + pentry->next = entry->next; > +g_free(entry); > +} else { >

[PATCH] MAINTAINERS: Update my email address

2024-04-29 Thread Anthony PERARD
From: Anthony PERARD Signed-off-by: Anthony PERARD --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 302b6fd00c..ea9672fc52 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -532,7 +532,7 @@ Guest CPU Cores (Xen

Re: [PATCH] xen-hvm: Avoid livelock while handling buffered ioreqs

2024-04-09 Thread Anthony PERARD
timer_del(state->buffered_io_timer); > qemu_xen_evtchn_unmask(state->xce_handle, > state->bufioreq_local_port); > +} else { > +timer_mod(state->buffered_io_timer, > + BUFFER_IO_MAX_DELAY + > qemu_clock_get_ms(QEMU_CLOCK_REALTIME)); > } > } Cheers, -- Anthony PERARD

Re: [PATCH v3 2/2] xen: fix stubdom PCI addr

2024-04-03 Thread Anthony PERARD
arameters > etc), the real BDF needs to be used. > Get the in-stubdomain BDF by looking up relevant PV PCI xenstore > entries. > > Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v3 1/2] hw/xen: detect when running inside stubdomain

2024-04-03 Thread Anthony PERARD
o be done > differently. > > Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH-for-9.0 v2 19/19] hw/xen: Have most of Xen files become target-agnostic

2024-03-28 Thread Anthony PERARD
o", that's not going to work. So even if that first source file doesn't directly depend on the Xen libraries, it depends on "xen_pt.o" which depends on the Xen libraries. So ultimately, I think all those source files should have the same condition: ['CONFIG_XEN', xen]. I've only checked the xen_pt* source files, I don't know if the same applies to "xen-operations.c" or "xen-mapcache.c". Beside this, QEMU built with Xen support still seems to works fine, so adding the objects to `system_ss` instead of `specific_ss` seems alright. Thanks, -- Anthony PERARD

Re: [PATCH-for-9.0 v2 16/19] hw/xen/xen_pt: Add missing license

2024-03-27 Thread Anthony PERARD
oodhouse > Signed-off-by: Philippe Mathieu-Daudé Fine by me. Looks like there was a license header before: https://xenbits.xen.org/gitweb/?p=qemu-xen-unstable.git;a=blob;f=hw/pass-through.h;h=0b5822414e24d199a064abccc4d378dcaf569bd6;hb=HEAD I don't know why I didn't copied it over he

Re: [PATCH-for-9.0 v2 15/19] hw/xen: Reduce inclusion of 'cpu.h' to target-specific sources

2024-03-27 Thread Anthony PERARD
e and > remove from the "hw/xen/xen-hvm-common.h" *common* header. > > Signed-off-by: Philippe Mathieu-Daudé > Reviewed-by: Richard Henderson > Reviewed-by: David Woodhouse Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [RFC PATCH-for-9.0 v2 13/19] hw/xen: Remove use of 'target_ulong' in handle_ioreq()

2024-03-27 Thread Anthony PERARD
=b4a663b87df3954557434a2d31bff7f6b2706ec1 and they were more IOREQ types. So my guess is it isn't relevant anymore, but extending the clamping to 32-bits request should be fine, when using qemu-system-i386 that is, as it is already be done if one use qemu-system-x86_64. So I think the patch is fine, and the tests I've ran so far worked fine. > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH-for-9.0 v2 12/19] hw/xen: Merge 'hw/xen/arch_hvm.h' in 'hw/xen/xen-hvm-common.h'

2024-03-27 Thread Anthony PERARD
ippe Mathieu-Daudé > Reviewed-by: David Woodhouse > Reviewed-by: Richard Henderson Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH-for-9.0 v2 11/19] hw/xen/xen_arch_hvm: Rename prototypes using 'xen_arch_' prefix

2024-03-27 Thread Anthony PERARD
Woodhouse > Reviewed-by: Richard Henderson Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [RFC PATCH-for-9.0 v2 09/19] hw/block/xen_blkif: Align structs with QEMU_ALIGNED() instead of #pragma

2024-03-27 Thread Anthony PERARD
: 4 */ + /* last cacheline: 48 bytes */ +} __attribute__((__aligned__(8))); Thanks, -- Anthony PERARD

Re: [PATCH-for-9.0 v2 08/19] hw/xen: Remove unused Xen stubs

2024-03-27 Thread Anthony PERARD
de in `if(0){...}`, but there's no guaranty, is there? Cheers, -- Anthony PERARD

Re: [PATCH-for-9.0 v2 05/19] hw/display: Restrict xen_register_framebuffer() call to Xen

2024-03-27 Thread Anthony PERARD
On Tue, Nov 14, 2023 at 03:38:01PM +0100, Philippe Mathieu-Daudé wrote: > Only call xen_register_framebuffer() when Xen is enabled. > > Signed-off-by: Philippe Mathieu-Daudé I don't think this patch is very useful but it's fine, so: Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v2 2/2] xen: fix stubdom PCI addr

2024-03-26 Thread Anthony PERARD
ing like Philippe talked about at https://lore.kernel.org/qemu-devel/429a5a27-21b9-45bd-a1a6-a1c2ccc48...@linaro.org/ materialise. Beside the coding style, the patch looks file. Thanks, -- Anthony PERARD

Re: [PATCH v2 1/2] hw/xen: detect when running inside stubdomain

2024-03-26 Thread Anthony PERARD
ng on "xen-legacy-backend", if possible. (In xen_hvm_init_pc(), a call to xen_register_ioreq() opens another xenstore, as `state->xenstore`.) (There's already been effort to build QEMU without legacy backends, that stubdom check would break in this scenario.) Thanks, -- Anthony PERARD

[PULL 1/3] xen/pt: Emulate multifunction bit in header type

2024-03-12 Thread Anthony PERARD
allows making passthrough devices appear as functions in a Xen guest. Signed-off-by: Ross Lagerwall Reviewed-by: Paul Durrant Message-Id: <20231103172601.1319375-1-ross.lagerw...@citrix.com> Signed-off-by: Anthony PERARD --- hw/xen/xen_pt_config_init.c | 7 +-- 1 file changed, 5 inse

[PULL 0/3] Xen queue 2024-03-12

2024-03-12 Thread Anthony PERARD
The following changes since commit 8f3f329f5e0117bd1a23a79ab751f8a7d3471e4b: Merge tag 'migration-20240311-pull-request' of https://gitlab.com/peterx/qemu into staging (2024-03-12 11:35:41 +) are available in the Git repository at: https://xenbits.xen.org/git-http/people/aperard/qemu-dm

[PULL 2/3] xen: Drop out of coroutine context xen_invalidate_map_cache_entry

2024-03-12 Thread Anthony PERARD
/block-backend.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: Peng Fan Reviewed-by:

[PULL 3/3] i386: load kernel on xen using DMA

2024-03-12 Thread Anthony PERARD
. This change was suggested initially here: https://lore.kernel.org/xen-devel/20180216204031.5...@gmail.com/ Apparently this alone is already enough to get massive speedup. Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Alex Bennée Reviewed-by: Anthony PERARD Message-Id

[PATCH] migration: Fix format in error message

2024-03-11 Thread Anthony PERARD
From: Anthony PERARD In file_write_ramblock_iov(), "offset" is "uintptr_t" and not "ram_addr_t". While usually they are both equivalent, this is not the case with CONFIG_XEN_BACKEND. Use the right format. This will fix build on 32-bit. Fixes: f427d90b9898 ("

Re: [PATCH v3 01/29] bulk: Access existing variables initialized to &S->F when available

2024-03-08 Thread Anthony PERARD
PT_IRQ_TYPE_PCI, > @@ -759,8 +759,8 @@ static void xen_pt_destroy(PCIDevice *d) { > memory_listener_unregister(&s->io_listener); > s->listener_set = false; > } > -if (!xen_host_pci_device_closed(&s->real_device)) { > -

Re: [PATCH] i386: load kernel on xen using DMA

2024-03-08 Thread Anthony PERARD
ectly sane to me but I don't have any x86 > Xen HW to test this one. Are the x86 maintainers happy to take this on? Yes. It looks like it works well with both SeaBIOS and OVMF, so the patch is good. > FWIW: > > Reviewed-by: Alex Bennée Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH 14/16] hw/char/xen_console: Fix missing ERRP_GUARD() for error_prepend()

2024-03-08 Thread Anthony PERARD
ption in the commit message of commit ae7c80a7bd73 > ("error: New macro ERRP_GUARD()"). > > Cc: Stefano Stabellini > Cc: Anthony Perard > Cc: Paul Durrant > Cc: "Marc-André Lureau" > Cc: Paolo Bonzini > Signed-off-by: Zhao Liu Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH 02/17] hw/net/xen_nic: Fix missing ERRP_GUARD() for error_prepend()

2024-03-08 Thread Anthony PERARD
is from xen_device_frontend_changed(). > > > > Though its @errp points to @local_err of xen_device_frontend_changed(), > > to follow the requirement of @errp, add missing ERRP_GUARD() at the > > beginning of this function. > > > > [1]: Issue description in the c

Re: [PATCH V8 00/12] fix migration of suspended runstate

2023-12-20 Thread Anthony PERARD
of migrating a Xen guest. It works fine for me. Thanks, -- Anthony PERARD

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

2023-12-12 Thread Anthony PERARD
On Tue, Dec 12, 2023 at 03:35:50PM +, Volodymyr Babchuk wrote: > Hi Anthony > > Anthony PERARD writes: > > > On Fri, Dec 08, 2023 at 02:49:27PM -0800, Stefano Stabellini wrote: > >> On Fri, 8 Dec 2023, Daniel P. Berrangé wrote: > >> > On Thu, Dec 07,

Re: [RFC PATCH v4 4/6] xen: add option to disable legacy backends

2023-12-12 Thread Anthony PERARD
_backends" ? > + description: 'Xen legacy backends (9pfs, fb, qusb) support') This description feels a bit wrong somehow. "Legacy backend" is internal to QEMU's code, and meant that the backends are implemented using legacy support that we want to retire. But the backends them self, as seen by a guest aren't going to change, and are not legacy. Also, a few month ago, "qnic" would have been part of the list. Maybe a description like "Xen backends based on legacy support" might be more appropriate. I'm not sure listing the different backend in the description is a good idea, as we will have to remember to change it whenever one of those backend is been upgraded. Cheers, -- Anthony PERARD

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

2023-12-12 Thread Anthony PERARD
aarch64__) check should pass I think. Building qemu with something like: ./configure --enable-xen --cpu=x86_64 used to work. Can we fix that? It still works with v8.1.0. At least, it works on x86, I never really try to build qemu for arm. Notice that there's no "--target-list" on the configure command line. I don't know if --cpu is useful here. Looks like the first commit where the build doesn't work is 7899f6589b78 ("xen_arm: Add virtual PCIe host bridge support"). Could we get that fixed? I'm sure distribution will appreciate to be able to build a single qemu package for xen and other, rather than having a dedicated qemu-xen package. Cheers, -- Anthony PERARD

Re: [PATCH v4 2/6] xen: backends: don't overwrite XenStore nodes created by toolstack

2023-12-06 Thread Anthony PERARD
ing a guest via libxl, an x86 hvm guest with qdisk. Error from guest kernel: "2 reading backend fields at /local/domain/0/backend/qdisk/23/768" It seems that "sector-size" is missing for the disk. Thanks, -- Anthony PERARD

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

2023-10-23 Thread Anthony PERARD
On Wed, Oct 11, 2023 at 12:22:46PM -0700, Vikram Garhwal wrote: > Hi Anthony, > On Thu, Oct 05, 2023 at 11:40:57AM +0100, Anthony PERARD wrote: > > Hi Vikram, > > > > This patch prevent QEMU from been build with Xen 4.15. See comments. > > > > Also, why

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

2023-10-05 Thread Anthony PERARD
> +xendevicemodel_set_irq_level(xen_dmod, xen_domid, irq, level); So, you just ignore the return value here. Shouldn't there be some kind of error check? And is it OK to create a virtio-mmio device without an error, even when we could find out that it never going to work (e.g. on Xen 4.14)? Cheers, -- Anthony PERARD

Re: [PATCH 6/7] block: Clean up local variable shadowing

2023-09-11 Thread Anthony PERARD
gt;type == XEN_BLOCK_VDEV_TYPE_HD) ? >"hd" : >"sd", > - name, vdev->partition); > -g_free(name); > + vbd_name, vdev->partition); > + g_free(vbd_name); > break; > } > default: Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v1 00/23] Q35 support for Xen

2023-08-22 Thread Anthony PERARD
same question for the xen toolstack side. Cheers, -- Anthony PERARD

[PULL 0/5] Misc fixes, for thread-pool, xen, and xen-emulate

2023-08-01 Thread Anthony PERARD via
en-emulate * fix an access to `request_cond` QemuCond in thread-pool * fix issue with PCI devices when unplugging IDE devices in Xen guest * several fixes for issues pointed out by Coverity -------- Anthony PERARD (2): xen-block: Avoi

[PULL 5/5] xen-platform: do full PCI reset during unplug of IDE devices

2023-08-01 Thread Anthony PERARD via
: <20230720072950.20198-1-o...@aepfle.de> Signed-off-by: Anthony PERARD --- hw/i386/xen/xen_platform.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c index 57f1d742c1..17457ff3de 100644 --- a/hw/i386/xen/x

[PULL 1/5] hw/xen: Clarify (lack of) error handling in transaction_commit()

2023-08-01 Thread Anthony PERARD via
is firing watches on the newly-committed changed nodes. So make it a g_assert(!ret), since it really should never happen. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant Message-Id: <20076888f6bdf06a65aafc5cf954260965d45b97.ca...@infradead.org> Signed-off-by: Anthony PERARD

[PULL 2/5] xen-block: Avoid leaks on new error path

2023-08-01 Thread Anthony PERARD via
From: Anthony PERARD Commit 189829399070 ("xen-block: Use specific blockdev driver") introduced a new error path, without taking care of allocated resources. So only allocate the qdicts after the error check, and free both `filename` and `driver` when we are about to return and thus t

[PULL 3/5] thread-pool: signal "request_cond" while locked

2023-08-01 Thread Anthony PERARD via
From: Anthony PERARD thread_pool_free() might have been called on the `pool`, which would be a reason for worker_thread() to quit. In this case, `pool->request_cond` is been destroyed. If worker_thread() didn't managed to signal `request_cond` before it been destroyed by thread_pool_fr

[PULL 4/5] xen: Don't pass MemoryListener around by value

2023-08-01 Thread Anthony PERARD via
variables const, since nothing changes them. Signed-off-by: Peter Maydell Acked-by: Anthony PERARD Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230718101057.1110979-1-peter.mayd...@linaro.org> Signed-off-by: Anthony PERARD --- hw/arm/xen_arm.c| 4 ++-- hw/i386/xen/xen

Re: [PATCH for-8.1] xen: Don't pass MemoryListener around by value

2023-07-18 Thread Anthony PERARD via
r(). We can also make the file-scope > MemoryListener variables const, since nothing changes them. > > Signed-off-by: Peter Maydell Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: QEMU assert (was: [xen-unstable test] 181558: regressions - FAIL)

2023-07-14 Thread Anthony PERARD via
On Tue, Jul 04, 2023 at 11:56:54AM +0200, Roger Pau Monné wrote: > On Tue, Jul 04, 2023 at 10:37:38AM +0100, Anthony PERARD wrote: > > On Wed, Jun 28, 2023 at 02:31:39PM +0200, Roger Pau Monné wrote: > > > On Fri, Jun 23, 2023 at 03:04:21PM +, osstest service owner wrote: >

[PATCH] thread-pool: signal "request_cond" while locked

2023-07-14 Thread Anthony PERARD via
From: Anthony PERARD thread_pool_free() might have been called on the `pool`, which would be a reason for worker_thread() to quit. In this case, `pool->request_cond` is been destroyed. If worker_thread() didn't managed to signal `request_cond` before it been destroyed by thread_pool_fr

[PATCH] xen-block: Avoid leaks on new error path

2023-07-04 Thread Anthony PERARD via
From: Anthony PERARD Commit 189829399070 ("xen-block: Use specific blockdev driver") introduced a new error path, without taking care of allocated resources. So only allocate the qdicts after the error check, and free both `filename` and `driver` when we are about to return and thus t

Re: QEMU assert (was: [xen-unstable test] 181558: regressions - FAIL)

2023-07-04 Thread Anthony PERARD via
ub. > > This is also with QEMU 7.2, as testing with upstream QEMU is blocked > ATM, so there's a chance it has already been fixed upstream. > > Thanks, Roger. So, I've run a test with the latest QEMU and I can still reproduce the issue. The test also fails with QEMU 7.1.0. But, QEMU 7.0 seems to pass the test, even with a start-stop loop of 200 iteration. So I'll try to find out if something change in that range. Or try to find out why would the thread pool be not initialised properly. Cheers, -- Anthony PERARD

Re: [PATCH v4 0/7] Resolve TYPE_PIIX3_XEN_DEVICE

2023-06-09 Thread Anthony PERARD via
gest for you to pick up the patches. But as it > > >>happens I'll have to likely send another pull request in a week or two > > >>and I can add these patches to it. > > >> > > >>Let me know your preference and I am happy to follow it. > > > > > >Hi Stefano, > > > > > >Michael's PR was merged last week. How about including this series into > > >your PR then? > > > > Ping > > Sorry for the late reply, it looks like patch #3 breaks the build: Hi Stefano, Sorry I forgot to reply to these mails. I've sent a pull request for this earlier this week (along with other patches I had to send), so the series should be applied now. I guess the build issue is due to trying to apply the same patch again. Cheers, -- Anthony PERARD

[PULL 07/12] hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()

2023-06-07 Thread Anthony PERARD via
Xen mode. Signed-off-by: Bernhard Beschow Reviewed-by: Michael S. Tsirkin Reviewed-by: Anthony PERARD Tested-by: Chuck Zmudzinski Message-Id: <20230312120221.99183-3-shen...@gmail.com> Message-Id: <20230403074124.3925-4-shen...@gmail.com> Signed-off-by: Anthony PERARD --- hw/isa

[PULL 02/12] hw/xen: Fix memory leak in libxenstore_open() for Xen

2023-06-07 Thread Anthony PERARD via
on to internal emulation") Suggested-by: Peter Maydell Signed-off-by: David Woodhouse Reviewed-by: Peter Maydell Reviewed-by: Paul Durrant Message-Id: <20230412185102.441523-3-dw...@infradead.org> Signed-off-by: Anthony PERARD --- hw/xen/xen-operations.c | 2 +- 1 file changed, 1

[PULL 11/12] hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE

2023-06-07 Thread Anthony PERARD via
From: Bernhard Beschow During the last patches, TYPE_PIIX3_XEN_DEVICE turned into a clone of TYPE_PIIX3_DEVICE. Remove this redundancy. Signed-off-by: Bernhard Beschow Reviewed-by: Michael S. Tsirkin Reviewed-by: Anthony PERARD Tested-by: Chuck Zmudzinski Message-Id: <20230312120221.9918

[PULL 00/12] xen queue

2023-06-07 Thread Anthony PERARD via
From: Anthony PERARD The following changes since commit f5e6786de4815751b0a3d2235c760361f228ea48: Merge tag 'pull-target-arm-20230606' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2023-06-06 12:11:34 -0700) are available in the Git repository at

[PULL 10/12] hw/isa/piix3: Resolve redundant k->config_write assignments

2023-06-07 Thread Anthony PERARD via
From: Bernhard Beschow The previous patch unified handling of piix3_write_config() accross the PIIX3 device models which allows for assigning k->config_write once in the base class. Signed-off-by: Bernhard Beschow Reviewed-by: Michael S. Tsirkin Reviewed-by: Anthony PERARD Tested-by: Ch

[PULL 06/12] hw/pci/pci.c: Don't leak PCIBus::irq_count[] in pci_bus_irqs()

2023-06-07 Thread Anthony PERARD via
m> Signed-off-by: Anthony PERARD --- hw/pci/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 1cc7c89036..9b7b4d7c18 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -560,6 +560,7 @@ void pci_bus_irqs(PCIBus *bus, pci_set_irq_fn set_irq, bus-&g

[PULL 08/12] hw/isa/piix3: Wire up Xen PCI IRQ handling outside of PIIX3

2023-06-07 Thread Anthony PERARD via
eviewed-by: Michael S. Tsirkin Reviewed-by: Anthony PERARD Tested-by: Chuck Zmudzinski Message-Id: <20230312120221.99183-4-shen...@gmail.com> Message-Id: <20230403074124.3925-5-shen...@gmail.com> Signed-off-by: Anthony PERARD --- hw/i386/pc_piix.c | 13 +

[PULL 01/12] hw/xen: Simplify emulated Xen platform init

2023-06-07 Thread Anthony PERARD via
and only *connecting* it to the GSI that it should be connected to, is still non-intuitive for me. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant Message-Id: <20230412185102.441523-2-dw...@infradead.org> Signed-off-by: Anthony PERARD --- hw/i386/kvm/xen_evtchn.c | 40

[PULL 05/12] include/hw/xen/xen: Rename xen_piix3_set_irq() to xen_intx_set_irq()

2023-06-07 Thread Anthony PERARD via
QS to XEN_IOAPIC_NUM_PIRQS since the Xen's IOAPIC rather than PIIX has this many interrupt routes. Signed-off-by: Bernhard Beschow Reviewed-by: Michael S. Tsirkin Reviewed-by: Anthony PERARD Tested-by: Chuck Zmudzinski Message-Id: <20230312120221.99183-2-shen...@gmail.com> Message-Id: <2023040

[PULL 12/12] xen-block: fix segv on unrealize

2023-06-07 Thread Anthony PERARD via
From: Anthony PERARD Backtrace: qemu_lockcnt_lock (lockcnt=0xb4) at ../util/lockcnt.c:238 aio_set_fd_handler (ctx=0x0, fd=51, is_external=true, io_read=0x0, io_write=0x0, io_poll=0x0, io_poll_ready=0x0, opaque=0x0) at ../util/aio-posix.c:119 xen_device_unbind_event_channel (xendev

[PULL 04/12] hw/xen: Fix broken check for invalid state in xs_be_open()

2023-06-07 Thread Anthony PERARD via
Reviewed-by: Peter Maydell Message-Id: <20230412185102.441523-6-dw...@infradead.org> Signed-off-by: Anthony PERARD --- hw/i386/kvm/xen_xenstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/kvm/xen_xenstore.c b/hw/i386/kvm/xen_xenstore.c index 0b189c6ab8..133

[PULL 03/12] xen: Drop support for Xen versions below 4.7.1

2023-06-07 Thread Anthony PERARD via
is fairly unintrusive. Fixes: 15e283c5b684 ("hw/xen: Add foreignmem operations to allow redirection to internal emulation") Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant Message-Id: <20230412185102.441523-4-dw...@infradead.org> Signed-off-by: Anthony PERARD

[PULL 09/12] hw/isa/piix3: Avoid Xen-specific variant of piix3_write_config()

2023-06-07 Thread Anthony PERARD via
, pci_bus_fire_intx_routing_notifier() could be adjusted in such a way that subscribing to it doesn't require knowledge of the device firing it. Signed-off-by: Bernhard Beschow Reviewed-by: Michael S. Tsirkin Reviewed-by: Anthony PERARD Tested-by: Chuck Zmudzinski Messa

[PATCH] xen-block: fix segv on unrealize

2023-06-06 Thread Anthony PERARD via
From: Anthony PERARD Backtrace: qemu_lockcnt_lock (lockcnt=0xb4) at ../util/lockcnt.c:238 aio_set_fd_handler (ctx=0x0, fd=51, is_external=true, io_read=0x0, io_write=0x0, io_poll=0x0, io_poll_ready=0x0, opaque=0x0) at ../util/aio-posix.c:119 xen_device_unbind_event_channel (xendev

Re: [PATCH v5 12/21] xen-block: implement BlockDevOps->drained_begin()

2023-05-16 Thread Anthony PERARD via
y one user of xen_device_bind_event_channel() at the moment so I don't know if other implementation making use of this API will want to call set_event_channel_context or not.) > + xen_block_dataplane_attach(dataplane); > +} > > return; > -- Anthony PERARD

Re: [PATCH v5 13/21] hw/xen: do not set is_external=true on evtchn fds

2023-05-16 Thread Anthony PERARD via
_external() API. > > Signed-off-by: Stefan Hajnoczi Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH v5 12/21] xen-block: implement BlockDevOps->drained_begin()

2023-05-16 Thread Anthony PERARD via
read-safe. > > It's safer to register BlockDevOps after the dataplane instance has been > created. The BlockDevOps .drained_begin/end() callbacks depend on the > dataplane instance, so move the blk_set_dev_ops() call after > xen_block_dataplane_create(). > > Signed-off-by: Stefan Hajnoczi Reviewed-by: Anthony PERARD Thanks, -- Anthony PERARD

  1   2   3   4   5   6   7   8   9   10   >