Re: [Qemu-devel] [PATCH 2/3] spapr/pci: Free MSIs during reset

2019-07-28 Thread David Gibson
On Fri, Jul 26, 2019 at 04:44:44PM +0200, Greg Kurz wrote: > When the machine is reset, the MSI bitmap is cleared but the allocated > MSIs are not freed. Some operating systems, such as AIX, can detect the > previous configuration and assert. > > Empty the MSI cache, this performs the needed clean

Re: [Qemu-devel] [PATCH 3/3] spapr/irq: Drop spapr_irq_msi_reset()

2019-07-28 Thread David Gibson
On Fri, Jul 26, 2019 at 04:44:49PM +0200, Greg Kurz wrote: > PHBs already take care of clearing the MSIs from the bitmap during reset > or unplug. No need to do this globally from the machine code. Rather add > an assert to ensure that PHBs have acted as expected. > > Signed-off-by: Greg Kurz Ap

Re: [Qemu-devel] [PATCH v2 09/17] ppc/xive: Extend XiveTCTX with a XiveRouter pointer

2019-07-28 Thread David Gibson
On Thu, Jul 18, 2019 at 01:54:12PM +0200, Cédric Le Goater wrote: > This is to perform lookups in the NVT table when a vCPU is dispatched > and possibily resend interrupts. > > Future XIVE chip will use a different class for the model of the > interrupt controller and we might need to change the t

Re: [Qemu-devel] [PATCH v2 09/17] ppc/xive: Extend XiveTCTX with a XiveRouter pointer

2019-07-28 Thread Cédric Le Goater
On 28/07/2019 09:46, David Gibson wrote: > On Thu, Jul 18, 2019 at 01:54:12PM +0200, Cédric Le Goater wrote: >> This is to perform lookups in the NVT table when a vCPU is dispatched >> and possibily resend interrupts. >> >> Future XIVE chip will use a different class for the model of the >> interru

Re: [Qemu-devel] Question regarding tcg trace-events

2019-07-28 Thread Alex Bennée
sainath grandhi writes: > Hello > I am working with qemu tracing support and combined with tcg. > I read that if tcg property is used for trace-event, it generates a > trace-event once during translation and another trace-event after the > execution. > > I made the following change in target/i3

Re: [Qemu-devel] [Virtio-fs] [PATCH 2/5] virtiofsd: prevent lo_lookup() NULL pointer dereference

2019-07-28 Thread piaojun
Hi Stefan, On 2019/7/26 17:11, Stefan Hajnoczi wrote: > Most lo_do_lookup() have already checked that the parent inode exists. > lo_lookup() hasn't and can therefore hit a NULL pointer dereference when > lo_inode(req, parent) returns NULL. > > Signed-off-by: Stefan Hajnoczi > --- > contrib/virt

[Qemu-devel] [PATCH 2/3] memory-device: break the loop if no hint is provided

2019-07-28 Thread Wei Yang
When there is no hint, the first un-overlapped range is the proper one. Just break the loop instead of iterate the whole list. Signed-off-by: Wei Yang --- hw/mem/memory-device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c index df3261b32a

[Qemu-devel] [PATCH 1/3] memory-device: not necessary to use goto for the last check

2019-07-28 Thread Wei Yang
We are already at the last condition check. Signed-off-by: Wei Yang --- hw/mem/memory-device.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c index 5f2c408036..df3261b32a 100644 --- a/hw/mem/memory-device.c +++ b/hw/mem/memory-device.c @@ -186,

[Qemu-devel] [PATCH 0/3] memory-device: refine memory_device_get_free_addr

2019-07-28 Thread Wei Yang
When we iterate the memory-device list to get the available range, it is not necessary to iterate the whole list. 1) the first non-overlap range is the proper one if no hint is provided 2) no more overlap for hinted range if tmp exceed it Wei Yang (3): memory-device: not necessary to use goto f

[Qemu-devel] [PATCH 3/3] memory-device: break the loop if tmp exceed the hinted range

2019-07-28 Thread Wei Yang
The memory-device list built by memory_device_build_list is ordered by its address, this means if the tmp range exceed the hinted range, all the following range will not overlap with it. Signed-off-by: Wei Yang --- hw/mem/memory-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

