Re: [Virtio-fs] [PATCH v3 0/5] vhost-user: Back-end state migration

2023-09-26 Thread Stefan Hajnoczi
Hi Hanna, I was thinking about how this could work without SUSPEND/RESUME. What do you think of the following? 1. The front-end sends VHOST_USER_RESET_DEVICE (or VHOST_USER_RESET_OWNER, when necessary) when the guest driver resets the device but not on vhost_dev_start()/vhost_dev_stop(). 2.

[PATCH v2 6/8] block/nvme: nvme_process_completion() fix bound for cid

2023-09-26 Thread 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 --- Cc: stefa...@redhat.com Cc: alex.c...@huawei.com Cc: euler.ro...@huawei.com Note, that

[PATCH v2 3/8] libvhost-user.c: add assertion to vu_message_read_default

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
Explain Coverity that we are not going to overflow vmsg->fds. Signed-off-by: Vladimir Sementsov-Ogievskiy --- subprojects/libvhost-user/libvhost-user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/libvhost-user/libvhost-user.c b/subprojects/libvhost-user/libvhost-user.c

[PATCH v2 4/8] mc146818rtc: rtc_set_time(): initialize tm to zeroes

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
set_time() function doesn't set all the fields, so it's better to initialize tm structure. And Coverity will be happier about it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/rtc/mc146818rtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rtc/mc146818rtc.c

[PATCH v2 1/8] hw/i386/intel_iommu: vtd_slpte_nonzero_rsvd(): assert no overflow

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
We support only 3- and 4-level page-tables, which is firstly checked in vtd_decide_config(), then setup in vtd_init(). Than level fields are checked by vtd_is_level_supported(). So here we can't have level out from 1..4 inclusive range. Let's assert it. That also explains Coverity that we are not

[PATCH v2 5/8] pcie_sriov: unregister_vfs(): fix error path

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
local_err must be NULL before calling object_property_set_bool(), so we must clear it on each iteration. Let's also use more convenient error_reportf_err(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci/pcie_sriov.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff

[PATCH v2 0/8] coverity fixes

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
v2: 01: add explanations, new assert and avoid extra assignment add CIDs [thx to Paolo] 02: add explanation, improve wording 04,07: s/{0}/{} 06,08: improve wording Hi! Here are some improvements to handle issues found by Coverity (not public Coverity site, so there are no CIDs). Vladimir

[PATCH v2 2/8] util/filemonitor-inotify: qemu_file_monitor_watch(): assert no overflow

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
Prefer clear assertions instead of [im]possible array overflow. Signed-off-by: Vladimir Sementsov-Ogievskiy --- util/filemonitor-inotify.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/util/filemonitor-inotify.c b/util/filemonitor-inotify.c index

[PATCH v2 8/8] io/channel-socket: qio_channel_socket_flush(): improve msg validation

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
For SO_EE_ORIGIN_ZEROCOPY the 32-bit notification range is encoded as [ee_info, ee_data] inclusively, so ee_info should be less or equal to ee_data. Signed-off-by: Vladimir Sementsov-Ogievskiy --- io/channel-socket.c | 5 + 1 file changed, 5 insertions(+) diff --git a/io/channel-socket.c

[PATCH v2 7/8] hw/core/loader: gunzip(): initialize z_stream

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
Coverity signals that variable as being used uninitialized. And really, when work with external APIs that's better to zero out the structure, where we set some fields by hand. Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/core/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] mailmap: Fix Andrey Drobyshev author email

2023-09-26 Thread Peter Maydell
On Tue, 26 Sept 2023 at 20:42, Eric Blake wrote: > > On Tue, Sep 26, 2023 at 02:46:44PM +0100, Peter Maydell wrote: > > On Tue, 26 Sept 2023 at 14:40, Eric Blake wrote: > > > > > > On Tue, Sep 26, 2023 at 01:28:01PM +0300, andrey.drobys...@virtuozzo.com > > > wrote: > > > > From: Andrey

Re: [PATCH v2 1/8] hw/i386/intel_iommu: vtd_slpte_nonzero_rsvd(): assert no overflow

2023-09-26 Thread Peter Maydell
On Tue, 26 Sept 2023 at 21:15, Vladimir Sementsov-Ogievskiy wrote: > > We support only 3- and 4-level page-tables, which is firstly checked in > vtd_decide_config(), then setup in vtd_init(). Than level fields are > checked by vtd_is_level_supported(). > > So here we can't have level out from

Re: [PATCH v2 2/8] util/filemonitor-inotify: qemu_file_monitor_watch(): assert no overflow

2023-09-26 Thread Peter Maydell
On Tue, 26 Sept 2023 at 21:15, Vladimir Sementsov-Ogievskiy wrote: > > Prefer clear assertions instead of [im]possible array overflow. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > -- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v2 7/8] hw/core/loader: gunzip(): initialize z_stream

2023-09-26 Thread Peter Maydell
On Tue, 26 Sept 2023 at 21:16, Vladimir Sementsov-Ogievskiy wrote: > > Coverity signals that variable as being used uninitialized. And really, > when work with external APIs that's better to zero out the structure, > where we set some fields by hand. > > Signed-off-by: Vladimir

