[PATCH 05/10] aspeed/smc: Remove the 'flash' attribute from AspeedSMCFlash

2021-09-06 Thread Cédric Le Goater
There is no use for it. Signed-off-by: Cédric Le Goater --- include/hw/ssi/aspeed_smc.h | 1 - hw/arm/aspeed.c | 11 +-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/hw/ssi/aspeed_smc.h b/include/hw/ssi/aspeed_smc.h index 0ea536a44c3a..f32f66f9a838

[PATCH 01/10] aspeed/smc: Add watchdog Control/Status Registers

2021-09-06 Thread Cédric Le Goater
The Aspeed SoCs have a dual boot function for firmware fail-over recovery. The system auto-reboots from the second flash if the main flash does not boot sucessfully within a certain amount of time. This function is called alternate boot (ABR) in the FMC controllers. On AST2400/AST2500, ABR is enab

[PATCH 00/10] aspeed/smc: Cleanups and QOMification

2021-09-06 Thread Cédric Le Goater
Hello, It looks big but there are no major changes. This series adds a simple support for the 2nd watchdog registers which were moved under the AST2600 FMC controller to deactivate the alternate boot function. Then come cleanups of the AspeedSMC model mostly removing a useless AspeedSMCController

[PATCH 09/10] aspeed/smc: Add default reset values

2021-09-06 Thread Cédric Le Goater
This simplifies the reset handler and has the benefit to remove some bad use of the segments array as an identifier of the controller model. Signed-off-by: Cédric Le Goater --- include/hw/ssi/aspeed_smc.h | 1 + hw/ssi/aspeed_smc.c | 52 +++-- 2 files cha

Re: [PATCH v8 0/7] DEVICE_UNPLUG_GUEST_ERROR QAPI event

2021-09-06 Thread Igor Mammedov
On Tue, 7 Sep 2021 11:17:21 +1000 David Gibson wrote: > On Mon, Sep 06, 2021 at 09:47:48PM -0300, Daniel Henrique Barboza wrote: > > Hi, > > > > This new version amends the QAPI doc in patch 5, as suggested > > by David and Markus, and added all reviewed-by and acked-by > > tags. > > I've stag

Re: [PULL 10/36] hostmem: Add hostmem-epc as a backend for SGX EPC

2021-09-06 Thread Yang Zhong
On Mon, Sep 06, 2021 at 03:10:33PM +0200, Paolo Bonzini wrote: > From: Sean Christopherson > > EPC (Enclave Page Cahe) is a specialized type of memory used by Intel > SGX (Software Guard Extensions). The SDM desribes EPC as: > > The Enclave Page Cache (EPC) is the secure storage used to sto

Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need

2021-09-06 Thread Ani Sinha
On Tue, Sep 7, 2021 at 11:44 AM Philippe Mathieu-Daudé wrote: > On 9/7/21 7:55 AM, Ani Sinha wrote: > > On Mon, Sep 6, 2021 at 4:19 PM Ani Sinha wrote: > >> > >> On Mon, Sep 6, 2021 at 3:54 PM Philippe Mathieu-Daudé < > phi...@redhat.com> wrote: > >>> > >>> On 9/6/21 12:03 PM, Ani Sinha wrote: >

Re: [PATCH] hw/display/ati_2d: Fix buffer overflow in ati_2d_blt (CVE-2021-3638)

2021-09-06 Thread Philippe Mathieu-Daudé
On 9/7/21 7:38 AM, Philippe Mathieu-Daudé wrote: > On 9/6/21 9:52 PM, BALATON Zoltan wrote: >> On Mon, 6 Sep 2021, Philippe Mathieu-Daudé wrote: >>> (Forgot to Cc Alex for eventual reproducer) >>> >>> On 9/6/21 6:44 PM, Mauro Matteo Cascella wrote: On Mon, Sep 6, 2021 at 5:31 PM Philippe Mathi

Re: [PATCH] hw/display/ati_2d: Fix buffer overflow in ati_2d_blt (CVE-2021-3638)

2021-09-06 Thread Philippe Mathieu-Daudé
On 9/6/21 5:31 PM, Philippe Mathieu-Daudé wrote: > When building QEMU with DEBUG_ATI defined then running with > '-device ati-vga,romfile="" -d unimp,guest_errors -trace ati\*' > we get: > > ati_mm_write 4 0x16c0 DP_CNTL <- 0x1 > ati_mm_write 4 0x146c DP_GUI_MASTER_CNTL <- 0x2 > ati_mm_write

Re: [PATCH v3] qemu-sockets: fix unix socket path copy (again)

2021-09-06 Thread Philippe Mathieu-Daudé
On 9/6/21 1:39 PM, Michael Tokarev wrote: > 06.09.2021 14:34, Philippe Mathieu-Daudé wrote: > >> Certainly, but you could also pick the latest patches >> sent to qemu-trivial@ already reviewed ;) > > I haven't done this in years.. Not sure what that means... you are still listed as maintainer:

Re: [PATCH v3 2/9] qapi: make blockdev-add a coroutine command

2021-09-06 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 06.09.2021 22:28, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> We are going to support nbd reconnect on open in a next commit. This >>> means that we want to do several connection attempts during some time. >>> And this should be

Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need

2021-09-06 Thread Philippe Mathieu-Daudé
On 9/7/21 7:55 AM, Ani Sinha wrote: > On Mon, Sep 6, 2021 at 4:19 PM Ani Sinha wrote: >> >> On Mon, Sep 6, 2021 at 3:54 PM Philippe Mathieu-Daudé >> wrote: >>> >>> On 9/6/21 12:03 PM, Ani Sinha wrote: On Mon, 6 Sep 2021, Philippe Mathieu-Daudé wrote: > On 9/4/21 11:36 PM, Michael S. Tsi

Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need