Re: [Qemu-devel] [PATCH v2 03/14] audio: add audiodev property to vnc and wav_capture

2019-07-28 Thread Zoltán Kővágó
On 2019-07-22 16:21, Markus Armbruster wrote: "Zoltán Kővágó" writes: On 2019-07-16 08:23, Markus Armbruster wrote: "Kővágó, Zoltán" writes: Signed-off-by: Kővágó, Zoltán --- ui/vnc.h| 2 ++ monitor/misc.c | 12 +++- ui/vnc.c| 15 ++- hmp-com

Re: [Qemu-devel] [PATCH v2 03/14] audio: add audiodev property to vnc and wav_capture

2019-07-28 Thread Zoltán Kővágó
On 2019-07-28 15:42, Zoltán Kővágó wrote: On 2019-07-22 16:21, Markus Armbruster wrote: "Zoltán Kővágó" writes: On 2019-07-16 08:23, Markus Armbruster wrote: "Kővágó, Zoltán" writes: Signed-off-by: Kővágó, Zoltán ---    ui/vnc.h    |  2 ++    monitor/misc.c  | 12 +++-    ui/v

Re: [Qemu-devel] [PATCH 2/2] iotests: use python logging for iotests.log()

2019-07-28 Thread Eduardo Habkost
On Fri, Jul 26, 2019 at 06:52:01PM -0400, John Snow wrote: > We can turn logging on/off globally instead of per-function. > > Remove use_log from run_job, and use python logging to turn on > diffable output when we run through a script entry point. > > (No, I have no idea why output on 245 change

Re: [Qemu-devel] [PATCH 1/2] iotests: add script_initialize

2019-07-28 Thread Eduardo Habkost
On Fri, Jul 26, 2019 at 06:52:00PM -0400, John Snow wrote: > Like script_main, but doesn't require a single point of entry. > Replace all existing initialization sections with this drop-in replacement. > > This brings debug support to all existing script-style iotests. > > Note: supported_oses=['

[Qemu-devel] [PATCH 0/2] add speed limit for multifd migration

2019-07-28 Thread Ivan Ren
Currently multifd migration has not been limited and it will consume the whole bandwidth of Nic. These two patches add speed limitation to it. Ivan Ren (2): migration: add qemu_file_update_rate_transfer interface migration: add speed limit for multifd migration migration/qemu-file.c | 5 +++

[Qemu-devel] [PATCH 1/2] migration: add qemu_file_update_rate_transfer interface

2019-07-28 Thread Ivan Ren
Add qemu_file_update_rate_transfer for just update bytes_xfer for speed limitation. This will be used for further migration feature such as multifd migration. Signed-off-by: Ivan Ren --- migration/qemu-file.c | 5 + migration/qemu-file.h | 1 + 2 files changed, 6 insertions(+) diff --git a/

[Qemu-devel] [PATCH 2/2] migration: add speed limit for multifd migration

2019-07-28 Thread Ivan Ren
Limit the speed of multifd migration through common speed limitation qemu file. Signed-off-by: Ivan Ren --- migration/ram.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 889148dd84..e3fde16776 100644 --- a/mig

Re: [Qemu-devel] [PATCH qemu RFC 4/4] spapr: Implement SLOF-less client_architecture_support

2019-07-28 Thread Alexey Kardashevskiy
On 28/07/2019 16:09, David Gibson wrote: > On Sat, Jul 20, 2019 at 11:28:50AM +1000, Alexey Kardashevskiy wrote: >> QEMU already implements H_CAS called by SLOF. The existing handler >> prepares a diff FDT and SLOF applies it on top of its current tree. >> In SLOF-less setup when the user explic

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/2] tests.acceptance.avocado_qemu: Add support for powerpc

2019-07-28 Thread Satheesh Rajendran
On Fri, Jul 26, 2019 at 01:49:00PM +0200, Greg Kurz wrote: > On Fri, 26 Jul 2019 12:48:09 +0530 > sathn...@linux.vnet.ibm.com wrote: > > > From: Satheesh Rajendran > > > > Current acceptance test will not run in powerpc Little endian > > environment due the arch name does not match the qemu bina

