Re: [PATCH v2] hw/ide/ahci: fix legacy software reset

2023-11-07 Thread Niklas Cassel
On Tue, Nov 07, 2023 at 07:14:07PM +0100, Kevin Wolf wrote: > Am 05.10.2023 um 12:04 hat Niklas Cassel geschrieben: > > From: Niklas Cassel > > > > Legacy software contains a standard mechanism for generating a reset to a > > Serial ATA device - setting the SRST (software reset) bit in the

Re: [PATCH v8 0/7] virtio: cleanup vhost-user-generic and reduce c

2023-11-07 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Tue, Nov 07, 2023 at 06:07:45PM +, Alex Bennée wrote: >> A lot of our vhost-user stubs are large chunks of boilerplate that do >> (mostly) the same thing. This series continues the cleanups by >> splitting the vhost-user-base and vhost-user-generic

Re: [PATCH v8 7/7] docs/system: add a basic enumeration of vhost-user devices

2023-11-07 Thread Philippe Mathieu-Daudé
On 7/11/23 19:07, Alex Bennée wrote: Make it clear the vhost-user-device is intended for expert use only. Signed-off-by: Alex Bennée --- v5 - split vhost-user-device out of the table - sort the table alphabetically - add sound and scmi devices v6 - add note re vhost-user-device v7

Re: [PATCH v2] hw/ide/ahci: fix legacy software reset

2023-11-07 Thread Kevin Wolf
Am 07.11.2023 um 19:14 hat Kevin Wolf geschrieben: > Am 05.10.2023 um 12:04 hat Niklas Cassel geschrieben: > > From: Niklas Cassel > > > > Legacy software contains a standard mechanism for generating a reset to a > > Serial ATA device - setting the SRST (software reset) bit in the Device > >

Re: [PATCH v6 0/6] virtio: cleanup vhost-user-generic and reduce c

2023-11-07 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Mon, Nov 06, 2023 at 07:15:09PM +, Alex Bennée wrote: >> A lot of our vhost-user stubs are large chunks of boilerplate that do >> (mostly) the same thing. This series continues the cleanups by >> splitting the vhost-user-base and vhost-user-generic

Re: [PATCH v2] hw/ide/ahci: fix legacy software reset

2023-11-07 Thread Kevin Wolf
Am 05.10.2023 um 12:04 hat Niklas Cassel geschrieben: > From: Niklas Cassel > > Legacy software contains a standard mechanism for generating a reset to a > Serial ATA device - setting the SRST (software reset) bit in the Device > Control register. > > Serial ATA has a more robust mechanism

Re: [PATCH v8 0/7] virtio: cleanup vhost-user-generic and reduce c

2023-11-07 Thread Michael S. Tsirkin
On Tue, Nov 07, 2023 at 06:07:45PM +, Alex Bennée wrote: > A lot of our vhost-user stubs are large chunks of boilerplate that do > (mostly) the same thing. This series continues the cleanups by > splitting the vhost-user-base and vhost-user-generic implementations. > After adding a new vq_size

Re: [PATCH v7 7/7] docs/system: add a basic enumeration of vhost-user devices

2023-11-07 Thread Michael S. Tsirkin
On Tue, Nov 07, 2023 at 06:02:46PM +, Alex Bennée wrote: > Make it clear the vhost-user-device is intended for expert use only. > > Signed-off-by: Alex Bennée > Message-Id: <20231009095937.195728-7-alex.ben...@linaro.org> > > --- > v5 > - split vhost-user-device out of the table > -

[PATCH v8 7/7] docs/system: add a basic enumeration of vhost-user devices

2023-11-07 Thread Alex Bennée
Make it clear the vhost-user-device is intended for expert use only. Signed-off-by: Alex Bennée --- v5 - split vhost-user-device out of the table - sort the table alphabetically - add sound and scmi devices v6 - add note re vhost-user-device v7 - fix patching description ---

[PATCH v8 1/7] virtio: split into vhost-user-base and vhost-user-device