Re: [PATCH v2 4/8] mc146818rtc: rtc_set_time(): initialize tm to zeroes

2023-09-26 Thread Peter Maydell
On Tue, 26 Sept 2023 at 21:15, Vladimir Sementsov-Ogievskiy wrote: > > set_time() function doesn't set all the fields, so it's better to > initialize tm structure. And Coverity will be happier about it. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > hw/rtc/mc146818rtc.c | 2 +- > 1

Re: [PATCH 1/2] i386/a-b-bootblock: factor test memory addresses out into constants

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
On 07.09.23 22:29, Daniil Tatianin wrote: So that we have less magic numbers to deal with. This also allows us to reuse these in the following commits. Signed-off-by: Daniil Tatianin Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH v2 41/58] i386/tdx: handle TDG.VP.VMCALL

2023-09-26 Thread Markus Armbruster
I sent this reply to your question on the same day, but it got eaten by malfunctioning servers, and I noticed only now after another failure made me dig through my logs. Sorry for the inconvenience! Chenyi Qiang writes: > On 8/22/2023 4:24 PM, Daniel P. Berrangé wrote: >> On Tue, Aug 22, 2023

Re: [PATCH 2/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
On 07.09.23 22:29, Daniil Tatianin wrote: The migration qtest all the way up to this point used to work by sheer luck relying on the contents of all pages from 1MiB to 100MiB to contain the same one value in the first byte initially. This easily breaks if we reduce the amount of RAM for the

Re: [PATCH v3 3/4] migration/qapi: Replace @MigrateSetParameters with @MigrationParameters

2023-09-26 Thread Markus Armbruster
Peter Xu writes: > Quotting from Markus in his replies: Quoting Suggest something like "Markus recently wrote:" > migrate-set-parameters sets migration parameters, and > query-migrate-parameters gets them. Unsurprisingly, the former's > argument type MigrateSetParameters is quite close

Re: [PATCH v3 4/4] migration/qapi: Drop @MigrationParameter enum

2023-09-26 Thread Markus Armbruster
Peter Xu writes: > Drop the enum in qapi because it is never used in QMP APIs. Instead making > it an internal definition for QEMU so that we can decouple it from QAPI, > and also we can deduplicate the QAPI documentations. > > Reviewed-by: Daniel P. Berrangé > Signed-off-by: Peter Xu The

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

2023-09-26 Thread Stefan Hajnoczi
On Tue, Sep 26, 2023 at 11:15:30PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 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 > --- >

[PATCH] maint: Tweak comment in mailmap to sound friendlier

2023-09-26 Thread eblake
From: Eric Blake Documenting that we should not add new lines to work around SPF rewrites sounds foreboding; the intent is instead that new lines here are okay, but indicate a second problem elsewhere in our build process that we should also consider fixing at the same time, to keep the section

Re: [PATCH v2 5/8] pcie_sriov: unregister_vfs(): fix error path

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
[add Markus] On 26.09.23 23:15, Vladimir Sementsov-Ogievskiy wrote: local_err must be NULL before calling object_property_set_bool(), so we must clear it on each iteration. Let's also use more convenient error_reportf_err(). Signed-off-by: Vladimir Sementsov-Ogievskiy ---

Re: [v2] Help wanted for enabling -Wshadow=local

2023-09-26 Thread Markus Armbruster
Warner Losh writes: > On Tue, Sep 26, 2023 at 8:43 AM Markus Armbruster wrote: > >> Brian, Gerd, Jason, Marc-André, Michael, we need your help to enable >> -Wshadow=local. >> >> Paolo, you already took care of several subsystems (thanks!), except you >> left a few warnings in

Re: [PATCH RFC V2 01/37] arm/virt,target/arm: Add new ARMCPU {socket,cluster,core,thread}-id property

2023-09-26 Thread Gavin Shan
Hi Salil, On 9/26/23 20:04, Salil Mehta wrote: This shall be used to store user specified topology{socket,cluster,core,thread} and shall be converted to a unique 'vcpu-id' which is used as slot-index during hot(un)plug of vCPU. Note that we don't have 'vcpu-id' property. It's actually the

Re: [Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux

2023-09-26 Thread Joel Stanley
On Fri, 22 Sept 2023 at 13:21, Cédric Le Goater wrote: > > +t->start = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); > > +return calculate_time(t, MAX(MAX(t->match[0], t->match[1]), 0)); > > This MAX(MAX(x, y), 0) looks strange to me. Would you remember where it comes > from ? Thanks, That

Re: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-26 Thread lixianglai
Hi Salil Mehta: From: Salil Mehta Sent: Tuesday, September 26, 2023 12:21 PM To: 'David Hildenbrand' ; lixianglai ; qemu-devel@nongnu.org Cc: Salil Mehta ; Xiaojuan Yang ; Song Gao ; Michael S. Tsirkin ; Igor Mammedov ; Ani Sinha ; Paolo Bonzini ; Richard Henderson ; Eduardo Habkost ; Marcel

Re: [Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux

2023-09-26 Thread Cédric Le Goater
On 9/27/23 04:12, Joel Stanley wrote: On Fri, 22 Sept 2023 at 13:21, Cédric Le Goater wrote: +t->start = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); +return calculate_time(t, MAX(MAX(t->match[0], t->match[1]), 0)); This MAX(MAX(x, y), 0) looks strange to me. Would you remember where it

Re: [PATCH 0/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-26 Thread Daniil Tatianin
27.09.2023, 00:02, "Peter Xu" :On Thu, Sep 07, 2023 at 10:29:42PM +0300, Daniil Tatianin wrote: This series fixes an issue where the outcome of the migration qtest relies on the initial memory contents all being the same across the first 100MiB of RAM, which is a very fragile invariant.  We fix

Re: [PATCH v2 1/3] i386/a-b-bootblock: factor test memory addresses out into constants

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
On 19.09.23 13:23, Daniil Tatianin wrote: So that we have less magic numbers to deal with. This also allows us to reuse these in the following commits. Signed-off-by: Daniil Tatianin Reviewed-by: Peter Xu Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

[PATCH RESEND v5 1/3] qmp: remove virtio_list, search QOM tree instead

2023-09-26 Thread Jonah Palmer
The virtio_list duplicates information about virtio devices that already exist in the QOM composition tree. Instead of creating this list of realized virtio devices, search the QOM composition tree instead. This patch modifies the QMP command qmp_x_query_virtio to instead recursively search the

[PATCH RESEND v5 0/3] qmp, vhost-user: Remove virtio_list & update virtio introspection

2023-09-26 Thread Jonah Palmer
These patches update a few things related to virtio introspection via. QMP/HMP commands. 1. Remove 'virtio_list' and instead query the QOM composition tree to find any active & realized virtio devices. The 'virtio_list' was duplicating information about virtio devices that was already available

[PATCH RESEND v5 2/3] qmp: update virtio feature maps, vhost-user-gpio introspection

2023-09-26 Thread Jonah Palmer
Add new vhost-user protocol feature to vhost-user protocol feature map and enumeration: - VHOST_USER_PROTOCOL_F_STATUS Add new virtio device features for several virtio devices to their respective feature mappings: virtio-blk: - VIRTIO_BLK_F_SECURE_ERASE virtio-net: - VIRTIO_NET_F_NOTF_COAL

[PATCH RESEND v5 3/3] vhost-user: move VhostUserProtocolFeature definition to header file

2023-09-26 Thread Jonah Palmer
Move the definition of VhostUserProtocolFeature to include/hw/virtio/vhost-user.h. Remove previous definitions in hw/scsi/vhost-user-scsi.c, hw/virtio/vhost-user.c, and hw/virtio/virtio-qmp.c. Previously there were 3 separate definitions of this over 3 different files. Now only 1 definition of

[PATCH 1/1] tcg/loongarch64: Fix buid error

2023-09-26 Thread Song Gao
From: gaosong Fix: In file included from ../tcg/tcg.c:735: /home1/gaosong/bugfix/qemu/tcg/loongarch64/tcg-target.c.inc: In function ‘tcg_out_vec_op’: /home1/gaosong/bugfix/qemu/tcg/loongarch64/tcg-target.c.inc:1855:9: error: a label can only be part of a statement and a declaration is

[PATCH] analyze-migration: ignore RAM_SAVE_FLAG_MULTIFD_FLUSH

2023-09-26 Thread marcandre . lureau
From: Marc-André Lureau Traceback (most recent call last): File "scripts/analyze-migration.py", line 605, in dump.read(dump_memory = args.memory) File "scripts/analyze-migration.py", line 542, in read section.read() File "scripts/analyze-migration.py", line 214, in read raise

Re: [PATCH 48/52] migration/rdma: Silence qemu_rdma_block_for_wrid()

2023-09-26 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:42, Markus Armbruster wrote: > Functions that use an Error **errp parameter to return errors should > not also report them to the user, because reporting is the caller's > job. When the caller does, the error is reported twice. When it > doesn't (because it recovered from the

Re: [PATCH 51/52] migration/rdma: Use error_report() & friends instead of stderr

2023-09-26 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:42, Markus Armbruster wrote: > if (local->nb_blocks != nb_dest_blocks) { > -fprintf(stderr, "ram blocks mismatch (Number of blocks %d vs %d) > " > -"Your QEMU command line parameters are probably " > -"not identical

Re: [PATCH 1/1] hw/ide/core: terminate in-flight DMA on IDE bus reset

2023-09-26 Thread Fiona Ebner
Am 25.09.23 um 21:53 schrieb John Snow: > On Thu, Sep 21, 2023 at 12:07 PM Simon Rowe wrote: >> >> When an IDE controller is reset, its internal state is being cleared >> before any outstanding I/O is cancelled. If a response to DMA is >> received in this window, the aio callback will incorrectly

Re: [PATCH] m68k: Silence -Wshadow=local warnings in the m68k code

2023-09-26 Thread Laurent Vivier
Le 25/09/2023 à 20:56, Thomas Huth a écrit : Rename the innermost variables to make the code compile without warnings when using -Wshadow=local. Signed-off-by: Thomas Huth --- hw/m68k/bootinfo.h | 10 -- disas/m68k.c| 8 target/m68k/translate.c | 8

Re: [PATCH] MAINTAINERS: Add entry for rdma migration

2023-09-26 Thread Zhijian Li (Fujitsu)
On 25/09/2023 21:34, Peter Xu wrote: > It's not obvious to many that RDMA migration is in Odd Fixes stage for a > long time. Add an explicit sub entry for it (besides migration, which > already covers the rdma files) to be clear on that, meanwhile add Zhijian > as Reviewer, so Zhijian can see

Re: [PATCH v7 6/7] qapi: Add HV_BALLOON_STATUS_REPORT event and its QMP query command

2023-09-26 Thread Markus Armbruster
"Maciej S. Szmigiero" writes: > On 25.09.2023 13:49, Markus Armbruster wrote: >> "Maciej S. Szmigiero" writes: >> >>> From: "Maciej S. Szmigiero" >>> >>> Used by the hv-balloon driver for (optional) guest memory status reports. >>> >>> Signed-off-by: Maciej S. Szmigiero >> [...] >> >>>

Re: [PATCH v2 10/20] q800: add easc bool machine class property to switch between ASC and EASC

2023-09-26 Thread Laurent Vivier
Le 09/09/2023 à 11:48, Mark Cave-Ayland a écrit : This determines whether the Apple Sound Chip (ASC) is set to enhanced mode (default) or to original mode. The real Q800 hardware used an EASC chip however a lot of older software only works with the older ASC chip. Adding this as a machine

Re: [PATCH v2 11/20] swim: add trace events for IWM and ISM registers

2023-09-26 Thread Laurent Vivier
Le 09/09/2023 à 11:48, Mark Cave-Ayland a écrit : Signed-off-by: Mark Cave-Ayland --- hw/block/swim.c | 14 ++ hw/block/trace-events | 7 +++ 2 files changed, 21 insertions(+) diff --git a/hw/block/swim.c b/hw/block/swim.c index 333da08ce0..7df36ea139 100644 ---

Re: [PATCH v2 12/20] swim: split into separate IWM and ISM register blocks

2023-09-26 Thread Laurent Vivier
Le 09/09/2023 à 11:48, Mark Cave-Ayland a écrit : The swim chip provides an implementation of both Apple's IWM and ISM floppy disk controllers. Split the existing implementation into separate register banks for each controller, whilst also switching the IWM registers from 16-bit to 8-bit as

Re: [PATCH 47/52] migration/rdma: Don't report received completion events as error

2023-09-26 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:42, Markus Armbruster wrote: > When qemu_rdma_wait_comp_channel() receives an event from the > completion channel, it reports an error "receive cm event while wait > comp channel,cm event is T", where T is the numeric event type. > However, the function fails only when T is a

RE: [PATCH v1 15/22] Add iommufd configure option

2023-09-26 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, September 21, 2023 2:20 AM > > On Wed, Sep 20, 2023 at 12:17:24PM -0600, Alex Williamson wrote: > > > > The iommufd design requires one open of the /dev/iommu to be shared > > > across all the vfios. > > > > "requires"? It's certainly of limited value

Re: [PATCH v3 0/4] Support dynamic MSI-X allocation

2023-09-26 Thread Cédric Le Goater
On 9/26/23 04:14, Jing Liu wrote: Changes since v2: - v2: https://www.mail-archive.com/qemu-devel@nongnu.org/msg989852.html - Use a bool type to test (vdev->nr_vectors < nr + 1). (Alex) - Revise comments. (Alex) - Apply Cédric's and Alex's Reviewed-by. Changes since v1: - v1:

Re: [PATCH 39/52] migration/rdma: Convert qemu_rdma_write_one() to Error

2023-09-26 Thread Markus Armbruster
"Zhijian Li (Fujitsu)" writes: > On 18/09/2023 22:41, Markus Armbruster wrote: >> Functions that use an Error **errp parameter to return errors should >> not also report them to the user, because reporting is the caller's >> job. When the caller does, the error is reported twice. When it >>

Re: [PATCH 52/52] migration/rdma: Fix how we show device details on open

2023-09-26 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:42, Markus Armbruster wrote: > qemu_rdma_dump_id() dumps RDMA device details to stdout. > > rdma_start_outgoing_migration() calls it via qemu_rdma_source_init() > and qemu_rdma_resolve_host() to show source device details. > rdma_start_incoming_migration() arranges its call via

Re: [RFC] Proposal of QEMU PCI Endpoint test environment

2023-09-26 Thread Christoph Hellwig
On Thu, Sep 21, 2023 at 02:41:54PM +0530, Kishon Vijay Abraham I wrote: > > PCI Endpoint function driver is implemented using the PCIe Endpoint > > framework, but it requires physical boards for testing, and it is difficult > > to test sufficiently. In order to find bugs and hardware-dependent > >

Re: [PATCH 0/4] ui/console: multihead: fix crash, simplify logic

2023-09-26 Thread Marc-André Lureau
Hi Laszlo On Mon, Sep 25, 2023 at 7:36 PM Laszlo Ersek wrote: > Has this been queued by someone? Both Gerd and Marc-André are "odd > fixers", so I'm not sure who should be sending a PR with these patches > (and I don't see a pending PULL at >

Re: [PATCH v2 00/12] VIRTIO-IOMMU/VFIO: Don't assume 64b IOVA space

2023-09-26 Thread YangHang Liu
The original issue I found : After starting a VM which has two ice PFs and a virtio-iommu device, qemu-kvm and VM guest dmesg throw lots of duplicate VFIO_MAP_DMA errors After testing with Eric's build, the original issue is gone and the Tier1 regression test against ice PF and virtio iommu

Re: [PATCH v2 20/20] mac_via: extend timer calibration hack to work with A/UX

2023-09-26 Thread Laurent Vivier
Le 09/09/2023 à 11:48, Mark Cave-Ayland a écrit : The A/UX timer calibration loop runs continuously until 2 consecutive iterations differ by at least 0x492 timer ticks. Modern hosts execute the timer calibration loop so fast that this situation never occurs causing a hang on boot. Use a similar

Re: [PATCH v2 19/20] q800: add alias for MacOS toolbox ROM at 0x40000000

2023-09-26 Thread Laurent Vivier
Le 09/09/2023 à 11:48, Mark Cave-Ayland a écrit : According to the Apple Quadra 800 Developer Note document, the Quadra 800 ROM consists of 2 ROM code sections based at offsets 0x0 and 0x80. A/UX attempts to access the toolbox ROM at the lower offset during startup, so provide a memory alias

Re: [PATCH v2 18/20] q800: add ESCC alias at 0xc000

2023-09-26 Thread Laurent Vivier
Le 09/09/2023 à 11:48, Mark Cave-Ayland a écrit : Tests on real Q800 hardware show that the ESCC is addressable at multiple locations within the ESCC memory region - at least 0xc000, 0xc020 (as expected by the MacOS toolbox ROM) and 0xc040. All released NetBSD kernels before 10 use the 0xc000

Re: [PATCH v2 13/20] swim: update IWM/ISM register block decoding

2023-09-26 Thread Laurent Vivier
Le 09/09/2023 à 11:48, Mark Cave-Ayland a écrit : Update the IWM/ISM register block decoding to match the description given in the "SWIM Chip Users Reference". This allows us to validate the device response to the guest OS which currently only does just enough to indicate that the floppy drive

Re: [PATCH 12/12] io/channel-socket: qio_channel_socket_flush(): improve msg validation

2023-09-26 Thread Maksim Davydov
Could you add a comment into the commit message why ee_data must be bigger than ee_info? On 9/25/23 22:40, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- io/channel-socket.c | 5 + 1 file changed, 5 insertions(+) diff --git a/io/channel-socket.c

Re: [PATCH 46/52] migration/rdma: Silence qemu_rdma_reg_control()

2023-09-26 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:42, Markus Armbruster wrote: > Functions that use an Error **errp parameter to return errors should > not also report them to the user, because reporting is the caller's > job. When the caller does, the error is reported twice. When it > doesn't (because it recovered from the

Re: [PATCH 45/52] migration/rdma: Silence qemu_rdma_connect()

2023-09-26 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > Functions that use an Error **errp parameter to return errors should > not also report them to the user, because reporting is the caller's > job. When the caller does, the error is reported twice. When it > doesn't (because it recovered from the

Re: [PATCH 43/52] migration/rdma: Convert qemu_rdma_alloc_pd_cq() to Error

2023-09-26 Thread Markus Armbruster
"Zhijian Li (Fujitsu)" writes: > On 18/09/2023 22:41, Markus Armbruster wrote: >> Functions that use an Error **errp parameter to return errors should >> not also report them to the user, because reporting is the caller's >> job. When the caller does, the error is reported twice. When it >>

RE: [PATCH 4/4] target/i386: add live migration support for FRED

2023-09-26 Thread Li, Xin3
> > FRED CPU states are managed in 10 FRED MSRs, in addtion to a few > > existing CPU registers and MSRs, e.g., the CR4.FRED bit. > > > > Add the 10 new FRED MSRs to x86 CPUArchState for live migration support. > > > > IMO, it's better to split this patch into two, one is for FRED MSR access, >

[PATCH 1/1] target/loongarch: Clean up local variable shadowing

2023-09-26 Thread Song Gao
Fix: [1839/2601] Compiling C object libqemu-loongarch64-softmmu.fa.p/hw_loongarch_virt.c.o ../hw/loongarch/virt.c: In function 'loongarch_irq_init': ../hw/loongarch/virt.c:665:14: warning: declaration of 'i' shadows a previous local [-Wshadow=compatible-local] for (int i = 0; i <

Re: [PATCH v2 17/20] mac_via: always clear ADB interrupt when switching to A/UX mode

2023-09-26 Thread Laurent Vivier
Le 09/09/2023 à 11:48, Mark Cave-Ayland a écrit : When the NetBSD kernel initialises it can leave the ADB interrupt asserted depending upon where in the ADB poll cycle the MacOS ADB interrupt handler is when the NetBSD kernel disables interrupts. The NetBSD ADB driver uses the ADB interrupt

Re: [PATCH v2 16/20] mac_via: implement ADB_STATE_IDLE state if shift register in input mode

2023-09-26 Thread Laurent Vivier
Le 09/09/2023 à 11:48, Mark Cave-Ayland a écrit : NetBSD switches directly to IDLE state without switching the shift register to input mode. Duplicate the existing ADB_STATE_IDLE logic in input mode from when the shift register is in output mode which allows the ADB autopoll handler to handle

Re: [PATCH 49/52] migration/rdma: Silence qemu_rdma_register_and_get_keys()

2023-09-26 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:42, Markus Armbruster wrote: > Functions that use an Error **errp parameter to return errors should > not also report them to the user, because reporting is the caller's > job. When the caller does, the error is reported twice. When it > doesn't (because it recovered from the

Re: [PATCH 0/4] aspeed: Clean up local variable shadowing

2023-09-26 Thread Markus Armbruster
Cédric Le Goater writes: > On 9/23/23 09:13, Markus Armbruster wrote: >> Cédric Le Goater writes: >> >>> On 9/22/23 20:20, Philippe Mathieu-Daudé wrote: On 22/9/23 17:59, Cédric Le Goater wrote: > Hello, > > Here are cleanups for local variable shadowing warnings in aspeed

Re: [PATCH v2 13/15] hw/qdev: Remove DEFINE_PROP_DMAADDR() and 'hw/qdev-dma.h'

2023-09-26 Thread Markus Armbruster
Paolo Bonzini writes: > On 9/25/23 13:03, Markus Armbruster wrote: >> +David >> Markus Armbruster writes: >> >>> Philippe Mathieu-Daudé writes: >>> DEFINE_PROP_DMAADDR() is only used once. Since it doesn't add much value, simply remove it, along with the header defining it.

Re: [PATCH 43/52] migration/rdma: Convert qemu_rdma_alloc_pd_cq() to Error

2023-09-26 Thread Zhijian Li (Fujitsu)
On 26/09/2023 14:41, Markus Armbruster wrote: > "Zhijian Li (Fujitsu)" writes: > >> On 18/09/2023 22:41, Markus Armbruster wrote: >>> Functions that use an Error **errp parameter to return errors should >>> not also report them to the user, because reporting is the caller's >>> job. When the

Re: [PATCH v2 14/20] mac_via: work around underflow in TimeDBRA timing loop in SETUPTIMEK

2023-09-26 Thread Laurent Vivier
Le 09/09/2023 à 11:48, Mark Cave-Ayland a écrit : The MacOS toolbox ROM calculates the number of branches that can be executed per millisecond as part of its timer calibration. Since modern hosts are considerably quicker than original hardware, the negative counter reaches zero before the

Re: [PATCH v2 15/20] mac_via: workaround NetBSD ADB bus enumeration issue

2023-09-26 Thread Laurent Vivier
Le 09/09/2023 à 11:48, Mark Cave-Ayland a écrit : NetBSD assumes it can send its first ADB command after sending the ADB_BUSRESET command in ADB_STATE_NEW without changing the state back to ADB_STATE_IDLE first as detailed in the ADB protocol. Add a workaround to detect this condition at the

Re: [PATCH v2 3/3] tests/qtest: Introduce tests for AMD/Xilinx Versal TRNG device

2023-09-26 Thread Francisco Iglesias
Hi Tong, On [2023 Sep 21] Thu 23:50:10, Tong Ho wrote: > Signed-off-by: Tong Ho > --- > tests/qtest/meson.build | 2 +- > tests/qtest/xlnx-versal-trng-test.c | 490 > 2 files changed, 491 insertions(+), 1 deletion(-) > create mode 100644

RE: [PATCH v1 04/22] vfio/common: Introduce vfio_container_add|del_section_window()

2023-09-26 Thread Duan, Zhenzhong
Hi Cédric, >-Original Message- >From: Duan, Zhenzhong >Sent: Thursday, September 21, 2023 6:14 PM >Subject: RE: [PATCH v1 04/22] vfio/common: Introduce >vfio_container_add|del_section_window() > >Hi Cédric, > >>-Original Message- >>From: Cédric Le Goater >>Sent: Thursday,

Re: [PATCH RFC V2 02/37] cpus-common: Add common CPU utility for possible vCPUs

2023-09-26 Thread Gavin Shan
Hi Salil, On 9/26/23 20:04, Salil Mehta wrote: Adds various utility functions which might be required to fetch or check the state of the possible vCPUs. This also introduces concept of *disabled* vCPUs, which are part of the *possible* vCPUs but are not part of the *present* vCPU. This state

Re: [PATCH 0/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-26 Thread Peter Xu
On Thu, Sep 07, 2023 at 10:29:42PM +0300, Daniil Tatianin wrote: > This series fixes an issue where the outcome of the migration qtest > relies on the initial memory contents all being the same across the > first 100MiB of RAM, which is a very fragile invariant. > > We fix this by making sure we

Re: [PATCH 50/52] migration/rdma: Silence qemu_rdma_cleanup()

2023-09-26 Thread Zhijian Li (Fujitsu)
On 26/09/2023 19:52, Markus Armbruster wrote: > "Zhijian Li (Fujitsu)" writes: > >> On 18/09/2023 22:42, Markus Armbruster wrote: >>> Functions that use an Error **errp parameter to return errors should >>> not also report them to the user, because reporting is the caller's >>> job. When the

Re: [PATCH 1/4] aspeed/i2c: Clean up local variable shadowing

2023-09-26 Thread Joel Stanley
On Fri, 22 Sept 2023 at 15:59, Cédric Le Goater wrote: > > Remove superfluous local 'data' variable and use the one define at the > top of the routine. This fixes : > > ../hw/i2c/aspeed_i2c.c: In function ‘aspeed_i2c_bus_recv’: > ../hw/i2c/aspeed_i2c.c:315:17: warning: declaration of ‘data’

Re: [PATCH 50/52] migration/rdma: Silence qemu_rdma_cleanup()

2023-09-26 Thread Markus Armbruster
"Zhijian Li (Fujitsu)" writes: > On 26/09/2023 19:52, Markus Armbruster wrote: >> "Zhijian Li (Fujitsu)" writes: >> >>> On 18/09/2023 22:42, Markus Armbruster wrote: Functions that use an Error **errp parameter to return errors should not also report them to the user, because

Re: [PATCH v2 2/3] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
On 19.09.23 13:23, Daniil Tatianin wrote: The migration qtest all the way up to this point used to work by sheer luck relying on the contents of all pages from 1MiB to 100MiB to contain the same one value in the first byte initially. This easily breaks if we reduce the amount of RAM for the

Re: [PATCH v6 00/23] bsd-user: Implement mmap related system calls for FreeBSD.

2023-09-26 Thread Warner Losh
On Mon, Sep 25, 2023 at 12:28 PM Karim Taha wrote: > Upstream the implementation of the following mmap system calls, from the > qemu-bsd-user fork: >mmap(2), munmap(2), >mprotect(2), >msync(2), >mlock(2), munlock(2), mlockall(2), munlockall(2), mincore(2), >madvise(2), >

Re: [PATCH 1/2] target/riscv: add riscv_cpu_get_name()

2023-09-26 Thread Alistair Francis
On Wed, Sep 27, 2023 at 5:35 AM Daniel Henrique Barboza wrote: > > We'll introduce generic errors that will output a CPU type name via its > RISCVCPU pointer. Create a helper for that. > > Use the helper in tcg_cpu_realizefn() instead of hardcoding the 'host' > CPU name. > > Signed-off-by: Daniel

Re: [PATCH 2/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-26 Thread Daniil Tatianin
26.09.2023, 23:41, "Vladimir Sementsov-Ogievskiy" :On 07.09.23 22:29, Daniil Tatianin wrote: The migration qtest all the way up to this point used to work by sheer luck relying on the contents of all pages from 1MiB to 100MiB to contain the same one value in the first byte initially.  This easily

Re: [PATCH 0/2] i386/a-b-bootblock: zero the first byte of each page on start

2023-09-26 Thread Daniil Tatianin
27.09.2023, 00:02, "Peter Xu" :On Thu, Sep 07, 2023 at 10:29:42PM +0300, Daniil Tatianin wrote: This series fixes an issue where the outcome of the migration qtest relies on the initial memory contents all being the same across the first 100MiB of RAM, which is a very fragile invariant.  We fix

Re: [PATCH v2 3/3] s390x/a-b-bios: zero the first byte of each page on start

2023-09-26 Thread Vladimir Sementsov-Ogievskiy
On 19.09.23 13:23, Daniil Tatianin wrote: Same as with the x86 verison of this test, we relied on the contents of all pages in RAM to be the same across the entire test range, which is very fragile. Zero the first byte of each page before running the increment loop to fix this. Fixes:

Re: [PATCH v5 00/28] bsd-user: Implement freebsd process related system calls.

2023-09-26 Thread Warner Losh
On Mon, Sep 25, 2023 at 12:25 PM Karim Taha wrote: > > > Karim Taha (3): > bsd-user: define TARGET_RFSPAWN for rfork to use vfork(2) semantics, > and fix RLIM_INFINITY > bsd-user: Implement get_filename_from_fd. > bsd-user: Implement execve(2) and fexecve(2) system calls. > > Kyle

Re: [PATCH RFC V2 03/37] hw/arm/virt: Move setting of common CPU properties in a function

2023-09-26 Thread Gavin Shan
Hi Salil, On 9/26/23 20:04, Salil Mehta wrote: Factor out CPU properties code common for {hot,cold}-plugged CPUs. This allows code reuse. Signed-off-by: Salil Mehta --- hw/arm/virt.c | 220 ++ include/hw/arm/virt.h | 4 + 2 files changed,

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

2023-09-26 Thread Marek Marczykowski-Górecki
On Tue, Nov 22, 2022 at 05:12:59PM +, Anthony PERARD wrote: > 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

Re: [PATCH v3 7/7] Update the ACPI table for the Loongarch CPU

2023-09-26 Thread lixianglai
Hi Salil Mehta: Hi Xianglai, From: xianglai li Sent: Tuesday, September 26, 2023 10:55 AM To: qemu-devel@nongnu.org Cc: Bernhard Beschow ; Salil Mehta ; Salil Mehta ; Xiaojuan Yang ; Song Gao ; Michael S. Tsirkin ; Igor Mammedov ; Ani Sinha ; Paolo Bonzini ; Richard Henderson ; Eduardo

Re: [PATCH] optionrom: Remove build-id section

2023-09-26 Thread Thomas Huth
On 26/09/2023 21.25, Fabiano Rosas wrote: Our linker script for optionroms specifies only the placement of the .text section, leaving the linker free to place the remaining sections at arbitrary places in the file. Since at least binutils 2.39, the .note.gnu.build-id section is now being placed

[PATCH RFC V2 00/37] Support of Virtual CPU Hotplug for ARMv8 Arch

2023-09-26 Thread Salil Mehta via
[ *REPEAT: Sent patches got held at internal server yesterday* ] PROLOGUE To assist in review and set the right expectations from this RFC, please first read below sections *APPENDED AT THE END* of this cover letter, 1. Important *DISCLAIMER* [Section (X)] 2. Work presented at KVMForum

[PATCH RFC V2 01/37] arm/virt, target/arm: Add new ARMCPU {socket, cluster, core, thread}-id property

2023-09-26 Thread Salil Mehta via
This shall be used to store user specified topology{socket,cluster,core,thread} and shall be converted to a unique 'vcpu-id' which is used as slot-index during hot(un)plug of vCPU. Co-developed-by: Salil Mehta Signed-off-by: Salil Mehta Co-developed-by: Keqian Zhu Signed-off-by: Keqian Zhu

[PATCH RFC V2 02/37] cpus-common: Add common CPU utility for possible vCPUs

2023-09-26 Thread Salil Mehta via
Adds various utility functions which might be required to fetch or check the state of the possible vCPUs. This also introduces concept of *disabled* vCPUs, which are part of the *possible* vCPUs but are not part of the *present* vCPU. This state shall be used during machine init time to check the

Re: [PATCH v4 13/14] MAINTAINERS: add maintainer of simpletrace.py

2023-09-26 Thread Mads Ynddal
> You're welcome to be the maintainer. I haven't touched it in years. > > When you have reviewed future simpletrace.py patches you can either post > your Reviewed-by and I'll include them in my tracing pull requests, or > you could send pull requests to the qemu.git maintainer yourself >

[PATCH] mailmap: Fix Andrey Drobyshev author email

2023-09-26 Thread andrey . drobyshev--- via
From: Andrey Drobyshev This fixes authorship of commits 2848289168, 52b10c9c0c as the mailing list rewrote the "From:" field in the corresponding patches. See commit 3bd2608db7 ("maint: Add .mailmap entries for patches claiming list authorship") for explanation. Signed-off-by: Andrey Drobyshev

RE: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-26 Thread Salil Mehta via
Hi David, > From: qemu-devel-bounces+salil.mehta=huawei@nongnu.org bounces+salil.mehta=huawei@nongnu.org> On Behalf Of David Hildenbrand > Sent: Tuesday, September 12, 2023 8:00 AM > To: xianglai li ; qemu-devel@nongnu.org > Cc: Salil Mehta ; Xiaojuan Yang > ; Song Gao ; Michael S. >

RE: [PATCH v2 04/10] Introduce the CPU address space destruction function

2023-09-26 Thread Salil Mehta via
Hi Xianglai, > From: lixianglai > Sent: Friday, September 15, 2023 3:48 AM > To: David Hildenbrand ; qemu-devel@nongnu.org; Salil > Mehta > Cc: Salil Mehta ; Xiaojuan Yang > ; Song Gao ; Michael S. > Tsirkin ; Igor Mammedov ; Ani Sinha > ; Paolo Bonzini ; Richard > Henderson ; Eduardo Habkost >

Re: [PATCH v3 2/7] Update CPUs AML with cpu-(ctrl)dev change

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 10:49:08AM +, Salil Mehta wrote: > Hi Xianglai, > FYI. RFC V2 is out and you can now drop the arch agnostic patches from > your patch-set. Please check the details in the cover letter which one > you need to pick and rebase from: > >

RE: [PATCH RFC V2 24/37] hw/acpi: Update ACPI GED framework to support vCPU Hotplug

2023-09-26 Thread Salil Mehta via
> From: Michael S. Tsirkin > Sent: Tuesday, September 26, 2023 12:02 PM > To: Salil Mehta > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; m...@kernel.org; jean- > phili...@linaro.org; Jonathan Cameron ; > lpieral...@kernel.org; peter.mayd...@linaro.org; > richard.hender...@linaro.org;

Re: [PATCH v3 1/7] Update ACPI GED framework to support vcpu hot-(un)plug

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 07:26:40PM +0800, lixianglai wrote: > > Hi, Michael S. Tsirkin : > > On Tue, Sep 26, 2023 at 05:54:26PM +0800, xianglai li wrote: > > > ACPI GED shall be used to convey to the guest kernel about any cpu > > > hot-(un)plug > > > events. Therefore, existing ACPI GED

[PATCH v24 14/21] docs/s390x/cpu topology: document s390x cpu topology

2023-09-26 Thread Nina Schoetterl-Glausch
From: Pierre Morel Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel Co-developed-by: Nina Schoetterl-Glausch Reviewed-by: Thomas Huth Signed-off-by: Nina Schoetterl-Glausch --- MAINTAINERS| 2 +

  1   2   3   4   5   >