Re: [Qemu-devel] [PATCH v2 09/17] ppc/xive: Extend XiveTCTX with a XiveRouter pointer

2019-07-28 Thread David Gibson
On Sun, Jul 28, 2019 at 11:06:27AM +0200, Cédric Le Goater wrote: > On 28/07/2019 09:46, David Gibson wrote: > > On Thu, Jul 18, 2019 at 01:54:12PM +0200, Cédric Le Goater wrote: > >> This is to perform lookups in the NVT table when a vCPU is dispatched > >> and possibily resend interrupts. > >> >

Re: [Qemu-devel] [PATCH v2 03/14] audio: add audiodev property to vnc and wav_capture

2019-07-28 Thread Markus Armbruster
"Zoltán Kővágó" writes: > On 2019-07-28 15:42, Zoltán Kővágó wrote: >> On 2019-07-22 16:21, Markus Armbruster wrote: >>> "Zoltán Kővágó" writes: >>> On 2019-07-16 08:23, Markus Armbruster wrote: [...] >> diff --git a/hmp-commands.hx b/hmp-commands.hx >> index bfa5681dd2..fa7f009268

[Qemu-devel] [for-4.2 PATCH 0/6] Block-related record/replay fixes

2019-07-28 Thread Pavel Dovgalyuk
The set of patches include the block-related updates of the record/replay icount feature: - application of 'snapshot' option on the file layer instead of the top one: command line and documentation fix - implementation of bdrv_snapshot_goto for blkreplay driver - start/stop fix in replay mode

[Qemu-devel] [for-4.2 PATCH 2/6] replay: disable default snapshot for record/replay

2019-07-28 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch disables setting '-snapshot' option on by default in record/replay mode. This is needed for creating vmstates in record and replay modes. Signed-off-by: Pavel Dovgalyuk Acked-by: Kevin Wolf --- vl.c | 10 -- 1 file changed, 8 insertions(+), 2 deletio

[Qemu-devel] [for-4.2 PATCH 1/6] block: implement bdrv_snapshot_goto for blkreplay

2019-07-28 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch enables making snapshots with blkreplay used in block devices. This function is required to make bdrv_snapshot_goto without calling .bdrv_open which is not implemented. Signed-off-by: Pavel Dovgalyuk Acked-by: Kevin Wolf --- block/blkreplay.c |8

[Qemu-devel] [for-4.2 PATCH 3/6] replay: update docs for record/replay with block devices

2019-07-28 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch updates the description of the command lines for using record/replay with attached block devices. Signed-off-by: Pavel Dovgalyuk --- docs/replay.txt | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/replay.txt b/docs/replay

[Qemu-devel] [for-4.2 PATCH 5/6] replay: finish record/replay before closing the disks

2019-07-28 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk After recent updates block devices cannot be closed on qemu exit. This happens due to the block request polling when replay is not finished. Therefore now we stop execution recording before closing the block devices. Signed-off-by: Pavel Dovgalyuk --- replay/replay.c |

[Qemu-devel] [PATCH v8 00/11] Build ACPI Heterogeneous Memory Attribute Table (HMAT)

2019-07-28 Thread Tao Xu
This series of patches will build Heterogeneous Memory Attribute Table (HMAT) according to the command line. The ACPI HMAT describes the memory attributes, such as memory side cache attributes and bandwidth and latency details, related to the Memory Proximity Domain. The software is expected to use

[Qemu-devel] [PATCH v8 09/11] numa: Extend the CLI to provide memory latency and bandwidth information

2019-07-28 Thread Tao Xu
From: Liu Jingqi Add -numa hmat-lb option to provide System Locality Latency and Bandwidth Information. These memory attributes help to build System Locality Latency and Bandwidth Information Structure(s) in ACPI Heterogeneous Memory Attribute Table (HMAT). Signed-off-by: Liu Jingqi Signed-off-

[Qemu-devel] [for-4.2 PATCH 4/6] replay: don't drain/flush bdrv queue while RR is working