2023-11-07 Thread Alex Bennée
Lets keep a cleaner split between the base class and the derived vhost-user-device which we can use for generic vhost-user stubs. This includes an update to introduce the vq_size property so the number of entries in a virtq can be defined. Signed-off-by: Alex Bennée --- v5 -

[PATCH v8 5/7] hw/virtio: derive vhost-user-i2c from vhost-user-base

2023-11-07 Thread Alex Bennée
Now we can take advantage of the new base class and make vhost-user-i2c a much simpler boilerplate wrapper. Also as this doesn't require any target specific hacks we only need to build the stubs once. Acked-by: Mark Cave-Ayland Acked-by: Viresh Kumar Signed-off-by: Alex Bennée --- v7 -

[PATCH v8 4/7] hw/virtio: derive vhost-user-gpio from vhost-user-base

2023-11-07 Thread Alex Bennée
Now the new base class supports config handling we can take advantage and make vhost-user-gpio a much simpler boilerplate wrapper. Also as this doesn't require any target specific hacks we only need to build the stubs once. Acked-by: Mark Cave-Ayland Acked-by: Viresh Kumar Signed-off-by: Alex

[PATCH v8 3/7] hw/virtio: derive vhost-user-rng from vhost-user-base

2023-11-07 Thread Alex Bennée
Now we can take advantage of our new base class and make vhost-user-rng a much simpler boilerplate wrapper. Also as this doesn't require any target specific hacks we only need to build the stubs once. Acked-by: Mark Cave-Ayland Signed-off-by: Alex Bennée --- v5 - don't remove the in-QEMU RNG

[PATCH v8 6/7] hw/virtio: add vhost-user-snd and virtio-snd-pci devices

2023-11-07 Thread Alex Bennée
From: Manos Pitsidianakis Tested with rust-vmm vhost-user-sound daemon: RUST_LOG=trace cargo run --bin vhost-user-sound -- --socket /tmp/snd.sock --backend null Invocation: qemu-system-x86_64 \ -qmp unix:./qmp-sock,server,wait=off \ -m 4096 \

[PATCH v8 2/7] hw/virtio: convert vhost-user-base to async shutdown

2023-11-07 Thread Alex Bennée
We are about to convert at least one stubs which was using the async teardown so lets use it for all the cases. Signed-off-by: Alex Bennée --- hw/virtio/vhost-user-base.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/hw/virtio/vhost-user-base.c

[PATCH v8 0/7] virtio: cleanup vhost-user-generic and reduce c

2023-11-07 Thread Alex Bennée
A lot of our vhost-user stubs are large chunks of boilerplate that do (mostly) the same thing. This series continues the cleanups by splitting the vhost-user-base and vhost-user-generic implementations. After adding a new vq_size property the rng, gpio and i2c vhost-user devices become simple

[PATCH v7 0/7] virtio: cleanup vhost-user-generic and reduce c

2023-11-07 Thread Alex Bennée
A lot of our vhost-user stubs are large chunks of boilerplate that do (mostly) the same thing. This series continues the cleanups by splitting the vhost-user-base and vhost-user-generic implementations. After adding a new vq_size property the rng, gpio and i2c vhost-user devices become simple

[PATCH v7 6/7] hw/virtio: add vhost-user-snd and virtio-snd-pci devices

2023-11-07 Thread Alex Bennée
From: Manos Pitsidianakis Tested with rust-vmm vhost-user-sound daemon: RUST_LOG=trace cargo run --bin vhost-user-sound -- --socket /tmp/snd.sock --backend null Invocation: qemu-system-x86_64 \ -qmp unix:./qmp-sock,server,wait=off \ -m 4096 \

[PATCH v7 5/7] hw/virtio: derive vhost-user-i2c from vhost-user-base

2023-11-07 Thread Alex Bennée
Now we can take advantage of the new base class and make vhost-user-i2c a much simpler boilerplate wrapper. Also as this doesn't require any target specific hacks we only need to build the stubs once. Acked-by: Mark Cave-Ayland Acked-by: Viresh Kumar Signed-off-by: Alex Bennée --- v7 -