2021-09-06 Thread Ani Sinha
On Mon, Sep 6, 2021 at 4:19 PM Ani Sinha wrote: > > On Mon, Sep 6, 2021 at 3:54 PM Philippe Mathieu-Daudé > wrote: > > > > On 9/6/21 12:03 PM, Ani Sinha wrote: > > > On Mon, 6 Sep 2021, Philippe Mathieu-Daudé wrote: > > >> On 9/4/21 11:36 PM, Michael S. Tsirkin wrote: > > >>> From: Ani Sinha >

Re: [PATCH] hw/display/ati_2d: Fix buffer overflow in ati_2d_blt (CVE-2021-3638)

2021-09-06 Thread Philippe Mathieu-Daudé
On 9/6/21 9:19 PM, Alexander Bulekov wrote: > On 210906 2019, Philippe Mathieu-Daudé wrote: >> (Forgot to Cc Alex for eventual reproducer) > > Here you go. Should we be fuzzing this on OSS-Fuzz? Should we limit what we fuzz there? All bugs found so far have been useful. The issues fixed improved

Re: [PATCH] hw/display/ati_2d: Fix buffer overflow in ati_2d_blt (CVE-2021-3638)

2021-09-06 Thread Philippe Mathieu-Daudé
On 9/6/21 9:52 PM, BALATON Zoltan wrote: > On Mon, 6 Sep 2021, Philippe Mathieu-Daudé wrote: >> (Forgot to Cc Alex for eventual reproducer) >> >> On 9/6/21 6:44 PM, Mauro Matteo Cascella wrote: >>> On Mon, Sep 6, 2021 at 5:31 PM Philippe Mathieu-Daudé >>> wrote: When building QEMU with D

Re: [PATCH 4/5] ebpf_rss_helper: Added helper for eBPF RSS.

2021-09-06 Thread Jason Wang
On Mon, Sep 6, 2021 at 11:50 PM Andrew Melnichenko wrote: > > Hi, >> >> I think it's for back-compatibility. >> >> E.g current codes works without mmap(), and user will surprise that it >> wont' work after upgrading their qemu. > > Well, the current code would require additional capabilities with

Re: [PATCH v4 00/33] Qemu SGX virtualization

2021-09-06 Thread Yang Zhong
On Mon, Sep 06, 2021 at 03:13:08PM +0200, Paolo Bonzini wrote: > Hi, > > the monitor patches did not pass the test-hmp qtest, and also they > should be in target/i386/monitor.c (see other commands that were > implemented there for SEV). However, I've sent a pull request with > the rest. > Paol

Re: [PATCH 5/5] vfio: defer to commit kvm route in migraiton resume phase

2021-09-06 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
在 2021/9/4 5:57, Alex Williamson 写道: > On Wed, 25 Aug 2021 15:56:20 +0800 > "Longpeng(Mike)" wrote: > >> In migration resume phase, all unmasked msix vectors need to be >> setup when load the VF state. However, the setup operation would >> takes longer if the VF has more unmasked vectors. >> >

Re: [PATCH v3 05/15] target/ppc: PMU: add instruction counting

2021-09-06 Thread David Gibson
On Fri, Sep 03, 2021 at 05:31:06PM -0300, Daniel Henrique Barboza wrote: > The PMU is already counting cycles by calculating time elapsed in > nanoseconds. Counting instructions is a different matter and requires > another approach. > > This patch adds the capability of counting completed instruct

Re: [PATCH v3 04/15] target/ppc/power8_pmu.c: enable PMC1-PMC4 events

2021-09-06 Thread David Gibson
On Fri, Sep 03, 2021 at 05:31:05PM -0300, Daniel Henrique Barboza wrote: 65;6402;1c> This patch enable all PMCs but PMC5 to count cycles. To do that we > need to implement MMCR1 bits where the event are stored, retrieve > them, see if the PMC was configured with a PM_CYC event, and > calculate cycl

Re: [PATCH 4/5] kvm: irqchip: support defer to commit the route

2021-09-06 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
在 2021/9/4 5:57, Alex Williamson 写道: > On Wed, 25 Aug 2021 15:56:19 +0800 > "Longpeng(Mike)" wrote: > >> The kvm_irqchip_commit_routes() is relatively expensive, so >> provide the users a choice to commit the route immediately >> or not when they add msi/msix route. >> >> Signed-off-by: Longpe

Re: [PATCH v3 03/15] target/ppc: PMU basic cycle count for pseries TCG

2021-09-06 Thread David Gibson
On Fri, Sep 03, 2021 at 05:31:04PM -0300, Daniel Henrique Barboza wrote: > This patch adds the barebones of the PMU logic by enabling cycle > counting, done via the performance monitor counter 6. The overall logic > goes as follows: > > - a helper is added to control the PMU state on each MMCR0 wr

Re: [PATCH v3 02/15] target/ppc: add user write access control for PMU SPRs

2021-09-06 Thread David Gibson
On Fri, Sep 03, 2021 at 05:31:03PM -0300, Daniel Henrique Barboza wrote: > The PMU needs to enable writing of its uregs to userspace, otherwise > Perf applications will not able to setup the counters correctly. This > patch enables user space writing of all PMU uregs. > > MMCR0 is a special case b

Re: [PATCH 3/5] vfio: defer to enable msix in migration resume phase

