[PATCH v2 0/3] Remove res_compatible parameter

2023-02-15 Thread Juan Quintela
Hi In this v2: - rename res_postocopy_only ->can_postcopy - rename res_precopy_only -> must_precopy - Rewrite comments after discussions with Vladimir. - 2nd patch is reviewd-by Vladimir. Please, review. [v1] This series are the redo of the series from vfio. Vladimir Sementsov-Ogievskiy asked

[PATCH v2 1/3] migration: In case of postcopy, the memory ends in res_postcopy_only

2023-02-15 Thread Juan Quintela
So remove last assignation of res_compatible. Signed-off-by: Juan Quintela --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index 521912385d..ecf697a58d 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -3528,7 +3528,7

[PATCH v2 3/3] migration: Rename res_{postcopy,precopy}_only

2023-02-15 Thread Juan Quintela
Once that res_compatible is removed, they don't make sense anymore. We remove the _only preffix. And to make things clearer we rename them to must_precopy and can_postcopy. Signed-off-by: Juan Quintela --- include/migration/register.h | 27 +++ migration/savevm.h

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-15 Thread Claudio Fontana
On 1/17/23 12:55, Chuang Xu wrote: > In this version: > > - rename rcu_read_locked() to rcu_read_is_locked(). > - adjust the sanity check in address_space_to_flatview(). > - improve some comments. > > The duration of loading non-iterable vmstate accounts for a significant > portion of downtime (s

Re: [PULL 13/25] hcd-ohci: Fix inconsistency when resetting ohci root hubs

2023-02-15 Thread BALATON Zoltan
On Wed, 15 Feb 2023, Laurent Vivier wrote: On 2/15/23 15:34, Stefan Hajnoczi wrote: On Wed, 15 Feb 2023 at 08:45, Qiang Liu wrote: Hi, This commit breaks boot-serial-test on ppc64-softmmu. $ ./configure --enable-tcg-interpreter '--target-list=aarch64-softmmu alpha-softmmu arm-softmmu hp

Re: CXL 2.0 memory pooling emulation

2023-02-15 Thread Gregory Price
On Wed, Feb 15, 2023 at 03:18:54PM +, Jonathan Cameron via wrote: > On Wed, 8 Feb 2023 16:28:44 -0600 > zhiting zhu wrote: > > > Hi, > > > > I saw a PoC: > > https://lore.kernel.org/qemu-devel/20220525121422.3...@huawei.com/T/ to > > implement memory pooling and fabric manager on qemu. I

[PATCH v2 2/3] migration: Remove unused res_compatible

2023-02-15 Thread Juan Quintela
Nothing assigns to it after previous commit. Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Juan Quintela --- include/migration/register.h | 7 ++- migration/savevm.h | 2 -- hw/s390x/s390-stattrib.c | 1 - hw/vfio/migration.c| 3 +-- migration/

Re: [PATCH v2 0/7] include/hw/pci include/hw/cxl: Clean up includes

2023-02-15 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 15/2/23 14:28, Markus Armbruster wrote: >> "Michael S. Tsirkin" writes: >> >>> On Fri, Dec 23, 2022 at 06:27:07AM +0100, Markus Armbruster wrote: "Michael S. Tsirkin" writes: [...] > It would be even better if there was e.g. a make target > pu

Re: Does the page boundary check still necessary?

2023-02-15 Thread Richard Henderson
On 2/14/23 22:39, Kenneth Lee wrote: Hello, I hope I send this mail to the right place. I'm porting a new guest arch. It jumps of out of physical page constantly. So many TBs cannot be chained with goto_tb. I'm wondering if the following check is still necessary? bool translator_use_go

Re: [PATCH 01/20] MAINTAINERS: Mark IDE and Floppy as "Odd Fixes"

2023-02-15 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > From: John Snow > > I have not been able to give these devices the love they need for a > while now. Update the maintainers file to reflect the truth of the > matter. > > Signed-off-by: John Snow > Message-Id: <20230206182544.77-1-js...@redhat.com> > Signe

Re: [PATCH 02/20] hw/ide/mmio: Use CamelCase for MMIO_IDE state name

2023-02-15 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Following docs/devel/style.rst guidelines, rename MMIOIDEState > as IdeMmioState. Erm the comment doesn't match what you've done s/MMIOState/MMIOIDEState/ > > Having the structure name and its typedef named equally, we can > manually convert from the old DECLA

Re: [PATCH 03/20] hw/ide/mmio: Extract TYPE_MMIO_IDE declarations to 'hw/ide/mmio.h'

2023-02-15 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > "hw/ide.h" is a mixed bag of lost IDE declarations. > > Extract mmio_ide_init_drives() and the TYPE_MMIO_IDE QOM > declarations to a new "hw/ide/mmio.h" header. > > Document the SysBus interface. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Benn

Re: [PATCH] include/hw/arm/allwinner-a10.h: Remove superfluous includes from the header

2023-02-15 Thread Alex Bennée
Thomas Huth writes: > pci_device.h is not needed at all in allwinner-a10.h, and serial.h > is only needed by the corresponding .c file. > > Signed-off-by: Thomas Huth Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH] accel/xen: Remove dead code

