Re: [RFC 3/3] s390-ccw: Getting rid of ulong

2023-05-25 Thread Thomas Huth
On 10/05/2023 16.39, Juan Quintela wrote: Any good reason why this still exist? I can understand u* and __u* to be linux kernel like, but ulong? Signed-off-by: Juan Quintela --- pc-bios/s390-ccw/helper.h| 2 +- pc-bios/s390-ccw/s390-ccw.h | 7 +++ pc-bios/s390-ccw/virtio-

Re: [PATCH v2 11/16] migration/RDMA: It is accounting for zero/normal pages in two places

2023-05-25 Thread Leonardo Brás
On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote: > Remove the one in control_save_page(). > > Signed-off-by: Juan Quintela > --- > migration/ram.c | 7 --- > 1 file changed, 7 deletions(-) > > diff --git a/migration/ram.c b/migration/ram.c > index a706edecc0..67ed49b387 100644 > ---

Re: [PATCH v2 12/16] migration/rdma: Remove QEMUFile parameter when not used

2023-05-25 Thread Leonardo Brás
On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote: > Signed-off-by: Juan Quintela > --- > migration/rdma.c | 23 +++ > 1 file changed, 11 insertions(+), 12 deletions(-) > > diff --git a/migration/rdma.c b/migration/rdma.c > index 074456f9df..416dec00a2 100644 > --- a/mig

Re: [PATCH v4 3/3] tests/qtest: sifive-e-aon-watchdog-test.c: Add QTest of watchdog of sifive_e

2023-05-25 Thread Thomas Huth
On 23/05/2023 10.49, Tommy Wu wrote: Add some simple tests of the watchdog timer in the always-on domain device of HiFive 1 rev b. Signed-off-by: Tommy Wu Reviewed-by: Frank Chang --- tests/qtest/meson.build | 3 + tests/qtest/sifive-e-aon-watchdog-test.c | 450 ++

Re: [PATCH v2 13/16] migration/rdma: Don't use imaginary transfers

2023-05-25 Thread Leonardo Brás
On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote: > RDMA protocol is completely asynchronous, so in qemu_rdma_save_page() > they "invent" that a byte has been transferred. And then they call > qemu_file_credit_transfer() and ram_transferred_add() with that byte. > Just remove that calls as n

Re: [PATCH v2 14/16] migration: Remove unused qemu_file_credit_transfer()

2023-05-25 Thread Leonardo Brás
On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote: > After this change, nothing abuses QEMUFile to account for data > transferrefd during migration. > > Signed-off-by: Juan Quintela > --- > migration/qemu-file.h | 8 > migration/qemu-file.c | 5 - > 2 files changed, 13 deletion

Re: [PATCH] target/i386: EPYC-Rome model without XSAVES

2023-05-25 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] meson.build: Fix glib -Wno-unused-function workaround

2023-05-25 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH 05/30] q800: move ROM memory region to Q800MachineState

2023-05-25 Thread Philippe Mathieu-Daudé
On 24/5/23 23:10, Mark Cave-Ayland wrote: Signed-off-by: Mark Cave-Ayland --- hw/m68k/q800.c | 13 + include/hw/m68k/q800.h | 1 + 2 files changed, 6 insertions(+), 8 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 04/30] q800: move CPU object into Q800MachineState

2023-05-25 Thread Philippe Mathieu-Daudé
On 24/5/23 23:10, Mark Cave-Ayland wrote: Signed-off-by: Mark Cave-Ayland --- hw/m68k/q800.c | 10 +- include/hw/m68k/q800.h | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c index 976da06231..ee6175ceb4 100644 --- a/hw/

[PATCH 1/4] tests/qtest/usb-hcd-uhci-test: Check whether "usb-storage" is available

2023-05-25 Thread Thomas Huth
The "usb-storage" device might not have been compiled into the binary (e.g. when compiling with "--without-default-devices"), so we have to check first before using it. Signed-off-by: Thomas Huth --- tests/qtest/usb-hcd-uhci-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -

[PATCH 0/4] tests/qtest: Check for devices before using them

2023-05-25 Thread Thomas Huth
Here are some more patches that are required for running the qtests with builds that have been configured with "--without-default-devices". We need to check whether the required devices are really available in the binaries before we can use them, otherwise the tests will fail. Thomas Huth (4): t

[PATCH 3/4] tests/qtest/rtl8139-test: Check whether the rtl8139 device is available

2023-05-25 Thread Thomas Huth
Though we are already using CONFIG_RTL8139_PCI in the meson.build file for testing whether the rtl8139 device is available or not, this is not enough: The CONFIG switch might have been selected by another target (e.g. the mips fuloong2e machine has the rtl8139 chip soldered on the board), so CONFIG

Re: [PATCH v2 15/16] migration/rdma: Simplify the function that saves a page

2023-05-25 Thread Leonardo Brás
On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote: > When we sent a page through QEMUFile hooks (RDMA) there are three > posiblities: > - We are not using RDMA. return RAM_SAVE_CONTROL_DELAYED and > control_save_page() returns false to let anything else to proceed. > - There is one error but

[PATCH 2/4] tests/qtest: Check for virtio-blk before using -cdrom with the arm virt machine

