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

2022-02-24 Thread Laszlo Ersek
(+Daniel, +Rich) On 02/23/22 17:08, Jason A. Donenfeld wrote: > On Wed, Feb 23, 2022 at 2:12 PM Jason A. Donenfeld wrote: >> second patch is the reason this is just an RFC: it's a cleanup of the >> ACPI driver from last year, and I don't really have much experience >> writing, testing,

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

2022-02-24 Thread Alexander Graf
Hey Jason, On 23.02.22 14:12, Jason A. Donenfeld wrote: 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

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

2022-02-24 Thread Igor Mammedov
On Wed, 23 Feb 2022 12:50:42 +0100 Gerd Hoffmann wrote: > 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

Re: [PATCH v8 1/3] monitor/hmp: add support for flag argument with value

2022-02-24 Thread Fabian Ebner
Am 09.02.22 um 15:12 schrieb Markus Armbruster: > Fabian Ebner writes: 8< >> diff --git a/monitor/monitor-internal.h b/monitor/monitor-internal.h >> index 3da3f86c6a..a4cb307c8a 100644 >> --- a/monitor/monitor-internal.h >> +++ b/monitor/monitor-internal.h >> @@ -63,7 +63,8 @@ >> *

Re: [PATCH 2/3] util/main-loop: Introduce the main loop into QOM

2022-02-24 Thread Stefan Hajnoczi
On Mon, Feb 21, 2022 at 06:08:44PM +0100, Nicolas Saenz Julienne wrote: > diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h > index 8dbc6fcb89..fea5a3e9d4 100644 > --- a/include/qemu/main-loop.h > +++ b/include/qemu/main-loop.h > @@ -26,9 +26,20 @@ > #define QEMU_MAIN_LOOP_H > >

Re: [PATCH v5 04/20] job.c: move inner aiocontext lock in callbacks

2022-02-24 Thread Emanuele Giuseppe Esposito
On 17/02/2022 14:45, Stefan Hajnoczi wrote: > On Tue, Feb 08, 2022 at 09:34:57AM -0500, Emanuele Giuseppe Esposito wrote: >> Instead of having the lock in job_tnx_apply, move it inside > > s/tnx/txn/ > >> in the callback. This will be helpful for next commits, when >> we introduce

Re: [PATCH v5 04/20] job.c: move inner aiocontext lock in callbacks

2022-02-24 Thread Emanuele Giuseppe Esposito
On 17/02/2022 14:45, Stefan Hajnoczi wrote: > On Tue, Feb 08, 2022 at 09:34:57AM -0500, Emanuele Giuseppe Esposito wrote: >> Instead of having the lock in job_tnx_apply, move it inside > > s/tnx/txn/ > >> in the callback. This will be helpful for next commits, when >> we introduce

Re: [PATCH v5 07/20] job.h: add _locked duplicates for job API functions called with and without job_mutex