2021-09-06 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
在 2021/9/4 5:56, Alex Williamson 写道: > On Wed, 25 Aug 2021 15:56:18 +0800 > "Longpeng(Mike)" wrote: > >> The vf's unmasked msix vectors will be enable one by one in >> migraiton resume phase, VFIO_DEVICE_SET_IRQS will be called >> for each vector, it's a bit expensive if the vf has more >> vec

Re: [PATCH v3 01/15] target/ppc: add user read functions for MMCR0 and MMCR2

2021-09-06 Thread David Gibson
On Fri, Sep 03, 2021 at 05:31:02PM -0300, Daniel Henrique Barboza wrote: > From: Gustavo Romero > > We're going to add PMU support for TCG PPC64 chips, based on IBM POWER8+ > emulation and following PowerISA v3.1. > > Let's start by handling the user read of UMMCR0 and UMMCR2. According to > Pow

Re: [PATCH 1/5] vfio: use helper to simplfy the failure path in vfio_msi_enable

2021-09-06 Thread Longpeng (Mike, Cloud Infrastructure Service Product Dept.)
在 2021/9/4 5:55, Alex Williamson 写道: > On Wed, 25 Aug 2021 15:56:16 +0800 > "Longpeng(Mike)" wrote: > >> The main difference of the failure path in vfio_msi_enable and >> vfio_msi_disable_common is enable INTX or not. >> >> Extend the vfio_msi_disable_common to provide a arg to decide > > "an

Re: [PATCH v8 0/7] DEVICE_UNPLUG_GUEST_ERROR QAPI event

2021-09-06 Thread David Gibson
On Mon, Sep 06, 2021 at 09:47:48PM -0300, Daniel Henrique Barboza wrote: > Hi, > > This new version amends the QAPI doc in patch 5, as suggested > by David and Markus, and added all reviewed-by and acked-by > tags. I've staged this in the ppc-for-6.2 tree. Obviously it has some stuff that isn't

Re: [PATCH v4 2/5] spapr_numa.c: split FORM1 code into helpers

2021-09-06 Thread David Gibson
On Mon, Sep 06, 2021 at 09:50:36PM -0300, Daniel Henrique Barboza wrote: > > > On 9/6/21 9:30 PM, David Gibson wrote: > > On Fri, Aug 27, 2021 at 06:24:52AM -0300, Daniel Henrique Barboza wrote: > > > The upcoming FORM2 NUMA affinity will support asymmetric NUMA topologies > > > and doesn't need

Re: [PATCH v5 2/4] spapr_numa.c: split FORM1 code into helpers

2021-09-06 Thread David Gibson
On Mon, Sep 06, 2021 at 09:25:25PM -0300, Daniel Henrique Barboza wrote: 65;6402;1c> The upcoming FORM2 NUMA affinity will support asymmetric NUMA topologies > and doesn't need be concerned with all the legacy support for older > pseries FORM1 guests. > > We're also not going to calculate associa

Re: [PATCH v5 1/4] spapr: move NUMA associativity init to machine reset

2021-09-06 Thread David Gibson
On Mon, Sep 06, 2021 at 09:25:24PM -0300, Daniel Henrique Barboza wrote: > At this moment we only support one form of NUMA affinity, FORM1. This > allows us to init the internal structures during machine_init(), and > given that NUMA distances won't change during the guest lifetime we > don't need

Re: [PATCH v5 4/4] spapr: move FORM1 verifications to do_client_architecture_support()

2021-09-06 Thread David Gibson
On Mon, Sep 06, 2021 at 09:25:27PM -0300, Daniel Henrique Barboza wrote: > FORM2 NUMA affinity is prepared to deal with empty (memory/cpu less) > NUMA nodes. This is used by the DAX KMEM driver to locate a PAPR SCM > device that has a different latency than the original NUMA node from the > regular

Re: [PATCH v5 3/4] spapr_numa.c: base FORM2 NUMA affinity support

2021-09-06 Thread David Gibson
On Mon, Sep 06, 2021 at 09:25:26PM -0300, Daniel Henrique Barboza wrote: > The main feature of FORM2 affinity support is the separation of NUMA > distances from ibm,associativity information. This allows for a more > flexible and straightforward NUMA distance assignment without relying on > complex

[PATCH v8 7/7] memory_hotplug.c: send DEVICE_UNPLUG_GUEST_ERROR in acpi_memory_hotplug_write()

2021-09-06 Thread Daniel Henrique Barboza
MEM_UNPLUG_ERROR is deprecated since the introduction of DEVICE_UNPLUG_GUEST_ERROR. Keep emitting both while the deprecation of MEM_UNPLUG_ERROR is pending. CC: Michael S. Tsirkin CC: Igor Mammedov Acked-by: Michael S. Tsirkin Reviewed-by: Greg Kurz Reviewed-by: David Gibson Reviewed-by: Igor

[PATCH v8 5/7] qapi/qdev.json: add DEVICE_UNPLUG_GUEST_ERROR QAPI event

2021-09-06 Thread Daniel Henrique Barboza
At this moment we only provide one event to report a hotunplug error, MEM_UNPLUG_ERROR. As of Linux kernel 5.12 and QEMU 6.0.0, the pseries machine is now able to report unplug errors for other device types, such as CPUs. Instead of creating a (device_type)_UNPLUG_ERROR for each new device, create

[PATCH v8 6/7] spapr: use DEVICE_UNPLUG_GUEST_ERROR to report unplug errors

2021-09-06 Thread Daniel Henrique Barboza
Linux Kernel 5.12 is now unisolating CPU DRCs in the device_removal error path, signalling that the hotunplug process wasn't successful. This allow us to send a DEVICE_UNPLUG_GUEST_ERROR in drc_unisolate_logical() to signal this error to the management layer. We also have another error path in spa

