Re: [PATCH v9 05/10] ACPI ERST: support for ACPI ERST feature

2021-12-06 Thread Ani Sinha
On Fri, Dec 3, 2021 at 12:39 AM Eric DeVolder wrote: > > This implements a PCI device for ACPI ERST. This implements the > non-NVRAM "mode" of operation for ERST as it is supported by > Linux and Windows. OK sent some more comments. It will take another pass for me to fully review this. > > Sign

Re: [RFC PATCH] s390: kvm: reduce frequency of CPU syncs of diag318 info

2021-12-06 Thread Christian Borntraeger
Am 02.12.21 um 21:54 schrieb Collin Walling: On 11/23/21 01:14, Christian Borntraeger wrote: Am 22.11.21 um 23:33 schrieb Collin Walling: DIAGNOSE 0318 is invoked only once during IPL. As such, the diag318 info will only change once initially and during resets. Let's only sync the register

Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-06 Thread Peter Xu
On Sat, Dec 04, 2021 at 08:00:19PM +0800, Hyman Huang wrote: > > > 在 2021/12/3 20:34, Markus Armbruster 写道: > > huang...@chinatelecom.cn writes: > > > > > From: Hyman Huang(黄勇) > > > > > > Implement dirtyrate calculation periodically basing on > > > dirty-ring and throttle vCPU until it reachs

Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-06 Thread Peter Xu
On Fri, Dec 03, 2021 at 09:39:47AM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Implement dirtyrate calculation periodically basing on > dirty-ring and throttle vCPU until it reachs the quota > dirty page rate given by user. > > Introduce qmp commands "vcpu-dirty-limit", "q

Re: [PATCH v9 3/3] cpus-common: implement dirty page limit on vCPU

2021-12-06 Thread Peter Xu
On Fri, Dec 03, 2021 at 09:39:47AM +0800, huang...@chinatelecom.cn wrote: > +void dirtylimit_setup(int max_cpus) > +{ > +if (!kvm_enabled() || !kvm_dirty_ring_enabled()) { > +return; > +} > + > +dirtylimit_calc_state_init(max_cpus); > +dirtylimit_state_init(max_cpus); > +}

[PATCH for-7.0] i386: Deprecate the -no-hpet QEMU command line option

2021-12-06 Thread Thomas Huth
The HPET setting has been turned into a machine property a while ago already, so we should finally do the next step and deprecate the legacy CLI option, too. While we're at it, add a proper help text for the machine property, too. Signed-off-by: Thomas Huth --- docs/about/deprecated.rst | 6

Re: [PATCH v9 09/10] ACPI ERST: bios-tables-test testcase

2021-12-06 Thread Ani Sinha
On Fri, Dec 3, 2021 at 12:39 AM Eric DeVolder wrote: > > This change implements the test suite checks for the ERST table. > > Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha > --- > tests/qtest/bios-tables-test.c | 56 > ++ > 1 file changed, 56 ins

Re: [PATCH for-7.0] i386: Deprecate the -no-hpet QEMU command line option

2021-12-06 Thread Thomas Huth
On 06/12/2021 09.40, Thomas Huth wrote: The HPET setting has been turned into a machine property a while ago already, so we should finally do the next step and deprecate the legacy CLI option, too. While we're at it, add a proper help text for the machine property, too. Signed-off-by: Thomas Hut

Re: [PATCH] hw/avr: Realize AVRCPU qdev object using qdev_realize()

2021-12-06 Thread Michael Rolnik
Reviewed-by: Michael Rolnik On Mon, Dec 6, 2021 at 12:41 AM Philippe Mathieu-Daudé wrote: > TYPE_AVR_CPU inherits TYPE_CPU, which itself inherits TYPE_DEVICE. > TYPE_DEVICE instances are realized using qdev_realize(), we don't > need to access QOM internal values. > > Signed-off-by: Philippe Ma

Re: [PATCH v9 07/10] ACPI ERST: create ACPI ERST table for pc/x86 machines

2021-12-06 Thread Ani Sinha
On Fri, Dec 3, 2021 at 12:40 AM Eric DeVolder wrote: > > This change exposes ACPI ERST support for x86 guests. > > Signed-off-by: Eric DeVolder Reviewed-by: Ani Sinha > --- > hw/i386/acpi-build.c | 15 +++ > hw/i386/acpi-microvm.c | 15 +++ > include/hw/acpi/erst.h |

Re: [PATCH v2 1/1] multifd: Shut down the QIO channels to avoid blocking the send threads when they are terminated.

2021-12-06 Thread Li Zhang
Thanks for Daniel's review. Hi David and Juan, Any comments for this patch? Thanks Li On 12/3/21 12:55 PM, Li Zhang wrote: When doing live migration with multifd channels 8, 16 or larger number, the guest hangs in the presence of the network errors such as missing TCP ACKs. At sender's s

Re: [PATCH for-7.0] i386: Deprecate the -no-hpet QEMU command line option

2021-12-06 Thread Peter Krempa
On Mon, Dec 06, 2021 at 09:47:58 +0100, Thomas Huth wrote: > On 06/12/2021 09.40, Thomas Huth wrote: > > The HPET setting has been turned into a machine property a while ago > > already, so we should finally do the next step and deprecate the > > legacy CLI option, too. > > While we're at it, add a

Re: [PATCH for-7.0] i386: Deprecate the -no-hpet QEMU command line option

