Re: [PATCH 4/5] python: qmp_shell: add -e/--exit-on-error option

2022-02-23 Thread Daniel P . Berrangé
On Wed, Feb 23, 2022 at 10:41:11AM -0500, John Snow wrote: > On Wed, Feb 23, 2022 at 10:27 AM Daniel P. Berrangé > wrote: > > > > On Wed, Feb 23, 2022 at 10:22:11AM -0500, John Snow wrote: > > > On Mon, Feb 21, 2022 at 10:55 AM Damien Hedde > > > wrote: > > > > > > > > This option makes

Re: [PATCH 4/5] python: qmp_shell: add -e/--exit-on-error option

2022-02-23 Thread John Snow
On Wed, Feb 23, 2022 at 10:27 AM Daniel P. Berrangé wrote: > > On Wed, Feb 23, 2022 at 10:22:11AM -0500, John Snow wrote: > > On Mon, Feb 21, 2022 at 10:55 AM Damien Hedde > > wrote: > > > > > > This option makes qmp_shell exit (with error code 1) > > > as soon as one of the following error

Re: [PATCH 4/5] python: qmp_shell: add -e/--exit-on-error option

2022-02-23 Thread Daniel P . Berrangé
On Wed, Feb 23, 2022 at 10:22:11AM -0500, John Snow wrote: > On Mon, Feb 21, 2022 at 10:55 AM Damien Hedde > wrote: > > > > This option makes qmp_shell exit (with error code 1) > > as soon as one of the following error occurs: > > + command parsing error > > + disconnection > > + command failure

Re: [PATCH 4/5] python: qmp_shell: add -e/--exit-on-error option

2022-02-23 Thread John Snow
On Mon, Feb 21, 2022 at 10:55 AM Damien Hedde wrote: > > This option makes qmp_shell exit (with error code 1) > as soon as one of the following error occurs: > + command parsing error > + disconnection > + command failure (response is an error) > > _execute_cmd() method now returns None or the

Re: [PATCH 0/5] qmp-shell modifications for non-interactive use

2022-02-23 Thread Daniel P . Berrangé
On Wed, Feb 23, 2022 at 10:01:05AM -0500, John Snow wrote: > On Wed, Feb 23, 2022 at 6:13 AM Daniel P. Berrangé > wrote: > > > > On Wed, Feb 23, 2022 at 10:57:29AM +0100, Damien Hedde wrote: > > > > > > > > > On 2/22/22 11:31, Daniel P. Berrangé wrote: > > > > On Tue, Feb 22, 2022 at 10:38:09AM

Re: [PATCH 0/5] qmp-shell modifications for non-interactive use

2022-02-23 Thread John Snow
On Wed, Feb 23, 2022 at 6:13 AM Daniel P. Berrangé wrote: > > On Wed, Feb 23, 2022 at 10:57:29AM +0100, Damien Hedde wrote: > > > > > > On 2/22/22 11:31, Daniel P. Berrangé wrote: > > > On Tue, Feb 22, 2022 at 10:38:09AM +0100, Damien Hedde wrote: > > > > > > > > > > > > Here I just wanted to

[PATCH 7/7] hw/smbios: add assertion to ensure handles of tables 19 and 32 do not collide

2022-02-23 Thread Ani Sinha
Since change dcf359832eec02 ("hw/smbios: fix table memory corruption with large memory vms") we reserve additional space between handle numbers of tables 17 and 19 for large VMs. This may cause table 19 to collide with table 32 in their handle numbers for those large VMs. This change adds an

[PATCH 4/7] hw/acpi/erst: clean up unused IS_UEFI_CPER_RECORD macro

2022-02-23 Thread Ani Sinha
This change is cosmetic. IS_UEFI_CPER_RECORD macro definition that was added as a part of the ERST implementation seems to be unused. Remove it. CC: Eric DeVolder Reviewed-by: Eric DeVolder Signed-off-by: Ani Sinha --- hw/acpi/erst.c | 5 - 1 file changed, 5 deletions(-) diff --git

[PATCH 6/7] hw/smbios: fix overlapping table handle numbers with large memory vms

2022-02-23 Thread Ani Sinha
The current smbios table implementation splits the main memory in 16 GiB (DIMM like) chunks. With the current smbios table assignment code, we can have only 512 such chunks before the 16 bit handle numbers in the header for tables 17 and 19 conflict. A guest with more than 8 TiB of memory will hit

[PATCH 3/7] docs/acpi/erst: add device id for ACPI ERST device in pci-ids.txt

2022-02-23 Thread Ani Sinha
Adding device ID for ERST device in pci-ids.txt. It was missed when ERST related patches were reviewed. CC: Eric DeVolder Reviewed-by: Eric DeVolder Signed-off-by: Ani Sinha --- docs/specs/pci-ids.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/specs/pci-ids.txt

[PATCH 0/7] Queued patches for the next pull request

2022-02-23 Thread Ani Sinha
Hi Michael : Here are the queued patches I have for your next PR. thanks ani Ani Sinha (6): MAINTAINERS: no need to add my name explicitly as a reviewer for VIOT tables docs/acpi/erst: add device id for ACPI ERST device in pci-ids.txt hw/acpi/erst: clean up unused IS_UEFI_CPER_RECORD

[PATCH 2/7] MAINTAINERS: no need to add my name explicitly as a reviewer for VIOT tables