2019-07-28 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk In record/replay mode bdrv queue is controlled by replay mechanism. It does not allow saving or loading the snapshots when bdrv queue is not empty. Stopping the VM is not blocked by nonempty queue, but flushing the queue is still impossible there, because it may cause deadlo

[Qemu-devel] [for-4.2 PATCH 6/6] replay: add BH oneshot event for block layer

2019-07-28 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk Replay is capable of recording normal BH events, but sometimes there are single use callbacks scheduled with aio_bh_schedule_oneshot function. This patch enables recording and replaying such callbacks. Block layer uses these events for calling the completion function. Replay

[Qemu-devel] [PATCH v8 02/11] numa: move numa global variable nb_numa_nodes into MachineState

2019-07-28 Thread Tao Xu
Add struct NumaState in MachineState and move existing numa global nb_numa_nodes(renamed as "num_nodes") into NumaState. And add variable numa_support into MachineClass to decide which submachines support NUMA. Suggested-by: Igor Mammedov Suggested-by: Eduardo Habkost Signed-off-by: Tao Xu ---

[Qemu-devel] [PATCH v8 05/11] numa: Extend CLI to provide initiator information for numa nodes

2019-07-28 Thread Tao Xu
In ACPI 6.3 chapter 5.2.27 Heterogeneous Memory Attribute Table (HMAT), The initiator represents processor which access to memory. And in 5.2.27.3 Memory Proximity Domain Attributes Structure, the attached initiator is defined as where the memory controller responsible for a memory proximity domain

[Qemu-devel] [PATCH v8 07/11] hmat acpi: Build System Locality Latency and Bandwidth Information Structure(s)

2019-07-28 Thread Tao Xu
From: Liu Jingqi This structure describes the memory access latency and bandwidth information from various memory access initiator proximity domains. The latency and bandwidth numbers represented in this structure correspond to rated latency and bandwidth for the platform. The software could use

[Qemu-devel] [Bug 1838228] [NEW] Slirp Broadcast traffic

2019-07-28 Thread Chris Koch
Public bug reported: Hi all, Version: QEMU emulator version 3.1.0 (Debian 1:3.1+dfsg-7+build1) I'm running some DHCP traffic to a *custom* DHCP server with user-mode networking in QEMU. I'm using port 30067 for the server, so this does not conflict with the built-in DHCP server. DHCP broadcasts

[Qemu-devel] [PATCH v8 11/11] tests/bios-tables-test: add test cases for ACPI HMAT

2019-07-28 Thread Tao Xu
ACPI table HMAT has been introduced, QEMU now builds HMAT tables for Heterogeneous Memory with boot option '-numa node'. Add test cases on PC and Q35 machines with 2 numa nodes. Because HMAT is generated when system enable numa, the following tables need to be added for this test: tests/acpi-tes

[Qemu-devel] [PATCH v8 03/11] numa: move numa global variable have_numa_distance into MachineState

2019-07-28 Thread Tao Xu
Move existing numa global have_numa_distance into NumaState. Reviewed-by: Igor Mammedov Reviewed-by: Liu Jingqi Suggested-by: Igor Mammedov Suggested-by: Eduardo Habkost Signed-off-by: Tao Xu --- No changes in v8. --- hw/arm/sbsa-ref.c| 2 +- hw/arm/virt-acpi-build.c | 2 +- hw/arm/

[Qemu-devel] [PATCH v8 01/11] hw/arm: simplify arm_load_dtb

2019-07-28 Thread Tao Xu
In struct arm_boot_info, kernel_filename, initrd_filename and kernel_cmdline are copied from from MachineState. This patch add MachineState as a parameter into arm_load_dtb() and move the copy chunk of kernel_filename, initrd_filename and kernel_cmdline into arm_load_kernel(). Reviewed-by: Igor Ma

[Qemu-devel] [PATCH v8 10/11] numa: Extend the CLI to provide memory side cache information

2019-07-28 Thread Tao Xu
From: Liu Jingqi Add -numa hmat-cache option to provide Memory Side Cache Information. These memory attributes help to build Memory Side Cache Information Structure(s) in ACPI Heterogeneous Memory Attribute Table (HMAT). Signed-off-by: Liu Jingqi Signed-off-by: Tao Xu --- No changes in v8. --