2021-12-06 Thread Thomas Huth
On 06/12/2021 09.57, Peter Krempa wrote: On Mon, Dec 06, 2021 at 09:47:58 +0100, Thomas Huth wrote: On 06/12/2021 09.40, Thomas Huth wrote: The HPET setting has been turned into a machine property a while ago already, so we should finally do the next step and deprecate the legacy CLI option, to

Re: [PATCH for-7.0] i386: Deprecate the -no-hpet QEMU command line option

2021-12-06 Thread Peter Krempa
On Mon, Dec 06, 2021 at 10:02:44 +0100, Thomas Huth wrote: > On 06/12/2021 09.57, Peter Krempa wrote: > > On Mon, Dec 06, 2021 at 09:47:58 +0100, Thomas Huth wrote: > > > On 06/12/2021 09.40, Thomas Huth wrote: > > > > The HPET setting has been turned into a machine property a while ago > > > > alr

Re: [PATCH 1/2] multifd: use qemu_sem_timedwait in multifd_recv_thread to avoid waiting forever

2021-12-06 Thread Li Zhang
On 11/29/21 4:49 PM, Dr. David Alan Gilbert wrote: * Daniel P. Berrangé (berra...@redhat.com) wrote: On Mon, Nov 29, 2021 at 11:20:08AM +, Dr. David Alan Gilbert wrote: * Daniel P. Berrangé (berra...@redhat.com) wrote: On Fri, Nov 26, 2021 at 04:31:53PM +0100, Li Zhang wrote: When doing

Re: [PATCH for-7.0] i386: Deprecate the -no-hpet QEMU command line option

2021-12-06 Thread Thomas Huth
On 06/12/2021 10.19, Peter Krempa wrote: On Mon, Dec 06, 2021 at 10:02:44 +0100, Thomas Huth wrote: On 06/12/2021 09.57, Peter Krempa wrote: On Mon, Dec 06, 2021 at 09:47:58 +0100, Thomas Huth wrote: On 06/12/2021 09.40, Thomas Huth wrote: The HPET setting has been turned into a machine prope

[PATCH for 6.2? v2] Revert "vga: don't abort when adding a duplicate isa-vga device"

2021-12-06 Thread Alex Bennée
This reverts commit 7852a77f598635a67a222b6c1463c8b46098aed2. The check is bogus as it ends up finding itself and falling over. Signed-off-by: Alex Bennée Resolves: https://gitlab.com/qemu-project/qemu/-/issues/733 Reviewed-by: Daniel P. Berrangé Message-Id: <20211202164929.1119036-1-alex.ben..

Re: [PATCH for-7.0] i386: Deprecate the -no-hpet QEMU command line option

2021-12-06 Thread Daniel P . Berrangé
On Mon, Dec 06, 2021 at 10:44:50AM +0100, Thomas Huth wrote: > On 06/12/2021 10.19, Peter Krempa wrote: > > On Mon, Dec 06, 2021 at 10:02:44 +0100, Thomas Huth wrote: > > > On 06/12/2021 09.57, Peter Krempa wrote: > > > > On Mon, Dec 06, 2021 at 09:47:58 +0100, Thomas Huth wrote: > > > > > On 06/12

Re: [PATCH v3 4/4] s390x/pci: add supported DT information to clp response

2021-12-06 Thread Pierre Morel
On 12/3/21 15:27, Matthew Rosato wrote: The DTSM is a mask that specifies which I/O Address Translation designation types are supported. Today QEMU only supports DT=1. Signed-off-by: Matthew Rosato --- hw/s390x/s390-pci-bus.c | 1 + hw/s390x/s390-pci-inst.c| 1 + hw/s390

Re: [PATCH v9 2/3] cpu-throttle: implement vCPU throttle