2022-02-23 Thread Ani Sinha
I am already listed as a reviewer for ACPI/SMBIOS subsystem. There is no need to again add me as a reviewer for ACPI/VIOT. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Ani Sinha --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH 1/7] ACPI ERST: specification for ERST support

2022-02-23 Thread Ani Sinha
From: Eric DeVolder Information on the implementation of the ACPI ERST support. Signed-off-by: Eric DeVolder Acked-by: Ani Sinha --- docs/specs/acpi_erst.rst | 200 +++ docs/specs/index.rst | 1 + 2 files changed, 201 insertions(+) create mode

[PATCH 5/7] hw/smbios: code cleanup - use macro definitions for table header handles

2022-02-23 Thread Ani Sinha
This is a minor cleanup. Using macro definitions makes the code more readable. It is at once clear which tables use which handle numbers in their header. It also makes it easy to calculate the gaps between the numbers and update them if needed. Reviewed-by: Igor Mammedov Signed-off-by: Ani Sinha

Re: Analysis of slow distro boots in check-avocado (BootLinuxAarch64.test_virt_tcg*)

2022-02-23 Thread Philippe Mathieu-Daudé
On 23/2/22 14:43, Daniel P. Berrangé wrote: On Wed, Feb 23, 2022 at 02:34:23PM +0100, Philippe Mathieu-Daudé wrote: On 23/2/22 12:07, Daniel P. Berrangé wrote: On Tue, Feb 22, 2022 at 06:33:41PM +0100, Philippe Mathieu-Daudé wrote: +Igor/MST for UEFI tests. On 22/2/22 17:38, Daniel P.

Re: [PATCH RFC 4/4] rtc: Have event RTC_CHANGE identify the RTC by QOM path

2022-02-23 Thread Markus Armbruster
Markus Armbruster writes: > Event RTC_CHANGE is "emitted when the guest changes the RTC time" (and > the RTC supports the event). What if there's more than one RTC? > Which one changed? New @qom-path identifies it. > > Signed-off-by: Markus Armbruster > --- > RFC because it's compile-tested

Re: [PATCH v8 3/3] qapi/monitor: allow VNC display id in set/expire_password

2022-02-23 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Fabian Ebner writes: > > > Am 09.02.22 um 15:07 schrieb Markus Armbruster: > >> Fabian Ebner writes: > >> > >>> From: Stefan Reiter > >>> > >>> It is possible to specify more than one VNC server on the command line, > >>> either with an

Re: Analysis of slow distro boots in check-avocado (BootLinuxAarch64.test_virt_tcg*)

2022-02-23 Thread Daniel P . Berrangé
On Wed, Feb 23, 2022 at 02:34:23PM +0100, Philippe Mathieu-Daudé wrote: > On 23/2/22 12:07, Daniel P. Berrangé wrote: > > On Tue, Feb 22, 2022 at 06:33:41PM +0100, Philippe Mathieu-Daudé wrote: > > > +Igor/MST for UEFI tests. > > > > > > On 22/2/22 17:38, Daniel P. Berrangé wrote: > > > > On Tue,

Re: [PATCH v6 1/4] s390x/tcg: Implement Miscellaneous-Instruction-Extensions Facility 3 for the s390x

2022-02-23 Thread Christian Borntraeger
Am 18.02.22 um 00:17 schrieb David Miller: resolves: https://gitlab.com/qemu-project/qemu/-/issues/737 implements: AND WITH COMPLEMENT (NCRK, NCGRK) NAND (NNRK, NNGRK) NOT EXCLUSIVE OR (NXRK, NXGRK) NOR (NORK, NOGRK) OR WITH COMPLEMENT(OCRK, OCGRK)

Re: Analysis of slow distro boots in check-avocado (BootLinuxAarch64.test_virt_tcg*)

2022-02-23 Thread Philippe Mathieu-Daudé
On 23/2/22 12:07, Daniel P. Berrangé wrote: On Tue, Feb 22, 2022 at 06:33:41PM +0100, Philippe Mathieu-Daudé wrote: +Igor/MST for UEFI tests. On 22/2/22 17:38, Daniel P. Berrangé wrote: On Tue, Feb 22, 2022 at 04:17:23PM +, Alex Bennée wrote: Alex Bennée writes: Hi, TL;DR: -

Re: [PATCH v7 2/2] drivers/virt: vmgenid: add vm generation id driver

2022-02-23 Thread Jason A. Donenfeld
On Tue, Feb 22, 2022 at 11:17 PM Jason A. Donenfeld wrote: > Well I cleaned up this v7 and refactored it into something along the > lines of what I'm thinking. I don't yet know enough about this general > problem space to propose the patch and I haven't tested it either A little further along,

[PATCH RFC v1 2/2] drivers/virt: add vmgenid driver for reinitializing RNG

2022-02-23 Thread Jason A. Donenfeld
VM Generation ID is a feature from Microsoft, described at , and supported by Hyper-V and QEMU. Its usage is described in Microsoft's RNG whitepaper, , as: If the OS is running in a VM, there is a problem that most

Re: [PATCH 19/20] migration: Postcopy recover with preempt enabled

2022-02-23 Thread Peter Xu
On Wed, Feb 23, 2022 at 09:52:08AM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Feb 22, 2022 at 11:32:10AM +, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > To allow postcopy recovery, the ram fast load