[PATCH v7 2/7] hw/virtio: convert vhost-user-base to async shutdown

2023-11-07 Thread Alex Bennée
We are about to convert at least one stubs which was using the async teardown so lets use it for all the cases. Signed-off-by: Alex Bennée --- hw/virtio/vhost-user-base.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/hw/virtio/vhost-user-base.c

[PATCH v7 4/7] hw/virtio: derive vhost-user-gpio from vhost-user-base

2023-11-07 Thread Alex Bennée
Now the new base class supports config handling we can take advantage and make vhost-user-gpio a much simpler boilerplate wrapper. Also as this doesn't require any target specific hacks we only need to build the stubs once. Acked-by: Mark Cave-Ayland Acked-by: Viresh Kumar Signed-off-by: Alex

[PATCH v7 7/7] docs/system: add a basic enumeration of vhost-user devices

2023-11-07 Thread Alex Bennée
Make it clear the vhost-user-device is intended for expert use only. Signed-off-by: Alex Bennée Message-Id: <20231009095937.195728-7-alex.ben...@linaro.org> --- v5 - split vhost-user-device out of the table - sort the table alphabetically - add sound and scmi devices v6 - add note re

[PATCH v7 3/7] hw/virtio: derive vhost-user-rng from vhost-user-base

2023-11-07 Thread Alex Bennée
Now we can take advantage of our new base class and make vhost-user-rng a much simpler boilerplate wrapper. Also as this doesn't require any target specific hacks we only need to build the stubs once. Acked-by: Mark Cave-Ayland Signed-off-by: Alex Bennée --- v5 - don't remove the in-QEMU RNG

[PATCH v7 1/7] virtio: split into vhost-user-base and vhost-user-device

2023-11-07 Thread Alex Bennée
Lets keep a cleaner split between the base class and the derived vhost-user-device which we can use for generic vhost-user stubs. This includes an update to introduce the vq_size property so the number of entries in a virtq can be defined. Signed-off-by: Alex Bennée --- v5 -

Re: [PATCH] hw/ide/ahci: trigger either error IRQ or regular IRQ, not both

2023-11-07 Thread Kevin Wolf
Am 11.10.2023 um 15:12 hat Niklas Cassel geschrieben: > From: Niklas Cassel > > According to AHCI 1.3.1, 5.3.8.1 RegFIS:Entry, if ERR_STAT is set, > we jump to state ERR:FatalTaskfile, which will raise a TFES IRQ > unconditionally, regardless if the I bit is set in the FIS or not. > > Thus, we

Re: [PATCH v2] block/file-posix: fix update_zones_wp() caller

2023-11-07 Thread Michael Tokarev
25.08.2023 07:05, Sam Li wrote: When the zoned request fail, it needs to update only the wp of the target zones for not disrupting the in-flight writes on these other zones. The wp is updated successfully after the request completes. Fixed the callers with right offset and nr_zones. This

Re: [PATCH] file-posix: fix over-writing of returning zone_append offset

2023-11-07 Thread Michael Tokarev
30.10.2023 10:38, Naohiro Aota wrote: raw_co_zone_append() sets "s->offset" where "BDRVRawState *s". This pointer is used later at raw_co_prw() to save the block address where the data is written. When multiple IOs are on-going at the same time, a later IO's raw_co_zone_append() call

Re: [PATCH v3 4/6] block/nvme: nvme_process_completion() fix bound for cid

2023-11-07 Thread Michael Tokarev
17.10.2023 15:59, Vladimir Sementsov-Ogievskiy: NVMeQueuePair::reqs has length NVME_NUM_REQS, which less than NVME_QUEUE_SIZE by 1. Fixes: 1086e95da17050 ("block/nvme: switch to a NVMeRequest freelist") Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi Reviewed-by:

Re: [PATCH v6 1/6] virtio: split into vhost-user-base and vhost-user-device