2021-12-06 Thread Peter Xu
On Fri, Dec 03, 2021 at 09:39:46AM +0800, huang...@chinatelecom.cn wrote: > +static uint64_t dirtylimit_pct(unsigned int last_pct, > + uint64_t quota, > + uint64_t current) > +{ > +uint64_t limit_pct = 0; > +RestrainPolicy policy;

Re: [PATCH v9 1/3] migration/dirtyrate: implement vCPU dirtyrate calculation periodically

2021-12-06 Thread Peter Xu
On Fri, Dec 03, 2021 at 09:39:45AM +0800, huang...@chinatelecom.cn wrote: > +static void dirtylimit_calc_func(void) > +{ > +CPUState *cpu; > +DirtyPageRecord *dirty_pages; > +int64_t start_time, end_time, calc_time; > +DirtyRateVcpu rate; > +int i = 0; > + > +dirty_pages = g

Re: [PATCH v9 06/10] ACPI ERST: build the ACPI ERST table

2021-12-06 Thread Ani Sinha
On Fri, Dec 3, 2021 at 12:40 AM Eric DeVolder wrote: > > This builds the ACPI ERST table to inform OSPM how to communicate > with the acpi-erst device. > > Signed-off-by: Eric DeVolder > --- > hw/acpi/erst.c | 241 > + > 1 file changed, 24

[PATCH 00/15] ppc/ppc405: decade cleanup

2021-12-06 Thread Cédric Le Goater
Hello, The goal of these changes is to refresh the QEMU ref405ep machine and enable boot from a Linux kernel without relying on a U-Boot firmware. The reason for doing so is that we are unable to find a "ppc405_rom.bin" firmware image or a flash image for the 405EP machines. Thomas fought is way

[PATCH 01/15] ppc/ppc405: Change kernel load address

2021-12-06 Thread Cédric Le Goater
The default addresses to load the kernel, fdt, initrd of AMCC boards in U-Boot v2015.10 are : "kernel_addr_r=100\0" "fdt_addr_r=180\0" "ramdisk_addr_r=190\0" The taihu is one of these boards, the ref405ep is not but we don't have much information on it and both

[PATCH 06/15] ppc/ppc405: Change ppc405ep_init() return value

2021-12-06 Thread Cédric Le Goater
I will be useful to rework the boot from Linux. Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 2 +- hw/ppc/ppc405_boards.c | 6 +- hw/ppc/ppc405_uc.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/ppc/ppc405.h b/hw/ppc/ppc405.h index 4cb77aca56

[PATCH 03/15] ppc: Add trace-events for DCR accesses

2021-12-06 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ppc/ppc.c| 2 ++ hw/ppc/trace-events | 3 +++ 2 files changed, 5 insertions(+) diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index e8127599c907..818d75798584 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -1367,6 +1367,7 @@ int ppc_dcr_read (ppc_dcr_t *

[PATCH 04/15] ppc/ppc405: Convert printfs to trace-events

2021-12-06 Thread Cédric Le Goater
and one error message to a LOG_GUEST_ERROR. Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405_uc.c | 159 +++- hw/ppc/trace-events | 20 ++ 2 files changed, 74 insertions(+), 105 deletions(-) diff --git a/hw/ppc/ppc405_uc.c b/hw/ppc/ppc405_uc.c inde

[PATCH 08/15] ppc/ppc405: Remove flash support

2021-12-06 Thread Cédric Le Goater
It is currently impossible to find a "ppc405_rom.bin" firmware file or a full flash image for the PPC405EP evalution board. Even if it should be technically possible to recreate such an image, it's unlikely that anyone will do it since the board is obsolete and support in QEMU has been broken for a

[PATCH 05/15] ppc/ppc405: Drop flag parameter in ppc405_set_bootinfo()

2021-12-06 Thread Cédric Le Goater
It was introduced in commit b8d3f5d12642 ("Add flags to support PowerPC 405 bootinfos variations.") but since its value has always been set to '1'. Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 3 +-- hw/ppc/ppc405_boards.c | 2 +- hw/ppc/ppc405_uc.c | 8 +++- 3 files chan

[PATCH 09/15] ppc/ppc405: Rework FW load

2021-12-06 Thread Cédric Le Goater
QEMU installs a custom U-Boot in-memory descriptor to share board information with Linux, which means that the QEMU machine was initially designed to support booting Linux directly without using the loaded FW. But, it's not that simple because the CPU still starts at address 0xfffc where nothin

[PATCH 12/15] ppc/ppc405: Change default PLL values at reset

2021-12-06 Thread Cédric Le Goater
These values are computed and updated by U-Boot at startup. Use them as defaults to improve direct Linux boot. Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405_uc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/ppc/ppc405_uc.c b/hw/ppc/ppc405_uc.c index 303af58444

[PATCH 07/15] ppc/ppc405: Add some address space definitions

2021-12-06 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 7 +++ hw/ppc/ppc405_boards.c | 16 +++- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/hw/ppc/ppc405.h b/hw/ppc/ppc405.h index ad5f4026b5db..ea48c3626908 100644 --- a/hw/ppc/ppc405.h +++ b/hw/ppc/ppc40

[PATCH 02/15] ppc: Mark the 'taihu' machine as deprecated

2021-12-06 Thread Cédric Le Goater
From: Thomas Huth The PPC 405 CPU is a system-on-a-chip, so all 405 machines are very similar, except for some external periphery. However, the periphery of the 'taihu' machine is hardly emulated at all (e.g. neither the LCD nor the USB part had been implemented), so there is not much value added

[PATCH 11/15] ppc/ppc405: Fix boot from kernel

2021-12-06 Thread Cédric Le Goater
The machine can already boot with kernel and initrd U-boot images if a firmware is loaded first. Adapt and improve the load sequence to let the machine boot directly from a Linux kernel ELF image and a usual initrd image if a firmware image is not provided. For that, install a custom CPU reset hand

[PATCH 14/15] ppc/ppc405: Add update of bi_procfreq field

2021-12-06 Thread Cédric Le Goater
Adapt the fields offset in the board information for Linux. Since Linux relies on the CPU frequency value, I wonder how it ever worked. Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405_uc.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/ppc/ppc405_uc.c b/hw/ppc/

Re: [PATCH for 6.2? v2] Revert "vga: don't abort when adding a duplicate isa-vga device"

2021-12-06 Thread Philippe Mathieu-Daudé
On 12/6/21 10:52, Alex Bennée wrote: > This reverts commit 7852a77f598635a67a222b6c1463c8b46098aed2. > > The check is bogus as it ends up finding itself and falling over. > > Signed-off-by: Alex Bennée > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/733 > Reviewed-by: Daniel P. Berrang

[PATCH 15/15] ppc/ppc405: Update U-Boot board information for hotfoot

2021-12-06 Thread Cédric Le Goater
When support for the ESTeem 195E (PPC405EP) SBC (hotfoot) board was added to Linux, a different layout of U-Boot board information was introduced because the FW of these boards was an ancient U-Boot without dual ethernet support [1]. Change the QEMU PPC405 board information to match the hotfoot bo

[PATCH 10/15] ppc/ppc405: Introduce ppc405_set_default_bootinfo()

2021-12-06 Thread Cédric Le Goater
This routine is a small helper to cleanup the code. The update of the flash fields were removed because there are not of any use when booting from a Linux kernel image. It should be functionally equivalent. Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h| 2 +- hw/ppc/ppc405_boards.

[PATCH 13/15] ppc/ppc405: Fix bi_pci_enetaddr2 field in U-Boot board information

2021-12-06 Thread Cédric Le Goater
The board information for the 405EP first appeared in commit 04f20795ac81 ("Move PowerPC 405 specific definitions into a separate file ...") An Ethernet address is a 6 byte number. Fix that. Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH v13 02/26] target/loongarch: Add core definition

2021-12-06 Thread Philippe Mathieu-Daudé
On 12/6/21 02:22, gaosong wrote: > HI, > On 2021/12/5 上午1:26, Philippe Mathieu-Daudé wrote: >>> + >>> +env->fcsr0_mask = 0x1f1f031f; >> Is this for all CPUs or only the 3A5000? >> > Yes, env->fcsr0_mask = FCSR0_M1 | FCSR0_M2 | FCSR0_M3 = 0x1f1f031f; Let's use "env->fcsr0_mask = FCSR0_M1 |

Re: [PATCH for 6.2? v2] Revert "vga: don't abort when adding a duplicate isa-vga device"

2021-12-06 Thread Philippe Mathieu-Daudé
On 12/6/21 11:43, Philippe Mathieu-Daudé wrote: > On 12/6/21 10:52, Alex Bennée wrote: >> This reverts commit 7852a77f598635a67a222b6c1463c8b46098aed2. >> >> The check is bogus as it ends up finding itself and falling over. >> >> Signed-off-by: Alex Bennée >> Resolves: https://gitlab.com/qemu-proj

Re: [PATCH for 6.2? v2] Revert "vga: don't abort when adding a duplicate isa-vga device"

2021-12-06 Thread Philippe Mathieu-Daudé
On Mon, Dec 6, 2021 at 11:50 AM Philippe Mathieu-Daudé wrote: > On 12/6/21 11:43, Philippe Mathieu-Daudé wrote: > > On 12/6/21 10:52, Alex Bennée wrote: > >> This reverts commit 7852a77f598635a67a222b6c1463c8b46098aed2. > >> > >> The check is bogus as it ends up finding itself and falling over. >

[PULL 1/3] hw/mips/bootloader: Fix write_ulong()

2021-12-06 Thread Philippe Mathieu-Daudé
From: Jiaxun Yang bl_gen_write_ulong uses sd for both 32 and 64 bit CPU, while sd is illegal on 32 bit CPUs. Replace sd with sw on 32bit CPUs. Fixes: 3ebbf86128f ("hw/mips: Add a bootloader helper") Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211130211729.711

[PULL 3/3] Revert "vga: don't abort when adding a duplicate isa-vga device"

2021-12-06 Thread Philippe Mathieu-Daudé
From: Alex Bennée This reverts commit 7852a77f598635a67a222b6c1463c8b46098aed2. The check is bogus as it ends up finding itself and falling over. Signed-off-by: Alex Bennée Resolves: https://gitlab.com/qemu-project/qemu/-/issues/733 Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathie

[PATCH v1 1/1] osdep: asynchronous teardown for shutdown on Linux

2021-12-06 Thread Claudio Imbrenda
This patch adds support for asynchronously tearing down a VM on Linux. When qemu terminates, either naturally or because of a fatal signal, the VM is torn down. If the VM is huge, it can take a considerable amount of time for it to be cleaned up. In case of a protected VM, it might take even longe

[PULL 0/3] MIPS patches for 2021-12-06

2021-12-06 Thread Philippe Mathieu-Daudé
in the Git repository at: https://github.com/philmd/qemu.git tags/mips-20211206 for you to fetch changes up to ac5837e330ec33e2df2d83338713a5c4272c8cc8: Revert "vga: don't abort when adding a duplicate isa-vga device" (2

[PULL 2/3] hw/mips/boston: Fix load_elf() error detection

2021-12-06 Thread Philippe Mathieu-Daudé
From: Jiaxun Yang load_elf() gives negative return in case of error, not zero. Fixes: 10e3f30ff73 ("hw/mips/boston: Allow loading elf kernel and dtb") Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211130211729.7116-3-jiaxun.y...@flygoat.com> Signed-off-by: Phili

Re: [PATCH v1 1/1] osdep: asynchronous teardown for shutdown on Linux

2021-12-06 Thread Daniel P . Berrangé
On Mon, Dec 06, 2021 at 12:06:11PM +0100, Claudio Imbrenda wrote: > This patch adds support for asynchronously tearing down a VM on Linux. > > When qemu terminates, either naturally or because of a fatal signal, > the VM is torn down. If the VM is huge, it can take a considerable > amount of time

[PATCH 1/1] kvm: Clear variables which may not be used

2021-12-06 Thread Li Zhang
The variables msi, route in kvm_irqchip_send_msi may be uninitialised values in some cases. It's necessary to clear them. Signed-off-by: Li Zhang --- accel/kvm/kvm-all.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index eecd8

Re: [PATCH 1/1] kvm: Clear variables which may not be used

2021-12-06 Thread Daniel P . Berrangé
On Mon, Dec 06, 2021 at 12:27:38PM +0100, Li Zhang wrote: > The variables msi, route in kvm_irqchip_send_msi may be uninitialised > values in some cases. It's necessary to clear them. You say the patch is going to 'clear them' but > > Signed-off-by: Li Zhang > --- > accel/kvm/kvm-all.c | 5

Re: [PATCH v1 1/1] osdep: asynchronous teardown for shutdown on Linux

2021-12-06 Thread Claudio Imbrenda
On Mon, 6 Dec 2021 11:21:10 + Daniel P. Berrangé wrote: > On Mon, Dec 06, 2021 at 12:06:11PM +0100, Claudio Imbrenda wrote: > > This patch adds support for asynchronously tearing down a VM on Linux. > > > > When qemu terminates, either naturally or because of a fatal signal, > > the VM is to

Re: [PATCH] spec: Add NBD_OPT_EXTENDED_HEADERS

2021-12-06 Thread Vladimir Sementsov-Ogievskiy
04.12.2021 02:14, Eric Blake wrote: Add a new negotiation feature where the client and server agree to use larger packet headers on every packet sent during transmission phase. This has two purposes: first, it makes it possible to perform operations like trim, write zeroes, and block status on mo

Re: [PATCH v1 1/1] osdep: asynchronous teardown for shutdown on Linux

2021-12-06 Thread Daniel P . Berrangé
On Mon, Dec 06, 2021 at 12:43:12PM +0100, Claudio Imbrenda wrote: > On Mon, 6 Dec 2021 11:21:10 + > Daniel P. Berrangé wrote: > > > On Mon, Dec 06, 2021 at 12:06:11PM +0100, Claudio Imbrenda wrote: > > > This patch adds support for asynchronously tearing down a VM on Linux. > > > > > > When

Re: [PATCH 01/14] nbd/server: Minor cleanups

2021-12-06 Thread Vladimir Sementsov-Ogievskiy
04.12.2021 02:15, Eric Blake wrote: Spelling fixes, grammar improvements and consistent spacing, noticed while preparing other patches in this file. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- nbd/server.c | 13 ++--- 1 file changed, 6 insertions(+),

Re: [PATCH 02/14] qemu-io: Utilize 64-bit status during map

2021-12-06 Thread Vladimir Sementsov-Ogievskiy
04.12.2021 02:15, Eric Blake wrote: The block layer has supported 64-bit block status from drivers since commit 86a3d5c688 ("block: Add .bdrv_co_block_status() callback", v2.12) and friends, with individual driver callbacks responsible for capping things where necessary. Artificially capping thi

Re: [PATCH v1 1/1] osdep: asynchronous teardown for shutdown on Linux

2021-12-06 Thread Claudio Imbrenda
On Mon, 6 Dec 2021 11:47:55 + Daniel P. Berrangé wrote: > On Mon, Dec 06, 2021 at 12:43:12PM +0100, Claudio Imbrenda wrote: > > On Mon, 6 Dec 2021 11:21:10 + > > Daniel P. Berrangé wrote: > > > > > On Mon, Dec 06, 2021 at 12:06:11PM +0100, Claudio Imbrenda wrote: > > > > This patch

Re: [PATCH 03/14] qemu-io: Allow larger write zeroes under no fallback

2021-12-06 Thread Vladimir Sementsov-Ogievskiy
04.12.2021 02:15, Eric Blake wrote: When writing zeroes can fall back to a slow write, permitting an overly large request can become an amplification denial of service attack in triggering a large amount of work from a small request. But the whole point of the no fallback flag is to quickly dete

Re: [PATCH v1 1/1] osdep: asynchronous teardown for shutdown on Linux

2021-12-06 Thread Daniel P . Berrangé
On Mon, Dec 06, 2021 at 01:15:14PM +0100, Claudio Imbrenda wrote: > On Mon, 6 Dec 2021 11:47:55 + > Daniel P. Berrangé wrote: > > > On Mon, Dec 06, 2021 at 12:43:12PM +0100, Claudio Imbrenda wrote: > > > On Mon, 6 Dec 2021 11:21:10 + > > > Daniel P. Berrangé wrote: > > > > > > > On Mo

Re: [PATCH 04/14] nbd/client: Add safety check on chunk payload length

2021-12-06 Thread Vladimir Sementsov-Ogievskiy
04.12.2021 02:15, Eric Blake wrote: Our existing use of structured replies either reads into a qiov capped at 32M (NBD_CMD_READ) or caps allocation to 1000 bytes (see NBD_MAX_MALLOC_PAYLOAD in block/nbd.c). But the existing length checks are rather late; if we encounter a buggy (or malicious) se

Re: [PATCH v2 01/13] hw/sd/ssi-sd: Do not create SD card within controller's realize

2021-12-06 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Hi Markus, Peter, > > On 11/17/21 17:33, Markus Armbruster wrote: >> ssi_sd_realize() creates an "sd-card" device. This is inappropriate, >> and marked FIXME. >> >> Move it to the boards that create these devices. Prior art: commit >> eb4f566bbb for device "gen

[PATCH v10 0/8] hmp,qmp: Add commands to introspect virtio devices

2021-12-06 Thread Jonah Palmer
This series introduces new QMP/HMP commands to dump the status of a virtio device at different levels. [Jonah: Rebasing previous patchset from Nov. 10 (v9). Original patches are by Laurent Vivier from May 2020. Rebase from v9 to v10 includes reformatting virtio.json examples and command struct

[PATCH v10 6/8] qmp: add QMP commands for virtio/vhost queue-status

2021-12-06 Thread Jonah Palmer
From: Laurent Vivier These new commands show the internal status of a VirtIODevice's VirtQueue and a vhost device's vhost_virtqueue (if active). Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 14 +++ hw/virtio/virtio.c | 103 qapi/virtio.json| 252

[PATCH v10 1/8] virtio: drop name parameter for virtio_init()

2021-12-06 Thread Jonah Palmer
This patch drops the name parameter for the virtio_init function. The pair between the numeric device ID and the string device ID (name) of a virtio device already exists, but not in a way that lets us map between them. This patch lets us do this and removes the need for the name parameter in the

[PATCH v10 3/8] qmp: add QMP command x-query-virtio

2021-12-06 Thread Jonah Palmer
From: Laurent Vivier This new command lists all the instances of VirtIODevices with their canonical QOM path and name. Signed-off-by: Jonah Palmer --- hw/virtio/meson.build | 2 ++ hw/virtio/virtio-stub.c| 14 ++ hw/virtio/virtio.c | 27 ++ include/hw/

[PATCH v10 8/8] hmp: add virtio commands

2021-12-06 Thread Jonah Palmer
From: Laurent Vivier This patch implements the HMP versions of the virtio QMP commands. Signed-off-by: Jonah Palmer --- hmp-commands-info.hx | 70 include/monitor/hmp.h | 5 + monitor/hmp-cmds.c| 311 ++ 3 files changed, 386

[PATCH v10 5/8] qmp: decode feature & status bits in virtio-status

2021-12-06 Thread Jonah Palmer
From: Laurent Vivier Display feature names instead of bitmaps for host, guest, and backend for VirtIODevices. Display status names instead of bitmaps for VirtIODevices. Display feature names instead of bitmaps for backend, protocol, acked, and features (hdev->features) for vhost devices. Decod

[PATCH v10 4/8] qmp: add QMP command x-query-virtio-status

2021-12-06 Thread Jonah Palmer
From: Laurent Vivier This new command shows the status of a VirtIODevice, including its corresponding vhost device's status (if active). Next patch will improve output by decoding feature bits, including vhost device's feature bits (backend, protocol, acked, and features). Also will decode statu

[PATCH v10 2/8] virtio: add vhost support for virtio devices

2021-12-06 Thread Jonah Palmer
This patch adds a get_vhost() callback function for VirtIODevices that returns the device's corresponding vhost_dev structure, if the vhost device is running. This patch also adds a vhost_started flag for VirtIODevices. Previously, a VirtIODevice wouldn't be able to tell if its corresponding vhost

[PATCH v10 7/8] qmp: add QMP command x-query-virtio-queue-element

2021-12-06 Thread Jonah Palmer
From: Laurent Vivier This new command shows the information of a VirtQueue element. Signed-off-by: Jonah Palmer --- hw/virtio/virtio-stub.c | 9 +++ hw/virtio/virtio.c | 154 qapi/virtio.json| 183 +

Re: [PATCH] ppc/pvn.c: fix "system-id" FDT when -uuid is set

2021-12-06 Thread Cédric Le Goater
On 12/6/21 13:45, Daniel Henrique Barboza wrote: Setting -uuid in the pnv machine does not work: ./qemu-system-ppc64 -machine powernv8,accel=tcg -uuid 7ff61ca1-a4a0-4bc1-944c-abd114a35e80 qemu-system-ppc64: error creating device tree: (fdt_property_string(fdt, "system-id", buf)): FDT_ERR_BADS

[PATCH] ppc/pvn.c: fix "system-id" FDT when -uuid is set

2021-12-06 Thread Daniel Henrique Barboza
Setting -uuid in the pnv machine does not work: ./qemu-system-ppc64 -machine powernv8,accel=tcg -uuid 7ff61ca1-a4a0-4bc1-944c-abd114a35e80 qemu-system-ppc64: error creating device tree: (fdt_property_string(fdt, "system-id", buf)): FDT_ERR_BADSTATE This happens because we're using "fdt_propert

RE: [PATCH] ppc/pvn.c: fix "system-id" FDT when -uuid is set

2021-12-06 Thread Luis Fernando Fujita Pires
From: Daniel Henrique Barboza > Subject: [PATCH] ppc/pvn.c: fix "system-id" FDT when -uuid is set I don't know enough to review this, but there's a typo on the commit message (pvn.c -> pnv.c). :) -- Luis Pires Instituto de Pesquisas ELDORADO Aviso Legal - Disclaimer

Bad error handling in machine sifive-u

2021-12-06 Thread Markus Armbruster
Watch this: $ ../qemu/bld/qemu-system-riscv64 -M sifive_u -S -monitor stdio -display none -drive if=pflash QEMU 6.1.93 monitor - type 'help' for more information (qemu) Unexpected error in sifive_u_otp_realize() at ../hw/misc/sifive_u_otp.c:229: qemu-system-riscv64: OTP drive siz

Re: [PATCH v2 01/13] hw/sd/ssi-sd: Do not create SD card within controller's realize

2021-12-06 Thread Peter Maydell
On Mon, 6 Dec 2021 at 12:35, Markus Armbruster wrote: > Philippe Mathieu-Daudé writes: > > I guess a already asked this once but don't remember now... What is the > > point of creating a SD card without drive? Is this due to the old design > > issue we hotplug the drive to the SD card and not the

Re: [PATCH] ppc/pvn.c: fix "system-id" FDT when -uuid is set

2021-12-06 Thread Daniel Henrique Barboza
On 12/6/21 09:59, Luis Fernando Fujita Pires wrote: From: Daniel Henrique Barboza Subject: [PATCH] ppc/pvn.c: fix "system-id" FDT when -uuid is set I don't know enough to review this, but there's a typo on the commit message (pvn.c -> pnv.c). :) ooops :D -- Luis Pires Instituto de Pe

[PATCH v2] ppc/pnv.c: fix "system-id" FDT when -uuid is set

2021-12-06 Thread Daniel Henrique Barboza
Setting -uuid in the pnv machine does not work: ./qemu-system-ppc64 -machine powernv8,accel=tcg -uuid 7ff61ca1-a4a0-4bc1-944c-abd114a35e80 qemu-system-ppc64: error creating device tree: (fdt_property_string(fdt, "system-id", buf)): FDT_ERR_BADSTATE This happens because we're using "fdt_propert

Re: [PATCH 03/15] ppc: Add trace-events for DCR accesses

2021-12-06 Thread Philippe Mathieu-Daudé
On 12/6/21 11:37, Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater > --- > hw/ppc/ppc.c| 2 ++ > hw/ppc/trace-events | 3 +++ > 2 files changed, 5 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 07/15] ppc/ppc405: Add some address space definitions