[PATCH RFC v1 1/2] random: add mechanism for VM forks to reinitialize crng

2022-02-23 Thread Jason A. Donenfeld
When a VM forks, we must immediately mix in additional information to the stream of random output so that two forks or a rollback don't produce the same stream of random numbers, which could have catastrophic cryptographic consequences. This commit adds a simple API, add_vmfork_ randomness(), for

[PATCH RFC v1 0/2] VM fork detection for RNG

2022-02-23 Thread Jason A. Donenfeld
This small series picks up work from Amazon that seems to have stalled out later year around this time: listening for the vmgenid ACPI notification, and using it to "do something." Last year, that something involved a complicated userspace mmap chardev, which seems frought with difficulty. This

Re: [PATCH 18/20] migration: Postcopy preemption enablement

2022-02-23 Thread Peter Xu
On Wed, Feb 23, 2022 at 09:56:08AM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Feb 22, 2022 at 10:52:23AM +, Dr. David Alan Gilbert wrote: > > > This does get a bit complicated, which worries me a bit; the code here > > > is already quite

Re: [PULL 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-23 Thread Dr. David Alan Gilbert
* Eric Auger (eric.au...@redhat.com) wrote: > Hi Igor, > > On 2/4/22 1:08 PM, Igor Mammedov wrote: > > On Thu, 03 Feb 2022 15:35:35 -0700 > > Alex Williamson wrote: > > > >> From: Eric Auger > >> > >> Representing the CRB cmd/response buffer as a standard > >> RAM region causes some trouble

Re: [PATCH 13/20] migration: Move channel setup out of postcopy_try_recover()

2022-02-23 Thread Peter Xu
On Wed, Feb 23, 2022 at 09:47:03AM +, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Tue, Feb 22, 2022 at 10:57:34AM +, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > We used to use postcopy_try_recover() to replace > > > >

[PATCH] tests/qemu-iotests/testrunner: Quote "case not run" lines in TAP mode

2022-02-23 Thread Thomas Huth
In TAP mode, the stdout is reserved for the TAP protocol, so we have to make sure to mark other lines with a comment '#' character at the beginning to avoid that the TAP parser at the other end gets confused. To test this condition, run "configure" for example with:

[PATCH] tests/qemu-iotests/040: Skip TestCommitWithFilters without 'throttle'

2022-02-23 Thread Thomas Huth
iotest 040 already has some checks for the availability of the 'throttle' driver, but some new code has been added in the course of time that depends on 'throttle' but does not check for its availability. Add a check to the TestCommitWithFilters class so that this iotest now also passes again if

Re: [PATCH v4 12/12] KVM: Expose KVM_MEM_PRIVATE

2022-02-23 Thread Chao Peng
On Tue, Feb 22, 2022 at 02:16:46AM +0100, Maciej S. Szmigiero wrote: > On 17.02.2022 14:45, Chao Peng wrote: > > On Tue, Jan 25, 2022 at 09:20:39PM +0100, Maciej S. Szmigiero wrote: > > > On 18.01.2022 14:21, Chao Peng wrote: > > > > KVM_MEM_PRIVATE is not exposed by default but architecture code

Re: [PATCH v4 01/12] mm/shmem: Introduce F_SEAL_INACCESSIBLE

2022-02-23 Thread Steven Price
On 23/02/2022 11:49, Chao Peng wrote: > On Thu, Feb 17, 2022 at 11:09:35AM -0800, Andy Lutomirski wrote: >> On Thu, Feb 17, 2022, at 5:06 AM, Chao Peng wrote: >>> On Fri, Feb 11, 2022 at 03:33:35PM -0800, Andy Lutomirski wrote: On 1/18/22 05:21, Chao Peng wrote: > From: "Kirill A.

Re: [PATCH] hw/i386/pc: when adding reserved E820 entries do not allocate dynamic entries

2022-02-23 Thread Ani Sinha
On Wed, Feb 23, 2022 at 2:34 PM Igor Mammedov wrote: > > On Thu, 10 Feb 2022 18:58:21 +0530 > Ani Sinha wrote: > > > When adding E820_RESERVED entries we also accidentally allocate dynamic > > entries. This is incorrect. We should simply return early with the count of > > the number of reserved

[PATCH] KVM: SVM: always set MSR_AMD64_TSC_RATIO to default value

2022-02-23 Thread Maxim Levitsky
Even when the feature is not supported in guest CPUID, still set the msr to the default value which will be the only value KVM will accept in this case Signed-off-by: Maxim Levitsky --- target/i386/cpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/i386/cpu.c

Re: [PATCH] qdev: move legacy cli device creation after JSON syntax ones

2022-02-23 Thread Peter Krempa
On Wed, Feb 23, 2022 at 17:46:49 +0800, Zhenzhong Duan wrote: > While libvirt does not support all the qemu parameters in standand > xml syntax, such as hostfwd. We have to use to > passthrough the parameters. E.x: > > > > > >

Re: [PATCH v6 4/4] tests/tcg/s390x: changed to using .insn for tests requiring z15

2022-02-23 Thread David Hildenbrand
On 23.02.22 12:49, Thomas Huth wrote: > On 23/02/2022 11.54, David Hildenbrand wrote: >> On 23.02.22 11:44, Thomas Huth wrote: >>> On 18/02/2022 00.17, David Miller wrote: Signed-off-by: David Miller --- tests/tcg/s390x/mie3-compl.c | 21 +++--

Re: [PATCH v6 4/4] tests/tcg/s390x: changed to using .insn for tests requiring z15

2022-02-23 Thread Thomas Huth
On 23/02/2022 12.51, David Hildenbrand wrote: On 23.02.22 12:49, Thomas Huth wrote: On 23/02/2022 11.54, David Hildenbrand wrote: On 23.02.22 11:44, Thomas Huth wrote: On 18/02/2022 00.17, David Miller wrote: Signed-off-by: David Miller --- tests/tcg/s390x/mie3-compl.c | 21

Re: Analysis of slow distro boots in check-avocado (BootLinuxAarch64.test_virt_tcg*)

2022-02-23 Thread Gerd Hoffmann
Hi, > > Also, "make install" installs these EDK2 images, which doesn't > > seem like the right thing for "this is only for one test case". > > Well I'd prefer we never had them installed. Today I don't remember > why it ended that way. Probably to behave simliar to other firmware, which makes

Re: [PATCH v4 01/12] mm/shmem: Introduce F_SEAL_INACCESSIBLE

2022-02-23 Thread Chao Peng
On Thu, Feb 17, 2022 at 11:09:35AM -0800, Andy Lutomirski wrote: > On Thu, Feb 17, 2022, at 5:06 AM, Chao Peng wrote: > > On Fri, Feb 11, 2022 at 03:33:35PM -0800, Andy Lutomirski wrote: > >> On 1/18/22 05:21, Chao Peng wrote: > >> > From: "Kirill A. Shutemov" > >> > > >> > Introduce a new seal

Re: [PATCH v6 4/4] tests/tcg/s390x: changed to using .insn for tests requiring z15

2022-02-23 Thread Thomas Huth
On 23/02/2022 11.54, David Hildenbrand wrote: On 23.02.22 11:44, Thomas Huth wrote: On 18/02/2022 00.17, David Miller wrote: Signed-off-by: David Miller --- tests/tcg/s390x/mie3-compl.c | 21 +++-- tests/tcg/s390x/mie3-mvcrl.c | 2 +- tests/tcg/s390x/mie3-sel.c | 6

Re: [PATCH v2 5/8] x86: Add AMX CPUIDs enumeration

2022-02-23 Thread David Edmondson
On Wednesday, 2022-02-16 at 22:04:31 -08, Yang Zhong wrote: > From: Jing Liu > > Add AMX primary feature bits XFD and AMX_TILE to > enumerate the CPU's AMX capability. Meanwhile, add > AMX TILE and TMUL CPUID leaf and subleaves which > exist when AMX TILE is present to provide the maximum >

Re: [PATCH] Added parameter to take screenshot with screendump as PNG

2022-02-23 Thread Daniel P . Berrangé
On Tue, Feb 22, 2022 at 03:27:58PM +, Kshitij Suri wrote: > Currently screendump only supports PPM format, which is un-compressed and not > standard. Added an "format" parameter to qemu monitor screendump capabilites > to support PNG image capture using libpng. The param was added in QAPI

Re: [PATCH 0/5] qmp-shell modifications for non-interactive use

2022-02-23 Thread Daniel P . Berrangé
On Wed, Feb 23, 2022 at 10:57:29AM +0100, Damien Hedde wrote: > > > On 2/22/22 11:31, Daniel P. Berrangé wrote: > > On Tue, Feb 22, 2022 at 10:38:09AM +0100, Damien Hedde wrote: > > > > > > > > > Here I just wanted to propose a simple way to just send a > > > bunch of commands from a source

Re: Analysis of slow distro boots in check-avocado (BootLinuxAarch64.test_virt_tcg*)

2022-02-23 Thread Daniel P . Berrangé
On Wed, Feb 23, 2022 at 11:53:28AM +0100, Philippe Mathieu-Daudé wrote: > On 23/2/22 10:19, Peter Maydell wrote: > > On Tue, 22 Feb 2022 at 17:33, Philippe Mathieu-Daudé > > wrote: > > > We need the DEBUG profile to ensure the bios-tables-tests work. > > > > > > If you want to boot a guest using

Re: Analysis of slow distro boots in check-avocado (BootLinuxAarch64.test_virt_tcg*)

2022-02-23 Thread Daniel P . Berrangé
On Tue, Feb 22, 2022 at 06:33:41PM +0100, Philippe Mathieu-Daudé wrote: > +Igor/MST for UEFI tests. > > On 22/2/22 17:38, Daniel P. Berrangé wrote: > > On Tue, Feb 22, 2022 at 04:17:23PM +, Alex Bennée wrote: > > > > > > Alex Bennée writes: > > > > > > > Hi, > > > > > > > > TL;DR: > > > >

Re: [PATCH] Added parameter to take screenshot with screendump as PNG

2022-02-23 Thread Dr. David Alan Gilbert
* Kshitij Suri (kshitij.s...@nutanix.com) wrote: > Currently screendump only supports PPM format, which is un-compressed and not > standard. Added an "format" parameter to qemu monitor screendump capabilites > to support PNG image capture using libpng. The param was added in QAPI schema > of

Re: Analysis of slow distro boots in check-avocado (BootLinuxAarch64.test_virt_tcg*)

2022-02-23 Thread Philippe Mathieu-Daudé
On 23/2/22 11:10, Alex Bennée wrote: Gerd Hoffmann writes: Hi, If you want to boot a guest using EDK2, you should use the images build by your distribution (/usr/share/qemu/edk2-aarch64-code.fd), not these images. Then we should add edk2-aarch64 and edk2-ovmf to lcitool, to have the

Re: [PATCH v6 4/4] tests/tcg/s390x: changed to using .insn for tests requiring z15

2022-02-23 Thread David Hildenbrand
On 23.02.22 11:44, Thomas Huth wrote: > On 18/02/2022 00.17, David Miller wrote: >> Signed-off-by: David Miller >> --- >> tests/tcg/s390x/mie3-compl.c | 21 +++-- >> tests/tcg/s390x/mie3-mvcrl.c | 2 +- >> tests/tcg/s390x/mie3-sel.c | 6 +++--- >> 3 files changed, 15

Re: Analysis of slow distro boots in check-avocado (BootLinuxAarch64.test_virt_tcg*)

2022-02-23 Thread Philippe Mathieu-Daudé
On 23/2/22 10:19, Peter Maydell wrote: On Tue, 22 Feb 2022 at 17:33, Philippe Mathieu-Daudé wrote: We need the DEBUG profile to ensure the bios-tables-tests work. If you want to boot a guest using EDK2, you should use the images build by your distribution

Re: [PATCH] accel/tcg/cpu-exec: fix precise single-stepping after interrupt

2022-02-23 Thread Luc Michel
On 14:26 Mon 14 Feb , Luc Michel wrote: > In some cases, cpu->exit_request can be false after handling the > interrupt, leading to another TB being executed instead of returning > to the main loop. > > Fix this by returning true unconditionally when in single-step mode. > > Fixes:

Re: [PATCH] thread-posix: optimize qemu_sem_timedwait with zero timeout

2022-02-23 Thread Philippe Mathieu-Daudé
On 23/2/22 09:36, Paolo Bonzini wrote: In this case there is no need to call pthread_cond_timedwait; the function is just a trywait and waiting on the condition variable would always time out. Based-on: <20220222090507.2028-1-longpe...@huawei.com> ^ Please remove when applying. Reviewed-by:

Re: [PATCH v6 4/4] tests/tcg/s390x: changed to using .insn for tests requiring z15

2022-02-23 Thread Thomas Huth
On 18/02/2022 00.17, David Miller wrote: Signed-off-by: David Miller --- tests/tcg/s390x/mie3-compl.c | 21 +++-- tests/tcg/s390x/mie3-mvcrl.c | 2 +- tests/tcg/s390x/mie3-sel.c | 6 +++--- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git

RE: [PATCH] thread-posix: optimize qemu_sem_timedwait with zero timeout

2022-02-23 Thread longpeng2--- via
> -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Wednesday, February 23, 2022 4:36 PM > To: qemu-devel@nongnu.org > Cc: Longpeng (Mike, Cloud Infrastructure Service Product Dept.) > > Subject: [PATCH] thread-posix:

Re: [PATCH v4 13/14] hw/mem/system-memory: add a memory sysbus device

2022-02-23 Thread Damien Hedde
On 2/23/22 10:44, Igor Mammedov wrote: On Wed, 23 Feb 2022 10:07:05 +0100 Damien Hedde wrote: This device can be used to create a memory wrapped into a sysbus device. This device has one property 'readonly' which allows to choose between a ram or a rom. The purpose for this device is

Re: [PATCH 0/5] qmp-shell modifications for non-interactive use

2022-02-23 Thread Damien Hedde
On 2/22/22 11:31, Daniel P. Berrangé wrote: On Tue, Feb 22, 2022 at 10:38:09AM +0100, Damien Hedde wrote: Here I just wanted to propose a simple way to just send a bunch of commands from a source file and stop if something unexpected happens. Only goal is to be able to share a file on the

[PATCH] qdev: move legacy cli device creation after JSON syntax ones

2022-02-23 Thread Zhenzhong Duan
While libvirt does not support all the qemu parameters in standand xml syntax, such as hostfwd. We have to use to passthrough the parameters. E.x: Then we got below error: qemu-system-x86_64: -device

Re: [PATCH 18/20] migration: Postcopy preemption enablement

2022-02-23 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Tue, Feb 22, 2022 at 10:52:23AM +, Dr. David Alan Gilbert wrote: > > This does get a bit complicated, which worries me a bit; the code here > > is already quite complicated. > > Right, it's the way I chose in this patchset on solving this problem.

Re: [PATCH 2/2] vmxcap: Add 5-level EPT bit

2022-02-23 Thread Paolo Bonzini
On 2/21/22 15:53, Vitaly Kuznetsov wrote: 5-level EPT is present in Icelake Server CPUs and is supported by QEMU ('vmx-page-walk-5'). Signed-off-by: Vitaly Kuznetsov --- scripts/kvm/vmxcap | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/kvm/vmxcap b/scripts/kvm/vmxcap index

Re: [PATCH 19/20] migration: Postcopy recover with preempt enabled

2022-02-23 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Tue, Feb 22, 2022 at 11:32:10AM +, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > To allow postcopy recovery, the ram fast load (preempt-only) dest QEMU > > > thread > > > needs similar handling on fault tolerance.

Re: [PATCH] virtiofsd: Let meson check for statx.stx_mnt_id

2022-02-23 Thread Dr. David Alan Gilbert
* Hanna Reitz (hre...@redhat.com) wrote: > In virtiofsd, we assume that the presence of the STATX_MNT_ID macro > implies existence of the statx.stx_mnt_id field. Unfortunately, that is > not necessarily the case: glibc has introduced the macro in its commit >

Re: [PATCH v4 1/4] tls: add macros for coroutine-safe TLS variables

2022-02-23 Thread Paolo Bonzini
On 2/21/22 15:29, Stefan Hajnoczi wrote: +#define QEMU_DEFINE_CO_TLS(type, var)\ +static __thread type co_tls_##var; \ +type get_##var(void) { asm volatile(""); return co_tls_##var; } \ +void

Re: [PATCH v4 4/4] cpus: use coroutine TLS macros for iothread_locked

2022-02-23 Thread Paolo Bonzini
On 2/21/22 15:29, Stefan Hajnoczi wrote: -static __thread bool iothread_locked = false; +QEMU_DEFINE_STATIC_CO_TLS(bool, iothread_locked) bool qemu_mutex_iothread_locked(void) { -return iothread_locked; +return get_iothread_locked(); } Can we rename either the variable or

Re: [PATCH 13/20] migration: Move channel setup out of postcopy_try_recover()

2022-02-23 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Tue, Feb 22, 2022 at 10:57:34AM +, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > We used to use postcopy_try_recover() to replace > > > migration_incoming_setup() to > > > setup incoming channels. That's fine for the

[PATCH] tests/qemu-iotests/testrunner: Supply a test plan in TAP mode

2022-02-23 Thread Thomas Huth
Quoting the TAP specification: "The plan tells how many tests will be run [...]. It’s a check that the test file hasn’t stopped prematurely." That's a good idea of course, so let's support that in the iotest testrunner, too. Signed-off-by: Thomas Huth --- tests/qemu-iotests/testrunner.py | 1 +

Re: [PATCH v4 13/14] hw/mem/system-memory: add a memory sysbus device

2022-02-23 Thread Igor Mammedov
On Wed, 23 Feb 2022 10:07:05 +0100 Damien Hedde wrote: > This device can be used to create a memory wrapped into a > sysbus device. > This device has one property 'readonly' which allows > to choose between a ram or a rom. > > The purpose for this device is to be used with qapi command >

Re: [Virtio-fs] [PATCH] virtiofsd: Let meson check for statx.stx_mnt_id

2022-02-23 Thread Greg Kurz
On Wed, 23 Feb 2022 10:23:40 +0100 Hanna Reitz wrote: > In virtiofsd, we assume that the presence of the STATX_MNT_ID macro > implies existence of the statx.stx_mnt_id field. Unfortunately, that is > not necessarily the case: glibc has introduced the macro in its commit >

Re: [PATCH v2 0/3] qemu-sem-posix: use monotonic clock instead

2022-02-23 Thread Paolo Bonzini
On 2/22/22 10:05, Longpeng(Mike) via wrote: The qemu_sem_timedwait() uses system time as default, it would be affected by changes to the system time. In the real scenario, the time that goes faster or slower is a common case and the NTP service could help us to sync time periodically. This

[PATCH] pci: show id info when pci BDF conflict

2022-02-23 Thread Zhenzhong Duan
During qemu init stage, when there is pci BDF conflicts, qemu print a warning but not showing which device the BDF is occupied by. E.x: "PCI: slot 2 function 0 not available for virtio-scsi-pci, in use by virtio-scsi-pci" To facilitate user knowing the offending device and fixing it, showing

Re: [RFC 1/2] sem-posix: remove the posix semaphore support

2022-02-23 Thread Paolo Bonzini
On 2/21/22 12:11, Daniel P. Berrangé wrote: As a point of history, the original code only used sem_t. The pthreads based fallback was introduced by Paolo in commit c166cb72f1676855816340666c3b618beef4b976 Author: Paolo Bonzini Date: Fri Nov 2 15:43:21 2012 +0100 semaphore:

[PATCH v3 0/4] Improve integration of iotests in the meson test harness

2022-02-23 Thread Thomas Huth
Though "make check-block" is currently already run via the meson test runner, it still looks like an oddball in the output of "make check". It would be nicer if the iotests would show up like the other tests suites. My original plan was to add each iotests individually from meson.build, but I did

[PATCH v3 3/4] tests/qemu-iotests: Move the bash and sanitizer checks to meson.build

2022-02-23 Thread Thomas Huth
We want to get rid of check-block.sh in the long run, so let's move the checks for the bash version and sanitizers from check-block.sh into the meson.build file instead. Signed-off-by: Thomas Huth --- tests/check-block.sh | 26 -- tests/qemu-iotests/meson.build

[PATCH v3 4/4] tests: Do not treat the iotests as separate meson test target anymore

2022-02-23 Thread Thomas Huth
If there is a failing iotest, the output is currently not logged to the console anymore. To get this working again, we need to run the meson test runner with --print-errorlogs (and without --verbose). We could update the "meson test" call in tests/Makefile.include, but actually it's nicer and

[PATCH v3 2/4] tests/qemu-iotests/meson.build: Improve the indentation

2022-02-23 Thread Thomas Huth
By using subdir_done(), we can get rid of one level of indentation in this file. This will make it easier to add more conditions to skip the iotests in future patches. Reviewed-by: Hanna Reitz Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- tests/qemu-iotests/meson.build |

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-23 Thread Igor Mammedov
On Wed, 23 Feb 2022 09:16:51 + "Dr. David Alan Gilbert" wrote: > * Igor Mammedov (imamm...@redhat.com) wrote: > > On Tue, 22 Feb 2022 10:42:55 +0100 > > Gerd Hoffmann wrote: > > > > > Hi, > > > > > > > > And the upstream code is now pretty much identical except for the > > > > >

Re: [PATCH 3/3] whpx: Added support for breakpoints and stepping

2022-02-23 Thread Paolo Bonzini
On 2/23/22 06:25, Ivan Shcherbakov wrote: This adds support for breakpoints and stepping when debugging WHPX-accelerated guests with gdb. It enables reliable debugging of the Linux kernel in both single-CPU and SMP modes. Signed-off-by: Ivan Shcherbakov Hi, in general this patch is really

Re: [PULL 0/7] Trivial branch for 7.0 patches

2022-02-23 Thread Peter Maydell
On Tue, 22 Feb 2022 at 16:35, Laurent Vivier wrote: > > The following changes since commit e670f6d825d4dee248b311197fd4048469d6772b: > > Merge remote-tracking branch 'remotes/legoater/tags/pull-ppc-20220218' into > staging (2022-02-20 15:05:41 +) > > are available in the Git repository at:

[PATCH] virtiofsd: Let meson check for statx.stx_mnt_id

2022-02-23 Thread Hanna Reitz
In virtiofsd, we assume that the presence of the STATX_MNT_ID macro implies existence of the statx.stx_mnt_id field. Unfortunately, that is not necessarily the case: glibc has introduced the macro in its commit 88a2cf6c4bab6e94a65e9c0db8813709372e9180, but the statx.stx_mnt_id field is still

Re: [PATCH v4 4/4] cpus: use coroutine TLS macros for iothread_locked

2022-02-23 Thread Peter Maydell
On Wed, 23 Feb 2022 at 09:45, Paolo Bonzini wrote: > > On 2/21/22 15:29, Stefan Hajnoczi wrote: > > -static __thread bool iothread_locked = false; > > +QEMU_DEFINE_STATIC_CO_TLS(bool, iothread_locked) > > > > bool qemu_mutex_iothread_locked(void) > > { > > -return iothread_locked; > > +

Re: Analysis of slow distro boots in check-avocado (BootLinuxAarch64.test_virt_tcg*)

2022-02-23 Thread Peter Maydell
On Tue, 22 Feb 2022 at 17:33, Philippe Mathieu-Daudé wrote: > We need the DEBUG profile to ensure the bios-tables-tests work. > > If you want to boot a guest using EDK2, you should use the images > build by your distribution (/usr/share/qemu/edk2-aarch64-code.fd), > not these images. Do we have

Re: [PATCH 4/8] meson: drop the .fa library suffix

2022-02-23 Thread Marc-André Lureau
Hi On Wed, Feb 23, 2022 at 1:08 PM Paolo Bonzini wrote: > > On 2/22/22 20:40, marcandre.lur...@redhat.com wrote: > > > > The .fa suffix was a temporary hack introduced in commit > > 1f0a1d8a51 ("build-sys hack: link with whole .fa archives") when the > > build system was mixed between meson &

[PATCH v4 07/14] none-machine: add the NoneMachineState structure

2022-02-23 Thread Damien Hedde
The none machine was using the parent state structure. We'll need a custom state to add a field in the following commit. Signed-off-by: Damien Hedde --- hw/core/null-machine.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/hw/core/null-machine.c

Re: [PATCH 4/8] meson: drop the .fa library suffix

2022-02-23 Thread Paolo Bonzini
On 2/22/22 20:40, marcandre.lur...@redhat.com wrote: The .fa suffix was a temporary hack introduced in commit 1f0a1d8a51 ("build-sys hack: link with whole .fa archives") when the build system was mixed between meson & makefiles. It is no longer needed. It is still needed to separate internal

Re: [PATCH resend 0/2] kvm/msi: do explicit commit when adding msi routes

2022-02-23 Thread Paolo Bonzini
On 2/22/22 15:11, Longpeng(Mike) via wrote: From: Longpeng This patchset moves the call to kvm_irqchip_commit_routes() out of kvm_irqchip_add_msi_route(). An optimization of vfio migration [1] depends on this changes. [1] https://lists.gnu.org/archive/html/qemu-devel/2021-11/msg00968.html

[PATCH v3 1/4] tests/qemu-iotests: Rework the checks and spots using GNU sed

2022-02-23 Thread Thomas Huth
Instead of failing the iotests if GNU sed is not available (or skipping them completely in the check-block.sh script), it would be better to simply skip the bash-based tests that rely on GNU sed, so that the other tests could still be run. Thus we now explicitely use "gsed" (either as direct

[PATCH v4 01/14] machine: add phase_get() and document phase_check()/advance()

2022-02-23 Thread Damien Hedde
phase_get() returns the current phase, we'll use it in next commit. Signed-off-by: Damien Hedde --- include/hw/qdev-core.h | 19 +++ hw/core/qdev.c | 5 + 2 files changed, 24 insertions(+) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-23 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > On Tue, 22 Feb 2022 10:42:55 +0100 > Gerd Hoffmann wrote: > > > Hi, > > > > > > And the upstream code is now pretty much identical except for the > > > > default; note that for TCG you do need to keep to 40 I think. > > > > > > will TCG work

[PATCH v4 11/14] softmmu/memory: add memory_region_try_add_subregion function

2022-02-23 Thread Damien Hedde
It allows adding a subregion to a memory region with error handling. Like memory_region_add_subregion_overlap(), it handles priority as well. Apart from the error handling, the behavior is the same. It can be used to do the simple memory_region_add_subregion() (with no overlap) by setting the

[PATCH v4 03/14] vl: support machine-initialized target in phase_until()

2022-02-23 Thread Damien Hedde
phase_until() now supports the following transitions: + accel-created -> machine-initialized + machine-initialized -> machine-ready As a consequence we can now support the use of qmp_exit_preconfig() from phases _accel-created_ and _machine-initialized_. This commit is a preparation to support

Re: [PATCH v4 11/14] softmmu/memory: add memory_region_try_add_subregion function

2022-02-23 Thread Damien Hedde
Hi Philippe, I suppose it is ok if I change your mail in the reviewed by ? Thanks, Damien On 2/23/22 10:07, Damien Hedde wrote: It allows adding a subregion to a memory region with error handling. Like memory_region_add_subregion_overlap(), it handles priority as well. Apart from the error

[PATCH v4 12/14] add sysbus-mmio-map qapi command

2022-02-23 Thread Damien Hedde
This command allows to map an mmio region of sysbus device onto the system memory. Its behavior mimics the sysbus_mmio_map() function apart from the automatic unmap (the C function unmaps the region if it is already mapped). For the qapi function we consider it is an error to try to map an already

[PATCH v4 04/14] qapi/device_add: compute is_hotplug flag

2022-02-23 Thread Damien Hedde
Instead of checking the phase everytime, just store the result in a flag. We will use more of it in the following commit. Signed-off-by: Damien Hedde --- softmmu/qdev-monitor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/softmmu/qdev-monitor.c

[PATCH v4 06/14] qapi/device_add: Allow execution in machine initialized phase

2022-02-23 Thread Damien Hedde
From: Mirela Grujic This commit allows to use the QMP command to add a cold-plugged device like we can do with the CLI option -device. Note: for device_add command in qdev.json adding the 'allow-preconfig' option has no effect because the command appears to bypass QAPI (see TODO at

[PATCH v4 14/14] hw: set user_creatable on opentitan/sifive_e devices

2022-02-23 Thread Damien Hedde
The devices are: + ibex-timer + ibex-uart + riscv.aclint.swi + riscv.aclint.mtimer + riscv.hart_array + riscv.sifive.e.prci + riscv.sifive.plic + riscv.sifive.uart + sifive_soc.gpio + unimplemented-device These devices are clean regarding error handling in realize. They are all sysbus devices,

[PATCH v4 10/14] none-machine: allow several cpus

2022-02-23 Thread Damien Hedde
In order to dynamically create (cold-plugging) cpus, we need to increase _maxcpus_. This value is indeed used to initialize the accelerator during qemu startup. Allowing 16 seems a good starting point. Add a check to prevent a user to request more than 1 cpu if he specifies the cpu type on the

[PATCH v4 09/14] none-machine: allow cold plugging sysbus devices

2022-02-23 Thread Damien Hedde
Allow plugging any sysbus device on this machine (the sysbus devices still need to be 'user-creatable'). This commit is needed to use the 'none' machine as a base, and subsequently to dynamically populate it with sysbus devices using qapi commands. Note that this only concern cold-plug: sysbus

[PATCH v4 00/14] Initial support for machine creation via QMP

2022-02-23 Thread Damien Hedde
Hi, This series adds initial support to build a machine using QMP/QAPI commands. With this series, one can start from the 'none' machine, create cpus, sysbus devices, memory map them and wire interrupts. Sorry for the huge cc list on this cover-letter. Apart from people who attended the kvm call

[PATCH v4 05/14] qapi/device_add: handle the rom_order_override when cold-plugging

2022-02-23 Thread Damien Hedde
rom_set_order_override() and rom_reset_order_override() were called in qemu_create_cli_devices() to set the rom_order_override value once and for all when creating the devices added on CLI. Unfortunately this won't work with qapi commands. Move the calls inside device_add so that it will be done

[PATCH v4 13/14] hw/mem/system-memory: add a memory sysbus device

2022-02-23 Thread Damien Hedde
This device can be used to create a memory wrapped into a sysbus device. This device has one property 'readonly' which allows to choose between a ram or a rom. The purpose for this device is to be used with qapi command device_add. Signed-off-by: Damien Hedde --- include/hw/mem/sysbus-memory.h

[PATCH v4 02/14] machine: introduce phase_until() to handle phase transitions

2022-02-23 Thread Damien Hedde
phase_until() is implemented in vl.c and is meant to be used to make startup progress up to a specified phase being reached(). At this point, no behavior change is introduced: phase_until() only supports a single double transition corresponding to the functionality of qmp_exit_preconfig(): +

[PATCH v4 08/14] none-machine: add 'ram-addr' property

2022-02-23 Thread Damien Hedde
Add the property to configure a the base address of the ram. The default value remains zero. This commit is needed to use the 'none' machine as a base, and subsequently to dynamically populate it using qapi commands. Having a non null 'ram' is really hard to workaround because of the actual

<    1   2   3   >