[PATCH v8 2/7] spapr.c: handle dev->id in spapr_memory_unplug_rollback()

2021-09-06 Thread Daniel Henrique Barboza
As done in hw/acpi/memory_hotplug.c, pass an empty string if dev->id is NULL to qapi_event_send_mem_unplug_error() to avoid relying on a behavior that can be changed in the future. Suggested-by: Markus Armbruster Reviewed-by: Greg Kurz Reviewed-by: David Gibson Reviewed-by: Markus Armbruster S

[PATCH v8 3/7] spapr_drc.c: do not error_report() when drc->dev->id == NULL

2021-09-06 Thread Daniel Henrique Barboza
The error_report() call in drc_unisolate_logical() is not considering that drc->dev->id can be NULL, and the underlying functions error_report() calls to do its job (vprintf(), g_strdup_printf() ...) has undefined behavior when trying to handle "%s" with NULL arguments. Besides, there is no utilit

[PATCH v8 1/7] memory_hotplug.c: handle dev->id = NULL in acpi_memory_hotplug_write()

2021-09-06 Thread Daniel Henrique Barboza
qapi_event_send_mem_unplug_error() deals with @device being NULL by replacing it with an empty string ("") when emitting the event. Aside from the fact that this behavior (qapi visitor mapping NULL pointer to "") can be patched/changed someday, there's also the lack of utility that the event brings

Re: [PATCH v4 2/5] spapr_numa.c: split FORM1 code into helpers

2021-09-06 Thread Daniel Henrique Barboza
On 9/6/21 9:30 PM, David Gibson wrote: On Fri, Aug 27, 2021 at 06:24:52AM -0300, Daniel Henrique Barboza wrote: The upcoming FORM2 NUMA affinity will support asymmetric NUMA topologies and doesn't need be concerned with all the legacy support for older pseries FORM1 guests. We're also not go

[PATCH v8 4/7] qapi/qdev.json: fix DEVICE_DELETED parameters doc

2021-09-06 Thread Daniel Henrique Barboza
Clarify that @device is optional and that 'path' is the device path from QOM. This change follows Markus' suggestion verbatim, provided in full context here: https://lists.gnu.org/archive/html/qemu-devel/2021-07/msg01891.html Suggested-by: Markus Armbruster Reviewed-by: Greg Kurz Reviewed-by:

[PATCH v8 0/7] DEVICE_UNPLUG_GUEST_ERROR QAPI event

2021-09-06 Thread Daniel Henrique Barboza
Hi, This new version amends the QAPI doc in patch 5, as suggested by David and Markus, and added all reviewed-by and acked-by tags. changes from v7: - patch 5: * s/internal guest/guest reported/ - v7 link: https://lists.gnu.org/archive/html/qemu-devel/2021-08/msg04115.html Daniel Henrique Barb

Re: [PATCH v4 2/5] spapr_numa.c: split FORM1 code into helpers

2021-09-06 Thread David Gibson
On Fri, Aug 27, 2021 at 06:24:52AM -0300, Daniel Henrique Barboza wrote: > The upcoming FORM2 NUMA affinity will support asymmetric NUMA topologies > and doesn't need be concerned with all the legacy support for older > pseries FORM1 guests. > > We're also not going to calculate associativity doma

[PATCH v5 3/4] spapr_numa.c: base FORM2 NUMA affinity support

2021-09-06 Thread Daniel Henrique Barboza
The main feature of FORM2 affinity support is the separation of NUMA distances from ibm,associativity information. This allows for a more flexible and straightforward NUMA distance assignment without relying on complex associations between several levels of NUMA via ibm,associativity matches. Anoth

[PATCH v5 2/4] spapr_numa.c: split FORM1 code into helpers

2021-09-06 Thread Daniel Henrique Barboza
The upcoming FORM2 NUMA affinity will support asymmetric NUMA topologies and doesn't need be concerned with all the legacy support for older pseries FORM1 guests. We're also not going to calculate associativity domains based on numa distance (via spapr_numa_define_associativity_domains) since the

[PATCH v5 1/4] spapr: move NUMA associativity init to machine reset

2021-09-06 Thread Daniel Henrique Barboza
At this moment we only support one form of NUMA affinity, FORM1. This allows us to init the internal structures during machine_init(), and given that NUMA distances won't change during the guest lifetime we don't need to bother with that again. We're about to introduce FORM2, a new NUMA affinity m

[PATCH v5 0/4] pSeries FORM2 affinity support

2021-09-06 Thread Daniel Henrique Barboza
Hi, In this new version, the biggest change is that now we're initializing NUMA associativity internal data during machine_reset(), instead of machine_init(), to allow for the guest to switch between FORM1 and FORM2 during guest reset. All other changes are consequence of this design change. Chan

[PATCH v5 4/4] spapr: move FORM1 verifications to do_client_architecture_support()

2021-09-06 Thread Daniel Henrique Barboza
FORM2 NUMA affinity is prepared to deal with empty (memory/cpu less) NUMA nodes. This is used by the DAX KMEM driver to locate a PAPR SCM device that has a different latency than the original NUMA node from the regular memory. FORM2 is also enable to deal with asymmetric NUMA distances gracefully,

Re: [PATCH v7 5/7] qapi/qdev.json: add DEVICE_UNPLUG_GUEST_ERROR QAPI event

2021-09-06 Thread David Gibson
On Mon, Sep 06, 2021 at 09:40:47AM -0300, Daniel Henrique Barboza wrote: > > > On 9/4/21 8:49 AM, Markus Armbruster wrote: > > David Gibson writes: > > > > > On Wed, Sep 01, 2021 at 03:19:26PM +0200, Markus Armbruster wrote: > > > > Daniel Henrique Barboza writes: > > > > > > > > > At this mo