2023-02-15 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Unused since introduction in commit 04b0de0ee8 > ("xen: factor out common functions"). > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v2 1/3] migration: In case of postcopy, the memory ends in res_postcopy_only

2023-02-15 Thread Vladimir Sementsov-Ogievskiy
On 15.02.23 20:03, Juan Quintela wrote: So remove last assignation of res_compatible. Signed-off-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

[PATCH v3 02/14] vdpa: stop svq at vhost_vdpa_dev_start(false)

2023-02-15 Thread Eugenio Pérez
It used to be done at vhost_vdpa_svq_cleanup, since a device couldn't switch to SVQ mode dynamically. Now that we need to fetch the state and trust SVQ will not modify guest's used_idx at migration, stop effectively SVQ at suspend time, as a real device would do. Leaving old vhost_svq_stop call a

[PATCH v3 03/14] vdpa: Negotiate _F_SUSPEND feature

2023-02-15 Thread Eugenio Pérez
This is needed for qemu to know it can suspend the device to retrieve its status and enable SVQ with it, so all the process is transparent to the guest. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- hw/virtio/vhost-vdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --g

[PATCH v3 05/14] vdpa: move vhost reset after get vring base

2023-02-15 Thread Eugenio Pérez
The function vhost.c:vhost_dev_stop calls vhost operation vhost_dev_start(false). In the case of vdpa it totally reset and wipes the device, making the fetching of the vring base (virtqueue state) totally useless. The kernel backend does not use vhost_dev_start vhost op callback, but vhost-user do

[PATCH v3 04/14] vdpa: add vhost_vdpa_suspend

2023-02-15 Thread Eugenio Pérez
The function vhost.c:vhost_dev_stop fetches the vring base so the vq state can be migrated to other devices. However, this is unreliable in vdpa, since we didn't signal the device to suspend the queues, making the value fetched useless. Suspend the device if possible before fetching first and sub

[PATCH v3 00/14] Dynamically switch to vhost shadow virtqueues at vdpa net migration

2023-02-15 Thread Eugenio Pérez
It's possible to migrate vdpa net devices if they are shadowed from the start. But to always shadow the dataplane is to effectively break its host passthrough, so its not efficient in vDPA scenarios. This series enables dynamically switching to shadow mode only at migration time. This allows ful

[PATCH v3 12/14] vdpa: block migration if dev does not have _F_SUSPEND

2023-02-15 Thread Eugenio Pérez
Next patches enable devices to be migrated even if vdpa netdev has not been started with x-svq. However, not all devices are migratable, so we need to block migration if we detect that. Block vhost-vdpa device migration if it does not offer _F_SUSPEND and it has not been started with x-svq. Signe

[PATCH v3 08/14] vdpa: add vdpa net migration state notifier

2023-02-15 Thread Eugenio Pérez
This allows net to restart the device backend to configure SVQ on it. Ideally, these changes should not be net specific. However, the vdpa net backend is the one with enough knowledge to configure everything because of some reasons: * Queues might need to be shadowed or not depending on its kind (

[PATCH v3 14/14] vdpa: return VHOST_F_LOG_ALL in vhost-vdpa devices

2023-02-15 Thread Eugenio Pérez
vhost-vdpa devices can return this features now that blockers have been set in case some features are not met. Expose VHOST_F_LOG_ALL only in that case. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/virtio/vhost-

[PATCH v3 01/14] vdpa net: move iova tree creation from init to start

2023-02-15 Thread Eugenio Pérez
The iova_tree is used to track the memory assotiation between SVQ IOVA and qemu virtual addresses. Only create iova_tree if and when it is needed. The cleanup keeps being responsible of last VQ but this change allows it to merge both cleanup functions. Signed-off-by: Eugenio Pérez Acked-by: Jaso

[PATCH v3 07/14] vdpa net: allow VHOST_F_LOG_ALL

2023-02-15 Thread Eugenio Pérez
Since some actions move to the start function instead of init, the device features may not be the parent vdpa device's, but the one returned by vhost backend. If transition to SVQ is supported, the vhost backend will return _F_LOG_ALL to signal the device is migratable. Add VHOST_F_LOG_ALL. HW d

[PATCH v3 06/14] vdpa: rewind at get_base, not set_base

2023-02-15 Thread Eugenio Pérez
At this moment it is only possible to migrate to a vdpa device running with x-svq=on. As a protective measure, the rewind of the inflight descriptors was done at the destination. That way if the source sent a virtqueue with inuse descriptors they are always discarded. Since this series allows to m

[PATCH v3 11/14] vdpa: block migration if device has unsupported features

2023-02-15 Thread Eugenio Pérez
A vdpa net device must initialize with SVQ in order to be migratable at this moment, and initialization code verifies some conditions. If the device is not initialized with the x-svq parameter, it will not expose _F_LOG so the vhost subsystem will block VM migration from its initialization. Next

[PATCH v3 13/14] vdpa: block migration if SVQ does not admit a feature

2023-02-15 Thread Eugenio Pérez
Next patches enable devices to be migrated even if vdpa netdev has not been started with x-svq. However, not all devices are migratable, so we need to block migration if we detect that. Block migration if we detect the device expose a feature SVQ does not know how to work with. Signed-off-by: Eug

[PATCH v3 10/14] vdpa net: block migration if the device has CVQ

2023-02-15 Thread Eugenio Pérez
Devices with CVQ needs to migrate state beyond vq state. Leaving this to future series. Signed-off-by: Eugenio Pérez --- v3: Migration blocker is registered in vhost_dev. --- include/hw/virtio/vhost-vdpa.h | 1 + hw/virtio/vhost-vdpa.c | 1 + net/vhost-vdpa.c | 4 3 f

[PATCH v3 09/14] vdpa: disable RAM block discard only for the first device

2023-02-15 Thread Eugenio Pérez
Although it does not make a big difference, its more correct and simplifies the cleanup path in subsequent patches. Move ram_block_discard_disable(false) call to the top of vhost_vdpa_cleanup because: * We cannot use vhost_vdpa_first_dev after dev->opaque = NULL assignment. * Improve the stack o

[PATCH 4/5] hw/timer/i8254: Really inline i8254_pit_init()

2023-02-15 Thread Philippe Mathieu-Daudé
In-line the one-line i8254_pit_create() call. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/microvm.c| 2 +- hw/isa/i82378.c | 2 +- hw/isa/piix4.c | 4 ++-- hw/isa/vt82c686.c| 2 +- hw/mips/jazz.c | 2 +- include/hw/timer/i8254.h | 7 --- 6 f

[PATCH 0/5] hw/timer/i8254: Un-inline and simplify IRQs

2023-02-15 Thread Philippe Mathieu-Daudé
i8254_pit_init() uses a odd pattern of "use this IRQ output line if non-NULL, otherwise use the ISA IRQ #number as output". Rework as simply "Use this IRQ output". Un-inline/rename/document functions. Based-on: <20230215161641.32663-1-phi...@linaro.org> "hw/ide: Untangle ISA/PCI abuses

[PATCH 5/5] hw/i386/kvm: Factor i8254_pit_create_try_kvm() out

2023-02-15 Thread Philippe Mathieu-Daudé
Factor a new i8254_pit_create_try_kvm() helper out of the following patter: if (kvm_pit_in_kernel()) { kvm_pit_init(...); } else } i8254_pit_create(...); } (adding a stub for non-KVM builds). Since kvm_pit_init() is only used once, un-inline it and remove the now unused headers f