2022-02-24 Thread Emanuele Giuseppe Esposito
On 17/02/2022 15:20, Stefan Hajnoczi wrote: > On Tue, Feb 08, 2022 at 09:35:00AM -0500, Emanuele Giuseppe Esposito wrote: >> static void job_exit(void *opaque) >> { >> Job *job = (Job *)opaque; >> AioContext *ctx; >> +JOB_LOCK_GUARD(); >> >> job_ref(job); >>

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

2022-02-24 Thread Chao Peng
On Wed, Feb 23, 2022 at 07:32:37PM +0100, Maciej S. Szmigiero wrote: > On 23.02.2022 13:00, Chao Peng wrote: > > 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

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

2022-02-24 Thread Igor Mammedov
On Wed, 23 Feb 2022 17:30:34 +0530 Ani Sinha wrote: > 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

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

2022-02-24 Thread Igor Mammedov
On Wed, 23 Feb 2022 11:19:49 +0100 Damien Hedde wrote: > 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'

Re: [PATCH RFCv2 3/4] i386/pc: warn if phys-bits is too low

2022-02-24 Thread Igor Mammedov
On Wed, 23 Feb 2022 17:18:55 + Joao Martins wrote: > On 2/14/22 15:18, Joao Martins wrote: > > On 2/14/22 15:03, Igor Mammedov wrote: > >> On Mon, 7 Feb 2022 20:24:21 + > >> Joao Martins wrote: > >> > >>> Default phys-bits on Qemu is TCG_PHYS_BITS (40) which is enough > >>> to

Re: [PATCH] vl: transform QemuOpts device to JSON syntax device

2022-02-24 Thread Peter Krempa
On Thu, Feb 24, 2022 at 09:02:02 +, Daniel P. Berrangé wrote: > On Thu, Feb 24, 2022 at 02:06:53PM +0800, Zhenzhong Duan wrote: > > While there are mixed use of traditional -device option and JSON > > syntax option, QEMU reports conflict, e.x: > > > > /usr/libexec/qemu-kvm -nodefaults \ > >

Re: [PATCH RFCv2 3/4] i386/pc: warn if phys-bits is too low

2022-02-24 Thread Joao Martins
On 2/24/22 09:01, Igor Mammedov wrote: > On Wed, 23 Feb 2022 17:18:55 + > Joao Martins wrote: > >> On 2/14/22 15:18, Joao Martins wrote: >>> On 2/14/22 15:03, Igor Mammedov wrote: On Mon, 7 Feb 2022 20:24:21 + Joao Martins wrote: > Default phys-bits on Qemu is

Re: Fix a potential memory leak bug in write_boot_rom() (v6.2.0).

2022-02-24 Thread Cédric Le Goater
Hello Wentao, On 2/23/22 17:15, Philippe Mathieu-Daudé wrote: On 23/2/22 15:39, wli...@stu.xidian.edu.cn wrote: Hi all, I find a memory leak bug in QEMU 6.2.0, which is in write_boot_rom()(./hw/arm/aspeed.c). Specifically, at line 276, a memory chunk is allocated with g_new0() and assigned

Re: [PATCH] vl: transform QemuOpts device to JSON syntax device

2022-02-24 Thread Daniel P . Berrangé
On Thu, Feb 24, 2022 at 02:06:53PM +0800, Zhenzhong Duan wrote: > While there are mixed use of traditional -device option and JSON > syntax option, QEMU reports conflict, e.x: > > /usr/libexec/qemu-kvm -nodefaults \ > -device >

Re: [PATCH v2] qapi, target/i386/sev: Add cpu0-id to query-sev-capabilities

2022-02-24 Thread Daniel P . Berrangé
On Thu, Feb 24, 2022 at 06:14:05AM +, Dov Murik wrote: > Add a new field 'cpu0-id' to the response of query-sev-capabilities QMP > command. The value of the field is the base64-encoded 64-byte unique ID > of the CPU0 (socket 0), which can be used to retrieve the signed CEK of > the CPU from

Re: [PATCH v5 06/20] jobs: remove aiocontext locks since the functions are under BQL

2022-02-24 Thread Emanuele Giuseppe Esposito
On 17/02/2022 15:12, Stefan Hajnoczi wrote: > On Tue, Feb 08, 2022 at 09:34:59AM -0500, Emanuele Giuseppe Esposito wrote: >> In preparation to the job_lock/unlock patch, remove these >> aiocontext locks. >> The main reason these two locks are removed here is because >> they are inside a loop

Re: [PATCH 1/3] util & iothread: Introduce event-loop abstract class

2022-02-24 Thread Stefan Hajnoczi
On Mon, Feb 21, 2022 at 06:08:43PM +0100, Nicolas Saenz Julienne wrote: > diff --git a/qom/meson.build b/qom/meson.build > index 062a3789d8..c20e5dd1cb 100644 > --- a/qom/meson.build > +++ b/qom/meson.build > @@ -4,6 +4,7 @@ qom_ss.add(files( >'object.c', >'object_interfaces.c', >

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

2022-02-24 Thread Peter Maydell
On Wed, 23 Feb 2022 at 20:08, Ivan Shcherbakov wrote: > > static GDBState gdbserver_state; > +static bool gdbserver_is_connected; > + > +bool gdb_is_connected(void) > +{ > +return gdbserver_is_connected; > +} I haven't looked at the rest of the patch -- but can you explain where whpx is

Re: [PATCH] vl: transform QemuOpts device to JSON syntax device

2022-02-24 Thread Daniel P . Berrangé
On Thu, Feb 24, 2022 at 10:09:35AM +0100, Peter Krempa wrote: > On Thu, Feb 24, 2022 at 09:02:02 +, Daniel P. Berrangé wrote: > > On Thu, Feb 24, 2022 at 02:06:53PM +0800, Zhenzhong Duan wrote: > > > While there are mixed use of traditional -device option and JSON > > > syntax option, QEMU

Re: [PATCH v8 1/3] monitor/hmp: add support for flag argument with value

2022-02-24 Thread Markus Armbruster
Fabian Ebner writes: > Am 09.02.22 um 15:12 schrieb Markus Armbruster: >> Fabian Ebner writes: > > 8< > >>> diff --git a/monitor/monitor-internal.h b/monitor/monitor-internal.h >>> index 3da3f86c6a..a4cb307c8a 100644 >>> --- a/monitor/monitor-internal.h >>> +++

[PATCH v2 0/2] ui/cocoa: updateUIInfo threading, autorelease pools

2022-02-24 Thread Peter Maydell
This patchset was originally provoked by Akihiko Odaki noting that we have some unnecessary creation and deletion of autorelease pools in the Cocoa UI code. Patch 2 deletes them; but to get there we need to do a bit of cleanup of the updateUIInfo support, which wasn't considering threads. Tested

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

2022-02-24 Thread Jason A. Donenfeld
Hey Eric, On Thu, Feb 24, 2022 at 2:27 AM Eric Biggers wrote: > > On Thu, Feb 24, 2022 at 01:54:54AM +0100, Jason A. Donenfeld wrote: > > On 2/24/22, Eric Biggers wrote: > > > I think we should be removing cases where the base_crng key is changed > > > directly > > > besides extraction from the

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

2022-02-24 Thread Alex Bennée
Peter Maydell writes: > On Wed, 23 Feb 2022 at 20:08, Ivan Shcherbakov wrote: >> > >> static GDBState gdbserver_state; >> +static bool gdbserver_is_connected; >> + >> +bool gdb_is_connected(void) >> +{ >> +return gdbserver_is_connected; >> +} > > I haven't looked at the rest of the patch

[PATCH v2 04/12] mos6522: switch over to use qdev gpios for IRQs

2022-02-24 Thread Mark Cave-Ayland
For historical reasons each mos6522 instance implements its own setting and update of the IFR flag bits using methods exposed by MOS6522DeviceClass. As of today this is no longer required, and it is now possible to implement the mos6522 IRQs as standard qdev gpios. Switch over to use qdev gpios

[PATCH v2 12/12] macio/pmu.c: remove redundant code

2022-02-24 Thread Mark Cave-Ayland
Now that the logic related to edge-triggered interrupts is all contained within the mos6522 device the redundant implementation for the mac99 PMU device can be removed. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/pmu.c | 33 -

Re: [PATCH v4 07/18] block/reqlist: reqlist_find_conflict(): use ranges_overlap()

2022-02-24 Thread Hanna Reitz
On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: Let's reuse convenient helper. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/reqlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Hanna Reitz

Re: [PATCH v4 04/18] block/copy-before-write: add bitmap open parameter

2022-02-24 Thread Hanna Reitz
On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: This brings "incremental" mode to copy-before-write filter: user can specify bitmap so that filter will copy only "dirty" areas. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 10 +++-

Re: [PULL 00/10] Misc next patches

2022-02-24 Thread Peter Maydell
On Mon, 21 Feb 2022 at 19:18, Daniel P. Berrangé wrote: > AFAIK, the block jobs run in CI don't cover the SSH driver at all. > > I had a CI pipeline before submitting, which covered Free BSD 13 > which passed. To be sure I just rebased to git master and tried > another pipeline which passed too:

[PATCH] target/arm: Report KVM's actual PSCI version to guest in dtb

2022-02-24 Thread Peter Maydell
When we're using KVM, the PSCI implementation is provided by the kernel, but QEMU has to tell the guest about it via the device tree. Currently we look at the KVM_CAP_ARM_PSCI_0_2 capability to determine if the kernel is providing at least PSCI 0.2, but if the kernel provides a newer version than

Re: [PATCH] block: fix preallocate filter: don't do unaligned preallocate requests

2022-02-24 Thread Hanna Reitz
On 15.02.22 13:16, Vladimir Sementsov-Ogievskiy wrote: There is a bug in handling BDRV_REQ_NO_WAIT flag: we still may wait in wait_serialising_requests() if request is unaligned. And this is possible for the only user of this flag (preallocate filter) if underlying file is unaligned to its

[PATCH v2 1/2] ui/cocoa.m: Fix updateUIInfo threading issues

2022-02-24 Thread Peter Maydell
The updateUIInfo method makes Cocoa API calls. It also calls back into QEMU functions like dpy_set_ui_info(). To do this safely, we need to follow two rules: * Cocoa API calls are made on the Cocoa UI thread * When calling back into QEMU we must hold the iothread lock Fix the places where we

Re: [PATCH v2] qapi, target/i386/sev: Add cpu0-id to query-sev-capabilities

2022-02-24 Thread Dov Murik
On 24/02/2022 10:59, Daniel P. Berrangé wrote: > On Thu, Feb 24, 2022 at 06:14:05AM +, Dov Murik wrote: >> Add a new field 'cpu0-id' to the response of query-sev-capabilities QMP >> command. The value of the field is the base64-encoded 64-byte unique ID >> of the CPU0 (socket 0), which can

Re: [PATCH 0/8] Misc build fixes and cleanups

2022-02-24 Thread Paolo Bonzini
On 2/22/22 20:40, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Hi, A small collection of patches gleaned while working on different things. Queued all except patch 4. Paolo Marc-André Lureau (8): meson: fix generic location of vss headers qga/vss-win32: check old VSS

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

2022-02-24 Thread Paolo Bonzini
On 2/23/22 10:38, Thomas Huth wrote: This way, we can now finally get the output of failed tests on the console again (unless you're running meson test in verbose mode, where meson only puts this to the log file - for incomprehensible reasons), It's a bug (introduced by yours truly, which

Re: [PATCH v2 2/2] block/curl.c: Check error return from curl_easy_setopt()

2022-02-24 Thread Hanna Reitz
On 22.02.22 16:23, Peter Maydell wrote: Coverity points out that we aren't checking the return value from curl_easy_setopt() for any of the calls to it we make in block/curl.c. Some of these options are documented as always succeeding (e.g. CURLOPT_VERBOSE) but others have documented failure

[PATCH] hw/intc/armv7m_nvic: Fix typo in comment

2022-02-24 Thread Evgeny Ermakov
Signed-off-by: Evgeny Ermakov --- hw/intc/armv7m_nvic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c index 13df002ce4..a08a0fdc50 100644 --- a/hw/intc/armv7m_nvic.c +++ b/hw/intc/armv7m_nvic.c @@ -97,7 +97,7 @@ static int

[PATCH v2] target/arm: Support PSCI 1.1 and SMCCC 1.0

2022-02-24 Thread Akihiko Odaki
Support the latest PSCI on TCG and HVF. A 64-bit function called from AArch32 now returns NOT_SUPPORTED, which is necessary to adhere to SMC Calling Convention 1.0. It is still not compliant with SMCCC 1.3 since they do not implement mandatory functions. Signed-off-by: Akihiko Odaki ---

[PATCH v2 0/4] target/nios2: Shadow register set, EIC and VIC

2022-02-24 Thread Amir Gonnen
Implement nios2 Shadow register set, EIC and VIC. Currently nios2 on QEMU contains an internal Interrupt Controller. The nios2 architecture can support a more powerful External Interrupt Controller (EIC) instead of the internal, and implements special cpu features to support it: Shadow register

Re: [PATCH v8 1/3] monitor/hmp: add support for flag argument with value

2022-02-24 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Fabian Ebner writes: > > > Am 09.02.22 um 15:12 schrieb Markus Armbruster: > >> Fabian Ebner writes: > > > > 8< > > > >>> diff --git a/monitor/monitor-internal.h b/monitor/monitor-internal.h > >>> index 3da3f86c6a..a4cb307c8a 100644 > >>>

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

2022-02-24 Thread Laszlo Ersek
On 02/24/22 10:10, Igor Mammedov wrote: > On Wed, 23 Feb 2022 12:50:42 +0100 > Gerd Hoffmann wrote: > >> 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

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

2022-02-24 Thread Kshitij Suri
Currently screendump only supports PPM format, which is un-compressed and not standard. Added a "format" parameter to qemu monitor screendump capabilites to support PNG image capture using libpng. The param was added in QAPI schema of screendump present in ui.json along with png_save() function

[PATCH v2 09/12] mos6522: record last_irq_levels in mos6522_set_irq()

2022-02-24 Thread Mark Cave-Ayland
To detect edge-triggered IRQs it is necessary to store the last state of each IRQ in a last_irq_levels bitmap. Note: this is a migration break for machines which use mos6522 instances which are g3beige/mac99 (PPC) and q800 (m68k). Signed-off-by: Mark Cave-Ayland --- hw/misc/mos6522.c |

[PATCH v2 05/12] mos6522: remove update_irq() and set_sr_int() methods from MOS6522DeviceClass

2022-02-24 Thread Mark Cave-Ayland
Now that the mos6522 IRQs are managed using standard qdev gpios these methods are no longer required. Signed-off-by: Mark Cave-Ayland Reviewed-by: Peter Maydell --- hw/misc/mos6522.c | 9 - include/hw/misc/mos6522.h | 2 -- 2 files changed, 11 deletions(-) diff --git

Re: [PATCH v4 03/18] block/block-copy: block_copy_state_new(): add bitmap parameter

2022-02-24 Thread Hanna Reitz
On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: This will be used in the following commit to bring "incremental" mode to copy-before-write filter. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 1 + block/block-copy.c | 14 +-

Re: [PATCH 08/11] mos6522: add "info via" HMP command for debugging

2022-02-24 Thread Mark Cave-Ayland
On 22/02/2022 15:03, Dr. David Alan Gilbert wrote: * Mark Cave-Ayland (mark.cave-ayl...@ilande.co.uk) wrote: On 21/02/2022 17:11, Daniel P. Berrangé wrote: On Sun, Feb 20, 2022 at 05:18:33PM +, Mark Cave-Ayland wrote: On 08/02/2022 13:10, Daniel P. Berrangé wrote: On Tue, Feb 08, 2022

Re: [PATCH v4 10/18] block/io: introduce block driver snapshot-access API

2022-02-24 Thread Hanna Reitz
On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: Add new block driver handlers and corresponding generic wrappers. It will be used to allow copy-before-write filter to provide reach fleecing interface in further commit. In future this approach may be used to allow reading qcow2 interanal

Re: [PATCH v4 08/18] block/dirty-bitmap: introduce bdrv_dirty_bitmap_status()

2022-02-24 Thread Hanna Reitz
On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: Add a convenient function similar with bdrv_block_status() to get status of dirty bitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 2 ++ include/qemu/hbitmap.h | 12

Re: [PATCH] hw/intc/armv7m_nvic: Fix typo in comment

2022-02-24 Thread Peter Maydell
On Thu, 24 Feb 2022 at 12:22, Evgeny Ermakov wrote: > > Signed-off-by: Evgeny Ermakov > --- > hw/intc/armv7m_nvic.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c > index 13df002ce4..a08a0fdc50 100644 > ---

Re: [PATCH v2] target/arm: Support PSCI 1.1 and SMCCC 1.0

2022-02-24 Thread Peter Maydell
On Sun, 13 Feb 2022 at 03:58, Akihiko Odaki wrote: > > Support the latest PSCI on TCG and HVF. A 64-bit function called from > AArch32 now returns NOT_SUPPORTED, which is necessary to adhere to SMC > Calling Convention 1.0. It is still not compliant with SMCCC 1.3 since > they do not implement

[PATCH v3 2/2] virt: vmgenid: introduce driver for reinitializing RNG on VM fork

2022-02-24 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 v4 14/18] iotests.py: add qemu_io_pipe_and_status()

2022-02-24 Thread Vladimir Sementsov-Ogievskiy
24.02.2022 15:52, Hanna Reitz wrote: On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: Add helper that returns both status and output, to be used in the following commit Signed-off-by: Vladimir Sementsov-Ogievskiy ---   tests/qemu-iotests/iotests.py | 4   1 file changed, 4

Re: [PATCH v2 03/12] mac_via: use IFR bit flag constants for VIA2 IRQs

2022-02-24 Thread Philippe Mathieu-Daudé
On 24/2/22 12:59, Mark Cave-Ayland wrote: This allows us to easily see how the physical control lines are mapped to the IFR bit flags. Signed-off-by: Mark Cave-Ayland --- include/hw/misc/mac_via.h | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) Reviewed-by:

Re: [PATCH v2 01/12] mos6522: add defines for IFR bit flags

2022-02-24 Thread Philippe Mathieu-Daudé
On 24/2/22 12:59, Mark Cave-Ayland wrote: These are intended to make it easier to see how the physical control lines are wired for each instance. Signed-off-by: Mark Cave-Ayland --- include/hw/misc/mos6522.h | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-)

Re: [PATCH v2 0/2] block/curl: check error return from curl_easy_setopt()

2022-02-24 Thread Hanna Reitz
On 22.02.22 16:23, Peter Maydell wrote: Coverity points out that we aren't checking the return value from curl_easy_setopt() for any of the calls to it we make in block/curl.c. Tested with 'make check' and with some basic smoke test command lines suggested by Dan: qemu-img info

Re: [PATCH v4 17/18] qapi: backup: add immutable-source parameter

2022-02-24 Thread Vladimir Sementsov-Ogievskiy
24.02.2022 16:05, Hanna Reitz wrote: On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: We are on the way to implement internal-backup with fleecing scheme, which includes backup job copying from fleecing block driver node (which is target of copy-before-write filter) to final target of

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

2022-02-24 Thread Daniel P . Berrangé
On Thu, Feb 24, 2022 at 09:22:50AM +0100, Laszlo Ersek wrote: > (+Daniel, +Rich) > > On 02/23/22 17:08, Jason A. Donenfeld wrote: > > On Wed, Feb 23, 2022 at 2:12 PM Jason A. Donenfeld wrote: > >> second patch is the reason this is just an RFC: it's a cleanup of the > >> ACPI driver from last

Re: [PATCH v2] hw/i2c: flatten pca954x mux device

2022-02-24 Thread Peter Maydell
On Wed, 2 Feb 2022 at 17:57, Patrick Venture wrote: > > Previously this device created N subdevices which each owned an i2c bus. > Now this device simply owns the N i2c busses directly. > > Tested: Verified devices behind mux are still accessible via qmp and i2c > from within an arm32 SoC. > >

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

2022-02-24 Thread Alexander Graf
On 24.02.22 11:43, Daniel P. Berrangé wrote: On Thu, Feb 24, 2022 at 09:53:59AM +0100, Alexander Graf wrote: Hey Jason, On 23.02.22 14:12, Jason A. Donenfeld wrote: This small series picks up work from Amazon that seems to have stalled out later year around this time: listening for the

[PATCH v2 07/12] mos6522: add register names to register read/write trace events

2022-02-24 Thread Mark Cave-Ayland
This helps to follow how the guest is programming the mos6522 when debugging. Signed-off-by: Mark Cave-Ayland Reviewed-by: Peter Maydell --- hw/misc/mos6522.c| 10 -- hw/misc/trace-events | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/misc/mos6522.c

Re: [PATCH v4 14/18] iotests.py: add qemu_io_pipe_and_status()

2022-02-24 Thread Hanna Reitz
On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: Add helper that returns both status and output, to be used in the following commit Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 4 1 file changed, 4 insertions(+) diff --git

Re: [PATCH v4 17/18] qapi: backup: add immutable-source parameter

2022-02-24 Thread Hanna Reitz
On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: We are on the way to implement internal-backup with fleecing scheme, which includes backup job copying from fleecing block driver node (which is target of copy-before-write filter) to final target of backup. This job doesn't need own filter,

Re: [PATCH v2] target/arm: Support PSCI 1.1 and SMCCC 1.0

2022-02-24 Thread Peter Maydell
On Sun, 13 Feb 2022 at 03:58, Akihiko Odaki wrote: > > Support the latest PSCI on TCG and HVF. A 64-bit function called from > AArch32 now returns NOT_SUPPORTED, which is necessary to adhere to SMC > Calling Convention 1.0. It is still not compliant with SMCCC 1.3 since > they do not implement

Re: [PATCH v2] target/arm: Support PSCI 1.1 and SMCCC 1.0

2022-02-24 Thread Peter Maydell
On Thu, 24 Feb 2022 at 13:25, Peter Maydell wrote: > > On Sun, 13 Feb 2022 at 03:58, Akihiko Odaki wrote: > > > > Support the latest PSCI on TCG and HVF. A 64-bit function called from > > AArch32 now returns NOT_SUPPORTED, which is necessary to adhere to SMC > > Calling Convention 1.0. It is

Re: [PATCH v2 2/2] block/curl.c: Check error return from curl_easy_setopt()

2022-02-24 Thread Peter Maydell
On Thu, 24 Feb 2022 at 14:11, Hanna Reitz wrote: > > On 22.02.22 16:23, Peter Maydell wrote: > > Coverity points out that we aren't checking the return value > > from curl_easy_setopt() for any of the calls to it we make > > in block/curl.c. > > > > Some of these options are documented as always

Re: [PATCH] target/arm: Report KVM's actual PSCI version to guest in dtb

2022-02-24 Thread Marc Zyngier via
On 2022-02-24 13:46, Peter Maydell wrote: When we're using KVM, the PSCI implementation is provided by the kernel, but QEMU has to tell the guest about it via the device tree. Currently we look at the KVM_CAP_ARM_PSCI_0_2 capability to determine if the kernel is providing at least PSCI 0.2, but

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

2022-02-24 Thread Kshitij Suri
On 23/02/22 4:30 pm, Dr. David Alan Gilbert wrote: * 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

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

2022-02-24 Thread Kshitij Suri
On 22/02/22 10:04 pm, Daniel P. Berrangé wrote: 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

Re: [PATCH v4 06/18] block: intoduce reqlist

2022-02-24 Thread Hanna Reitz
On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: Split intersecting-requests functionality out of block-copy to be reused in copy-before-write filter. Note: while being here, fix tiny typo in MAINTAINERS. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/reqlist.h | 67

[PATCH v2 11/12] mos6522: implement edge-triggering for CA1/2 and CB1/2 control line IRQs

2022-02-24 Thread Mark Cave-Ayland
The mos6522 datasheet describes how the control lines IRQs are edge-triggered according to the configuration in the PCR register. Implement the logic according to the datasheet so that the interrupt bits in IFR are latched when the edge is detected, and cleared when reading portA/portB or writing

Re: [PATCH v4 12/18] block: copy-before-write: realize snapshot-access API

2022-02-24 Thread Hanna Reitz
On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: Current scheme of image fleecing looks like this: [guest][NBD export] | | |root | root v v [copy-before-write] ->

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

2022-02-24 Thread Igor Mammedov
On Thu, 24 Feb 2022 18:14:35 +0530 Ani Sinha wrote: > On Thu, Feb 24, 2022 at 2:33 PM Igor Mammedov wrote: > > > > On Wed, 23 Feb 2022 17:30:34 +0530 > > Ani Sinha wrote: > > > > > On Wed, Feb 23, 2022 at 2:34 PM Igor Mammedov > > > wrote: > > > > > > > > On Thu, 10 Feb 2022 18:58:21

[PATCH v2 4/4] hw/nios2: Machine with a Vectored Interrupt Controller

2022-02-24 Thread Amir Gonnen
Demonstrate how to use nios2 VIC on a machine. Introduce a new machine "10m50-ghrd-vic" which is based on "10m50-ghrd" with a VIC attached and internal interrupt controller removed. When VIC is present, irq0 connects the VIC to the cpu, intc_present is set to false to disable the internal

[PATCH v2 3/4] hw/intc: Vectored Interrupt Controller (VIC)

2022-02-24 Thread Amir Gonnen
Implement nios2 Vectored Interrupt Controller (VIC). VIC is connected to EIC. It needs to update rha, ril, rrs and rnmi fields on Nios2CPU before raising an IRQ. For that purpose, VIC has a "cpu" property which should refer to the nios2 cpu and set by the board that connects VIC. Signed-off-by:

Re: [PATCH v4 15/18] iotests/image-fleecing: add test case with bitmap

2022-02-24 Thread Vladimir Sementsov-Ogievskiy
24.02.2022 15:58, Hanna Reitz wrote: On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: Note that reads zero areas (not dirty in the bitmap) fails, that's correct. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   tests/qemu-iotests/tests/image-fleecing | 32 ++--  

Re: [PATCH v2] target/arm: Support PSCI 1.1 and SMCCC 1.0

2022-02-24 Thread Peter Maydell
On Thu, 24 Feb 2022 at 14:37, Akihiko Odaki wrote: > > Support the latest PSCI on TCG and HVF. A 64-bit function called from > AArch32 now returns NOT_SUPPORTED, which is necessary to adhere to SMC > Calling Convention 1.0. It is still not compliant with SMCCC 1.3 since > they do not implement

Re: [PATCH 3/3] util/event-loop: Introduce options to set the thread pool size

2022-02-24 Thread Stefan Hajnoczi
On Mon, Feb 21, 2022 at 06:08:45PM +0100, Nicolas Saenz Julienne wrote: > The thread pool regulates itself: when idle, it kills threads until > empty, when in demand, it creates new threads until full. This behaviour > doesn't play well with latency sensitive workloads where the price of >

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

2022-02-24 Thread Damien Hedde
On 2/23/22 19:20, John Snow wrote: On Wed, Feb 23, 2022 at 12:09 PM Damien Hedde wrote: On 2/23/22 17:18, John Snow wrote: On Wed, Feb 23, 2022 at 10:44 AM Daniel P. Berrangé wrote: On Wed, Feb 23, 2022 at 10:41:11AM -0500, John Snow wrote: On Wed, Feb 23, 2022 at 10:27 AM Daniel P.

RE: [PATCH] vl: transform QemuOpts device to JSON syntax device

2022-02-24 Thread Duan, Zhenzhong
>-Original Message- >From: Daniel P. Berrangé >Sent: Thursday, February 24, 2022 5:14 PM >To: Peter Krempa >Cc: Duan, Zhenzhong ; qemu- >de...@nongnu.org; kw...@redhat.com; m...@redhat.com; >ler...@redhat.com; pbonz...@redhat.com; ebl...@redhat.com >Subject: Re: [PATCH] vl: transform

Re: [PATCH] vl: transform QemuOpts device to JSON syntax device

2022-02-24 Thread Kevin Wolf
Am 24.02.2022 um 07:06 hat Zhenzhong Duan geschrieben: > While there are mixed use of traditional -device option and JSON > syntax option, QEMU reports conflict, e.x: > > /usr/libexec/qemu-kvm -nodefaults \ > -device > '{"driver":"virtio-scsi-pci","id":"scsi0","bus":"pci.0","addr":"0x02.0"}' \

Re: [PATCH v2 0/2] ui/cocoa: updateUIInfo threading, autorelease pools

2022-02-24 Thread Akihiko Odaki
Reviewed-by: Akihiko Odaki Tested-by: Akihiko Odaki On 2022/02/24 19:13, Peter Maydell wrote: This patchset was originally provoked by Akihiko Odaki noting that we have some unnecessary creation and deletion of autorelease pools in the Cocoa UI code. Patch 2 deletes them; but to get there we

[PATCH v2 10/12] mac_via: make SCSI_DATA (DRQ) bit live rather than latched

2022-02-24 Thread Mark Cave-Ayland
The VIA2 on the Q800 machine is not a separate chip as in older Macs but instead is integrated into the on-board logic. From analysing the SCSI routines in the MacOS toolbox ROM (and to a lesser extent NetBSD and Linux) the expectation seems to be that the SCSI_DATA (DRQ) bit is live on the Q800

Re: [PATCH v4 11/18] block: introduce snapshot-access filter

2022-02-24 Thread Hanna Reitz
On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: The filter simply utilizes snapshot-access API of underlying block Nit picking: Well, it isn’t really a filter.  I understand where you’re coming from, but by definition it isn’t a filter driver. node. In further patches we want to

Re: [PATCH v4 13/18] iotests/image-fleecing: add test-case for fleecing format node

2022-02-24 Thread Hanna Reitz
On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/image-fleecing | 64 - tests/qemu-iotests/tests/image-fleecing.out | 76 - 2 files changed, 120 insertions(+), 20

Re: [PATCH v4 12/18] block: copy-before-write: realize snapshot-access API

2022-02-24 Thread Vladimir Sementsov-Ogievskiy
24.02.2022 15:46, Hanna Reitz wrote: On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: Current scheme of image fleecing looks like this: [guest]    [NBD export]    |  |    |root  | root    v  v

[PATCH v2 2/4] target/nios2: Exteral Interrupt Controller (EIC)

2022-02-24 Thread Amir Gonnen
Implement Exteral Interrupt Controller interface (EIC). Added intc_present property, true by default. When set to false, nios2 uses the EIC interface when handling IRQ. When set to true (default) it uses the internal interrupt controller. When nios2 recieves irq, it first checks intc_present to

Re: [PATCH v3 5/6] i386/pc: warn if phys-bits is too low

2022-02-24 Thread Joao Martins
On 2/23/22 18:44, Joao Martins wrote: > @@ -896,6 +897,15 @@ void pc_memory_init(PCMachineState *pcms, > > x86_update_above_4g_mem_start(pcms, pci_hole64_size); > > +maxphysaddr = ((hwaddr)1 << X86_CPU(first_cpu)->phys_bits) - 1; > +maxusedaddr = x86_max_phys_addr(pcms,

Re: [PATCH] mps3-an547: Add missing user ahb interfaces

2022-02-24 Thread Peter Maydell
On Thu, 10 Feb 2022 at 21:02, Jimmy Brisson wrote: > > With these interfaces missing, TFM would delegate peripherals 0, 1, > 2, 3 and 8, and qemu would ignore the delegation of interface 8, as > it thought interface 4 was eth & USB. > > This patch corrects this behavior and allows TFM to delegate

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

2022-02-24 Thread Daniel P . Berrangé
On Thu, Feb 24, 2022 at 09:53:59AM +0100, Alexander Graf wrote: > Hey Jason, > > On 23.02.22 14:12, Jason A. Donenfeld wrote: > > 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

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

2022-02-24 Thread Jason A. Donenfeld
Hi Lazlo, Thanks for your reply. On Thu, Feb 24, 2022 at 9:23 AM Laszlo Ersek wrote: > QEMU's related design is documented in > . I'll link to this document on the 2/2 patch next to the other ones. > "they can also use the data

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

2022-02-24 Thread Jason A. Donenfeld
Hi Alex, Strangely your message never made it to me, and I had to pull this out of Lore after seeing Daniel's reply to it. I wonder what's up. On Thu, Feb 24, 2022 at 09:53:59AM +0100, Alexander Graf wrote: > The main problem with VMGenID is that it is inherently racy. There will > always be a

[PATCH v2 00/12] mos6522: switch to gpios, add control line edge-triggering and extra debugging

2022-02-24 Thread Mark Cave-Ayland
Here is another patchset taken from my series to enable MacOS to boot on the q800 machine. Patches 1-3 define the IFR bit flags in terms of the physical control lines and update mac_via to use them. Patch 4 does the main switch from custom methods in MOS6522DeviceClass to using standard gpios

[PATCH v2 01/12] mos6522: add defines for IFR bit flags

2022-02-24 Thread Mark Cave-Ayland
These are intended to make it easier to see how the physical control lines are wired for each instance. Signed-off-by: Mark Cave-Ayland --- include/hw/misc/mos6522.h | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/include/hw/misc/mos6522.h

[PATCH v2 02/12] mac_via: use IFR bit flag constants for VIA1 IRQs

2022-02-24 Thread Mark Cave-Ayland
This allows us to easily see how the physical control lines are mapped to the IFR bit flags. Signed-off-by: Mark Cave-Ayland --- include/hw/misc/mac_via.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/hw/misc/mac_via.h

Re: [PATCH v5 08/20] jobs: protect jobs with job_lock/unlock

2022-02-24 Thread Emanuele Giuseppe Esposito
On 17/02/2022 15:48, Stefan Hajnoczi wrote: > On Tue, Feb 08, 2022 at 09:35:01AM -0500, Emanuele Giuseppe Esposito wrote: >> diff --git a/block/replication.c b/block/replication.c >> index 55c8f894aa..a03b28726e 100644 >> --- a/block/replication.c >> +++ b/block/replication.c >> @@ -149,7

Re: [PATCH v4 04/18] block/copy-before-write: add bitmap open parameter

2022-02-24 Thread Vladimir Sementsov-Ogievskiy
24.02.2022 15:07, Hanna Reitz wrote: On 16.02.22 20:46, Vladimir Sementsov-Ogievskiy wrote: This brings "incremental" mode to copy-before-write filter: user can specify bitmap so that filter will copy only "dirty" areas. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   qapi/block-core.json   

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

2022-02-24 Thread Paolo Bonzini
On 2/23/22 10:14, Marc-André Lureau wrote: 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

Re: [PATCH v2 10/12] mac_via: make SCSI_DATA (DRQ) bit live rather than latched

2022-02-24 Thread Philippe Mathieu-Daudé
On 24/2/22 12:59, Mark Cave-Ayland wrote: The VIA2 on the Q800 machine is not a separate chip as in older Macs but instead is integrated into the on-board logic. From analysing the SCSI routines in the MacOS toolbox ROM (and to a lesser extent NetBSD and Linux) the expectation seems to be that

Re: [PATCH v2 1/2] block/curl.c: Set error message string if curl_init_state() fails

2022-02-24 Thread Hanna Reitz
On 22.02.22 16:23, Peter Maydell wrote: In curl_open(), the 'out' label assumes that the state->errmsg string has been set (either by curl_easy_perform() or by manually copying a string into it); however if curl_init_state() fails we will jump to that label without setting the string. Add the

  1   2   3   >