Re: [PATCH v3 2/9] qapi: make blockdev-add a coroutine command

2021-09-06 Thread Vladimir Sementsov-Ogievskiy
06.09.2021 22:28, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: We are going to support nbd reconnect on open in a next commit. This means that we want to do several connection attempts during some time. And this should be done in a coroutine, otherwise we'll stuck. Signed-off

Re: [PATCH] hw/display/ati_2d: Fix buffer overflow in ati_2d_blt (CVE-2021-3638)

2021-09-06 Thread Alexander Bulekov
On 210906 2019, Philippe Mathieu-Daudé wrote: > (Forgot to Cc Alex for eventual reproducer) Here you go. Should we be fuzzing this on OSS-Fuzz? = 8< = /* * cat << EOF | ./qemu-system-i386 -display none -machine accel=qtest, -m \ * 512M -device ati-vga,romfile= -nodefaul

Re: [PATCH] hw/display/ati_2d: Fix buffer overflow in ati_2d_blt (CVE-2021-3638)

2021-09-06 Thread BALATON Zoltan
On Mon, 6 Sep 2021, Philippe Mathieu-Daudé wrote: (Forgot to Cc Alex for eventual reproducer) On 9/6/21 6:44 PM, Mauro Matteo Cascella wrote: On Mon, Sep 6, 2021 at 5:31 PM Philippe Mathieu-Daudé wrote: When building QEMU with DEBUG_ATI defined then running with '-device ati-vga,romfile="" -

Re: [PATCH v3 2/9] qapi: make blockdev-add a coroutine command

2021-09-06 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > We are going to support nbd reconnect on open in a next commit. This > means that we want to do several connection attempts during some time. > And this should be done in a coroutine, otherwise we'll stuck. > > Signed-off-by: Vladimir Sementsov-Ogievskiy >

[PATCH v3 5/9] nbd/client-connection: improve error message of cancelled attempt

2021-09-06 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- nbd/client-connection.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nbd/client-connection.c b/nbd/client-connection.c index 722998c985..2bda42641d 100644 --- a/nbd/client-connection.c +++ b/nbd/client-connection.c

[PATCH v3 8/9] iotests.py: add qemu_io_popen()

2021-09-06 Thread Vladimir Sementsov-Ogievskiy
Add qemu-io Popen constructor wrapper. To be used in the following new test commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 4 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 3b7b57489a

[PATCH v3 9/9] iotests: add nbd-reconnect-on-open test

2021-09-06 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- .../qemu-iotests/tests/nbd-reconnect-on-open | 71 +++ .../tests/nbd-reconnect-on-open.out | 11 +++ 2 files changed, 82 insertions(+) create mode 100755 tests/qemu-iotests/tests/nbd-reconnect-on-open create mode 100644

[PATCH v3 6/9] iotests.py: add qemu_tool_popen()

2021-09-06 Thread Vladimir Sementsov-Ogievskiy
Split qemu_tool_popen() from qemu_tool_pipe_and_status() to be used separately. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iote

[PATCH v3 0/9] nbd reconnect on open

2021-09-06 Thread Vladimir Sementsov-Ogievskiy
Hi all! After a long delay here is v3. v3 is rebased on top of big refactoring of nbd connection code, and on top of last portion of it, not yet merged: Based-on: <20210902103805.25686-1-vsement...@virtuozzo.com> "[PATCH v6 0/5] block/nbd: drop connection_co" So, the core patch (02) is change

[PATCH v3 4/9] nbd/client-connection: nbd_co_establish_connection(): return real error

2021-09-06 Thread Vladimir Sementsov-Ogievskiy
The only user of errp is call to nbd_do_establish_connection() in nbd_open(). The only way to cancel this call is through open_timer timeout. And for this case, user will be more interested in description of last failed connect rather than in "Connection attempt cancelled by other operation". So,

[PATCH v3 7/9] iotests.py: add and use qemu_io_wrap_args()

2021-09-06 Thread Vladimir Sementsov-Ogievskiy
For qemu_io* functions support --image-opts argument, which conflicts with -f argument from qemu_io_args. For QemuIoInteractive use new wrapper as well, which allows relying on default format. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 22 ---

[PATCH v3 2/9] qapi: make blockdev-add a coroutine command

2021-09-06 Thread Vladimir Sementsov-Ogievskiy
We are going to support nbd reconnect on open in a next commit. This means that we want to do several connection attempts during some time. And this should be done in a coroutine, otherwise we'll stuck. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 3 ++- 1 file changed,

[PATCH v3 3/9] nbd: allow reconnect on open, with corresponding new options

2021-09-06 Thread Vladimir Sementsov-Ogievskiy
It is useful when start of vm and start of nbd server are not simple to sync. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 9 - block/nbd.c | 45 +++- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git

[PATCH v3 1/9] nbd/client-connection: nbd_co_establish_connection(): fix non set errp

2021-09-06 Thread Vladimir Sementsov-Ogievskiy
When we don't have a connection and blocking is false, we return NULL but don't set errp. That's wrong. We have two paths for calling nbd_co_establish_connection(): 1. nbd_open() -> nbd_do_establish_connection() -> ... but that will never set blocking=false 2. nbd_reconnect_attempt() -> nbd_co

Re: [PULL] qemu-socket unix socket bugfix 2021-09-06

2021-09-06 Thread Michael Tokarev
06.09.2021 21:41, Peter Maydell wrote: .. Hi. gpg says the key you signed this with has expired: gpg: Signature made Mon 06 Sep 2021 16:19:32 BST gpg:using RSA key 7B73BAD68BE7A2C289314B22701B4F6B1A693E59 gpg:issuer "m...@tls.msk.ru" gpg: Good signature from "Mich

Re: [RFC PATCH 0/2] riscv: Adding custom CSR related Kconfig options

2021-09-06 Thread Richard Henderson
On 9/6/21 9:05 AM, Alistair Francis wrote: I honestly don't see a scenario where that happens. The maintenance overhead and confusion of changing the CPUs at build time is too high. Yes indeed. One qemu image should support all cpu variations at once. I also don't think we should need that f

Re: [PULL] qemu-socket unix socket bugfix 2021-09-06

2021-09-06 Thread Peter Maydell
On Mon, 6 Sept 2021 at 16:21, Michael Tokarev wrote: > > The following changes since commit 935efca6c246c108253b0e4e51cc87648fc7ca10: > > Merge remote-tracking branch > 'remotes/thuth-gitlab/tags/pull-request-2021-09-06' into staging (2021-09-06 > 12:38:07 +0100) > > are available in the Git r

Re: [PATCH] hw/display/ati_2d: Fix buffer overflow in ati_2d_blt (CVE-2021-3638)

2021-09-06 Thread Philippe Mathieu-Daudé
(Forgot to Cc Alex for eventual reproducer) On 9/6/21 6:44 PM, Mauro Matteo Cascella wrote: > On Mon, Sep 6, 2021 at 5:31 PM Philippe Mathieu-Daudé > wrote: >> >> When building QEMU with DEBUG_ATI defined then running with >> '-device ati-vga,romfile="" -d unimp,guest_errors -trace ati\*' >> we

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-09-06 Thread Michael Tokarev
> Add --preserve-argv0 in qemu-binfmt-conf.sh to configure the preserve-argv0 > flag. ... > diff --git a/linux-user/main.c b/linux-user/main.c > @@ -697,6 +707,20 @@ int main(int argc, char **argv, char **envp) > } > } > > +/* > + * get binfmt_misc flags > + */ > +pr