2021-12-06 Thread Philippe Mathieu-Daudé
On 12/6/21 11:37, Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater > --- > hw/ppc/ppc405.h| 7 +++ > hw/ppc/ppc405_boards.c | 16 +++- > 2 files changed, 14 insertions(+), 9 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH 13/15] ppc/ppc405: Fix bi_pci_enetaddr2 field in U-Boot board information

2021-12-06 Thread Philippe Mathieu-Daudé
On 12/6/21 11:37, Cédric Le Goater wrote: > The board information for the 405EP first appeared in commit 04f20795ac81 > ("Move PowerPC 405 specific definitions into a separate file ...") > An Ethernet address is a 6 byte number. Fix that. > > Signed-off-by: Cédric Le Goater > --- > hw/ppc/ppc405

Re: [PATCH 15/15] ppc/ppc405: Update U-Boot board information for hotfoot

2021-12-06 Thread Thomas Huth
On 06/12/2021 14.37, Cédric Le Goater wrote: On 12/6/21 14:27, Philippe Mathieu-Daudé wrote: On 12/6/21 11:37, Cédric Le Goater wrote: When support for the ESTeem 195E (PPC405EP) SBC (hotfoot) board was added to Linux, a different layout of U-Boot board information was introduced because the FW

Re: [PATCH 15/15] ppc/ppc405: Update U-Boot board information for hotfoot