2023-11-07 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Mon, Nov 06, 2023 at 07:15:10PM +, Alex Bennée wrote: >> Lets keep a cleaner split between the base class and the derived >> vhost-user-device which we can use for generic vhost-user stubs. This >> includes an update to introduce the vq_size property so the

Re: [PULL 00/15] xenfv.for-upstream queue

2023-11-07 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

[PULL 40/75] target/ppc: Move powerpc_mmu_t definition to 'cpu.h'

2023-11-07 Thread Philippe Mathieu-Daudé
The powerpc_mmu_t definition is only used by target/ppc/, no need to expose it. Restrict it by moving it to "target/ppc/cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater Message-Id: <20231013125630.95116-7-phi...@linaro.org> ---

[PULL 37/75] target/ppc: Move ppc_cpu_class_by_name() declaration to 'cpu.h'

2023-11-07 Thread Philippe Mathieu-Daudé
ppc_cpu_class_by_name() is only called in target/ppc/, no need to expose outside (in particular to hw/). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater Message-Id: <20231013125630.95116-4-phi...@linaro.org> --- target/ppc/cpu-qom.h | 2 --

[PULL 51/75] hw/cpu: Clean up global variable shadowing

2023-11-07 Thread Philippe Mathieu-Daudé
Fix: hw/core/machine.c:1302:22: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] const CPUArchId *cpus = possible_cpus->cpus; ^ hw/core/numa.c:69:17: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]

[PULL 73/75] MAINTAINERS: Add more guest-agent related files to the corresponding section

2023-11-07 Thread Philippe Mathieu-Daudé
From: Thomas Huth contrib/systemd/qemu-guest-agent.service, tests/data/test-qga-config and tests/data/test-qga-os-release belong to the guest agent, so make sure that these files are covered here, too. Signed-off-by: Thomas Huth Reviewed-by: Konstantin Kostiuk Message-ID:

[PULL 42/75] hw/s390x/css: Have css_do_sic() take S390CPU instead of CPUS390XState

2023-11-07 Thread Philippe Mathieu-Daudé
"hw/s390x/css.h" is a header used by target-agnostic objects (such hw/s390x/virtio-ccw-gpu.c), thus can not use target-specific types, such CPUS390XState. Have css_do_sic() take S390CPU a pointer, which is target-agnostic. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth

[PULL 75/75] dump: Add close fd on error return to avoid resource leak

2023-11-07 Thread Philippe Mathieu-Daudé
From: Zongmin Zhou Reported-by: Coverity CID 1523842 (RESOURCE_LEAK) Fixes: e6549197f7 ("dump: Add command interface for kdump-raw formats") Signed-off-by: Zongmin Zhou Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231107024417.585475-1-min_h...@163.com>

[PULL 68/75] hw/sd: Declare QOM types using DEFINE_TYPES() macro