Re: [PATCH v2 2/5] s390x: kvm: topology: interception of PTF instruction

2021-09-06 Thread Thomas Huth
On 22/07/2021 19.42, Pierre Morel wrote: Interception of the PTF instruction depending on the new KVM_CAP_S390_CPU_TOPOLOGY KVM extension. Signed-off-by: Pierre Morel --- hw/s390x/s390-virtio-ccw.c | 45 ++ include/hw/s390x/s390-virtio-ccw.h | 7 + t

[qemu-web RFC] CONTRIBUTING.md: Mention maintainers

2021-09-06 Thread Hanna Reitz
All patches to the QEMU website should be CC-ed to the website maintainers, who (right now) are Thomas and Paolo. Signed-off-by: Hanna Reitz --- This is an RFC first because I feel bad about sending a patch that gives people responsibilities who aren't me. But Thomas seemed to agree with me that

Re: [PATCH] hw/display/ati_2d: Fix buffer overflow in ati_2d_blt (CVE-2021-3638)

2021-09-06 Thread Mauro Matteo Cascella
On Mon, Sep 6, 2021 at 5:31 PM Philippe Mathieu-Daudé wrote: > > When building QEMU with DEBUG_ATI defined then running with > '-device ati-vga,romfile="" -d unimp,guest_errors -trace ati\*' > we get: > > ati_mm_write 4 0x16c0 DP_CNTL <- 0x1 > ati_mm_write 4 0x146c DP_GUI_MASTER_CNTL <- 0x2 >

Re: Guest Agent issue with 'guest-get-osinfo' command on Windows

2021-09-06 Thread Konstantin Kostiuk
On Mon, Sep 6, 2021 at 6:59 PM Richard W.M. Jones wrote: > On Mon, Sep 06, 2021 at 06:45:08PM +0300, Konstantin Kostiuk wrote: > > Hi All, > > > > I reviewed glib, libguestfs, and libosinfo tools. All tools read the > registry > > to get information about Windows but read different registry value

[qemu-web PATCH] Update FUSE block export blog post

2021-09-06 Thread Hanna Reitz
Because I forgot to CC Thomas on the discussion adding this post, it was merged prematurely. This patch updates the post to incorporate the feedback I received on it: - Title change: This article mostly deals with presenting a guest image in one image format as a raw image, so the title should

Re: [PATCH v6 0/5] hw/arm/virt: Introduce cpu topology support

2021-09-06 Thread Andrew Jones
On Fri, Sep 03, 2021 at 03:38:13PM +0800, wangyanan (Y) wrote: > > On 2021/9/3 15:25, Peter Maydell wrote: > > On Fri, 3 Sept 2021 at 08:05, wangyanan (Y) wrote: > > > > > > On 2021/9/2 23:56, Peter Maydell wrote: > > > > On Tue, 24 Aug 2021 at 13:20, Yanan Wang wrote: > > > > > This new versio

Re: [PATCH] meson.build: Do not look for VNC-related libraries if have_system is not set

2021-09-06 Thread Philippe Mathieu-Daudé
On 9/6/21 5:39 PM, Thomas Huth wrote: > When running "./configure --static --disable-system" there is currently > a warning if the static version of libpng is missing: > > WARNING: Static library 'png16' not found for dependency 'libpng', may not > be statically linked > > Since it does not mak

Re: Guest Agent issue with 'guest-get-osinfo' command on Windows