2023-05-25 Thread Thomas Huth
The arm "virt" machine needs "virtio-blk-pci" for devices that get attached via the "-cdrom" option. Since this is an optional device that might not be available in the binary, we should check for the availability of this device first before using it. Signed-off-by: Thomas Huth --- tests/qtest/b

[PATCH 4/4] tests/qtest/usb-hcd-ehci-test: Check for EHCI and UHCI HCDs before using them

2023-05-25 Thread Thomas Huth
The devices might not be available in the binary (e.g. when compiling with "--without-default-devices"), so we have to check before we can use them. Signed-off-by: Thomas Huth --- tests/qtest/usb-hcd-ehci-test.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qtest/usb-hcd-ehci-te

Re: [PATCH 09/30] q800: add djMEMC memory controller

2023-05-25 Thread Philippe Mathieu-Daudé
On 24/5/23 23:10, Mark Cave-Ayland wrote: The djMEMC controller is used to store information related to the physical memory configuration. Co-developed-by: Laurent Vivier Signed-off-by: Mark Cave-Ayland --- MAINTAINERS | 2 + hw/m68k/Kconfig | 1 + hw/m68k/q800.c

Re: [PATCH 10/30] q800: add machine id register

2023-05-25 Thread Philippe Mathieu-Daudé
On 24/5/23 23:10, Mark Cave-Ayland wrote: MacOS reads this address to identify the hardware. This is a basic implementation returning the ID of Quadra 800. Details: http://mess.redump.net/mess/driver_info/mac_technical_notes "There are 3 ID schemes [...] The third and most scalable is a

Re: [PATCH 13/30] q800: allow accesses to RAM area even if less memory is available

2023-05-25 Thread Philippe Mathieu-Daudé
On 24/5/23 23:10, Mark Cave-Ayland wrote: MacOS attempts a series of writes and reads over the entire RAM area in order to determine the amount of RAM within the machine. Allow accesses to the entire RAM area ignoring writes and always reading zero for areas where there is no physical RAM install

Re: [PATCH v2 16/16] migration/multifd: Compute transferred bytes correctly

2023-05-25 Thread Leonardo Brás
On Mon, 2023-05-15 at 21:57 +0200, Juan Quintela wrote: > In the past, we had to put the in the main thread all the operations > related with sizes due to qemu_file not beeing thread safe. As now > all counters are atomic, we can update the counters just after the > do the write. As an aditional

Re: [PATCH v7 08/14] KVM: Rename mmu_notifier_*

2023-05-25 Thread Peter Zijlstra
On Wed, May 24, 2023 at 02:39:50PM -0700, Sean Christopherson wrote: > On Wed, May 24, 2023, Peter Zijlstra wrote: > > On Wed, May 24, 2023 at 01:16:03PM -0700, Sean Christopherson wrote: > > > Of course, the only accesses outside of mmu_lock are reads, so on x86 that > > > "atomic" access is just

Re: [PATCH v3 6/7] vfio/migration: Add VFIO migration pre-copy support

2023-05-25 Thread Avihai Horon
On 24/05/2023 18:38, Cédric Le Goater wrote: External email: Use caution opening links or attachments Hello Avihai, On 5/24/23 14:49, Avihai Horon wrote: On 23/05/2023 17:56, Cédric Le Goater wrote: External email: Use caution opening links or attachments Hello Avihai, On 5/21/23 17:18

Re: [PATCH] Update copyright dates to 2023

2023-05-25 Thread Peter Maydell
On Thu, 25 May 2023 at 07:45, Enze Li wrote: > > I noticed that in the latest version, the copyright string is still > 2022, even though 2023 is halfway through. This patch fixes that and > fixes the documentation along with it. > > Signed-off-by: Enze Li Whoops, thanks for catching this. These

Re: [PATCH 4/4] tests/qtest/usb-hcd-ehci-test: Check for EHCI and UHCI HCDs before using them

2023-05-25 Thread Ani Sinha
> On 25-May-2023, at 1:40 PM, Thomas Huth wrote: > > The devices might not be available in the binary (e.g. when compiling > with "--without-default-devices"), so we have to check before we can > use them. > > Signed-off-by: Thomas Huth Reviewed-by: Ani Sinha > --- > tests/qtest/usb-hcd-e

Re: [PATCH 1/4] tests/qtest/usb-hcd-uhci-test: Check whether "usb-storage" is available

2023-05-25 Thread Ani Sinha
> On 25-May-2023, at 1:40 PM, Thomas Huth wrote: > > The "usb-storage" device might not have been compiled into the binary > (e.g. when compiling with "--without-default-devices"), so we have to > check first before using it. > > Signed-off-by: Thomas Huth Reviewed-by: Ani Sinha > --- > t

Re: [PATCH v3 1/7] migration: Add switchover ack capability

2023-05-25 Thread Markus Armbruster
Avihai Horon writes: > Migration downtime estimation is calculated based on bandwidth and > remaining migration data. This assumes that loading of migration data in > the destination takes a negligible amount of time and that downtime > depends only on network speed. > > While this may be true fo

Re: [PATCH v4 00/11] *** Add allwinner r40 support ***

2023-05-25 Thread Peter Maydell
On Mon, 15 May 2023 at 21:25, Niek Linnenbank wrote: > > Hi Qianfan, > > Thanks for sending the v4. I've reviewed all patches and replied to each > individual patch. > > Great work so far! > > One thing I wanted to mention is that when you receive a 'Reviewed-by:' or > 'Tested-by:' line from a r