[PATCH 2/5] hw/timer/i8254: Factor i8254_pit_create() out and document

2023-02-15 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/timer/i8254.c | 16 include/hw/timer/i8254.h | 24 +--- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/hw/timer/i8254.c b/hw/timer/i8254.c index c8388ea432..9b6932ab08 100644 --- a/hw/timer

[PATCH 3/5] hw/i386/pc: Un-inline i8254_pit_init()

2023-02-15 Thread Philippe Mathieu-Daudé
pc_basic_device_init() is the single caller of i8254_pit_init() with a non-NULL 'alt_irq' argument. Open-code i8254_pit_init() by direclty calling i8254_pit_create(). To confirm all other callers pass a NULL 'alt_irq', add an assertion in i8254_pit_init(). Signed-off-by: Philippe Mathieu-Daudé -

[PATCH 1/5] hw/timer/hpet: Include missing 'hw/qdev-properties.h' header

2023-02-15 Thread Philippe Mathieu-Daudé
Avoid when refactoring unrelated headers: hw/timer/hpet.c:776:39: error: array has incomplete element type 'Property' (aka 'struct Property') static Property hpet_device_properties[] = { ^ hw/timer/hpet.c:777:5: error: implicit declaration of function

[PULL 1/5] crypto: TLS: introduce `check_pending`

2023-02-15 Thread Daniel P . Berrangé
From: Antoine Damhet The new `qcrypto_tls_session_check_pending` function allows the caller to know if data have already been consumed from the backend and is already available. Signed-off-by: Antoine Damhet Signed-off-by: Daniel P. Berrangé --- crypto/tlssession.c | 14 ++

[PULL 5/5] ui: remove deprecated 'password' option for SPICE

2023-02-15 Thread Daniel P . Berrangé
This has been replaced by the 'password-secret' option, which references a 'secret' object instance. Reviewed-by: Fabiano Rosas Reviewed-by: Markus Armbruster Signed-off-by: Daniel P. Berrangé --- docs/about/deprecated.rst | 8 docs/about/removed-features.rst | 7 +++ qemu

[PULL 4/5] block: deprecate iSCSI 'password' in favour of 'password-secret'

2023-02-15 Thread Daniel P . Berrangé
Support for referencing secret objects was added in commit b189346eb1784df95ed6fed610411dbf23d19e1f Author: Daniel P. Berrangé Date: Thu Jan 21 14:19:21 2016 + iscsi: add support for getting CHAP password via QCryptoSecret API The existing 'password' option is overdue for deprec

[PULL 2/5] io/channel-tls: fix handling of bigger read buffers

2023-02-15 Thread Daniel P . Berrangé
From: Antoine Damhet Since the TLS backend can read more data from the underlying QIOChannel we introduce a minimal child GSource to notify if we still have more data available to be read. Signed-off-by: Antoine Damhet Signed-off-by: Charles Frey Signed-off-by: Daniel P. Berrangé --- io/chan

[PULL 0/5] Misc next patches

2023-02-15 Thread Daniel P . Berrangé
The following changes since commit 6a50f64ca01d0a7b97f14f069762bfd88160f31e: Merge tag 'pull-request-2023-02-14' of https://gitlab.com/thuth/qemu into staging (2023-02-14 14:46:10 +) are available in the Git repository at: https://gitlab.com/berrange/qemu tags/misc-next-pull-request fo

Re: [RFC PATCH 06/16] hw/arm/smmuv3: Parse STE config for stage-2

2023-02-15 Thread Eric Auger
Hi Mostafa, On 2/5/23 10:44, Mostafa Saleh wrote: > Parse stage-2 configuration and populate it in SMMUTransCfg. > Configs in this patch (s2g, ttb, tsz, sl0). above 'sentence' a bit cryptic. > Checking validity of values added when possible. > > MAX IPA supported is 48 bits and only AA64 tables ar

[PULL 3/5] block: mention 'password-secret' option for -iscsi

2023-02-15 Thread Daniel P . Berrangé
The 'password-secret' option was added commit b189346eb1784df95ed6fed610411dbf23d19e1f Author: Daniel P. Berrangé Date: Thu Jan 21 14:19:21 2016 + iscsi: add support for getting CHAP password via QCryptoSecret API but was not mentioned in the command line docs Reviewed-by: Mark

Re: [PATCH v10 03/12] vfio/migration: Allow migration without VFIO IOMMU dirty tracking support

2023-02-15 Thread Avihai Horon
On 15/02/2023 14:43, Juan Quintela wrote: External email: Use caution opening links or attachments Avihai Horon wrote: Currently, if IOMMU of a VFIO container doesn't support dirty page tracking, migration is blocked. This is because a DMA-able VFIO device can dirty RAM pages without updati

Re: [PATCH v2 3/3] migration: Rename res_{postcopy,precopy}_only

2023-02-15 Thread Vladimir Sementsov-Ogievskiy
On 15.02.23 20:03, Juan Quintela wrote: Once that res_compatible is removed, they don't make sense anymore. We remove the _only preffix. And to make things clearer we rename them to must_precopy and can_postcopy. Signed-off-by: Juan Quintela Ideally headers of trace events (trace_vfio_state_p

Re: [PATCH 05/20] hw/ide/isa: Remove intermediate ISAIDEState::irq variable

2023-02-15 Thread Bernhard Beschow
Am 15. Februar 2023 11:26:57 UTC schrieb "Philippe Mathieu-Daudé" : >The intermediate ISAIDEState::irq variable just add noise, remove it. > >Signed-off-by: Philippe Mathieu-Daudé >--- > hw/ide/isa.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > >diff --git a/hw/ide/isa.c b/hw/id

[PATCH v6 1/3] multifd: Create property multifd-flush-after-each-section

2023-02-15 Thread Juan Quintela
We used to flush all channels at the end of each RAM section sent. That is not needed, so preparing to only flush after a full iteration through all the RAM. Default value of the property is false. But we return "true" in migrate_multifd_flush_after_each_section() until we implement the code in

[PATCH v6 0/3] Eliminate multifd flush

2023-02-15 Thread Juan Quintela
Hi In this v6: - Rename multifd-sync-after-each-section to multifd-flush-after-each-section - Redo comments (thanks Markus) - Redo how to comment capabilities that are enabled/disabled during development. (thanks Markus) Please, review. In this v5: - Remove RAM Flags documentation (al

[PATCH v6 2/3] multifd: Protect multifd_send_sync_main() calls

2023-02-15 Thread Juan Quintela
We only need to do that on the ram_save_iterate() call on sending and on destination when we get a RAM_SAVE_FLAG_EOS. In setup() and complete() we need to synch in both new and old cases, so don't add a check there. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Signed-off-by:

[PATCH v6 3/3] multifd: Only flush once each full round of memory

2023-02-15 Thread Juan Quintela
We need to add a new flag to mean to flush at that point. Notice that we still flush at the end of setup and at the end of complete stages. Signed-off-by: Juan Quintela --- Add missing qemu_fflush(), now it passes all tests always. --- qapi/migration.json | 3 --- migration/migration.c | 6

Re: [PATCH v10 03/12] vfio/migration: Allow migration without VFIO IOMMU dirty tracking support

2023-02-15 Thread Juan Quintela
Avihai Horon wrote: > On 15/02/2023 14:43, Juan Quintela wrote: >> External email: Use caution opening links or attachments >> >> >> Avihai Horon wrote: >>> Currently, if IOMMU of a VFIO container doesn't support dirty page >>> tracking, migration is blocked. This is because a DMA-able VFIO devic

Re: [PATCH 17/20] hw/ide/pci: Unexport bmdma_active_if()

2023-02-15 Thread Bernhard Beschow
Am 15. Februar 2023 11:27:09 UTC schrieb "Philippe Mathieu-Daudé" : >From: Bernhard Beschow > >The function is only used inside ide/pci.c, so doesn't need to be exported. > >Signed-off-by: Bernhard Beschow >Signed-off-by: Philippe Mathieu-Daudé >--- > hw/ide/pci.c | 6 ++ > includ

[PULL v3 00/10] Misc patches for 2023-02-08

2023-02-15 Thread Paolo Bonzini
The following changes since commit 3b33ae48ec28e1e0d1bc28a85c7423724bcb1a2c: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-02-09 15:29:14 +) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to

Re: [PATCH v2 3/3] migration: Rename res_{postcopy,precopy}_only

2023-02-15 Thread Juan Quintela
Vladimir Sementsov-Ogievskiy wrote: > On 15.02.23 20:03, Juan Quintela wrote: >> Once that res_compatible is removed, they don't make sense anymore. >> We remove the _only preffix. And to make things clearer we rename >> them to must_precopy and can_postcopy. >> Signed-off-by: Juan Quintela > > I

Re: [PATCH v2 1/3] scsi: protect req->aiocb with AioContext lock

2023-02-15 Thread Eric Blake
On Fri, Feb 10, 2023 at 09:32:36AM -0500, Stefan Hajnoczi wrote: > If requests are being processed in the IOThread when a SCSIDevice is > unplugged, scsi_device_purge_requests() -> scsi_req_cancel_async() races > with I/O completion callbacks. Both threads load and store req->aiocb. > This can lead

Re: [PATCH v2 2/3] dma-helpers: prevent dma_blk_cb() vs dma_aio_cancel() race

2023-02-15 Thread Eric Blake
On Fri, Feb 10, 2023 at 09:32:37AM -0500, Stefan Hajnoczi wrote: > dma_blk_cb() only takes the AioContext lock around ->io_func(). That > means the rest of dma_blk_cb() is not protected. In particular, the > DMAAIOCB field accesses happen outside the lock. > > There is a race when the main loop th

Re: [PATCH 1/4] util/cacheflush: fix illegal instruction on windows-arm64

2023-02-15 Thread Richard Henderson
On 2/15/23 02:49, Pierrick Bouvier wrote: I'm not an expert on this area, but I imagine that booting a full VM will force TCG to emit code at the same address twice (after having generated enough translated blocks), which shows that generic flush_idcache_range works. Is that reasoning correct?

Re: [PATCH v10 09/12] vfio/migration: Implement VFIO migration protocol v2

2023-02-15 Thread Avihai Horon
On 15/02/2023 15:01, Juan Quintela wrote: External email: Use caution opening links or attachments Avihai Horon wrote: Implement the basic mandatory part of VFIO migration protocol v2. This includes all functionality that is necessary to support VFIO_MIGRATION_STOP_COPY part of the v2 proto

Re: [PATCH v2 3/3] virtio-scsi: reset SCSI devices from main loop thread

2023-02-15 Thread Eric Blake
On Fri, Feb 10, 2023 at 09:32:38AM -0500, Stefan Hajnoczi wrote: > When an IOThread is configured, the ctrl virtqueue is processed in the > IOThread. TMFs that reset SCSI devices are currently called directly > from the IOThread and trigger an assertion failure in blk_drain(): > > ../block/block

Re: [PATCH 3/3] target/mips: implement CP0.Config7.WII bit support

2023-02-15 Thread Philippe Mathieu-Daudé
Hi Marcin, On 15/2/23 09:47, Marcin Nowakowski wrote: Some older cores use CP0.Config7.WII bit to indicate that a disabled interrupt should wake up a sleeping CPU. Enable this bit by default for M14Kc, which supports that. There are potentially other cores that support this feature, but I do not

Re: [PULL v2 0/10] xenpvh

2023-02-15 Thread Peter Maydell
On Tue, 14 Feb 2023 at 23:43, Stefano Stabellini wrote: > > The following changes since commit 6a50f64ca01d0a7b97f14f069762bfd88160f31e: > > Merge tag 'pull-request-2023-02-14' of https://gitlab.com/thuth/qemu into > staging (2023-02-14 14:46:10 +) > > are available in the Git repository at

Re: [RFC PATCH 08/16] hw/arm/smmuv3: Support S2AFFD

2023-02-15 Thread Eric Auger
Hi Mostafa, On 2/5/23 10:44, Mostafa Saleh wrote: > Parse S2AFFD from STE and use it in stage-2 translation. > > This is described in the SMMUv3 manual "5.2. Stream Table Entry" in > "[181] S2AFFD". from a patch structure pov, to me it would make more sense to add the STE field decoding in [RFC P

Re: [PATCH v2 00/13] Dynamycally switch to vhost shadow virtqueues at vdpa net migration

2023-02-15 Thread Eugenio Perez Martin
On Fri, Feb 10, 2023 at 1:58 PM Gautam Dawar wrote: > > Hi Eugenio, > > I've tested this patch series on Xilinx/AMD SN1022 device without > control vq and VM Live Migration between two hosts worked fine. > > Tested-by: Gautam Dawar > Thanks for the testing! > > Here is some minor feedback: > >

[PATCH v2 4/4] virtiofsd: Swing deprecated message to removed-features

2023-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Move the deprecation message, since it's now gone. Signed-off-by: Dr. David Alan Gilbert --- docs/about/deprecated.rst | 18 -- docs/about/removed-features.rst | 13 + 2 files changed, 13 insertions(+), 18 deletions(-) diff --gi

[PATCH v2 2/4] virtiofsd: Remove build and docs glue

2023-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Remove all the virtiofsd build and docs infrastructure. Signed-off-by: Dr. David Alan Gilbert --- MAINTAINERS| 2 -- docs/conf.py | 4 docs/meson.build | 1

[PATCH v2 0/4] Remove C virtiofsd

2023-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We deprecated the C virtiofsd in commit 34deee7b6a1418f3d62a in v7.0 in favour of the Rust implementation at https://gitlab.com/virtio-fs/virtiofsd since then, the Rust version has had more development and has held up well. It's time to say goodbye to the C v

[PATCH v2 1/4] virtiofsd: Remove test

2023-02-15 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Rmove the avocado test for virtiofsd, since we're about to remove the C implementation. Signed-off-by: Dr. David Alan Gilbert --- .../org.centos/stream/8/x86_64/test-avocado | 7 - tests/avocado/virtiofs_submounts.py | 217 -- 2 file

Re: [RFC PATCH 07/16] hw/arm/smmuv3: Check validity of stage-2 page table

2023-02-15 Thread Eric Auger
Hi Mostafa, On 2/5/23 10:44, Mostafa Saleh wrote: > Check if with the configured start level, ia_bits and granularity we > can have a valid page table as described in ARM ARM D8.2 Translation > process. > The idea is to see for the highest possible number of IPA bits, how > many concatenated tables

Re: [RFC PATCH 15/16] hw/arm/smmuv3: Add fault configuration for stage-2

2023-02-15 Thread Eric Auger
On 2/5/23 10:44, Mostafa Saleh wrote: > As stall is not supported, if S2S is set the translation would abort. > For S2R, we reuse the same code used for stage-1 with flag > record_faults. However when nested translation is supported we would > need to separate stage-1 and stage-2 faults. same he

Re: [PATCH 1/5] hw/timer/hpet: Include missing 'hw/qdev-properties.h' header

2023-02-15 Thread Richard Henderson
On 2/15/23 07:43, Philippe Mathieu-Daudé wrote: Avoid when refactoring unrelated headers: hw/timer/hpet.c:776:39: error: array has incomplete element type 'Property' (aka 'struct Property') static Property hpet_device_properties[] = { ^ hw/timer

Re: [PATCH 2/5] hw/timer/i8254: Factor i8254_pit_create() out and document

2023-02-15 Thread Richard Henderson
On 2/15/23 07:43, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- hw/timer/i8254.c | 16 include/hw/timer/i8254.h | 24 +--- 2 files changed, 29 insertions(+), 11 deletions(-) Reviewed-by: Richard Henderson r~

[PATCH v3 01/10] target/riscv: do not mask unsupported QEMU extensions in write_misa()

2023-02-15 Thread Daniel Henrique Barboza
The masking done using env->misa_ext_mask already filters any extension that QEMU doesn't support. If the hart supports the extension then QEMU supports it as well. If the masking done by env->misa_ext_mask is somehow letting unsupported QEMU extensions pass by, misa_ext_mask itself needs to be fi

[PATCH v3 02/10] target/riscv: always allow write_misa() to write MISA

2023-02-15 Thread Daniel Henrique Barboza
At this moment, and apparently since ever, we have no way of enabling RISCV_FEATURE_MISA. This means that all the code from write_misa(), all the nuts and bolts that handles how to properly write this CSR, has always been a no-op as well because write_misa() will always exit earlier. This seems to

Re: [RFC PATCH 02/16] hw/arm/smmuv3: Update translation config to hold stage-2

2023-02-15 Thread Eric Auger
hi Mostafa, On 2/5/23 10:43, Mostafa Saleh wrote: > In preparation for adding stage-2 support. Add it's configuration. replace "support. Add it's " by "support, add a S2 config struct, composed of the following fields and embedded in the main TransCfg ../.." > > They are added as SMMUS2Cfg in SMM

[PATCH v3 00/10] enable write_misa() and RISCV_FEATURE_* cleanups

2023-02-15 Thread Daniel Henrique Barboza
Hi, In this new version the most notable change was in the write_misa() logic. I decided to follow Bin's suggestion and removed the verification at the start of the function. As the result, the patch that removes RISCV_FEATURE_MISA was merged with the patch that makes this change (patch 2). I al

[PATCH v3 04/10] target/riscv: remove RISCV_FEATURE_DEBUG

2023-02-15 Thread Daniel Henrique Barboza
RISCV_FEATURE_DEBUG will always follow the value defined by cpu->cfg.debug flag. Read the flag instead. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Weiwei Li Reviewed-by: Bin Meng Reviewed-by: Andrew Jones --- target/riscv/cpu.c| 6 +- target/riscv/cpu.h| 1 - targ

[PATCH v3 09/10] target/riscv: remove RISCV_FEATURE_MMU

2023-02-15 Thread Daniel Henrique Barboza
RISCV_FEATURE_MMU is set whether cpu->cfg.mmu is set, so let's just use the flag directly instead. With this change the enum is also removed. It is worth noticing that this enum, and all the RISCV_FEATURES_* that were contained in it, predates the existence of the cpu->cfg object. Today, using cpu

[PATCH v3 05/10] target/riscv/cpu.c: error out if EPMP is enabled without PMP

2023-02-15 Thread Daniel Henrique Barboza
Instead of silently ignoring the EPMP setting if there is no PMP available, error out informing the user that EPMP depends on PMP support: $ ./qemu-system-riscv64 -cpu rv64,pmp=false,x-epmp=true qemu-system-riscv64: Invalid configuration: EPMP requires PMP support This will force users to pick sa

[PATCH v3 10/10] target/riscv/cpu: remove CPUArchState::features and friends

2023-02-15 Thread Daniel Henrique Barboza
The attribute is no longer used since we can retrieve all the enabled features in the hart by using cpu->cfg instead. Remove env->feature, riscv_feature() and riscv_set_feature(). We also need to bump vmstate_riscv_cpu version_id and minimal_version_id since 'features' is no longer being migrated.

[PATCH v3 07/10] target/riscv: remove RISCV_FEATURE_PMP

2023-02-15 Thread Daniel Henrique Barboza
RISCV_FEATURE_PMP is being set via riscv_set_feature() by mirroring the cpu->cfg.pmp flag. Use the flag instead. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Weiwei Li Reviewed-by: Bin Meng Reviewed-by: Andrew Jones --- target/riscv/cpu.c| 4 target/riscv/cpu.h| 1

[PATCH v3 06/10] target/riscv: remove RISCV_FEATURE_EPMP

2023-02-15 Thread Daniel Henrique Barboza
RISCV_FEATURE_EPMP is always set to the same value as the cpu->cfg.epmp flag. Use the flag directly. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Weiwei Li Reviewed-by: Bin Meng Reviewed-by: Andrew Jones --- target/riscv/cpu.c | 10 +++--- target/riscv/cpu.h | 1 - target/riscv/cs

[PATCH v3 03/10] target/riscv: introduce riscv_cpu_cfg()

2023-02-15 Thread Daniel Henrique Barboza
We're going to do changes that requires accessing the RISCVCPUConfig struct from the RISCVCPU, having access only to a CPURISCVState 'env' pointer. Add a helper to make the code easier to read. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Weiwei Li Reviewed-by: Bin Meng Reviewed-by: Andr

Re: [PATCH 3/5] hw/i386/pc: Un-inline i8254_pit_init()

2023-02-15 Thread Richard Henderson
On 2/15/23 07:43, Philippe Mathieu-Daudé wrote: pc_basic_device_init() is the single caller of i8254_pit_init() with a non-NULL 'alt_irq' argument. Open-code i8254_pit_init() by direclty calling i8254_pit_create(). To confirm all other callers pass a NULL 'alt_irq', add an assertion in i8254_pit

[PATCH v3 08/10] hw/riscv/virt.c: do not use RISCV_FEATURE_MMU in create_fdt_socket_cpus()

2023-02-15 Thread Daniel Henrique Barboza
Read cpu_ptr->cfg.mmu directly. As a bonus, use cpu_ptr in riscv_isa_string(). Signed-off-by: Daniel Henrique Barboza Reviewed-by: Weiwei Li Reviewed-by: Bin Meng Reviewed-by: Andrew Jones --- hw/riscv/virt.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/riscv/

Re: [PATCH 4/5] hw/timer/i8254: Really inline i8254_pit_init()

2023-02-15 Thread Richard Henderson
On 2/15/23 07:43, Philippe Mathieu-Daudé wrote: In-line the one-line i8254_pit_create() call. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/microvm.c| 2 +- hw/isa/i82378.c | 2 +- hw/isa/piix4.c | 4 ++-- hw/isa/vt82c686.c| 2 +- hw/mips/jazz.c

Re: [PATCH 5/5] hw/i386/kvm: Factor i8254_pit_create_try_kvm() out

2023-02-15 Thread Richard Henderson
On 2/15/23 07:43, Philippe Mathieu-Daudé wrote: Factor a new i8254_pit_create_try_kvm() helper out of the following patter: pattern if (kvm_pit_in_kernel()) { kvm_pit_init(...); } else } i8254_pit_create(...); } (adding a stub for non-KVM builds). Since kvm_pit_init()

Re: [PATCH v4 4/6] qapi/parser: add QAPIExpression type

2023-02-15 Thread John Snow
On Wed, Feb 15, 2023 at 4:43 AM Markus Armbruster wrote: > > John Snow writes: > > > This patch creates a new type, QAPIExpression, which represents a parsed > > expression complete with QAPIDoc and QAPISourceInfo. > > > > This patch turns parser.exprs into a list of QAPIExpression instead, > > a

Re: [PATCH v2 0/7] Python: Drop support for Python 3.6

2023-02-15 Thread Markus Armbruster
The discussion under PATCH 6 makes me think there's a bit of confusion about the actual impact of dropping support for Python 3.6. Possibly because it's spelled out in the commit message of PATCH 7. Let me summarize it in one sentence: *** All supported host systems continue to work *** Evi

Re: [PATCH 03/20] hw/ide/mmio: Extract TYPE_MMIO_IDE declarations to 'hw/ide/mmio.h'

2023-02-15 Thread Richard Henderson
On 2/15/23 01:26, Philippe Mathieu-Daudé wrote: "hw/ide.h" is a mixed bag of lost IDE declarations. Extract mmio_ide_init_drives() and the TYPE_MMIO_IDE QOM declarations to a new "hw/ide/mmio.h" header. Document the SysBus interface. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/mmio.c

Re: [PATCH 04/20] hw/ide/isa: Extract TYPE_ISA_IDE declarations to 'hw/ide/isa.h'

2023-02-15 Thread Richard Henderson
On 2/15/23 01:26, Philippe Mathieu-Daudé wrote: "hw/ide.h" is a mixed bag of lost IDE declarations. Extract isa_ide_init() and the TYPE_ISA_IDE QOM declarations to a new "hw/ide/isa.h" header. Rename ISAIDEState::isairq as 'irqnum' to emphasize this is not a qemu_irq object but the number (inde

Re: [PATCH 05/20] hw/ide/isa: Remove intermediate ISAIDEState::irq variable

2023-02-15 Thread Richard Henderson
On 2/15/23 01:26, Philippe Mathieu-Daudé wrote: The intermediate ISAIDEState::irq variable just add noise, remove it. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/isa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 06/20] hw/ide/atapi: Restrict 'scsi/constants.h' inclusion

2023-02-15 Thread Richard Henderson
On 2/15/23 01:26, Philippe Mathieu-Daudé wrote: Only atapi.c requires the SCSI constants. No need to include it in all files including "hw/ide/internal.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/atapi.c| 1 + include/hw/ide/internal.h | 1 - 2 files changed, 1 insertion

Re: [PATCH 07/20] hw/ide: Remove unused 'qapi/qapi-types-run-state.h'

2023-02-15 Thread Richard Henderson
On 2/15/23 01:26, Philippe Mathieu-Daudé wrote: Missed in commit d7458e7754 ("hw/ide/internal: Remove unused DMARestartFunc typedef") which removed the single use of RunState. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/ide/internal.h | 1 - 1 file changed, 1 deletion(-) Reviewed-b

Re: [PATCH 08/20] hw/ide: Include 'exec/ioport.h' instead of 'hw/isa/isa.h'

2023-02-15 Thread Richard Henderson
On 2/15/23 01:27, Philippe Mathieu-Daudé wrote: The IDEBus structure has PortioList fields, so we need its declarations from "exec/ioport.h". "hw/isa/isa.h" is not required. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/ide/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-15 Thread Juan Quintela
Chuang Xu wrote: > In this version: Hi I had to drop this. It breaks migration of dbus-vmstate. .[K144/179 qemu:qtest+qtest-x86_64 / qtest-x86_64/virtio-net-failover ERROR 5.66s killed by signal 6 SIGABRT >>> G_TEST_DBUS_DAEMON=/mnt/code/qemu/multifd/tests/dbus-vmstate

Re: [PATCH 09/20] hw/ide: Un-inline ide_set_irq()

2023-02-15 Thread Richard Henderson
On 2/15/23 01:27, Philippe Mathieu-Daudé wrote: Only include "hw/irq.h" where appropriate. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ahci.c | 1 + hw/ide/core.c | 8 hw/ide/ich.c | 1 + hw/ide/macio.c| 1 + hw/ide/microdrive.

Re: [PATCH 10/20] hw/ide: Rename ide_set_irq() -> ide_bus_set_irq()

2023-02-15 Thread Richard Henderson
On 2/15/23 01:27, Philippe Mathieu-Daudé wrote: ide_set_irq() operates on a IDEBus; rename it as ide_bus_set_irq() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_set_irq/ide_bus_set_irq/g' \ $(git grep -l ide_set_irq) Signed-off-by: Philipp

Re: [PATCH 11/20] hw/ide: Rename ide_create_drive() -> ide_bus_create_drive()

2023-02-15 Thread Richard Henderson
On 2/15/23 01:27, Philippe Mathieu-Daudé wrote: ide_create_drive() operates on a IDEBus; rename it as ide_bus_create_drive() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_create_drive/ide_bus_create_drive/g' \ $(git grep -wl ide_create_driv

Re: [PATCH 12/20] hw/ide: Rename ide_register_restart_cb -> ide_bus_register_restart_cb

2023-02-15 Thread Richard Henderson
On 2/15/23 01:27, Philippe Mathieu-Daudé wrote: ide_register_restart_cb() operates on a IDEBus; rename it as ide_bus_register_restart_cb() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_register_restart_cb/ide_bus_register_restart_cb/g' \ $(git

Re: [PATCH 13/20] hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd()

2023-02-15 Thread Richard Henderson
On 2/15/23 01:27, Philippe Mathieu-Daudé wrote: ide_exec_cmd() operates on a IDEBus; rename it as ide_bus_exec_cmd() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_exec_cmd/ide_bus_exec_cmd/g' \ $(git grep -wl ide_exec_cmd) Signed-off-by: P

<    1   2   3   4   5   6   >