2021-09-06 Thread Richard W.M. Jones
On Mon, Sep 06, 2021 at 06:45:08PM +0300, Konstantin Kostiuk wrote: > Hi All, > > I reviewed glib, libguestfs, and libosinfo tools. All tools read the registry > to get information about Windows but read different registry values. All > information is returned in a localized form. > Related key: H

Re: [PULL v2 01/36] target/i386: add missing bits to CR4_RESERVED_MASK

2021-09-06 Thread Richard W.M. Jones
On Mon, Sep 06, 2021 at 05:26:57PM +0200, Paolo Bonzini wrote: > From: Daniel P. Berrangé > > Booting Fedora kernels with -cpu max hangs very early in boot. Disabling > the la57 CPUID bit fixes the problem. git bisect traced the regression to > > commit 213ff024a2f92020290296cb9dc29c2af3d4a221

Re: [PATCH 4/5] ebpf_rss_helper: Added helper for eBPF RSS.

2021-09-06 Thread Andrew Melnichenko
Hi, > I think it's for back-compatibility. > > E.g current codes works without mmap(), and user will surprise that it > wont' work after upgrading their qemu. > Well, the current code would require additional capabilities with "kernel.unprivileged_bpf_disabled=1", which may be possible on RedHat s

Re: [PULL v2 00/36] (Mostly) x86 changes for 2021-09-06

2021-09-06 Thread Peter Maydell
On Mon, 6 Sept 2021 at 16:28, Paolo Bonzini wrote: > > The following changes since commit 935efca6c246c108253b0e4e51cc87648fc7ca10: > > Merge remote-tracking branch > 'remotes/thuth-gitlab/tags/pull-request-2021-09-06' into staging (2021-09-06 > 12:38:07 +0100) > > are available in the Git rep

Re: Guest Agent issue with 'guest-get-osinfo' command on Windows

2021-09-06 Thread Konstantin Kostiuk
Hi All, I reviewed glib, libguestfs, and libosinfo tools. All tools read the registry to get information about Windows but read different registry values. All information is returned in a localized form. Related key: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion We can get 'pretty-name' from '

Re: [PATCH] meson.build: Do not look for VNC-related libraries if have_system is not set

2021-09-06 Thread Daniel P . Berrangé
On Mon, Sep 06, 2021 at 05:39:39PM +0200, Thomas Huth wrote: > When running "./configure --static --disable-system" there is currently > a warning if the static version of libpng is missing: > > WARNING: Static library 'png16' not found for dependency 'libpng', may not > be statically linked >

[PATCH] meson.build: Do not look for VNC-related libraries if have_system is not set

2021-09-06 Thread Thomas Huth
When running "./configure --static --disable-system" there is currently a warning if the static version of libpng is missing: WARNING: Static library 'png16' not found for dependency 'libpng', may not be statically linked Since it does not make sense to look for the VNC-related libraries at all

Re: arm: Launching EFI-enabled arm32 Linux

2021-09-06 Thread Andre Przywara
On Sat, 4 Sep 2021 21:26:45 +0200 Adam Lackorzynski wrote: Hi Adam, > while trying to launch an EFI-enabled arm32 Linux binary (zImage) I > noticed I get an undefined instruction exception on the first > instruction. Now this is a bit special because Linux uses a nop > instruction there that als

Re: [PATCH v3 0/6] qapi: Add support for aliases

2021-09-06 Thread Markus Armbruster
Kevin Wolf writes: > This series introduces alias definitions for QAPI object types (structs > and unions). > > This allows using the same QAPI type and visitor even when the syntax > has some variations between different external interfaces such as QMP > and the command line. > > It also provide

[PATCH] hw/display/ati_2d: Fix buffer overflow in ati_2d_blt (CVE-2021-3638)

2021-09-06 Thread Philippe Mathieu-Daudé
When building QEMU with DEBUG_ATI defined then running with '-device ati-vga,romfile="" -d unimp,guest_errors -trace ati\*' we get: ati_mm_write 4 0x16c0 DP_CNTL <- 0x1 ati_mm_write 4 0x146c DP_GUI_MASTER_CNTL <- 0x2 ati_mm_write 4 0x16c8 DP_MIX <- 0xff ati_mm_write 4 0x16c4 DP_DATATYP

Re: [PATCH v3 6/6] tests/qapi-schema: Test cases for aliases

2021-09-06 Thread Markus Armbruster
Kevin Wolf writes: > Signed-off-by: Kevin Wolf [...] > diff --git a/tests/unit/test-qobject-input-visitor.c > b/tests/unit/test-qobject-input-visitor.c > index e41b91a2a6..f2891b6f5d 100644 > --- a/tests/unit/test-qobject-input-visitor.c > +++ b/tests/unit/test-qobject-input-visitor.c > @@ -9

[PULL v2 01/36] target/i386: add missing bits to CR4_RESERVED_MASK

2021-09-06 Thread Paolo Bonzini
From: Daniel P. Berrangé Booting Fedora kernels with -cpu max hangs very early in boot. Disabling the la57 CPUID bit fixes the problem. git bisect traced the regression to commit 213ff024a2f92020290296cb9dc29c2af3d4a221 (HEAD, refs/bisect/bad) Author: Lara Lazier Date: Wed Jul 21 17:26:

[PULL v2 00/36] (Mostly) x86 changes for 2021-09-06

2021-09-06 Thread Paolo Bonzini
The following changes since commit 935efca6c246c108253b0e4e51cc87648fc7ca10: Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-09-06' into staging (2021-09-06 12:38:07 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstre

[PULL] qemu-socket unix socket bugfix 2021-09-06