Re: [PATCH v3 2/7] migration: Implement switchover ack logic

2023-05-25 Thread Avihai Horon
On 24/05/2023 22:32, Peter Xu wrote: External email: Use caution opening links or attachments On Sun, May 21, 2023 at 06:18:03PM +0300, Avihai Horon wrote: Implement switchover ack logic. This prevents the source from stopping the VM and completing the migration until an ACK is received from

Re: [PATCH] tests/decode: Emit TAP

2023-05-25 Thread Peter Maydell
On Wed, 24 May 2023 at 18:38, Richard Henderson wrote: > > We currently print FAIL for the failure of a succ_* test, but don't > return a failure exit code. Instead, convert the script to emit > Test Anything Protocol, which gives visibility into each subtest > as well as not relying on exit code

Re: [PATCH 1/2] docs: sbsa: correct graphics card name

2023-05-25 Thread Peter Maydell
On Tue, 23 May 2023 at 19:41, Thomas Huth wrote: > > On 23/05/2023 19.30, Marcin Juszkiewicz wrote: > ... > >> (is there a reason why it can't be disabled with "-vga none" or > >> "-nodefaults"?) > > > > That's something I need to check how it should be done. > > Other boards set mc->default_displ

Re: [PATCH v3 0/4] hw/arm/sbsa-ref: platform version 0.1

2023-05-25 Thread Peter Maydell
On Wed, 24 May 2023 at 12:33, Marcin Juszkiewicz wrote: > > About year ago support for setting platform version for sbsa-ref was > added with "0.0" value. > > This patchset bumps it to "0.1" as we export basic GIC information via > DeviceTree to the firmware. TF-A will then take it and provide to

Re: [PATCH v4 2/3] Add Bochs to list of vga_interfaces

2023-05-25 Thread Peter Maydell
On Wed, 24 May 2023 at 12:14, Marcin Juszkiewicz wrote: > > arm/sbsa-ref uses Bochs-display graphics card and without it being > present in vga_interfaces "-vga none" argument handling cannot be added. > > Signed-off-by: Marcin Juszkiewicz > --- > hw/pci/pci.c| 2 ++ > include/sysemu

Re: [PATCH] hw/arm/xlnx-zynqmp: fix unsigned error when checking the RPUs number

2023-05-25 Thread Peter Maydell
On Wed, 24 May 2023 at 15:37, Clément Chigot wrote: > > When passing --smp with a number lower than XLNX_ZYNQMP_NUM_APU_CPUS, > the expression (ms->smp.cpus - XLNX_ZYNQMP_NUM_APU_CPUS) will result > in a positive number as ms->smp.cpus is a unsigned int. > This will raise the following error after

Performance improvement with 6d740fb01b9f0f5ea7a82f4d5e458d91940a19ee

2023-05-25 Thread Lukáš Doktor
Hello Stefan, folks, the perf-ci detected and bisected the 6d740fb - aio-posix: do not nest poll handlers - as a performance improvement when using multiple concurrent jobs and 4k (22%) as well as 1024k (63%) blocks on aarch64 (on a slow rotational disk). https://ldoktor.github.io/tmp/RedH

[PATCH 0/3] makefile fixes/cleanups

2023-05-25 Thread Paolo Bonzini
A few fixes for things that have gotten inconsistent or redundant over many changes to Makefile. Paolo Paolo Bonzini (3): tests/docker: simplify HOST_ARCH definition tests/vm: fix and simplify HOST_ARCH definition Makefile: remove $(TESTS_PYTHON) tests/Makefile.include| 8 +++-

[PATCH 3/3] Makefile: remove $(TESTS_PYTHON)

2023-05-25 Thread Paolo Bonzini
It is now the same as $(PYTHON), since the latter always points at pyvenv/bin/python3. Signed-off-by: Paolo Bonzini --- tests/Makefile.include| 8 +++- tests/vm/Makefile.include | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefil

[PATCH 2/3] tests/vm: fix and simplify HOST_ARCH definition

2023-05-25 Thread Paolo Bonzini
ARCH is always empty, so just define HOST_ARCH as the result of uname. The incorrect definition was not being used because the "ifeq" statement is wrong; replace it with the same idiom based on $(realpath) that the main Makefile uses. With this change, vm-build-netbsd in a configured tree will not

[PATCH 1/3] tests/docker: simplify HOST_ARCH definition

2023-05-25 Thread Paolo Bonzini
ARCH is always empty, so just define HOST_ARCH as the result of uname. Signed-off-by: Paolo Bonzini --- tests/docker/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 94015253254c..142e8605eee9

Re: [PATCH 1/2] docs: sbsa: correct graphics card name

2023-05-25 Thread Thomas Huth
On 25/05/2023 12.05, Peter Maydell wrote: On Tue, 23 May 2023 at 19:41, Thomas Huth wrote: On 23/05/2023 19.30, Marcin Juszkiewicz wrote: ... (is there a reason why it can't be disabled with "-vga none" or "-nodefaults"?) That's something I need to check how it should be done. Other board

Re: [PATCH 1/2] qemu-img: rebase: stop when reaching EOF of old backing file

2023-05-25 Thread Andrey Drobyshev
On 5/24/23 11:30, Denis V. Lunev wrote: > On 5/23/23 18:24, Andrey Drobyshev wrote: >> In case when we're rebasing within one backing chain, and when target >> image >> is larger than old backing file, bdrv_is_allocated_above() ends up >> setting >> *pnum = 0.  As a result, target offset isn't gett

Re: [PATCH 1/2] docs: sbsa: correct graphics card name

2023-05-25 Thread Peter Maydell
On Thu, 25 May 2023 at 11:32, Thomas Huth wrote: > > On 25/05/2023 12.05, Peter Maydell wrote: > > On Tue, 23 May 2023 at 19:41, Thomas Huth wrote: > >> > >> On 23/05/2023 19.30, Marcin Juszkiewicz wrote: > >> ... > (is there a reason why it can't be disabled with "-vga none" or > "-nod

Re: [PATCH 1/2] docs: sbsa: correct graphics card name

2023-05-25 Thread Thomas Huth
On 25/05/2023 12.44, Peter Maydell wrote: On Thu, 25 May 2023 at 11:32, Thomas Huth wrote: On 25/05/2023 12.05, Peter Maydell wrote: On Tue, 23 May 2023 at 19:41, Thomas Huth wrote: On 23/05/2023 19.30, Marcin Juszkiewicz wrote: ... (is there a reason why it can't be disabled with "-vga n

Re: [PATCH 1/2] docs: sbsa: correct graphics card name

2023-05-25 Thread Mark Cave-Ayland
On 25/05/2023 11:44, Peter Maydell wrote: On Thu, 25 May 2023 at 11:32, Thomas Huth wrote: On 25/05/2023 12.05, Peter Maydell wrote: On Tue, 23 May 2023 at 19:41, Thomas Huth wrote: On 23/05/2023 19.30, Marcin Juszkiewicz wrote: ... (is there a reason why it can't be disabled with "-vga

Re: [PATCH 2/4] tests/qtest: Check for virtio-blk before using -cdrom with the arm virt machine

2023-05-25 Thread Fabiano Rosas
Thomas Huth writes: > The arm "virt" machine needs "virtio-blk-pci" for devices that get attached > via the "-cdrom" option. Since this is an optional device that might not > be available in the binary, we should check for the availability of this > device first before using it. > We're still pr

Re: [PATCH 3/4] tests/qtest/rtl8139-test: Check whether the rtl8139 device is available

2023-05-25 Thread Fabiano Rosas
Thomas Huth writes: > Though we are already using CONFIG_RTL8139_PCI in the meson.build file > for testing whether the rtl8139 device is available or not, this is not > enough: The CONFIG switch might have been selected by another target > (e.g. the mips fuloong2e machine has the rtl8139 chip sol

Re: [PATCH v5 04/10] scripts/qapi: document the tool that generated the file

2023-05-25 Thread Markus Armbruster
Alex Bennée writes: > This makes it a little easier for developers to find where things > where being generated. > > Reviewed-by: Richard Henderson > Signed-off-by: Alex Bennée > Message-Id: <20230523125000.3674739-5-alex.ben...@linaro.org> > --- > scripts/qapi/gen.py | 8 ++-- > 1 file ch

Re: [PATCH v2 1/3] hw/i2c: add mctp core

2023-05-25 Thread Jonathan Cameron via
On Tue, 25 Apr 2023 08:35:38 +0200 Klaus Jensen wrote: > From: Klaus Jensen > > Add an abstract MCTP over I2C endpoint model. This implements MCTP > control message handling as well as handling the actual I2C transport > (packetization). > > Devices are intended to derive from this and impleme

RE: [PATCH] intel_iommu: Optimize out some unnecessary UNMAP calls

2023-05-25 Thread Duan, Zhenzhong
Hi Peter, See inline. >-Original Message- >From: Peter Xu >Sent: Thursday, May 25, 2023 12:59 AM >Subject: Re: [PATCH] intel_iommu: Optimize out some unnecessary UNMAP >calls > >Hi, Zhenzhong, > >On Tue, May 23, 2023 at 04:07:02PM +0800, Zhenzhong Duan wrote: >> Commit 63b88968f1 ("intel-

Re: [PATCH v2 2/3] i2c/mctp: Allow receiving messages to dest eid 0

2023-05-25 Thread Jonathan Cameron via
On Tue, 25 Apr 2023 08:35:39 +0200 Klaus Jensen wrote: > From: Matt Johnston > > The Null Destination ID, 0, is used for MCTP control messages when > addressing by physical ID. That is used for Get Endpoint ID and > Set Endpoint ID when querying/assigning an EID to an endpoint. > > Signed-off-

Re: [PATCH] checkpatch: Prefer DEFINE_TYPES() over type_init / type_register_static

2023-05-25 Thread Daniel Henrique Barboza
On 5/24/23 11:54, Philippe Mathieu-Daudé wrote: When multiple QOM types are registered in the same file, it is clearer and simpler to use the the DEFINE_TYPES() macro. Add a rule to checkpatch.pl to suggest using DEFINE_TYPES() instead of type_init() / type_register_static(). Nice! Sugge

Re: [PATCH v2 1/3] hw/i2c: add mctp core

2023-05-25 Thread Klaus Jensen
On May 25 12:27, Jonathan Cameron wrote: > On Tue, 25 Apr 2023 08:35:38 +0200 > Klaus Jensen wrote: > > > From: Klaus Jensen > > > > Add an abstract MCTP over I2C endpoint model. This implements MCTP > > control message handling as well as handling the actual I2C transport > > (packetization).

Re: [PATCH v2 3/3] hw/nvme: add nvme management interface model

2023-05-25 Thread Jonathan Cameron via
On Tue, 25 Apr 2023 08:35:40 +0200 Klaus Jensen wrote: > From: Klaus Jensen > > Add the 'nmi-i2c' device that emulates an NVMe Management Interface > controller. > > Initial support is very basic (Read NMI DS, Configuration Get). > > This is based on previously posted code by Padmakar Kalghat

Re: [PATCH v5 05/10] qapi: make the vcpu parameters deprecated for 8.1

2023-05-25 Thread Markus Armbruster
Alex Bennée writes: > I don't think I can remove the parameters directly but certainly mark > them as deprecated. > > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Richard Henderson > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Alex Bennée > Message-Id: <20230523125000.3674739-6-alex.b

Re: [PATCH 1/2] docs: sbsa: correct graphics card name

2023-05-25 Thread Peter Maydell
On Thu, 25 May 2023 at 12:06, Mark Cave-Ayland wrote: > > On 25/05/2023 11:44, Peter Maydell wrote: > > > On Thu, 25 May 2023 at 11:32, Thomas Huth wrote: > > > >> So there needs to be at least some logic dealing with vga_interface_type if > >> we want to be able to select a different graphics ca

Re: [PATCH 1/2] docs/cxl: Correct CFMW number

2023-05-25 Thread Jonathan Cameron via
On Fri, 19 May 2023 16:58:01 +0800 Li Zhijian wrote: > The 'Notes:' in this document mentioned CFMW{0-2}, but the figure missed > CFMW2. > > Signed-off-by: Li Zhijian > --- > I'm totally new to CXL, so i have little confidence to this change :) I believe this one is already fixed upstream by B

[PATCH v2 1/2] exec/ram_addr: return nr of dirty pages in cpu_physical_memory_set_dirty_lebitmap()

2023-05-25 Thread Joao Martins
In preparation for including the number of dirty pages in the vfio_get_dirty_bitmap() tracepoint, return the number of dirty pages in cpu_physical_memory_set_dirty_lebitmap() similar to cpu_physical_memory_sync_dirty_bitmap(). To avoid counting twice when GLOBAL_DIRTY_RATE is enabled, stash the nu

[PATCH v2 2/2] hw/vfio: Add nr of dirty pages to vfio_get_dirty_bitmap tracepoint

2023-05-25 Thread Joao Martins
Include the number of dirty pages on the vfio_get_dirty_bitmap tracepoint. These are fetched from the newly added return value in cpu_physical_memory_set_lebitmap(). Signed-off-by: Joao Martins --- hw/vfio/common.c | 7 --- hw/vfio/trace-events | 2 +- 2 files changed, 5 insertions(+), 4

[PATCH v2 0/2] hw/vfio: Improve vfio_get_dirty_bitmap() tracepoint

2023-05-25 Thread Joao Martins
Hey, This tiny series changes the tracepoint to include the number of dirty pages via the vfio_get_dirty_bitmap. I find it useful for observability in general to understand the number of dirty pages in an IOVA range. With dirty tracking supported by device or IOMMU it's specially relevant data to

Re: [PATCH 1/3] tests/docker: simplify HOST_ARCH definition

2023-05-25 Thread Philippe Mathieu-Daudé
On 25/5/23 12:28, Paolo Bonzini wrote: ARCH is always empty, so just define HOST_ARCH as the result of uname. Signed-off-by: Paolo Bonzini --- tests/docker/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 1/2] docs: sbsa: correct graphics card name

2023-05-25 Thread Thomas Huth
On 25/05/2023 13.39, Peter Maydell wrote: On Thu, 25 May 2023 at 12:06, Mark Cave-Ayland wrote: On 25/05/2023 11:44, Peter Maydell wrote: On Thu, 25 May 2023 at 11:32, Thomas Huth wrote: So there needs to be at least some logic dealing with vga_interface_type if we want to be able to sele

Re: [PATCH 2/2] docs/clx: Change to lowercase as others

2023-05-25 Thread Jonathan Cameron via
On Fri, 19 May 2023 16:58:02 +0800 Li Zhijian wrote: > Using the same style except the 'Topo' abbreviation. > > Signed-off-by: Li Zhijian > --- > I'm not a native speaker, feel free to correct me. I've edited slightly and applied to my local staging tree for cxl patches. Includes fixing docs/c

Re: [PATCH v2 2/2] hw/vfio: Add nr of dirty pages to vfio_get_dirty_bitmap tracepoint

2023-05-25 Thread Philippe Mathieu-Daudé
Hi Joao, On 25/5/23 13:43, Joao Martins wrote: Include the number of dirty pages on the vfio_get_dirty_bitmap tracepoint. These are fetched from the newly added return value in cpu_physical_memory_set_lebitmap(). Signed-off-by: Joao Martins --- hw/vfio/common.c | 7 --- hw/vfio/trac

[PATCH v2] target/loongarch: Fix the vinsgr2vr/vpickve2gr instructions cause system coredump

2023-05-25 Thread Song Gao
The vinsgr2vr/vpickve2gr instructions need use get_src/get_dst to get gpr registers value, not cpu_gpr[]. The $zero register does not have cpu_gpr[0] allocated. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1662 Signed-off-by: Song Gao --- target/loongarch/insn_trans/trans_lsx.c.inc |

Re: [PATCH v4 1/3] hw/misc: sifive_e_aon: Support the watchdog timer of HiFive 1 rev b.

2023-05-25 Thread Philippe Mathieu-Daudé
Hi Tommy, On 23/5/23 10:49, Tommy Wu wrote: The watchdog timer is in the always-on domain device of HiFive 1 rev b, so this patch added the AON device to the sifive_e machine. This patch only implemented the functionality of the watchdog timer. Signed-off-by: Tommy Wu Reviewed-by: Frank Chang

Re: [PATCH v4 2/3] hw/riscv: sifive_e: Support the watchdog timer of HiFive 1 rev b.

2023-05-25 Thread Philippe Mathieu-Daudé
On 23/5/23 10:49, Tommy Wu wrote: Create the AON device when we realize the sifive_e machine. This patch only implemented the functionality of the watchdog timer, not all the functionality of the AON device. Signed-off-by: Tommy Wu Reviewed-by: Frank Chang --- hw/riscv/Kconfig|

Re: [PATCH] tests/qtest: Run arm-specific tests only if the required machine is available

2023-05-25 Thread Peter Maydell
On Wed, 24 May 2023 at 09:06, Thomas Huth wrote: > > pflash-cfi02-test.c always uses the "musicpal" machine for testing, > test-arm-mptimer.c always uses the "vexpress-a9" machine, and > microbit-test.c requires the "microbit" machine, so we should only > run these tests if the machines have been

Re: [PATCH v3 1/4] target/riscv: Add Smrnmi cpu extension.

2023-05-25 Thread Daniel Henrique Barboza
On 5/22/23 10:11, Tommy Wu wrote: Signed-off-by: Frank Chang Signed-off-by: Tommy Wu --- hw/riscv/riscv_hart.c | 21 + include/hw/riscv/riscv_hart.h | 4 target/riscv/cpu.c| 14 ++ target/riscv/cpu.h| 7 +++ tar

Re: [PATCH v3 2/4] target/riscv: Add Smrnmi CSRs.

2023-05-25 Thread Daniel Henrique Barboza
On 5/22/23 10:11, Tommy Wu wrote: Signed-off-by: Frank Chang Signed-off-by: Tommy Wu --- Reviewed-by: Daniel Henrique Barboza target/riscv/cpu.c | 5 +++ target/riscv/cpu.h | 4 ++ target/riscv/cpu_bits.h | 11 ++ target/riscv/csr.c | 82 +++

Re: [PATCH 09/12] hw/char/pl011: Check if transmitter is enabled

2023-05-25 Thread Peter Maydell
On Mon, 22 May 2023 at 16:32, Philippe Mathieu-Daudé wrote: > > Do not transmit characters when UART or transmitter are disabled. > > Signed-off-by: Philippe Mathieu-Daudé Last time somebody tried to add checks on the tx/rx enable bits for the PL011 it broke 'make check' because the hand-rolled

Re: [PATCH v1 2/3] memory-device: Factor out device memory initialization into memory_devices_init()

2023-05-25 Thread Song Gao
在 2023/5/24 上午2:51, David Hildenbrand 写道: Let's factor the common setup out, to prepare for further changes. On arm64, we'll add the subregion to system RAM now earlier -- which shouldn't matter, because the system RAM memory region should already be alive at that point. Signed-off-by: David

Re: [PATCH v3 3/4] target/riscv: Handle Smrnmi interrupt and exception.

2023-05-25 Thread Daniel Henrique Barboza
On 5/22/23 10:11, Tommy Wu wrote: Signed-off-by: Frank Chang Signed-off-by: Tommy Wu --- target/riscv/cpu_helper.c | 60 +++ 1 file changed, 55 insertions(+), 5 deletions(-) diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index cc789

Re: [PATCH 01/10] hw/arm/realview: Simplify using 'break' statement

2023-05-25 Thread Peter Maydell
On Wed, 24 May 2023 at 20:01, Richard Henderson wrote: > > On 5/24/23 07:58, Philippe Mathieu-Daudé wrote: > > The 'break' statement terminates the execution of the nearest > > enclosing 'for' statement in which it appears. > > > > Signed-off-by: Philippe Mathieu-Daudé > > --- > > hw/arm/realvi

Re: [PATCH v5 05/10] qapi: make the vcpu parameters deprecated for 8.1

2023-05-25 Thread Alex Bennée
Markus Armbruster writes: > Alex Bennée writes: > >> I don't think I can remove the parameters directly but certainly mark >> them as deprecated. >> >> Reviewed-by: Stefan Hajnoczi >> Reviewed-by: Richard Henderson >> Reviewed-by: Philippe Mathieu-Daudé >> Signed-off-by: Alex Bennée >> Mes

Re: [PATCH v3 2/7] migration: Implement switchover ack logic

2023-05-25 Thread Peter Xu
On Thu, May 25, 2023 at 12:51:46PM +0300, Avihai Horon wrote: > However, there is one issue -- we can't send the ACK up here [1], as at that > point the return path has not been created yet. > A possible solution is to check for mis->switchover_ack_pending_num == 0 > when we create the return path

[PATCH 00/12] block: Fix blockdev-create with iothreads

2023-05-25 Thread Kevin Wolf
This series started with the last patch, an iotest that tests the fixes for .bdrv_co_create() that were made in commit b2ab5f545f ('block: bdrv/blk_co_unref() for calls in coroutine context'). Unfortunately, it turned out that much more is wrong about creating images in an iothread. In particular,

[PATCH 06/12] qcow2: Fix open with 'file' in iothread

2023-05-25 Thread Kevin Wolf
qcow2_open() doesn't work correctly when opening the 'file' child moves bs to an iothread, for several reasons: - It uses BDRV_POLL_WHILE() to wait for the qcow2_open_entry() coroutine, which involves dropping the AioContext lock for bs when it is not in the main context - but we don't hold it

[PATCH 05/12] mirror: Hold main AioContext lock for calling bdrv_open_backing_file()

2023-05-25 Thread Kevin Wolf
bdrv_open_backing_file() calls bdrv_open_inherit(), so all callers must hold the main AioContext lock. Signed-off-by: Kevin Wolf --- block.c| 2 ++ block/mirror.c | 6 ++ 2 files changed, 8 insertions(+) diff --git a/block.c b/block.c index 79bc9c01de..be9ae364fb 100644 --- a/block.

[PATCH 02/12] block: Clarify locking rules for bdrv_open(_inherit)()

2023-05-25 Thread Kevin Wolf
These functions specify that the caller must hold the "@filename AioContext lock". This doesn't make sense, file names don't have an AioContext. New BlockDriverStates always start in the main AioContext, so this is what we really need here. Signed-off-by: Kevin Wolf --- block.c | 10 ++

[PATCH 03/12] block: Take main AioContext lock when calling bdrv_open()

2023-05-25 Thread Kevin Wolf
The function documentation already says that all callers must hold the main AioContext lock, but not all of them do. This can cause assertion failures when functions called by bdrv_open() try to drop the lock. Fix a few more callers to take the lock before calling bdrv_open(). Signed-off-by: Kevin

[PATCH 12/12] iotests: Test blockdev-create in iothread

2023-05-25 Thread Kevin Wolf
If blockdev-create references an existing node in an iothread (e.g. as it's 'file' child), then suddenly all of the image creation code must run in that AioContext, too. Test that this actually works. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/tests/iothreads-create | 67 ++

[PATCH 07/12] raw-format: Fix open with 'file' in iothread

2023-05-25 Thread Kevin Wolf
When opening the 'file' child moves bs to an iothread, we need to hold the AioContext lock of it before we can call raw_apply_options() (and more specifically, bdrv_getlength() inside of it). Signed-off-by: Kevin Wolf --- block/raw-format.c | 5 + tests/unit/test-block-iothread

[PATCH 04/12] block-backend: Fix blk_new_open() for iothreads

2023-05-25 Thread Kevin Wolf
This fixes blk_new_open() to not assume that bs is in the main context. In particular, the BlockBackend must be created with the right AioContext because it will refuse to move to a different context afterwards. (blk->allow_aio_context_change is false.) Use this opportunity to use blk_insert_bs()

[PATCH 10/12] block: Fix AioContext locking in bdrv_insert_node()

2023-05-25 Thread Kevin Wolf
While calling bdrv_new_open_driver_opts(), the main AioContext lock must be held, not the lock of the AioContext of the block subtree it will be added to afterwards. Signed-off-by: Kevin Wolf --- block.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block.c b/block.c index e36

[PATCH 11/12] iotests: Make verify_virtio_scsi_pci_or_ccw() public

2023-05-25 Thread Kevin Wolf
It has no internal callers, so its only use is being called from individual test cases. If the name starts with an underscore, it is considered private and linters warn against calling it. 256 only gets away with it currently because it's on the exception list for linters. Signed-off-by: Kevin Wol

[PATCH 01/12] block-coroutine-wrapper: Take AioContext lock in no_co_wrappers

2023-05-25 Thread Kevin Wolf
All of the functions that currently take a BlockDriverState, BdrvChild or BlockBackend as their first parameter expect the associated AioContext to be locked when they are called. In the case of no_co_wrappers, they are called from bottom halves directly in the main loop, so no other caller can be

[PATCH 09/12] block: Take AioContext lock in bdrv_open_driver()

2023-05-25 Thread Kevin Wolf
bdrv_refresh_total_sectors() and bdrv_refresh_limits() expect to be called under the AioContext lock of the node. Take the lock. Signed-off-by: Kevin Wolf --- block.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block.c b/block.c index be9ae364fb..e368a43761 100644 --- a/block.c ++

[PATCH 08/12] copy-before-write: Fix open with child in iothread

2023-05-25 Thread Kevin Wolf
The AioContext lock must not be held for bdrv_open_child(), but it is necessary for the followig operations, in particular those using nested event loops in coroutine wrappers. Temporarily dropping the main AioContext lock is not necessary because we know we run in the main thread. Signed-off-by:

Re: [PATCH v3 4/4] target/riscv: Add Smrnmi mnret instruction.

2023-05-25 Thread Daniel Henrique Barboza
On 5/22/23 10:11, Tommy Wu wrote: Signed-off-by: Frank Chang Signed-off-by: Tommy Wu --- target/riscv/helper.h | 1 + target/riscv/insn32.decode| 3 ++ .../riscv/insn_trans/trans_privileged.c.inc | 12 + target/riscv/op_helper.c

Re: [PATCH 09/12] hw/char/pl011: Check if transmitter is enabled

2023-05-25 Thread Alex Bennée
Peter Maydell writes: > On Mon, 22 May 2023 at 16:32, Philippe Mathieu-Daudé > wrote: >> >> Do not transmit characters when UART or transmitter are disabled. >> >> Signed-off-by: Philippe Mathieu-Daudé > > Last time somebody tried to add checks on the tx/rx enable bits > for the PL011 it bro

Re: [PATCH v3 2/3] vhost: register and change IOMMU flag depending on Device-TLB state

2023-05-25 Thread Viktor Prutyanov
On Wed, May 24, 2023 at 11:25 AM Jason Wang wrote: > > On Sat, May 20, 2023 at 1:50 AM Viktor Prutyanov wrote: > > > > On Thu, May 18, 2023 at 9:14 AM Jason Wang wrote: > > > > > > On Fri, May 12, 2023 at 9:51 PM Viktor Prutyanov > > > wrote: > > > > > > > > The guest can disable or never enab

Re: [PATCH 09/12] hw/char/pl011: Check if transmitter is enabled

2023-05-25 Thread Peter Maydell
On Thu, 25 May 2023 at 13:52, Alex Bennée wrote: > > > Peter Maydell writes: > > > On Mon, 22 May 2023 at 16:32, Philippe Mathieu-Daudé > > wrote: > >> > >> Do not transmit characters when UART or transmitter are disabled. > >> > >> Signed-off-by: Philippe Mathieu-Daudé > > > > Last time someb

Re: [PATCH 4/5] hw/loongarch64: Use MachineClass->default_nic in the virt machine

2023-05-25 Thread Song Gao
在 2023/5/23 下午7:04, Thomas Huth 写道: Mark the default NIC via the new MachineClass->default_nic setting so that the machine-defaults code in vl.c can decide whether the default NIC is usable or not (for example when compiling with the "--without-default-devices" configure switch). Signed-off-b

[PATCH v4 0/2] vhost: register and change IOMMU flag depending on ATS state

2023-05-25 Thread Viktor Prutyanov
When IOMMU and vhost are enabled together, QEMU tracks IOTLB or Device-TLB unmap events depending on whether Device-TLB is enabled. But even if Device-TLB and PCI ATS is enabled, the guest can reject to use it. For example, this situation appears when Windows Server 2022 is running with intel-iommu

[PATCH v4 1/2] vhost: register and change IOMMU flag depending on Device-TLB state

2023-05-25 Thread Viktor Prutyanov
The guest can disable or never enable Device-TLB. In these cases, it can't be used even if enabled in QEMU. So, check Device-TLB state before registering IOMMU notifier and select unmap flag depending on that. Also, implement a way to change IOMMU notifier flag if Device-TLB state is changed. Bugl

[PATCH v4 2/2] virtio-net: pass Device-TLB enable/disable events to vhost

2023-05-25 Thread Viktor Prutyanov
If vhost is enabled for virtio-net, Device-TLB enable/disable events must be passed to vhost for proper IOMMU unmap flag selection. Signed-off-by: Viktor Prutyanov --- hw/net/virtio-net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 6df6b732

Re: [PATCH] vhost: release memory objects in error path

2023-05-25 Thread Peter Xu
Hi, Prasad, On Mon, May 22, 2023 at 11:40:21PM +0530, P J P wrote: > From: Prasad Pandit > > vhost_dev_start function does not release memory objects in case > of an error. This may crash the guest with: > > stack trace of thread 125653: > Program terminated with signal SIGSEGV, Segmentatio

Re: [PATCH] qapi: better docs for calc-dirty-rate and friends

2023-05-25 Thread Markus Armbruster
Andrei Gudkov writes: > Rewrote calc-dirty-rate documentation. Briefly described > different modes of dirty page rate measurement. Added some > examples. Fixed obvious grammar errors. > > Signed-off-by: Andrei Gudkov > --- > qapi/migration.json | 107 +++-

Re: [PATCH] tests/decode: Emit TAP

2023-05-25 Thread Richard Henderson
On 5/25/23 03:00, Peter Maydell wrote: On Wed, 24 May 2023 at 18:38, Richard Henderson wrote: We currently print FAIL for the failure of a succ_* test, but don't return a failure exit code. Instead, convert the script to emit Test Anything Protocol, which gives visibility into each subtest as

[PATCH] Update copyright dates to 2023

2023-05-25 Thread Enze Li
I noticed that in the latest version, the copyright string is still 2022, even though 2023 is halfway through. This patch fixes that and fixes the documentation along with it. Signed-off-by: Enze Li --- docs/conf.py | 2 +- include/qemu/help-texts.h | 2 +- 2 files changed, 2 inser

Re: [PATCH v2 1/2] exec/ram_addr: return nr of dirty pages in cpu_physical_memory_set_dirty_lebitmap()

2023-05-25 Thread Peter Xu
On Thu, May 25, 2023 at 12:43:20PM +0100, Joao Martins wrote: > In preparation for including the number of dirty pages in the > vfio_get_dirty_bitmap() tracepoint, return the number of dirty pages in > cpu_physical_memory_set_dirty_lebitmap() similar to > cpu_physical_memory_sync_dirty_bitmap(). T

  1   2   3   4   >