2021-12-06 Thread Philippe Mathieu-Daudé
On 12/6/21 11:37, Cédric Le Goater wrote: > When support for the ESTeem 195E (PPC405EP) SBC (hotfoot) board was > added to Linux, a different layout of U-Boot board information was > introduced because the FW of these boards was an ancient U-Boot > without dual ethernet support [1]. > > Change the

Re: [PATCH v10 1/8] virtio: drop name parameter for virtio_init()

2021-12-06 Thread Christian Schoenebeck
On Montag, 6. Dezember 2021 13:43:19 CET Jonah Palmer wrote: > This patch drops the name parameter for the virtio_init function. > > The pair between the numeric device ID and the string device ID > (name) of a virtio device already exists, but not in a way that > lets us map between them. > > Th

[PATCH for-7.0] hw/i386/pc: Add missing property descriptions

2021-12-06 Thread Thomas Huth
When running "qemu-system-x86_64 -M pc,help" I noticed that some properties were still missing their description. Add them now so that users get at least a slightly better idea what they are all about. Signed-off-by: Thomas Huth --- hw/i386/pc.c | 8 1 file changed, 8 insertions(+) dif

Re: [PATCH 05/15] ppc/ppc405: Drop flag parameter in ppc405_set_bootinfo()

2021-12-06 Thread Philippe Mathieu-Daudé
On 12/6/21 11:37, Cédric Le Goater wrote: > It was introduced in commit b8d3f5d12642 ("Add flags to support > PowerPC 405 bootinfos variations.") but since its value has always > been set to '1'. > > Signed-off-by: Cédric Le Goater > --- > hw/ppc/ppc405.h| 3 +-- > hw/ppc/ppc405_boards.c