2023-11-07 Thread Philippe Mathieu-Daudé
When multiple QOM types are registered in the same file, it is simpler to use the the DEFINE_TYPES() macro. In particular because type array declared with such macro are easier to review. Mechanical transformation using the following comby script: [pattern-x1] match=''' static const

[PULL 44/75] target/s390x/cpu: Restrict cpu_get_tb_cpu_state() definition to TCG

2023-11-07 Thread Philippe Mathieu-Daudé
cpu_get_tb_cpu_state() is TCG specific. Another accelerator calling it would be a bug, so restrict the definition to TCG, along with "tcg_s390x.h" header inclusion. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20231106114500.5269-4-phi...@linaro.org> ---

[PULL 43/75] hw/s390x/sclp: Have sclp_service_call[_protected]() take S390CPU*

2023-11-07 Thread Philippe Mathieu-Daudé
"hw/s390x/sclp.h" is a header used by target-agnostic objects (such hw/char/sclpconsole[-lm].c), thus can not use target-specific types, such CPUS390XState. Have sclp_service_call[_protected]() take a S390CPU pointer, which is target-agnostic. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by:

[PULL 72/75] MAINTAINERS: Add include/hw/xtensa/mx_pic.h to the XTFPGA machine section

2023-11-07 Thread Philippe Mathieu-Daudé
From: Thomas Huth These machines are the only user of the mx_pic code, so the header (which is currently "unmaintained" according to the MAINTAINERS file) should be added to this section. Signed-off-by: Thomas Huth Acked-by: Max Filippov Reviewed-by: Philippe Mathieu-Daudé Message-ID:

[PULL 47/75] target: Move ArchCPUClass definition to 'cpu.h'

2023-11-07 Thread Philippe Mathieu-Daudé
The OBJECT_DECLARE_CPU_TYPE() macro forward-declares each ArchCPUClass type. These forward declarations are sufficient for code in hw/ to use the QOM definitions. No need to expose these structure definitions. Keep each local to their target/ by moving them to the corresponding "cpu.h" header.

[PULL 41/75] target/ppc: Move powerpc_input_t definition to 'cpu.h'

2023-11-07 Thread Philippe Mathieu-Daudé
The powerpc_input_t definition is only used by target/ppc/, no need to expose it. Restrict it by moving it to "target/ppc/cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater Message-Id: <20231013125630.95116-8-phi...@linaro.org> ---

[PULL 45/75] target/s390x/cpu: Restrict CPUS390XState declaration to 'cpu.h'

2023-11-07 Thread Philippe Mathieu-Daudé
"target/s390x/cpu-qom.h" has to be target-agnostic. However, it currently declares CPUS390XState, which is target-specific. Move that declaration to "cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20231106114500.5269-5-phi...@linaro.org> ---

[PULL 36/75] target/ppc: Define powerpc_pm_insn_t in 'internal.h'

2023-11-07 Thread Philippe Mathieu-Daudé
PM instructions are only used by TCG helpers. No need to expose to other hardware. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater Message-Id: <20231013125630.95116-3-phi...@linaro.org> --- target/ppc/cpu-qom.h | 10 --

[PULL 00/75] Misc HW/UI patches for 2023-11-07

2023-11-07 Thread Philippe Mathieu-Daudé
The following changes since commit bb541a7068d2eee51a9abbe2dedcdf27298b1872: Merge tag 'pull-pa-20231106' of https://gitlab.com/rth7680/qemu into staging (2023-11-07 15:01:17 +0800) are available in the Git repository at: https://github.com/philmd/qemu.git tags/misc-cpus-20231107 for you

[PULL 38/75] target/ppc: Move PowerPCCPUClass definition to 'cpu.h'

2023-11-07 Thread Philippe Mathieu-Daudé
The OBJECT_DECLARE_CPU_TYPE() macro forward-declares the PowerPCCPUClass type. This forward declaration is sufficient for code in hw/ to use the QOM definitions. No need to expose the structure definition. Keep it local to target/ppc/ by moving it to target/ppc/cpu.h. Suggested-by: Richard

[PULL 39/75] target/ppc: Move powerpc_excp_t definition to 'cpu.h'

2023-11-07 Thread Philippe Mathieu-Daudé
The powerpc_excp_t definition is only used by target/ppc/, no need to expose it. Restrict it by moving it to "target/ppc/cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater Message-Id: <20231013125630.95116-6-phi...@linaro.org> ---

Re: [PATCH v3 0/6] migration: check required entries and sections are loaded

2023-11-07 Thread Juan Quintela
"Michael S. Tsirkin" wrote: > On Mon, Nov 06, 2023 at 03:35:54PM +0400, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> >> Hi, >> >> Surprisingly, the migration code doesn't check that required migration >> entries >> and subsections are loaded. Either optional or required

Re: [PATCH v2 1/3] ide/pci.c: introduce pci_ide_update_mode() function

2023-11-07 Thread Kevin Wolf
Am 06.11.2023 um 23:41 hat Mark Cave-Ayland geschrieben: > On 06/11/2023 14:12, Kevin Wolf wrote: > > Hi Kevin, > > Thanks for taking the time to review this. I'll reply inline below. > > > Am 25.10.2023 um 00:40 hat Mark Cave-Ayland geschrieben: > > > This function reads the value of the

Re: [PATCH v2 3/3] hw/ide/via: implement legacy/native mode switching

2023-11-07 Thread Kevin Wolf
Am 06.11.2023 um 17:13 hat BALATON Zoltan geschrieben: > On Mon, 6 Nov 2023, Kevin Wolf wrote: > > Am 25.10.2023 um 00:40 hat Mark Cave-Ayland geschrieben: > > > Allow the VIA IDE controller to switch between both legacy and native > > > modes by > > > calling pci_ide_update_mode() to reconfigure

Re: [PATCH v2 0/2] virtio-blk: add iothread-vq-mapping parameter

2023-11-07 Thread Kevin Wolf
Am 07.11.2023 um 04:00 hat Stefan Hajnoczi geschrieben: > On Thu, Nov 02, 2023 at 03:10:52PM +0100, Kevin Wolf wrote: > > Am 18.09.2023 um 18:16 hat Stefan Hajnoczi geschrieben: > > > virtio-blk and virtio-scsi devices need a way to specify the mapping > > > between > > > IOThreads and

Re: [PATCH v6 0/6] virtio: cleanup vhost-user-generic and reduce c

2023-11-07 Thread Michael S. Tsirkin
On Mon, Nov 06, 2023 at 07:15:09PM +, Alex Bennée wrote: > A lot of our vhost-user stubs are large chunks of boilerplate that do > (mostly) the same thing. This series continues the cleanups by > splitting the vhost-user-base and vhost-user-generic implementations. > After adding a new vq_size

Re: [PATCH v4 14/17] net: do not delete nics in net_cleanup()

2023-11-07 Thread David Woodhouse
On Mon, 2023-11-06 at 14:35 +, David Woodhouse wrote: > From: David Woodhouse > > In net_cleanup() we only need to delete the netdevs, as those may have > state which outlives Qemu when it exits, and thus may actually need to > be cleaned up on exit. > > The nics, on the other hand, are

Re: [PATCH v4 16/17] doc/sphinx/hxtool.py: add optional label argument to SRST directive

2023-11-07 Thread David Woodhouse
On Mon, 2023-11-06 at 14:35 +, David Woodhouse wrote: > From: David Woodhouse > > We can't just embed labels directly into files like qemu-options.hx which > are included from multiple top-level RST files, because Sphinx sees the > labels as duplicate:

[PULL 12/15] hw/xen: update Xen PV NIC to XenDevice model

2023-11-07 Thread David Woodhouse
From: David Woodhouse This allows us to use Xen PV networking with emulated Xen guests, and to add them on the command line or hotplug. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/net/meson.build| 2 +- hw/net/trace-events | 11 + hw/net/xen_nic.c

[PULL 00/15] xenfv.for-upstream queue

2023-11-07 Thread David Woodhouse
The following changes since commit 8aba939e77daca10eac99d9d467f65ba7df5ab3e: Merge tag 'pull-riscv-to-apply-20231107' of https://github.com/alistair23/qemu into staging (2023-11-07 11:08:16 +0800) are available in the Git repository at: git://git.infradead.org/users/dwmw2/qemu.git tags

[PULL 09/15] hw/xen: update Xen console to XenDevice model

2023-11-07 Thread David Woodhouse
From: David Woodhouse This allows (non-primary) console devices to be created on the command line and hotplugged. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/char/trace-events| 8 + hw/char/xen_console.c | 532 +++-

[PULL 11/15] hw/xen: only remove peers of PCI NICs on unplug

2023-11-07 Thread David Woodhouse
From: David Woodhouse When the Xen guest asks to unplug *emulated* NICs, it's kind of unhelpful also to unplug the peer of the *Xen* PV NIC. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/xen/xen_platform.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-)

[PULL 01/15] i386/xen: Ignore VCPU_SSHOTTMR_future flag in set_singleshot_timer()

2023-11-07 Thread David Woodhouse
From: David Woodhouse Upstream Xen now ignores this flag¹, since the only guest kernel ever to use it was buggy. ¹ https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=19c6cbd909 Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- target/i386/kvm/xen-emu.c | 20

[PULL 07/15] hw/xen: add get_frontend_path() method to XenDeviceClass

2023-11-07 Thread David Woodhouse
From: David Woodhouse The primary Xen console is special. The guest's side is set up for it by the toolstack automatically and not by the standard PV init sequence. Accordingly, its *frontend* doesn't appear in …/device/console/0 either; instead it appears under …/console in the guest's

[PULL 13/15] hw/i386/pc: support '-nic' for xen-net-device

2023-11-07 Thread David Woodhouse
From: David Woodhouse The default NIC creation seems a bit hackish to me. I don't understand why each platform has to call pci_nic_init_nofail() from a point in the code where it actually has a pointer to the PCI bus, and then we have the special cases for things like ne2k_isa. If

[PULL 14/15] xen-platform: unplug AHCI disks

2023-11-07 Thread David Woodhouse
From: David Woodhouse To support Xen guests using the Q35 chipset, the unplug protocol needs to also remove AHCI disks. Make pci_xen_ide_unplug() more generic, iterating over the children of the PCI device and destroying the "ide-hd" devices. That works the same for both AHCI and IDE, as does

[PULL 04/15] i386/xen: advertise XEN_HVM_CPUID_UPCALL_VECTOR in CPUID

2023-11-07 Thread David Woodhouse
From: David Woodhouse This will allow Linux guests (since v6.0) to use the per-vCPU upcall vector delivered as MSI through the local APIC. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- target/i386/kvm/kvm.c | 4 1 file changed, 4 insertions(+) diff --git

[PULL 03/15] include: update Xen public headers to Xen 4.17.2 release

2023-11-07 Thread David Woodhouse
From: David Woodhouse ... in order to advertise the XEN_HVM_CPUID_UPCALL_VECTOR feature, which will come in a subsequent commit. Signed-off-by: David Woodhouse Acked-by: Paul Durrant --- hw/i386/kvm/xen_xenstore.c| 2 +- include/hw/xen/interface/arch-arm.h | 37

[PULL 10/15] hw/xen: add support for Xen primary console in emulated mode

2023-11-07 Thread David Woodhouse
From: David Woodhouse The primary console is special because the toolstack maps a page into the guest for its ring, and also allocates the guest-side event channel. The guest's grant table is even primed to export that page using a known grant ref#. Add support for all that in emulated mode, so

[PULL 08/15] hw/xen: do not repeatedly try to create a failing backend device

2023-11-07 Thread David Woodhouse
From: David Woodhouse If xen_backend_device_create() fails to instantiate a device, the XenBus code will just keep trying over and over again each time the bus is re-enumerated, as long as the backend appears online and in XenbusStateInitialising. The only thing which prevents the XenBus code

[PULL 05/15] hw/xen: populate store frontend nodes with XenStore PFN/port

2023-11-07 Thread David Woodhouse
From: David Woodhouse This is kind of redundant since without being able to get these through some other method (HVMOP_get_param) the guest wouldn't be able to access XenStore in order to find them. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_xenstore.c | 11

[PULL 02/15] hw/xen: Clean up event channel 'type_val' handling to use union

2023-11-07 Thread David Woodhouse
From: David Woodhouse A previous implementation of this stuff used a 64-bit field for all of the port information (vcpu/type/type_val) and did atomic exchanges on them. When I implemented that in Qemu I regretted my life choices and just kept it simple with locking instead. So there's no need

[PULL 06/15] hw/xen: automatically assign device index to block devices

2023-11-07 Thread David Woodhouse
From: David Woodhouse There's no need to force the user to assign a vdev. We can automatically assign one, starting at xvda and searching until we find the first disk name that's unused. This means we can now allow '-drive if=xen,file=xxx' to work without an explicit separate -driver argument,

[PULL 15/15] docs: update Xen-on-KVM documentation

2023-11-07 Thread David Woodhouse
From: David Woodhouse Add notes about console and network support, and how to launch PV guests. Clean up the disk configuration examples now that that's simpler, and remove the comment about IDE unplug on q35/AHCI now that it's fixed. Update the -initrd option documentation to explain how to

[PATCH] block-backend: per-device throttling of BLOCK_IO_ERROR reports

2023-11-07 Thread Vladimir Sementsov-Ogievskiy
From: Leonid Kaplan BLOCK_IO_ERROR events comes from guest, so we must throttle them. We still want per-device throttling, so let's use device id as a key. Signed-off-by: Leonid Kaplan Signed-off-by: Vladimir Sementsov-Ogievskiy --- monitor/monitor.c | 10 ++ 1 file changed, 10

Re: [PATCH v6 3/6] hw/virtio: derive vhost-user-gpio from vhost-user-base

2023-11-07 Thread Michael S. Tsirkin
On Mon, Nov 06, 2023 at 07:15:12PM +, Alex Bennée wrote: > -case CHR_EVENT_CLOSED: > -/* defer close until later to avoid circular close */ > -vhost_user_async_close(dev, >chardev, >vhost_dev, > - vu_gpio_disconnect, vu_gpio_event); I don't

Re: [PULL 00/60] Misc HW/UI patches for 2023-11-06

2023-11-07 Thread Philippe Mathieu-Daudé
On 7/11/23 02:39, Stefan Hajnoczi wrote: On Mon, 6 Nov 2023 at 19:03, Philippe Mathieu-Daudé wrote: The following changes since commit d762bf97931b58839316b68a570eecc6143c9e3e: Merge tag 'pull-target-arm-20231102' of https://git.linaro.org/people/pmaydell/qemu-arm into staging

Re: [PATCH v6 0/6] virtio: cleanup vhost-user-generic and reduce c

2023-11-07 Thread Michael S. Tsirkin
On Mon, Nov 06, 2023 at 07:15:09PM +, Alex Bennée wrote: > A lot of our vhost-user stubs are large chunks of boilerplate that do > (mostly) the same thing. This series continues the cleanups by > splitting the vhost-user-base and vhost-user-generic implementations. > After adding a new vq_size

Re: [PATCH v6 0/6] virtio: cleanup vhost-user-generic and reduce c

2023-11-07 Thread Michael S. Tsirkin
On Mon, Nov 06, 2023 at 07:15:09PM +, Alex Bennée wrote: > A lot of our vhost-user stubs are large chunks of boilerplate that do > (mostly) the same thing. This series continues the cleanups by > splitting the vhost-user-base and vhost-user-generic implementations. > After adding a new vq_size

Re: [PATCH v6 0/6] virtio: cleanup vhost-user-generic and reduce c

2023-11-07 Thread Mark Cave-Ayland
On 06/11/2023 19:15, Alex Bennée wrote: A lot of our vhost-user stubs are large chunks of boilerplate that do (mostly) the same thing. This series continues the cleanups by splitting the vhost-user-base and vhost-user-generic implementations. After adding a new vq_size property the rng, gpio

Re: [PATCH v6 1/6] virtio: split into vhost-user-base and vhost-user-device

2023-11-07 Thread Michael S. Tsirkin
On Tue, Nov 07, 2023 at 08:03:16AM +, Alex Bennée wrote: > "Michael S. Tsirkin" writes: > > > On Mon, Nov 06, 2023 at 07:15:10PM +, Alex Bennée wrote: > >> Lets keep a cleaner split between the base class and the derived > >> vhost-user-device which we can use for generic vhost-user

Re: [PATCH v6 1/6] virtio: split into vhost-user-base and vhost-user-device

2023-11-07 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Mon, Nov 06, 2023 at 07:15:10PM +, Alex Bennée wrote: >> Lets keep a cleaner split between the base class and the derived >> vhost-user-device which we can use for generic vhost-user stubs. This >> includes an update to introduce the vq_size property so the