2021-09-06 Thread Michael Tokarev
The following changes since commit 935efca6c246c108253b0e4e51cc87648fc7ca10: Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-09-06' into staging (2021-09-06 12:38:07 +0100) are available in the Git repository at: git://git.corpit.ru/qemu.git tags/patch-fetch for

Re: [PATCH v3 5/6] qapi: Add support for aliases

2021-09-06 Thread Markus Armbruster
Kevin Wolf writes: > Introduce alias definitions for object types (structs and unions). This > allows using the same QAPI type and visitor for many syntax variations > that exist in the external representation, like between QMP and the > command line. It also provides a new tool for evolving the

Re: [PATCH v3 4/6] qapi: Apply aliases in qobject-input-visitor

2021-09-06 Thread Markus Armbruster
Kevin Wolf writes: > When looking for an object in a struct in the external representation, > check not only the currently visited struct, but also whether an alias > in the current StackObject matches and try to fetch the value from the > alias then. Providing two values for the same object thro

Re: [PULL 00/13] Testing, build system and misc patches

2021-09-06 Thread Peter Maydell
On Mon, 6 Sept 2021 at 16:08, Paolo Bonzini wrote: > > On 06/09/21 11:51, Thomas Huth wrote: > > On 03/09/2021 18.49, Peter Maydell wrote: > >> But I think there is an underlying meson bug here which that kind of > >> use of an if is merely working around: if we ask for a static library > >> it sh

Re: [RFC PATCH : v3 2/2] Implementation of nvme-mi plugin in nvme-cli

2021-09-06 Thread Mohit Kapoor
On Tue, Aug 03, 2021 at 02:34:46PM +0530, Mohit Kapoor wrote: From: mohit kapoor Subject: [RFC PATCH : v3 2/2] Implementation of nvme-mi plugin in nvme-cli Hello All, Request to kindly provide your valuable feedback for the patches shared for nvme-mi over QEMU and nvme-cli. Looking forward fo

Re: [PULL 00/13] Testing, build system and misc patches

2021-09-06 Thread Paolo Bonzini
On 06/09/21 11:51, Thomas Huth wrote: On 03/09/2021 18.49, Peter Maydell wrote: On Fri, 3 Sept 2021 at 17:37, Alex Bennée wrote: Thomas Huth writes: On 03/09/2021 15.22, Peter Maydell wrote: This provokes a new warning from meson on a linux-static build: Run-time dependency appleframeworks

Re: [PATCH v2 6/8] pc: Add VIOT table for virtio-iommu

2021-09-06 Thread Eric Auger
Hi jean, On 9/3/21 4:32 PM, Jean-Philippe Brucker wrote: > The ACPI Virtual I/O Translation table (VIOT) describes the relation > between a virtio-iommu and the endpoints it manages. When a virtio-iommu > device is instantiated, add a VIOT table. As there is no used of pcms->virtio_iommu and virt

Re: [PATCH v2 8/8] docs: Add '-device virtio-iommu' entry

2021-09-06 Thread Eric Auger
Hi, On 9/3/21 4:32 PM, Jean-Philippe Brucker wrote: > Document the virtio-iommu device for qemu-system-x86_64. In particular > note the lack of interrupt remapping, which may be an important > limitation on x86. > > Suggested-by: Eric Auger > Signed-off-by: Jean-Philippe Brucker > --- > qemu-op

Re: [PATCH v2 7/8] pc: Allow instantiating a virtio-iommu device

2021-09-06 Thread Eric Auger
Hi Jean, On 9/3/21 4:32 PM, Jean-Philippe Brucker wrote: > From: Eric Auger > > Add a hotplug handler for virtio-iommu on x86 and set the necessary > reserved region property. On x86, the [0xfee0, 0xfeef] DMA > region is reserved for MSIs. DMA transactions to this range either > trigger I

Re: [PATCH v2 8/8] docs: Add '-device virtio-iommu' entry

2021-09-06 Thread Daniel P . Berrangé
On Fri, Sep 03, 2021 at 04:32:09PM +0200, Jean-Philippe Brucker wrote: > Document the virtio-iommu device for qemu-system-x86_64. In particular > note the lack of interrupt remapping, which may be an important > limitation on x86. > > Suggested-by: Eric Auger > Signed-off-by: Jean-Philippe Brucke

Re: [PATCH v2 8/8] docs: Add '-device virtio-iommu' entry

2021-09-06 Thread Eric Auger
Hi Jean, On 9/3/21 4:32 PM, Jean-Philippe Brucker wrote: > Document the virtio-iommu device for qemu-system-x86_64. In particular Nit: this is not only for qemu-system-x86_6. This also documents the option usage for aarch64. Only the interrupt remapping note is x86-64 specific. I think it also wo

Re: [PATCH v2 4/8] hw/arm/virt: Remove device tree restriction for virtio-iommu

2021-09-06 Thread Eric Auger
Hi Jean, On 9/3/21 4:32 PM, Jean-Philippe Brucker wrote: > virtio-iommu is now supported with ACPI VIOT as well as device tree. > Remove the restriction that prevents from instantiating a virtio-iommu > device under ACPI. > > Signed-off-by: Jean-Philippe Brucker Reviewed-by: Eric Auger Eric >

Re: [PATCH v2] include/block.h: remove outdated comment

2021-09-06 Thread Stefan Hajnoczi
On Fri, Sep 03, 2021 at 01:38:00PM +0200, Emanuele Giuseppe Esposito wrote: > There are a couple of errors in bdrv_drained_begin header comment: > - block_job_pause does not exist anymore, it has been replaced > with job_pause in b15de82867 > - job_pause is automatically invoked as a .drained_beg

  1   2   3   >