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

2023-08-01 Thread Anthony PERARD via
The following changes since commit 802341823f1720511dd5cf53ae40285f7978c61b: Merge tag 'pull-tcg-20230731' of https://gitlab.com/rth7680/qemu into staging (2023-07-31 14:02:51 -0700) are available in the Git repository at: https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pu

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

2023-08-01 Thread Anthony PERARD via
From: Olaf Hering The IDE unplug function needs to reset the entire PCI device, to make sure all state is initialized to defaults. This is done by calling pci_device_reset, which resets not only the chip specific registers, but also all PCI state. This fixes "unplug" in a Xen HVM domU with the mo

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

2023-08-01 Thread Anthony PERARD via
From: David Woodhouse Coverity was unhappy (CID 1508359) because we didn't check the return of init_walk_op() in transaction_commit(), despite doing so at every other call site. Strictly speaking, this is a false positive since it can never fail. It only fails for invalid user input (transaction

[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 taking care

[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_free(), we g

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

2023-08-01 Thread Anthony PERARD via
From: Peter Maydell Coverity points out (CID 1513106, 1513107) that MemoryListener is a 192 byte struct which we are passing around by value. Switch to passing a const pointer into xen_register_ioreq() and then to xen_do_ioreq_register(). We can also make the file-scope MemoryListener variables

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

2023-07-18 Thread Anthony PERARD via
On Tue, Jul 18, 2023 at 11:10:57AM +0100, Peter Maydell wrote: > Coverity points out (CID 1513106, 1513107) that MemoryListener is a > 192 byte struct which we are passing around by value. Switch to > passing a const pointer into xen_register_ioreq() and then to > xen_do_ioreq_register(). We can

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: > > > > flight 181558

[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_free(), we g

[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 taking care

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

2023-07-04 Thread Anthony PERARD via
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: > > flight 181558 xen-unstable real [real] > > http://logs.test-lab.xenproject.org/osstest/logs/181558/ > > > > Regressions :-( > > > > Tests which did not suc

Re: [PATCH v4 0/7] Resolve TYPE_PIIX3_XEN_DEVICE

2023-06-09 Thread Anthony PERARD via
On Thu, Jun 08, 2023 at 03:43:32PM -0700, 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 > > >: > > >>On Sat, 13 May 2023, Bernhard Beschow

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

2023-06-07 Thread Anthony PERARD via
From: Bernhard Beschow This is a preparational patch for the next one to make the following more obvious: First, pci_bus_irqs() is now called twice in case of Xen where the second call overrides the pci_set_irq_fn with the Xen variant. Second, pci_bus_set_route_irq_fn() is now also called in Xe

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

2023-06-07 Thread Anthony PERARD via
From: David Woodhouse There was a superfluous allocation of the XS handle, leading to it being leaked on both the error path and the success path (where it gets allocated again). Spotted by Coverity (CID 1508098). Fixes: ba2a92db1ff6 ("hw/xen: Add xenstore operations to allow redirection to in

[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.99183-7-

[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: https://xenbits.xen.o

[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: Chuck Zm

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

2023-06-07 Thread Anthony PERARD via
From: Bernhard Beschow When calling pci_bus_irqs() multiple times on the same object without calling pci_bus_irqs_cleanup() in between PCIBus::irq_count[] is currently leaked. Let's fix this because Xen will do just that in a few commits, and because calling pci_bus_irqs_cleanup() in between seem

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

2023-06-07 Thread Anthony PERARD via
From: Bernhard Beschow xen_intx_set_irq() doesn't depend on PIIX3State. In order to resolve TYPE_PIIX3_XEN_DEVICE and in order to make Xen agnostic about the precise south bridge being used, set up Xen's PCI IRQ handling of PIIX3 in the board. Signed-off-by: Bernhard Beschow Reviewed-by: Michae

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

2023-06-07 Thread Anthony PERARD via
From: David Woodhouse I initially put the basic platform init (overlay pages, grant tables, event channels) into mc->kvm_type because that was the earliest place that could sensibly test for xen_mode==XEN_EMULATE. The intent was to do this early enough that we could then initialise the XenBus an

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

2023-06-07 Thread Anthony PERARD via
From: Bernhard Beschow xen_piix3_set_irq() isn't PIIX specific: PIIX is a single PCI device while xen_piix3_set_irq() maps multiple PCI devices to their respective IRQs, which is board-specific. Rename xen_piix3_set_irq() to communicate this. Also rename XEN_PIIX_NUM_PIRQS to XEN_IOAPIC_NUM_PIRQ

[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=0x55c6d

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

2023-06-07 Thread Anthony PERARD via
From: David Woodhouse Coverity points out that if (!s && !s->impl) isn't really what we intended to do here. CID 1508131. Fixes: 032475127225 ("hw/xen: Add emulated implementation of XenStore operations") Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant Reviewed-by: Peter Maydell Mes

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

2023-06-07 Thread Anthony PERARD via
From: David Woodhouse In restructuring to allow for internal emulation of Xen functionality, I broke compatibility for Xen 4.6 and earlier. Fix this by explicitly removing support for anything older than 4.7.1, which is also ancient but it does still build, and the compatibility support for it is

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

2023-06-07 Thread Anthony PERARD via
From: Bernhard Beschow Subscribe to pci_bus_fire_intx_routing_notifier() instead which allows for having a common piix3_write_config() for the PIIX3 device models. While at it, move the subscription into machine code to facilitate resolving TYPE_PIIX3_XEN_DEVICE. In a possible future followup,

[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=0x55c6d

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

2023-05-16 Thread Anthony PERARD via
On Thu, May 04, 2023 at 03:53:18PM -0400, Stefan Hajnoczi wrote: > @@ -819,11 +841,9 @@ void xen_block_dataplane_start(XenBlockDataPlane > *dataplane, > blk_set_aio_context(dataplane->blk, dataplane->ctx, NULL); > aio_context_release(old_context); > > -/* Only reason for failure is

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

2023-05-16 Thread Anthony PERARD via
On Thu, May 04, 2023 at 03:53:19PM -0400, Stefan Hajnoczi wrote: > is_external=true suspends fd handlers between aio_disable_external() and > aio_enable_external(). The block layer's drain operation uses this > mechanism to prevent new I/O from sneaking in between > bdrv_drained_begin() and bdrv_dr

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

2023-05-16 Thread Anthony PERARD via
On Thu, May 04, 2023 at 03:53:18PM -0400, Stefan Hajnoczi wrote: > Detach event channels during drained sections to stop I/O submission > from the ring. xen-block is no longer reliant on aio_disable_external() > after this patch. This will allow us to remove the > aio_disable_external() API once al

Re: [PATCH] xen: Fix host pci for stubdom

2023-05-15 Thread Anthony PERARD via
On Sun, Mar 19, 2023 at 08:05:54PM -0400, Jason Andryuk wrote: > diff --git a/hw/xen/xen-host-pci-device.c b/hw/xen/xen-host-pci-device.c > index 8c6e9a1716..51a72b432d 100644 > --- a/hw/xen/xen-host-pci-device.c > +++ b/hw/xen/xen-host-pci-device.c > @@ -33,13 +34,101 @@ > #define IORESOURCE_PREF

Re: [PATCH v3 2/6] hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()

2023-04-03 Thread Anthony PERARD via
On Sat, Apr 01, 2023 at 10:36:45PM +, Bernhard Beschow wrote: > > > Am 30. März 2023 13:00:25 UTC schrieb Anthony PERARD > : > >On Sun, Mar 12, 2023 at 01:02:17PM +0100, Bernhard Beschow wrote: > >> This is a preparational patch for the next one to make the following > >> more obvious: > >>

Re: [PATCH v3 6/6] hw/isa/piix3: Resolve redundant TYPE_PIIX3_XEN_DEVICE

2023-03-30 Thread Anthony PERARD via
On Sun, Mar 12, 2023 at 01:02:21PM +0100, Bernhard Beschow wrote: > 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 Thanks, --

Re: [PATCH v3 5/6] hw/isa/piix3: Resolve redundant k->config_write assignments

2023-03-30 Thread Anthony PERARD via
On Sun, Mar 12, 2023 at 01:02:20PM +0100, Bernhard Beschow wrote: > 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. Tsir

Re: [PATCH v3 4/6] hw/isa/piix3: Avoid Xen-specific variant of piix3_write_config()

2023-03-30 Thread Anthony PERARD via
On Sun, Mar 12, 2023 at 01:02:19PM +0100, Bernhard Beschow wrote: > Subscribe to pci_bus_fire_intx_routing_notifier() instead which allows for > having a common piix3_write_config() for the PIIX3 device models. > > While at it, move the subscription into machine code to facilitate resolving > TYPE

Re: [PATCH v3 3/6] hw/isa/piix3: Wire up Xen PCI IRQ handling outside of PIIX3

2023-03-30 Thread Anthony PERARD via
On Sun, Mar 12, 2023 at 01:02:18PM +0100, Bernhard Beschow wrote: > xen_intx_set_irq() doesn't depend on PIIX3State. In order to resolve > TYPE_PIIX3_XEN_DEVICE and in order to make Xen agnostic about the > precise south bridge being used, set up Xen's PCI IRQ handling of PIIX3 > in the board. > >

Re: [PATCH v3 2/6] hw/isa/piix3: Reuse piix3_realize() in piix3_xen_realize()

2023-03-30 Thread Anthony PERARD via
On Sun, Mar 12, 2023 at 01:02:17PM +0100, Bernhard Beschow wrote: > This is a preparational patch for the next one to make the following > more obvious: > > First, pci_bus_irqs() is now called twice in case of Xen where the > second call overrides the pci_set_irq_fn with the Xen variant. pci_bus_

Re: [PATCH v3 1/6] include/hw/xen/xen: Rename xen_piix3_set_irq() to xen_intx_set_irq()

2023-03-30 Thread Anthony PERARD via
On Sun, Mar 12, 2023 at 01:02:16PM +0100, Bernhard Beschow wrote: > xen_piix3_set_irq() isn't PIIX specific: PIIX is a single PCI device > while xen_piix3_set_irq() maps multiple PCI devices to their respective > IRQs, which is board-specific. Rename xen_piix3_set_irq() to communicate > this. > >

[PULL 2/2] hw/xenpv: Initialize Xen backend operations

2023-03-24 Thread Anthony PERARD via
From: David Woodhouse As the Xen backend operations were abstracted out into a function table to allow for internally emulated Xen support, we missed the xen_init_pv() code path which also needs to install the operations for the true Xen libraries. Add the missing call to setup_xen_backend_ops().

[PULL 1/2] accel/xen: Fix DM state change notification in dm_restrict mode

2023-03-24 Thread Anthony PERARD via
From: David Woodhouse When dm_restrict is set, QEMU isn't permitted to update the XenStore node to indicate its running status. Previously, the xs_write() call would fail but the failure was ignored. However, in refactoring to allow for emulated XenStore operations, a new call to xs_open() was a

Re: [PULL 0/1] xen queue

2023-03-24 Thread Anthony PERARD via
On Thu, Mar 23, 2023 at 10:01:59AM +, Anthony PERARD wrote: > The following changes since commit 60ca584b8af0de525656f959991a440f8c191f12: > > Merge tag 'pull-for-8.0-220323-1' of https://gitlab.com/stsquad/qemu into > staging (2023-03-22 17:58:12 +) > > are available in the Git reposi

[PULL 0/2] xen queue

2023-03-24 Thread Anthony PERARD via
The following changes since commit 60ca584b8af0de525656f959991a440f8c191f12: Merge tag 'pull-for-8.0-220323-1' of https://gitlab.com/stsquad/qemu into staging (2023-03-22 17:58:12 +) are available in the Git repository at: https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tag

Re: [PATCH] hw/xenpv: Initialize Xen backend operations

2023-03-24 Thread Anthony PERARD via
On Thu, Mar 23, 2023 at 10:57:34AM +, David Woodhouse wrote: > From: David Woodhouse > > As the Xen backend operations were abstracted out into a function table to > allow for internally emulated Xen support, we missed the xen_init_pv() > code path which also needs to install the operations f

Re: [PATCH v2 09/27] hw/xen: Add evtchn operations to allow redirection to internal emulation

2023-03-23 Thread Anthony PERARD via
On Tue, Mar 07, 2023 at 05:17:32PM +, David Woodhouse wrote: > From: David Woodhouse > > The existing implementation calling into the real libxenevtchn moves to > a new file hw/xen/xen-operations.c, and is called via a function table > which in a subsequent commit will also be able to invoke

[PULL 1/1] accel/xen: Fix DM state change notification in dm_restrict mode

2023-03-23 Thread Anthony PERARD via
From: David Woodhouse When dm_restrict is set, QEMU isn't permitted to update the XenStore node to indicate its running status. Previously, the xs_write() call would fail but the failure was ignored. However, in refactoring to allow for emulated XenStore operations, a new call to xs_open() was a

[PULL 0/1] xen queue

2023-03-23 Thread Anthony PERARD via
The following changes since commit 60ca584b8af0de525656f959991a440f8c191f12: Merge tag 'pull-for-8.0-220323-1' of https://gitlab.com/stsquad/qemu into staging (2023-03-22 17:58:12 +) are available in the Git repository at: https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tag

[PULL 0/2] xen queue

2023-03-06 Thread Anthony PERARD via
The following changes since commit 2946e1af2704bf6584f57d4e3aec49d1d5f3ecc0: configure: Disable thread-safety warnings on macOS (2023-03-04 14:03:46 +) are available in the Git repository at: https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pull-xen-20230306 for you to

[PULL 2/2] hw/xen/xen_pt: fix uninitialized variable

2023-03-06 Thread Anthony PERARD via
From: Marek Marczykowski-Górecki xen_pt_config_reg_init() reads only that many bytes as the size of the register that is being initialized. It uses xen_host_pci_get_{byte,word,long} and casts its last argument to expected pointer type. This means for smaller registers higher bits of 'val' are not

[PULL 1/2] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-03-06 Thread Anthony PERARD via
From: Chuck Zmudzinski Intel specifies that the Intel IGD must occupy slot 2 on the PCI bus, as noted in docs/igd-assign.txt in the Qemu source code. Currently, when the xl toolstack is used to configure a Xen HVM guest with Intel IGD passthrough to the guest with the Qemu upstream device model,

Re: [XEN PATCH v2 0/3] Configure qemu upstream correctly by default for igd-passthru

2023-01-25 Thread Anthony PERARD via
On Tue, Jan 10, 2023 at 02:32:01AM -0500, Chuck Zmudzinski wrote: > I call attention to the commit message of the first patch which points > out that using the "pc" machine and adding the xen platform device on > the qemu upstream command line is not functionally equivalent to using > the "xenfv" m

Re: [PATCH v2 0/6] Resolve TYPE_PIIX3_XEN_DEVICE

2023-01-24 Thread Anthony PERARD via
On Wed, Jan 18, 2023 at 05:13:03AM -0500, Michael S. Tsirkin wrote: > On Wed, Jan 04, 2023 at 03:44:31PM +0100, Bernhard Beschow wrote: > > This series first renders TYPE_PIIX3_XEN_DEVICE redundant and finally > > removes > > it. The motivation is to 1/ decouple PIIX from Xen and 2/ to make Xen in

Re: [PATCH v6] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-06 Thread Anthony PERARD via
On Fri, Jan 06, 2023 at 09:10:55AM -0500, Chuck Zmudzinski wrote: > Well, our messages almost collided! I just proposed a v7 that adds > a check to prevent the extra processing for cases when machine is > not xenfv and the slot does not need to be cleared because it was > never reserved. The propos

[PATCH] configure: Expand test which disable -Wmissing-braces

2023-01-06 Thread Anthony PERARD via
From: Anthony PERARD With "clang 6.0.0-1ubuntu2" on Ubuntu Bionic, the test with build fine, but clang still suggest braces around the zero initializer in a few places, where there is a subobject. Expand test to include a sub struct which doesn't build on clang 6.0.0-1ubuntu2, and give: confi

Re: [PATCH v6] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-06 Thread Anthony PERARD via
On Sun, Jan 01, 2023 at 06:52:03PM -0500, Chuck Zmudzinski wrote: > Intel specifies that the Intel IGD must occupy slot 2 on the PCI bus, > as noted in docs/igd-assign.txt in the Qemu source code. > > Currently, when the xl toolstack is used to configure a Xen HVM guest with > Intel IGD passthroug

Re: [PATCH v6] xen/pt: reserve PCI slot 2 for Intel igd-passthru

2023-01-06 Thread Anthony PERARD via
On Tue, Jan 03, 2023 at 05:58:01PM -0500, Chuck Zmudzinski wrote: > Hello Anthony and Paul, Hi Chuck, > I am requesting your feedback to Alex Williamson's suggestion that this > problem with assigning the correct slot address to the igd on xen should > be fixed in libxl instead of in qemu. > > I

Re: [PATCH 2/6] hw/xen: use G_GNUC_PRINTF/SCANF for various functions

2022-12-19 Thread Anthony PERARD via
On Mon, Dec 19, 2022 at 08:02:01AM -0500, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH 1/2] hw/xen/xen_pt: Call default handler only if no custom one is set

2022-11-22 Thread Anthony PERARD via
On Mon, Nov 14, 2022 at 08:20:10PM +0100, Marek Marczykowski-Górecki wrote: > diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c > index 0ec7e52183..269bd26109 100644 > --- a/hw/xen/xen_pt.c > +++ b/hw/xen/xen_pt.c > @@ -255,6 +255,7 @@ static void xen_pt_pci_write_config(PCIDevice *d, > uint32_t addr

[PULL 1/1] hw/xen: set pci Atomic Ops requests for passthrough device

2022-09-27 Thread Anthony PERARD via
From: Ruili Ji Make guest os access pci device control 2 reg for passthrough device as struct XenPTRegInfo described in the file hw/xen/xen_pt.h. /* reg read only field mask (ON:RO/ROS, OFF:other) */ uint32_t ro_mask; /* reg emulate field mask (ON:emu, OFF:passthrough) */ uint32_t emu_mask; Reso

[PULL 0/1] xen queue 2022-09-27

2022-09-27 Thread Anthony PERARD via
The following changes since commit 99d6b11b5b44d7dd64f4cb1973184e40a4a174f8: Merge tag 'pull-target-arm-20220922' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2022-09-26 13:38:26 -0400) are available in the Git repository at: https://xenbits.xen.org/git-http/people/aper

Re: [PATCH] hw/xen: set pci Atomic Ops requests for passthrough device

2022-09-26 Thread Anthony PERARD via
On Tue, Sep 06, 2022 at 07:40:25AM +, Ji, Ruili wrote: > From: Ruili Ji ruili...@amd.com > Date: Tue, 6 Sep 2022 14:09:41 +0800 > Subject: [PATCH] hw/xen: set pci Atomic Ops requests for passthrough device > > Make guest os access pci device control 2 reg for passthrou

[PULL 2/2] xen/pass-through: don't create needless register group

2022-07-05 Thread Anthony PERARD via
From: Chuck Zmudzinski Currently we are creating a register group for the Intel IGD OpRegion for every device we pass through, but the XEN_PCI_INTEL_OPREGION register group is only valid for an Intel IGD. Add a check to make sure the device is an Intel IGD and a check that the administrator has e

[PULL 1/2] xen/pass-through: merge emulated bits correctly

2022-07-05 Thread Anthony PERARD via
From: Chuck Zmudzinski In xen_pt_config_reg_init(), there is an error in the merging of the emulated data with the host value. With the current Qemu, instead of merging the emulated bits with the host bits as defined by emu_mask, the emulated bits are merged with the host bits as defined by the i

[PULL 0/2] xen queue

2022-07-05 Thread Anthony PERARD via
The following changes since commit 19361471b59441cd6f2aa22d4fbee7a6e9e76586: Merge tag 'pull-la-20220705' of https://gitlab.com/rth7680/qemu into staging (2022-07-05 16:30:52 +0530) are available in the Git repository at: https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/pul

Re: [PATCH v2] xen/pass-through: don't create needless register group

2022-06-21 Thread Anthony PERARD via
On Fri, Jun 17, 2022 at 03:13:33PM -0400, Chuck Zmudzinski wrote: > Currently we are creating a register group for the Intel IGD OpRegion > for every device we pass through, but the XEN_PCI_INTEL_OPREGION > register group is only valid for an Intel IGD. Add a check to make > sure the device is an I

Re: [PATCH] xen/pass-through: don't create needless register group

2022-06-17 Thread Anthony PERARD via
On Fri, Jun 10, 2022 at 12:23:35PM -0400, Chuck Zmudzinski wrote: > Currently we are creating a register group for the Intel IGD OpRegion > for every device we pass through, but the XEN_PCI_INTEL_OPREGION > register group is only valid for an Intel IGD. Add a check to make > sure the device is an I

Re: [PATCH v2] xen/pass-through: merge emulated bits correctly

2022-06-17 Thread Anthony PERARD via
On Sat, Jun 11, 2022 at 12:43:29PM -0400, Chuck Zmudzinski wrote: > In xen_pt_config_reg_init(), there is an error in the merging of the > emulated data with the host value. With the current Qemu, instead of > merging the emulated bits with the host bits as defined by emu_mask, > the emulated bits

[PULL 1/3] hw/ide/piix: Remove redundant "piix3-ide-xen" device class

2022-06-09 Thread Anthony PERARD via
From: Bernhard Beschow Commit 0f8445820f11a69154309863960328dda3dc1ad4 'xen: piix reuse pci generic class init function' already resolved redundant code which in turn rendered piix3-ide-xen redundant. Signed-off-by: Bernhard Beschow Reviewed-by: Anthony PERARD Message-Id: <20220513180957.90514

[PULL 2/3] hw/ide/piix: Add some documentation to pci_piix3_xen_ide_unplug()

2022-06-09 Thread Anthony PERARD via
From: Bernhard Beschow The comment is based on commit message ae4d2eb273b167dad748ea4249720319240b1ac2 'xen-platform: add missing disk unplug option'. Since it seems to describe design decisions and limitations that still apply it seems worth having. Signed-off-by: Bernhard Beschow Reviewed-by:

[PULL 0/3] xen queue 2022-06-09

2022-06-09 Thread Anthony PERARD via
The following changes since commit 05911658cb46d907fb38cbc0b48d2b652237dc28: Merge tag 'vfio-updates-20220608.0' of https://gitlab.com/alex.williamson/qemu into staging (2022-06-08 13:38:54 -0700) are available in the Git repository at: https://xenbits.xen.org/git-http/people/aperard/qemu-d

[PULL 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug()

2022-06-09 Thread Anthony PERARD via
From: Bernhard Beschow This function was declared in a generic and public header, implemented in a device-specific source file but only used in xen_platform. Given its 'aux' parameter, this function is more xen-specific than piix-specific. Also, the hardcoded magic constants seem to be generic an

Re: [PATCH v2 3/3] include/hw/ide: Unexport pci_piix3_xen_ide_unplug()

2022-05-19 Thread Anthony PERARD via
On Fri, May 13, 2022 at 08:09:57PM +0200, Bernhard Beschow wrote: > This function was declared in a generic and public header, implemented > in a device-specific source file but only used in xen_platform. Given its > 'aux' parameter, this function is more xen-specific than piix-specific. > Also, th

Re: [PATCH v2 2/3] hw/ide/piix: Add some documentation to pci_piix3_xen_ide_unplug()

2022-05-19 Thread Anthony PERARD via
On Fri, May 13, 2022 at 08:09:56PM +0200, Bernhard Beschow wrote: > The comment is based on commit message > ae4d2eb273b167dad748ea4249720319240b1ac2 'xen-platform: add missing disk > unplug option'. Since it seems to describe design decisions and > limitations that still apply it seems worth havin

Re: [PATCH v2 1/3] hw/ide/piix: Remove redundant "piix3-ide-xen" device class

2022-05-19 Thread Anthony PERARD via
On Fri, May 13, 2022 at 08:09:55PM +0200, Bernhard Beschow wrote: > Commit 0f8445820f11a69154309863960328dda3dc1ad4 'xen: piix reuse pci > generic class init function' already resolved redundant code which in > turn rendered piix3-ide-xen redundant. > > Signed-off-by: Bernhard Beschow Creating a

Re: [PATCH] tpm_crb: mark command buffer as dirty on request completion

2022-05-10 Thread Anthony PERARD via
On Mon, Apr 11, 2022 at 12:31:01PM -0400, Stefan Berger wrote: > On 4/11/22 10:47, Anthony PERARD wrote: > > From: Anthony PERARD > The state of the registers is saved using this here: > > static const VMStateDescription vmstate_tpm_crb = { > .name = "tpm-crb", > .pre_save = tpm_crb_pre_s

Re: [PATCH] qemu-options: Limit the -xen options to x86 and arm

2022-04-27 Thread Anthony PERARD via
On Wed, Apr 27, 2022 at 03:31:56PM +0200, Thomas Huth wrote: > The Xen hypervisor is only available on x86 and arm - thus let's > limit the related options to these targets. > > Signed-off-by: Thomas Huth Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

Re: [PATCH] softmmu/vl: Fence 'xenfb' if Xen support is not compiled in

2022-04-27 Thread Anthony PERARD via
On Wed, Apr 27, 2022 at 02:33:16PM +0200, Thomas Huth wrote: > The 'xenfb' parameter for the '-vga' command line option is currently > always enabled unconditionally (since the xenfb is not a proper QOM > device that could be tested via its class name). That means it also > shows up if Xen is not e

[PATCH] tpm_crb: mark command buffer as dirty on request completion

2022-04-11 Thread Anthony PERARD via
From: Anthony PERARD At the moment, there doesn't seems to be any way to know that QEMU made modification to the command buffer. This is potentially an issue on Xen while migrating a guest, as modification to the buffer after the migration as started could be ignored and not transfered to the des

Re: [PATCH 2/2] hw/xen/xen_pt: Resolve igd_passthrough_isa_bridge_create() indirection

2022-04-05 Thread Anthony PERARD via
On Sat, Mar 26, 2022 at 05:58:24PM +0100, Bernhard Beschow wrote: > Now that igd_passthrough_isa_bridge_create() is implemented within the > xen context it may use Xen* data types directly and become > xen_igd_passthrough_isa_bridge_create(). This resolves an indirection. > > Signed-off-by: Bernha

Re: [PATCH 1/2] hw/xen/xen_pt: Confine igd-passthrough-isa-bridge to XEN

2022-04-05 Thread Anthony PERARD via
On Sat, Mar 26, 2022 at 05:58:23PM +0100, Bernhard Beschow wrote: > igd-passthrough-isa-bridge is only requested in xen_pt but was > implemented in pc_piix.c. This caused xen_pt to dependend on i386/pc > which is hereby resolved. > > Signed-off-by: Bernhard Beschow Acked-by: Anthony PERARD Tha

[PULL 2/2] xen-mapcache: Avoid entry->lock overflow

2022-01-27 Thread Anthony PERARD via
From: Ross Lagerwall In some cases, a particular mapcache entry may be mapped 256 times causing the lock field to wrap to 0. For example, this may happen when using emulated NVME and the guest submits a large scatter-gather write. At this point, the entry map be remapped causing QEMU to write the

[PULL 0/2] Xen queue

2022-01-27 Thread Anthony PERARD via
The following changes since commit 48302d4eb628ff0bea4d7e92cbf6b726410eb4c3: Merge remote-tracking branch 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20220126' into staging (2022-01-26 10:59:50 +) are available in the Git repository at: https://xenbits.xen.org/git-http/people/aperard/q

[PULL 1/2] xen-hvm: Allow disabling buffer_io_timer

2022-01-27 Thread Anthony PERARD via
From: Jason Andryuk commit f37f29d31488 "xen: slightly simplify bufioreq handling" hard coded setting req.count = 1 during initial field setup before the main loop. This missed a subtlety that an early exit from the loop when there are no ioreqs to process, would have req.count == 0 for the retu

Re: [PATCH] xen-hvm: Allow disabling buffer_io_timer

2022-01-26 Thread Anthony PERARD via
On Wed, Jan 26, 2022 at 01:47:20PM +, Durrant, Paul wrote: > On 26/01/2022 13:43, Jason Andryuk wrote: > > On Tue, Dec 14, 2021 at 8:40 AM Durrant, Paul wrote: > > > > > > On 10/12/2021 11:34, Jason Andryuk wrote: > > > > commit f37f29d31488 "xen: slightly simplify bufioreq handling" hard > >

Re: [PATCH] vl: Parse legacy default_machine_opts

2021-07-22 Thread Anthony PERARD via
On Mon, Jul 12, 2021 at 10:15:52PM -0400, Jason Andryuk wrote: > qemu can't start a xen vm after commit d8fb7d0969d5 > "vl: switch -M parsing to keyval" with: > > $ ./qemu-system-i386 -M xenfv > Unexpected error in object_property_find_err() at ../qom/object.c:1298: > qemu-system-i386: Property 'x

Re: [PATCH 2/2] Remove leading underscores from Xen defines

2021-06-07 Thread Anthony PERARD via
On Mon, Jun 07, 2021 at 08:36:07AM +0200, Thomas Huth wrote: > On 05/06/2021 19.50, Ahmed Abouzied wrote: > > Identifiers with leading underscores followed by capital letters or > > underscores are reserved for C standards. > > > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/369 > > >

[PULL 1/3] xen-mapcache: avoid a race on memory map while using MAP_FIXED

2021-05-10 Thread Anthony PERARD via
From: Igor Druzhinin When we're replacing the existing mapping there is possibility of a race on memory map with other threads doing mmap operations - the address being unmapped/re-mapped could be occupied by another thread in between. Linux mmap man page recommends keeping the existing mappings

[PULL 3/3] xen-block: Use specific blockdev driver

2021-05-10 Thread Anthony PERARD via
... when a xen-block backend instance is created via xenstore. Following 8d17adf34f50 ("block: remove support for using "file" driver with block/char devices"), using the "file" blockdev driver for everything doesn't work anymore, we need to use the "host_device" driver when the disk image is a bl

[PULL 2/3] xen: Free xenforeignmemory_resource at exit

2021-05-10 Thread Anthony PERARD via
Because Coverity complains about it and this is one leak that Valgrind reports. Signed-off-by: Anthony PERARD Acked-by: Paul Durrant Message-Id: <20210430163742.469739-1-anthony.per...@citrix.com> Signed-off-by: Anthony PERARD --- hw/i386/xen/xen-hvm.c | 9 ++--- include/hw/xen/xen_c

[PULL 0/3] xen queue 2021-05-10

2021-05-10 Thread Anthony PERARD via
The following changes since commit 4cc10cae64c51e17844dc4358481c393d7bf1ed4: Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging (2021-05-06 18:56:17 +0100) are available in the Git repository at: https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git

[PATCH] xen: Free xenforeignmemory_resource at exit

2021-04-30 Thread Anthony PERARD via
From: Anthony PERARD Because Coverity complains about it and this is one leak that Valgrind reports. Signed-off-by: Anthony PERARD --- hw/i386/xen/xen-hvm.c | 9 ++--- include/hw/xen/xen_common.h | 6 ++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/hw/i386/xen/

[PATCH] xen-block: Use specific blockdev driver

2021-04-30 Thread Anthony PERARD via
From: Anthony PERARD ... when a xen-block backend instance is created via xenstore. Following 8d17adf34f50 ("block: remove support for using "file" driver with block/char devices"), using the "file" blockdev driver for everything doesn't work anymore, we need to use the "host_device" driver when

Re: [PATCH] xen-mapcache: avoid a race on memory map while using MAP_FIXED

2021-04-20 Thread Anthony PERARD via
On Tue, Apr 20, 2021 at 10:51:47AM +0100, Igor Druzhinin wrote: > On 20/04/2021 04:39, no-re...@patchew.org wrote: > > === OUTPUT BEGIN === > > ERROR: Author email address is mangled by the mailing list > > #2: > > Author: Igor Druzhinin via > > > > total: 1 errors, 0 warnings, 21 lines checked >

Re: An error due to installation that require binutils package

2021-04-09 Thread Anthony PERARD via
On Wed, Mar 31, 2021 at 11:03:55AM +0100, George Dunlap wrote: > [Dropping some irrelevant cc’s] > > > On Mar 30, 2021, at 1:46 PM, Stefano Garzarella wrote: > > > > Hi John, > > > > On Mon, Mar 29, 2021 at 09:46:49PM +0300, John Simpson wrote: > >> Hello, > >> > >> Kindly ask you to have a lo

Re: [PULL 0/1] xen queue 2021-03-23

2021-03-23 Thread Anthony PERARD via
On Tue, Mar 23, 2021 at 05:09:45AM -0700, no-re...@patchew.org wrote: > ERROR: Author email address is mangled by the mailing list > #2: > Author: Anthony PERARD via The actual commit in the pull request is fine. I didn't work around the email issue when sending pull request, b

[PULL 1/1] xen-block: Fix removal of backend instance via xenstore

2021-03-23 Thread Anthony PERARD via
Whenever a Xen block device is detach via xenstore, the image associated with it remained open by the backend QEMU and an error is logged: qemu-system-i386: failed to destroy drive: Node xvdz-qcow2 is in use This happened since object_unparent() doesn't immediately frees the object and thus ke

[PULL 0/1] xen queue 2021-03-23

2021-03-23 Thread Anthony PERARD via
The following changes since commit 5ca634afcf83215a9a54ca6e66032325b5ffb5f6: Merge remote-tracking branch 'remotes/philmd/tags/sdmmc-20210322' into staging (2021-03-22 18:50:25 +) are available in the Git repository at: https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git tags/p

Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-22 Thread Anthony PERARD via
Hi Paul, Stefano, Could one of you could give a Ack to this patch? Thanks, On Mon, Mar 08, 2021 at 02:32:32PM +, Anthony PERARD wrote: > From: Anthony PERARD > > Whenever a Xen block device is detach via xenstore, the image > associated with it remained open by the backend QEMU and an err

Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Anthony PERARD via
On Mon, Mar 08, 2021 at 06:37:38PM +0100, Paolo Bonzini wrote: > On 08/03/21 18:29, Anthony PERARD wrote: > > > If nothing else works then I guess it's okay, but why can't you do the > > > xen_block_drive_destroy from e.g. an unrealize callback? > > > > I'm not sure if that's possible. > > > > xe

Re: [PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Anthony PERARD via
On Mon, Mar 08, 2021 at 03:38:49PM +0100, Paolo Bonzini wrote: > On 08/03/21 15:32, Anthony PERARD wrote: > > From: Anthony PERARD > > > > Whenever a Xen block device is detach via xenstore, the image > > associated with it remained open by the backend QEMU and an error is > > logged: > > qe

[PATCH] xen-block: Fix removal of backend instance via xenstore

2021-03-08 Thread Anthony PERARD via
From: Anthony PERARD Whenever a Xen block device is detach via xenstore, the image associated with it remained open by the backend QEMU and an error is logged: qemu-system-i386: failed to destroy drive: Node xvdz-qcow2 is in use This happened since object_unparent() doesn't immediately frees

Re: [PATCH v2 4/6] xen: Delete xen_available() function

2020-11-27 Thread Anthony PERARD via
On Wed, Nov 25, 2020 at 03:56:34PM -0500, Eduardo Habkost wrote: > The function can be replaced with accel_available("xen"). > > Signed-off-by: Eduardo Habkost Acked-by: Anthony PERARD Thanks, -- Anthony PERARD

  1   2   >