Re: [PATCH 1/1] kvm: Clear variables which may not be used

2021-12-06 Thread Li Zhang
On 12/6/21 12:39 PM, Daniel P. Berrangé wrote: On Mon, Dec 06, 2021 at 12:27:38PM +0100, Li Zhang wrote: The variables msi, route in kvm_irqchip_send_msi may be uninitialised values in some cases. It's necessary to clear them. You say the patch is going to 'clear them' but Ah, sorry for

Re: [PATCH 15/15] ppc/ppc405: Update U-Boot board information for hotfoot

2021-12-06 Thread Cédric Le Goater
On 12/6/21 14:27, Philippe Mathieu-Daudé wrote: On 12/6/21 11:37, Cédric Le Goater wrote: When support for the ESTeem 195E (PPC405EP) SBC (hotfoot) board was added to Linux, a different layout of U-Boot board information was introduced because the FW of these boards was an ancient U-Boot without

Re: [PATCH v10 0/8] hmp, qmp: Add commands to introspect virtio devices

2021-12-06 Thread Christian Schoenebeck via
On Montag, 6. Dezember 2021 13:43:18 CET Jonah Palmer wrote: > This series introduces new QMP/HMP commands to dump the status of a > virtio device at different levels. > > [Jonah: Rebasing previous patchset from Nov. 10 (v9). Original patches > are by Laurent Vivier from May 2020. > > Rebase fr

[RFC PATCH v2] blog post: how to get your new feature up-streamed

2021-12-06 Thread Alex Bennée
Experience has shown that getting new functionality up-streamed can be a somewhat painful process. Lets see if we can collect some of our community knowledge into a blog post describing some best practices for getting code accepted. Signed-off-by: Alex Bennée --- v2 - tweak the title - expan

Re: [PATCH] virtio-blk: Fix clean up of host notifiers for single MR transaction.

2021-12-06 Thread Stefan Hajnoczi
On Thu, Dec 02, 2021 at 11:26:51AM -0500, Mark Mielke wrote: > The code that introduced "virtio-blk: Configure all host notifiers in > a single MR transaction" introduced a second loop variable to perform > cleanup in second loop, but mistakenly still refers to the first > loop variable within the

Re: [PATCH] linux-user/hexagon: Use generic target_stat64 structure

2021-12-06 Thread Philippe Mathieu-Daudé
Hi Laurent, What is your plan for this patch? Technically this is a bugfix. On 11/16/21 22:09, Philippe Mathieu-Daudé wrote: > Linux Hexagon port doesn't define a specific 'struct stat' > but uses the generic one (see Linux commit 6103ec56c65c [*] > "asm-generic: add generic ABI headers" which pr

[RFC v3 1/4] tls: add macros for coroutine-safe TLS variables

2021-12-06 Thread Stefan Hajnoczi
Compiler optimizations can cache TLS values across coroutine yield points, resulting in stale values from the previous thread when a coroutine is re-entered by a new thread. Serge Guelton developed an __attribute__((noinline)) wrapper and tested it with clang and gcc. I formatted his idea accordin

request for wiki account

2021-12-06 Thread nick black
hello there! i've been using qemu since about 2005, but somehow never needed to make an account on the wiki. i now do. can i get an account created for 'dankamongmen' or, if you prefer real names, 'nickblack'? thanks! -- nick black -=- https://www.nick-black.com to make an apple pie from scratch,

[RFC v3 2/4] util/async: replace __thread with QEMU TLS macros

2021-12-06 Thread Stefan Hajnoczi
QEMU TLS macros must be used to make TLS variables safe with coroutines. Signed-off-by: Stefan Hajnoczi --- util/async.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/util/async.c b/util/async.c index 6f6717a34b..ddd9f24419 100644 --- a/util/async.c +++ b/util/

[RFC v3 0/4] tls: add macros for coroutine-safe TLS variables

2021-12-06 Thread Stefan Hajnoczi
v3: - Added __attribute__((weak)) to get_ptr_*() [Florian] - Replace rdfsbase with mov %%fs:0,%0 [Florian] This patch series solves the coroutines TLS problem. Coroutines re-entered from another thread sometimes see stale TLS values. This happens because compilers may cache values across yield poi

Re: [PATCH] linux-user/hexagon: Use generic target_stat64 structure

2021-12-06 Thread Philippe Mathieu-Daudé
On Mon, Dec 6, 2021 at 3:21 PM Philippe Mathieu-Daudé wrote: > > Hi Laurent, > > What is your plan for this patch? Technically this is a bugfix. I see the code was released for 6.0, so not a regression. Probably 7.0 material now. > On 11/16/21 22:09, Philippe Mathieu-Daudé wrote: > > Linux Hexag

[RFC v3 3/4] rcu: use coroutine TLS macros

2021-12-06 Thread Stefan Hajnoczi
RCU may be used from coroutines. Standard __thread variables cannot be used by coroutines. Use the coroutine TLS macros instead. Signed-off-by: Stefan Hajnoczi --- include/qemu/rcu.h | 7 --- tests/unit/rcutorture.c| 10 +- tests/unit/test-rcu-list.c | 4 ++-- util/rcu.

[RFC v3 4/4] cpus: use coroutine TLS macros for iothread_locked

2021-12-06 Thread Stefan Hajnoczi
qemu_mutex_iothread_locked() may be used from coroutines. Standard __thread variables cannot be used by coroutines. Use the coroutine TLS macros instead. Signed-off-by: Stefan Hajnoczi --- softmmu/cpus.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/softmmu/cpus.c b

[PATCH for-7.0] tests/qemu-iotests: Fix 051 for binaries without 'lsi53c895a'

2021-12-06 Thread Thomas Huth
The lsi53c895a SCSI adaptor might not be enabled in each and every x86 QEMU binary, e.g. it's disabled in the RHEL/CentOS build. Thus let's add a check to the 051 test so that it does not fail if this device is not available. Signed-off-by: Thomas Huth --- tests/qemu-iotests/051 | 4 1 file

Re: [PATCH v3 4/4] s390x/pci: add supported DT information to clp response

2021-12-06 Thread Eric Farman
On Fri, 2021-12-03 at 09:27 -0500, Matthew Rosato wrote: > The DTSM is a mask that specifies which I/O Address Translation > designation > types are supported. Today QEMU only supports DT=1. > > Signed-off-by: Matthew Rosato Reviewed-by: Eric Farman > --- > hw/s390x/s390-pci-bus.c |

Re: request for wiki account

2021-12-06 Thread Daniel P . Berrangé
On Mon, Dec 06, 2021 at 04:37:24AM -0500, nick black wrote: > hello there! i've been using qemu since about 2005, but somehow > never needed to make an account on the wiki. i now do. can i > get an account created for 'dankamongmen' or, if you prefer real > names, 'nickblack'? thanks! I'll take ca

  1   2   >