[Qemu-devel] [PATCH v8 04/11] numa: move numa global variable numa_info into MachineState

2019-07-28 Thread Tao Xu
Move existing numa global numa_info (renamed as "nodes") into NumaState. Reviewed-by: Igor Mammedov Suggested-by: Igor Mammedov Suggested-by: Eduardo Habkost Signed-off-by: Tao Xu Signed-off-by: Tao Xu --- No changes in v8. --- exec.c | 2 +- hw/acpi/aml-build.c | 6

[Qemu-devel] [PATCH v8 08/11] hmat acpi: Build Memory Side Cache Information Structure(s)

2019-07-28 Thread Tao Xu
From: Liu Jingqi This structure describes memory side cache information for memory proximity domains if the memory side cache is present and the physical device forms the memory side cache. The software could use this information to effectively place the data in memory to maximize the performance

Re: [Qemu-devel] [PATCH 1/2] migration: add qemu_file_update_rate_transfer interface

2019-07-28 Thread Wei Yang
On Mon, Jul 29, 2019 at 10:32:52AM +0800, Ivan Ren wrote: >Add qemu_file_update_rate_transfer for just update bytes_xfer for >speed limitation. This will be used for further migration feature >such as multifd migration. > >Signed-off-by: Ivan Ren >--- > migration/qemu-file.c | 5 + > migration/

[Qemu-devel] [PATCH v8 06/11] hmat acpi: Build Memory Proximity Domain Attributes Structure(s)

2019-07-28 Thread Tao Xu
From: Liu Jingqi HMAT is defined in ACPI 6.3: 5.2.27 Heterogeneous Memory Attribute Table (HMAT). The specification references below link: http://www.uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf It describes the memory attributes, such as memory side cache attributes and bandw

Re: [Qemu-devel] [PATCH 2/2] migration: add speed limit for multifd migration

2019-07-28 Thread Wei Yang
On Mon, Jul 29, 2019 at 10:32:53AM +0800, Ivan Ren wrote: >Limit the speed of multifd migration through common speed limitation >qemu file. > >Signed-off-by: Ivan Ren >--- > migration/ram.c | 22 -- > 1 file changed, 12 insertions(+), 10 deletions(-) > >diff --git a/migration/ra

Re: [Qemu-devel] [for-4.2 PATCH 0/6] Block-related record/replay fixes

2019-07-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/156438176555.22071.10523120047318890136.stgit@pasha-Precision-3630-Tower/ Hi, This series failed build test on s390x host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with #

Re: [Qemu-devel] [PATCH 1/3] memory-device: not necessary to use goto for the last check

2019-07-28 Thread Igor Mammedov
On Sun, 28 Jul 2019 21:13:02 +0800 Wei Yang wrote: > We are already at the last condition check. > > Signed-off-by: Wei Yang Reviewed-by: Igor Mammedov > --- > hw/mem/memory-device.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c > i

Re: [Qemu-devel] [PATCH 2/2] migration: add speed limit for multifd migration

2019-07-28 Thread Ivan Ren
>> if (multifd_send_state->pages->used) { >>-if (multifd_send_pages() < 0) { >>+if (multifd_send_pages(rs) < 0) { >> error_report("%s: multifd_send_pages fail", __func__); >> return; >> } >>@@ -1083,6 +1084,7 @@ static void multifd_send_sync_main(

Re: [Qemu-devel] [PATCH v7 02/11] numa: move numa global variable nb_numa_nodes into MachineState

2019-07-28 Thread Tao Xu
On 7/26/2019 10:17 PM, Eduardo Habkost wrote: On Fri, Jul 26, 2019 at 03:43:43PM +0200, Igor Mammedov wrote: On Wed, 24 Jul 2019 15:15:28 -0300 Eduardo Habkost wrote: On Wed, Jul 24, 2019 at 05:48:11PM +0200, Igor Mammedov wrote: On Wed, 24 Jul 2019 12:02:41 -0300 Eduardo Habkost wrote: