Re: virtio capabilities

2019-12-13 Thread Alexey Kardashevskiy
On 13/12/2019 18:24, Michael S. Tsirkin wrote: > On Fri, Dec 13, 2019 at 05:05:05PM +1100, Alexey Kardashevskiy wrote: >> Hi! >> >> I am having an issue with capabilities (hopefully the chunk formatting >> won't break). >> >> The problem is that when virtio_pci_find_capability() reads >> pci_fin

Re: virtio capabilities

2019-12-13 Thread Michael S. Tsirkin
On Fri, Dec 13, 2019 at 07:29:40PM +1100, Alexey Kardashevskiy wrote: > > > On 13/12/2019 18:24, Michael S. Tsirkin wrote: > > On Fri, Dec 13, 2019 at 05:05:05PM +1100, Alexey Kardashevskiy wrote: > >> Hi! > >> > >> I am having an issue with capabilities (hopefully the chunk formatting > >> won't

Re: [PATCH] mos6522: remove anh register

2019-12-13 Thread Laurent Vivier
Le 13/12/2019 à 02:44, David Gibson a écrit : > On Thu, Dec 12, 2019 at 08:43:59PM +0100, Laurent Vivier wrote: >> Register addr 1 is defined as buffer A with handshake (vBufAH), >> register addr 15 is also defined as buffer A without handshake (vBufA). >> >> Linux kernel has a big "DON'T USE!" nex

Re: [PATCH] linux-user:Fix align mistake when mmap guest space

2019-12-13 Thread Laurent Vivier
Le 13/12/2019 à 03:29, Xinyu Li a écrit : > In init_guest_space, we need to mmap guest space. If the return address > of first mmap is not aligned with align, which was set to MAX(SHMLBA, > qemu_host_page_size), we need unmap and a new mmap(space is larger than > first size). The new size is named

Re: [PATCH 2/2] numa: properly check if numa is supported

2019-12-13 Thread Igor Mammedov
On Fri, 13 Dec 2019 09:33:10 +0800 Tao Xu wrote: > On 12/12/2019 8:48 PM, Igor Mammedov wrote: > > Commit aa57020774b, by mistake used MachineClass::numa_mem_supported > > to check if NUMA is supported by machine and also as unrelated change > > set it to true for sbsa-ref board. > > > > Luckily

Re: [PATCH v26 20/21] Add rx-softmmu

2019-12-13 Thread Philippe Mathieu-Daudé
On 10/14/19 1:57 PM, Yoshinori Sato wrote: Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49044-17-ys...@users.sourceforge.jp> Signed-off-by: Richard Henderson pick ed65c02993 target/rx: Add RX to SysEmuTarget pi

Re: [PATCH] mos6522: remove anh register

2019-12-13 Thread Philippe Mathieu-Daudé
On 12/12/19 8:43 PM, Laurent Vivier wrote: Register addr 1 is defined as buffer A with handshake (vBufAH), register addr 15 is also defined as buffer A without handshake (vBufA). Maybe add "IOW both addresses access the same register." Linux kernel has a big "DON'T USE!" next to the register

Re: [PATCH RESEND v20 2/8] numa: Extend CLI to provide memory latency and bandwidth information

2019-12-13 Thread Igor Mammedov
On Fri, 13 Dec 2019 09:19:23 +0800 Tao Xu wrote: > 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

Re: [PATCH RESEND v20 3/8] numa: Extend CLI to provide memory side cache information

2019-12-13 Thread Igor Mammedov
On Fri, 13 Dec 2019 09:19:24 +0800 Tao Xu wrote: > 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). > Before using

Re: [PATCH v2 3/8] hw: replace hw/i386/pc.h with a header just for the i8259

2019-12-13 Thread Philippe Mathieu-Daudé
On 12/12/19 9:05 PM, Paolo Bonzini wrote: Il gio 12 dic 2019, 20:04 Philippe Mathieu-Daudé > ha scritto: On 12/12/19 6:29 PM, Paolo Bonzini wrote: > Remove the need to include i386/pc.h to get to the i8259 functions. > This is enough to remove the inclusio

Re: [PATCH RESEND v20 7/8] tests/numa: Add case for QMP build HMAT

2019-12-13 Thread Igor Mammedov
On Fri, 13 Dec 2019 09:19:28 +0800 Tao Xu wrote: > Check configuring HMAT usecase > > Acked-by: Markus Armbruster > Suggested-by: Igor Mammedov > Signed-off-by: Tao Xu Reviewed-by: Igor Mammedov > --- > > Changes in v20: > - Fix the wrong target in pc_hmat_erange_cfg > - Use g_ass

[PATCH] virtio-mmio: Clear v2 transport state on soft reset

2019-12-13 Thread Jean-Philippe Brucker
At the moment when the guest writes a status of 0, we only reset the virtio core state but not the virtio-mmio state. The virtio-mmio specification says (v1.1 cs01, 4.2.2.1 Device Requirements: MMIO Device Register Layout): Upon reset, the device MUST clear all bits in InterruptStatus and

Re: [PATCH for-5.0 v11 12/20] qapi: Introduce DEFINE_PROP_INTERVAL

2019-12-13 Thread Markus Armbruster
Auger Eric writes: > Hi Markus, > > On 12/12/19 1:17 PM, Markus Armbruster wrote: >> Eric Auger writes: >> >>> Introduce a new property defining a labelled interval: >>> ,,label. >>> >>> This will be used to encode reserved IOVA regions. The label >>> is left undefined to ease reuse accross use

Re: [PATCH RESEND v20 0/8] Build ACPI Heterogeneous Memory Attribute Table (HMAT)

2019-12-13 Thread Michael S. Tsirkin
On Fri, Dec 13, 2019 at 09:19:21AM +0800, Tao Xu wrote: > 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

Re: [PATCH 1/2] vhost-user: add VHOST_USER_RESET_DEVICE to reset devices

2019-12-13 Thread Michael S. Tsirkin
On Tue, Oct 29, 2019 at 05:38:02PM -0400, Raphael Norwitz wrote: > Add a VHOST_USER_RESET_DEVICE message which will reset the vhost user > backend. Disabling all rings, and resetting all internal state, ready > for the backend to be reinitialized. > > A backend has to report it supports this featu

Re: [PATCH] virtio-mmio: Clear v2 transport state on soft reset

2019-12-13 Thread Sergio Lopez
Jean-Philippe Brucker writes: > At the moment when the guest writes a status of 0, we only reset the > virtio core state but not the virtio-mmio state. The virtio-mmio > specification says (v1.1 cs01, 4.2.2.1 Device Requirements: > MMIO Device Register Layout): > > Upon reset, the device MUS

Re: [PATCH v0 2/2] block: allow to set 'drive' property on a realized block device

2019-12-13 Thread Kevin Wolf
Am 18.11.2019 um 11:50 hat Denis Plotnikov geschrieben: > > > On 10.11.2019 22:08, Denis Plotnikov wrote: > > > > On 10.11.2019 22:03, Denis Plotnikov wrote: > >> This allows to change (replace) the file on a block device and is useful > >> to workaround exclusive file access restrictions, e.g. t

Re: [PATCH] qcow2: Use offset_into_cluster()

2019-12-13 Thread Kevin Wolf
Am 12.12.2019 um 11:01 hat Alberto Garcia geschrieben: > There's a couple of places left in the qcow2 code that still do the > calculation manually, so let's replace them. > > Signed-off-by: Alberto Garcia Thanks, applied to the block branch. Kevin

Re: [RFC v4 PATCH 00/49] Initial support of multi-process qemu - status update

2019-12-13 Thread Stefan Hajnoczi
On Mon, Dec 09, 2019 at 10:47:17PM -0800, Elena Ufimtseva wrote: > At this moment we are working on the first stage of the project with help of > the Nutanix developers. > The questions we have gathered so far will be addressed with muser > and Qemu developers after we finish the first stage and ma

[PATCH 1/4] hw/i386/pc: Convert DPRINTF() to trace events

2019-12-13 Thread Philippe Mathieu-Daudé
Convert the deprecated DPRINTF() macro to trace events. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 19 +-- hw/i386/trace-events | 6 ++ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index ac08e63604..66a30c

[PATCH 0/4] hw/i386/pc: Extract the port92 device

2019-12-13 Thread Philippe Mathieu-Daudé
In this series we - remove the old DPRINTF() macro in hw/i386/pc.c - extract the TYPE_PORT92 device from the same file, reducing it by 5%. Philippe Mathieu-Daudé (4): hw/i386/pc: Convert DPRINTF() to trace events hw/i386/pc: Use TYPE_PORT92 instead of hardcoded string hw/i386/pc: Inline po

[PATCH 2/4] hw/i386/pc: Use TYPE_PORT92 instead of hardcoded string

2019-12-13 Thread Philippe Mathieu-Daudé
By using the TYPE_* definitions for devices, we can: - quickly find where devices are used with 'git-grep' - easily rename a device (one-line change). Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386

[PATCH 3/4] hw/i386/pc: Inline port92_init()

2019-12-13 Thread Philippe Mathieu-Daudé
This one-line function is not very helpful, so remove it by inlining the call to qdev_connect_gpio_out_named(). Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2c2ae27447..2e

Re: [PATCH] vhost-user-fs: remove "vhostfd" property

2019-12-13 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > The property doesn't make much sense for a vhost-user device. > > Signed-off-by: Marc-André Lureau Queued for virtiofs > --- > hw/virtio/vhost-user-fs.c | 1 - > include/hw/virtio/vhost-user-fs.h | 1 - > 2 files changed, 2 del

[PATCH 4/4] hw/i386/pc: Extract the port92 device

2019-12-13 Thread Philippe Mathieu-Daudé
This device is only used by the PC machines. The pc.c file is already big enough, with 2255 lines. By removing 113 lines of it, we reduced it by 5%. It is now a bit easier to navigate the file. Signed-off-by: Philippe Mathieu-Daudé --- checkpatch warning: WARNING: added, moved or deleted file(

Re: [PATCH] virtio-fs: fix MSI-X nvectors calculation

2019-12-13 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > The following MSI-X vectors are required: > * VIRTIO Configuration Change > * hiprio virtqueue > * requests virtqueues > > Fix the calculation to reserve enough MSI-X vectors. Otherwise guest > drivers fall back to a sub-optional configuration w

Re: How to extend QEMU's vhost-user tests after implementing vhost-user-blk device backend

2019-12-13 Thread Stefan Hajnoczi
On Wed, Dec 11, 2019 at 11:25:32PM +0800, Coiby Xu wrote: > I'm now writing the tests for vhost-user-blk device based on > tests/virtio-blk-test.c. But block_resize command doesn't apply to > vhost-user-blk device. > > After launching vhost-user backend server, I type the following > command to co

[PATCH] hw/isa/isa-bus: Use ISA_NUM_IRQS instead of magic number

2019-12-13 Thread Philippe Mathieu-Daudé
We have a definition for the number of ISA IRQs, use it. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/isa-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 388800603b..1d79ed133c 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-

[PATCH] hw/i386: De-duplicate gsi_handler() to remove kvm_pc_gsi_handler()

2019-12-13 Thread Philippe Mathieu-Daudé
Both gsi_handler() and kvm_pc_gsi_handler() have the same content, except one comment. Move the comment, and de-duplicate the code. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/kvm.h | 1 - hw/i386/kvm/ioapic.c | 12 hw/i386/pc.c | 5 ++--- 3 files changed, 2 i

[PATCH] hw/i386/pc: Simplify ioapic_init_gsi()

2019-12-13 Thread Philippe Mathieu-Daudé
All callers of ioapic_init_gsi() provide a parent. We want new uses to follow the same good practice and provide the parent name, so do not make this optional: assert the parent name is provided, and simplify the code. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 7 +++ 1 file ch

Re: [PATCH v9 01/13] accel/tcg: introduce TBStatistics structure

2019-12-13 Thread Alex Bennée
Richard Henderson writes: > On 10/7/19 11:28 AM, Alex Bennée wrote: >> From: "Vanderson M. do Rosario" >> >> To store statistics for each TB, we created a TBStatistics structure >> which is linked with the TBs. TBStatistics can stay alive after >> tb_flush and be relinked to a regenerated TB.

Re: [PATCH for-5.0 v2 15/23] mirror: Prevent loops

2019-12-13 Thread Vladimir Sementsov-Ogievskiy
09.12.2019 17:43, Max Reitz wrote: > On 02.12.19 13:12, Vladimir Sementsov-Ogievskiy wrote: >> 11.11.2019 19:02, Max Reitz wrote: >>> While bdrv_replace_node() will not follow through with it, a specific >>> @replaces asks the mirror job to create a loop. >>> >>> For example, say both the source an

Re: [PATCH] virtio: don't enable notifications during polling

2019-12-13 Thread Stefan Hajnoczi
On Mon, Dec 09, 2019 at 09:09:57PM +, Stefan Hajnoczi wrote: > Virtqueue notifications are not necessary during polling, so we disable > them. This allows the guest driver to avoid MMIO vmexits. > Unfortunately the virtio-blk and virtio-scsi handler functions re-enable > notifications, defeati

Re: [PATCH for-5.0 v2 18/23] iotests: Add VM.assert_block_path()

2019-12-13 Thread Vladimir Sementsov-Ogievskiy
09.12.2019 18:10, Max Reitz wrote: > On 03.12.19 13:59, Vladimir Sementsov-Ogievskiy wrote: >> 11.11.2019 19:02, Max Reitz wrote: >>> Signed-off-by: Max Reitz >>> --- >>>tests/qemu-iotests/iotests.py | 59 +++ >>>1 file changed, 59 insertions(+) >>> >>> diff

Re: [PATCH for-5.0 v2 18/23] iotests: Add VM.assert_block_path()

2019-12-13 Thread Vladimir Sementsov-Ogievskiy
11.11.2019 19:02, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/iotests.py | 59 +++ > 1 file changed, 59 insertions(+) > > diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py > index d34305ce69..3e03320ce3 100644

Re: [PATCH] virtio-fs: fix MSI-X nvectors calculation

2019-12-13 Thread Stefan Hajnoczi
On Mon, Dec 09, 2019 at 11:07:59AM +, Stefan Hajnoczi wrote: > The following MSI-X vectors are required: > * VIRTIO Configuration Change > * hiprio virtqueue > * requests virtqueues > > Fix the calculation to reserve enough MSI-X vectors. Otherwise guest > drivers fall back to a sub-option

Re: [PATCH for-5.0 v2 19/23] iotests: Resolve TODOs in 041

2019-12-13 Thread Vladimir Sementsov-Ogievskiy
09.12.2019 18:15, Max Reitz wrote: > On 03.12.19 14:33, Vladimir Sementsov-Ogievskiy wrote: >> 03.12.2019 16:32, Vladimir Sementsov-Ogievskiy wrote: >>> 11.11.2019 19:02, Max Reitz wrote: Signed-off-by: Max Reitz >>> >>> >>> Reviewed-by: Vladimir Sementsov-Ogievskiy >>> >> >> >> Oops, stop. W

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-12-13 Thread Stefan Hajnoczi
On Fri, Nov 29, 2019 at 10:23:25AM +0100, Igor Mammedov wrote: > On Thu, 28 Nov 2019 16:59:33 + > "Dr. David Alan Gilbert" wrote: > > > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > > > Hi, > > > > > > Setting up shared memory for vhost-user is a bit complicated from > > > comma

Re: [PATCH v9 03/13] accel: collecting JIT statistics

2019-12-13 Thread Alex Bennée
Richard Henderson writes: > On 10/7/19 11:28 AM, Alex Bennée wrote: >> @@ -1795,6 +1799,10 @@ TranslationBlock *tb_gen_code(CPUState *cpu, >> if (flag & TB_EXEC_STATS) { >> tb->tb_stats->stats_enabled |= TB_EXEC_STATS; >> } >> + >> +if (flag & TB_JIT_STATS

Re: [PATCH] hw/i386: De-duplicate gsi_handler() to remove kvm_pc_gsi_handler()

2019-12-13 Thread Paolo Bonzini
On 13/12/19 12:07, Philippe Mathieu-Daudé wrote: > Both gsi_handler() and kvm_pc_gsi_handler() have the same content, > except one comment. Move the comment, and de-duplicate the code. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/sysemu/kvm.h | 1 - > hw/i386/kvm/ioapic.c | 12

Re: [PATCH] hw/i386/pc: Simplify ioapic_init_gsi()

2019-12-13 Thread Paolo Bonzini
On 13/12/19 12:11, Philippe Mathieu-Daudé wrote: > All callers of ioapic_init_gsi() provide a parent. We want new > uses to follow the same good practice and provide the parent > name, so do not make this optional: assert the parent name is > provided, and simplify the code. > > Signed-off-by: Phi

[PULL 1/2] vhost-user-fs: remove "vhostfd" property

2019-12-13 Thread Dr. David Alan Gilbert (git)
From: Marc-André Lureau The property doesn't make much sense for a vhost-user device. Signed-off-by: Marc-André Lureau Message-Id: <20191116112016.14872-1-marcandre.lur...@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost-user-fs.c | 1

[PULL 0/2] virtiofs queue

2019-12-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit b0ca999a43a22b38158a33d3f5881648bb4f: Update version for v4.2.0 release (2019-12-12 16:45:57 +) are available in the Git repository at: git://github.com/dagrh/qemu.git tags/pull-virtiofs-20191213a for you to fetch c

[PATCH 01/13] ppc: Drop useless extern annotation for functions

2019-12-13 Thread Greg Kurz
Signed-off-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daudé --- include/hw/ppc/pnv_xscom.h | 22 +++--- include/hw/ppc/spapr_vio.h |6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h index 0918

[PULL 2/2] virtio-fs: fix MSI-X nvectors calculation

2019-12-13 Thread Dr. David Alan Gilbert (git)
From: Stefan Hajnoczi The following MSI-X vectors are required: * VIRTIO Configuration Change * hiprio virtqueue * requests virtqueues Fix the calculation to reserve enough MSI-X vectors. Otherwise guest drivers fall back to a sub-optional configuration where all virtqueues share a single ve

[PATCH 00/13] ppc/pnv: Get rid of chip_type attributes

2019-12-13 Thread Greg Kurz
The PnvChipClass type has a chip_type attribute which identifies various POWER CPU chip types that can be used in a powernv machine. typedef enum PnvChipType { PNV_CHIP_POWER8E, /* AKA Murano (default) */ PNV_CHIP_POWER8, /* AKA Venice */ PNV_CHIP_POWER8NVL, /* AKA Naples */

[PATCH 02/13] ppc/pnv: Introduce PnvPsiClass::compat

2019-12-13 Thread Greg Kurz
The Processor Service Interface (PSI) model has a chip_type class level attribute, which is used to generate the content of the "compatible" DT property according to the CPU type. Since the PSI model already has specialized classes for each supported CPU type, it seems cleaner to achieve this with

[PATCH 08/13] ppc/pnv: Introduce PnvChipClass::xscom_core_base() method

2019-12-13 Thread Greg Kurz
The pnv_chip_core_realize() function configures the XSCOM MMIO subregion for each core of a single chip. The base address of the subregion depends on the CPU type. Its computation is currently open-code using the pnv_chip_is_powerXX() helpers. This can be achieved with QOM. Introduce a method for t

[PATCH 04/13] ppc/pnv: Introduce PnvMachineClass and PnvMachineClass::compat

2019-12-13 Thread Greg Kurz
The pnv_dt_create() function generates different contents for the "compatible" property of the root node in the DT, depending on the CPU type. This is open coded with multiple ifs using pnv_is_powerXX() helpers. It seems cleaner to achieve with QOM. Introduce a base class for the powernv machine a

[PATCH 12/13] ppc/pnv: Introduce PnvChipClass::xscom_pcba() method

2019-12-13 Thread Greg Kurz
The XSCOM bus is implemented with a QOM interface, which is mostly generic from a CPU type standpoint, except for the computation of addresses on the Pervasize Connect Bus (PCB) network. This is handled by the pnv_xscom_pcba() function with a switch statement based on the chip_type class level attr

[PATCH 13/13] ppc/pnv: Drop PnvChipClass::type

2019-12-13 Thread Greg Kurz
It isn't used anymore. Signed-off-by: Greg Kurz --- hw/ppc/pnv.c |5 - include/hw/ppc/pnv.h |9 - 2 files changed, 14 deletions(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index cc40b90e9cd2..232b4a25603c 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -1132,7 +1132,

[PATCH 03/13] ppc/pnv: Drop PnvPsiClass::chip_type

2019-12-13 Thread Greg Kurz
It isn't used anymore. Signed-off-by: Greg Kurz --- hw/ppc/pnv_psi.c |3 --- include/hw/ppc/pnv_psi.h |1 - 2 files changed, 4 deletions(-) diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c index 98a82b25e01f..75e20d9da08b 100644 --- a/hw/ppc/pnv_psi.c +++ b/hw/ppc/pnv_psi.c @@ -

[PATCH 05/13] ppc/pnv: Introduce PnvMachineClass::dt_power_mgt()

2019-12-13 Thread Greg Kurz
We add an extra node to advertise power management on some machines, namely powernv9 and powernv10. This is achieved by using the pnv_is_power9() and pnv_is_power10() helpers. This can be achieved with QOM. Add a method to the base class for powernv machines and have it implemented by machine type

Re: [PATCH] hw/i386: De-duplicate gsi_handler() to remove kvm_pc_gsi_handler()

2019-12-13 Thread Paolo Bonzini
On 13/12/19 12:07, Philippe Mathieu-Daudé wrote: > Both gsi_handler() and kvm_pc_gsi_handler() have the same content, > except one comment. Move the comment, and de-duplicate the code. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/sysemu/kvm.h | 1 - > hw/i386/kvm/ioapic.c | 12

[PATCH 11/13] ppc/pnv: Drop pnv_chip_is_power9() and pnv_chip_is_power10() helpers

2019-12-13 Thread Greg Kurz
They aren't used anymore. Signed-off-by: Greg Kurz --- include/hw/ppc/pnv.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/include/hw/ppc/pnv.h b/include/hw/ppc/pnv.h index 17ca9a14ac8f..7a134a15d3b5 100644 --- a/include/hw/ppc/pnv.h +++ b/include/hw/ppc/pnv.h @@ -224,21 +224,1

[PATCH 06/13] ppc/pnv: Drop pnv_is_power9() and pnv_is_power10() helpers

2019-12-13 Thread Greg Kurz
They aren't used anymore. Signed-off-by: Greg Kurz --- include/hw/ppc/pnv.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/include/hw/ppc/pnv.h b/include/hw/ppc/pnv.h index 8a42c199b65c..c213bdd5ecd3 100644 --- a/include/hw/ppc/pnv.h +++ b/include/hw/ppc/pnv.h @@ -227,11 +227,6

[PATCH 09/13] ppc/pnv: Pass XSCOM base address and address size to pnv_dt_xscom()

2019-12-13 Thread Greg Kurz
Since pnv_dt_xscom() is called from chip specific dt_populate() hooks, it shouldn't have to guess the chip type in order to populate the "reg" property. Just pass the base address and address size as arguments. Signed-off-by: Greg Kurz --- hw/ppc/pnv.c | 12 +--- hw/ppc/p

Re: [PATCH 4/4] hw/i386/pc: Extract the port92 device

2019-12-13 Thread Paolo Bonzini
On 13/12/19 11:51, Philippe Mathieu-Daudé wrote: > This device is only used by the PC machines. The pc.c file is > already big enough, with 2255 lines. By removing 113 lines of > it, we reduced it by 5%. It is now a bit easier to navigate > the file. > > Signed-off-by: Philippe Mathieu-Daudé > --

[PATCH 07/13] ppc/pnv: Introduce PnvChipClass::intc_print_info() method

2019-12-13 Thread Greg Kurz
The pnv_pic_print_info() callback checks the type of the chip in order to forward to the request appropriate interrupt controller. This can be achieved with QOM. Introduce a method for this in the base chip class and implement it in child classes. This also prepares ground for the upcoming interru

[PATCH 10/13] ppc/pnv: Pass content of the "compatible" property to pnv_dt_xscom()

2019-12-13 Thread Greg Kurz
Since pnv_dt_xscom() is called from chip specific dt_populate() hooks, it shouldn't have to guess the chip type in order to populate the "compatible" property. Just pass the compat string and its size as arguments. Signed-off-by: Greg Kurz --- hw/ppc/pnv.c | 12 +--- hw/p

Re: [PATCH v2 2/2] gdbstub: do not split gdb_monitor_write payload

2019-12-13 Thread Damien Hedde
On 12/12/19 11:52 AM, Alex Bennée wrote: > > Damien Hedde writes: > >> On 12/11/19 7:59 PM, Alex Bennée wrote: >>> >>> Damien Hedde writes: >>> Since we can now send packets of arbitrary length: simplify gdb_monitor_write() and send the whole payload in one packet. >>> >>> Do w

Re: [PATCH v3 4/4] pc-bios/s390x: Fix reset psw mask

2019-12-13 Thread Cornelia Huck
On Thu, 5 Dec 2019 11:12:39 +0100 Cornelia Huck wrote: > On Tue, 3 Dec 2019 08:28:13 -0500 > Janosch Frank wrote: > > > We need to set the short psw indication bit in the reset psw, as it is > > a short psw. > > > > fixes: 9629823290 ("pc-bios/s390-ccw: do a subsystem reset before running >

[PING] [PATCH] virtio: fix IO request length in virtio SCSI/block #PSBM-78839

2019-12-13 Thread Denis Plotnikov
On 05.12.2019 10:59, Denis Plotnikov wrote: > Ping! > > On 25.11.2019 12:16, Denis Plotnikov wrote: >> >> >> On 06.11.2019 15:03, Michael S. Tsirkin wrote: >>> On Thu, Oct 24, 2019 at 11:34:34AM +, Denis Lunev wrote: On 10/24/19 12:28 AM, Michael S. Tsirkin wrote: > On Fri, Oct 18, 2

Re: [PATCH v3 04/20] gdbstub: move mem_buf to GDBState and use GByteArray

2019-12-13 Thread Damien Hedde
On 12/11/19 6:05 PM, Alex Bennée wrote: > This is in preparation for further re-factoring of the register API > with the rest of the code. Theoretically the read register function > could overwrite the MAX_PACKET_LENGTH buffer although currently all > registers are well within the size range. >

Re: [PATCH v3 4/4] pc-bios/s390x: Fix reset psw mask

2019-12-13 Thread Janosch Frank
On 12/13/19 1:06 PM, Cornelia Huck wrote: > On Thu, 5 Dec 2019 11:12:39 +0100 > Cornelia Huck wrote: > >> On Tue, 3 Dec 2019 08:28:13 -0500 >> Janosch Frank wrote: >> >>> We need to set the short psw indication bit in the reset psw, as it is >>> a short psw. >>> >>> fixes: 9629823290 ("pc-bios/

Re: [PATCH] virtio: fix IO request length in virtio SCSI/block #PSBM-78839

2019-12-13 Thread Michael S. Tsirkin
On Mon, Nov 25, 2019 at 09:16:10AM +, Denis Plotnikov wrote: > > > On 06.11.2019 15:03, Michael S. Tsirkin wrote: > > On Thu, Oct 24, 2019 at 11:34:34AM +, Denis Lunev wrote: > >> On 10/24/19 12:28 AM, Michael S. Tsirkin wrote: > >>> On Fri, Oct 18, 2019 at 02:55:47PM +0300, Denis Plotnik

Re: [PATCH 03/13] ppc/pnv: Drop PnvPsiClass::chip_type

2019-12-13 Thread Cédric Le Goater
On 13/12/2019 12:59, Greg Kurz wrote: > It isn't used anymore. > > Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater > --- > hw/ppc/pnv_psi.c |3 --- > include/hw/ppc/pnv_psi.h |1 - > 2 files changed, 4 deletions(-) > > diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c

Re: [PATCH 02/13] ppc/pnv: Introduce PnvPsiClass::compat

2019-12-13 Thread Cédric Le Goater
On 13/12/2019 12:59, Greg Kurz wrote: > The Processor Service Interface (PSI) model has a chip_type class level > attribute, which is used to generate the content of the "compatible" DT > property according to the CPU type. > > Since the PSI model already has specialized classes for each supported

Re: [PATCH 05/13] ppc/pnv: Introduce PnvMachineClass::dt_power_mgt()

2019-12-13 Thread Cédric Le Goater
On 13/12/2019 12:59, Greg Kurz wrote: > We add an extra node to advertise power management on some machines, > namely powernv9 and powernv10. This is achieved by using the > pnv_is_power9() and pnv_is_power10() helpers. > > This can be achieved with QOM. Add a method to the base class for > powern

Re: [PATCH 04/13] ppc/pnv: Introduce PnvMachineClass and PnvMachineClass::compat

2019-12-13 Thread Cédric Le Goater
On 13/12/2019 12:59, Greg Kurz wrote: > The pnv_dt_create() function generates different contents for the > "compatible" property of the root node in the DT, depending on the > CPU type. This is open coded with multiple ifs using pnv_is_powerXX() > helpers. > > It seems cleaner to achieve with QOM

Re: [PATCH v2 1/2] python/qemu: Add set_qmp_monitor() to QEMUMachine

2019-12-13 Thread Wainer dos Santos Moschetta
On 12/12/19 12:13 PM, Cleber Rosa wrote: On Wed, Dec 11, 2019 at 01:55:35PM -0500, Wainer dos Santos Moschetta wrote: The QEMUMachine VM has a monitor setup on which an QMP connection is always attempted on _post_launch() (executed by launch()). In case the QEMU process immediatly exits then t

Re: [PATCH v5 3/5] tpm_spapr: Support suspend and resume

2019-12-13 Thread Stefan Berger
On 12/13/19 12:39 AM, David Gibson wrote: On Thu, Dec 12, 2019 at 03:24:28PM -0500, Stefan Berger wrote: Extend the tpm_spapr frontend with VM suspend and resume support. Signed-off-by: Stefan Berger diff --git a/hw/tpm/tpm_spapr.c b/hw/tpm/tpm_spapr.c index c4a67e2403..8f5a142bd4 100644 ---

RE: [PATCH 0/5] ARM virt: Add NVDIMM support

2019-12-13 Thread Shameerali Kolothum Thodi
Hi Igor, > -Original Message- > From: Igor Mammedov [mailto:imamm...@redhat.com] > Sent: 11 December 2019 07:57 > To: Shameerali Kolothum Thodi > Cc: xiaoguangrong.e...@gmail.com; peter.mayd...@linaro.org; > drjo...@redhat.com; shannon.zha...@gmail.com; qemu-devel@nongnu.org; > Linuxarm ;

Re: [PATCH 06/13] ppc/pnv: Drop pnv_is_power9() and pnv_is_power10() helpers

2019-12-13 Thread Cédric Le Goater
On 13/12/2019 13:00, Greg Kurz wrote: > They aren't used anymore. Good ! > Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater > --- > include/hw/ppc/pnv.h | 10 -- > 1 file changed, 10 deletions(-) > > diff --git a/include/hw/ppc/pnv.h b/include/hw/ppc/pnv.h > index 8a42c199

Re: [PATCH 07/13] ppc/pnv: Introduce PnvChipClass::intc_print_info() method

2019-12-13 Thread Cédric Le Goater
On 13/12/2019 13:00, Greg Kurz wrote: > The pnv_pic_print_info() callback checks the type of the chip in order > to forward to the request appropriate interrupt controller. This can > be achieved with QOM. Introduce a method for this in the base chip class > and implement it in child classes. > >

Re: [PATCH 08/13] ppc/pnv: Introduce PnvChipClass::xscom_core_base() method

2019-12-13 Thread Cédric Le Goater
On 13/12/2019 13:00, Greg Kurz wrote: > The pnv_chip_core_realize() function configures the XSCOM MMIO subregion > for each core of a single chip. The base address of the subregion depends > on the CPU type. Its computation is currently open-code using the > pnv_chip_is_powerXX() helpers. This can

Re: [PATCH 09/13] ppc/pnv: Pass XSCOM base address and address size to pnv_dt_xscom()

2019-12-13 Thread Cédric Le Goater
On 13/12/2019 13:00, Greg Kurz wrote: > Since pnv_dt_xscom() is called from chip specific dt_populate() hooks, > it shouldn't have to guess the chip type in order to populate the "reg" > property. Just pass the base address and address size as arguments. Much better, > Signed-off-by: Greg Kurz

Re: [PATCH v5 1/5] tpm_spapr: Support TPM for ppc64 using CRQ based interface

2019-12-13 Thread Stefan Berger
On 12/13/19 12:34 AM, David Gibson wrote: On Thu, Dec 12, 2019 at 03:24:26PM -0500, Stefan Berger wrote: Implement support for TPM on ppc64 by implementing the vTPM CRQ interface as a frontend. It can use the tpm_emulator driver backend with the external swtpm. The Linux vTPM driver for ppc64 w

Re: [PATCH 10/13] ppc/pnv: Pass content of the "compatible" property to pnv_dt_xscom()

2019-12-13 Thread Cédric Le Goater
On 13/12/2019 13:00, Greg Kurz wrote: > Since pnv_dt_xscom() is called from chip specific dt_populate() hooks, > it shouldn't have to guess the chip type in order to populate the > "compatible" property. Just pass the compat string and its size as > arguments. Yeah. That is where I think a PnXscom

Re: [PATCH 12/13] ppc/pnv: Introduce PnvChipClass::xscom_pcba() method

2019-12-13 Thread Cédric Le Goater
On 13/12/2019 13:00, Greg Kurz wrote: > The XSCOM bus is implemented with a QOM interface, which is mostly > generic from a CPU type standpoint, except for the computation of > addresses on the Pervasize Connect Bus (PCB) network. This is handled Pervasive > by the pnv_xscom_pcba() function with

Re: [PATCH 11/13] ppc/pnv: Drop pnv_chip_is_power9() and pnv_chip_is_power10() helpers

2019-12-13 Thread Cédric Le Goater
On 13/12/2019 13:00, Greg Kurz wrote: > They aren't used anymore. Good ! > Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater > --- > include/hw/ppc/pnv.h | 10 -- > 1 file changed, 10 deletions(-) > > diff --git a/include/hw/ppc/pnv.h b/include/hw/ppc/pnv.h > index 17ca9a14ac

Re: [PATCH 13/13] ppc/pnv: Drop PnvChipClass::type

2019-12-13 Thread Cédric Le Goater
On 13/12/2019 13:00, Greg Kurz wrote: > It isn't used anymore. Fantastic ! > Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater Thanks, C. > --- > hw/ppc/pnv.c |5 - > include/hw/ppc/pnv.h |9 - > 2 files changed, 14 deletions(-) > > diff --git a/hw/ppc/p

Re: [PATCH 0/2] RFC: add -mem-shared option

2019-12-13 Thread Igor Mammedov
On Fri, 13 Dec 2019 11:39:57 + Stefan Hajnoczi wrote: > On Fri, Nov 29, 2019 at 10:23:25AM +0100, Igor Mammedov wrote: > > On Thu, 28 Nov 2019 16:59:33 + > > "Dr. David Alan Gilbert" wrote: > > > > > * Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > > > > Hi, > > > > > > >

[PATCH 0/2] rcu_read auto macro use

2019-12-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, A couple more uses of the rcu_read macros; in qsp and hyperv (neither of which list maintainers, so I guess best through RCU). The hyperv case saves a temporary. The qsp case uses an rcu_read_lock around the lifetime of a snapshot and carefully comments that;

[PATCH 2/2] qsp: Use WITH_RCU_READ_LOCK_GUARD

2019-12-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The automatic rcu read lock maintenance works quite nicely in this case where it previously relied on a comment to delimit the lifetime and now has a block. Signed-off-by: Dr. David Alan Gilbert --- util/qsp.c | 22 ++ 1 file changed, 10 inser

[PATCH 1/2] hyperv: Use auto rcu_read macros

2019-12-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Use RCU_READ_LOCK_GUARD and WITH_RCU_READ_LOCK_GUARD to replace the manual rcu_read_(un)lock calls. Signed-off-by: Dr. David Alan Gilbert --- hw/hyperv/hyperv.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/hw/hyperv/

Re: [PATCH] hw/isa/isa-bus: Use ISA_NUM_IRQS instead of magic number

2019-12-13 Thread Philippe Mathieu-Daudé
On 12/13/19 11:59 AM, Philippe Mathieu-Daudé wrote: We have a definition for the number of ISA IRQs, use it. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/isa-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 388800603b..1d

Re: [PATCH 1/2] hyperv: Use auto rcu_read macros

2019-12-13 Thread Roman Kagan
On Fri, Dec 13, 2019 at 01:19:30PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Use RCU_READ_LOCK_GUARD and WITH_RCU_READ_LOCK_GUARD > to replace the manual rcu_read_(un)lock calls. > > Signed-off-by: Dr. David Alan Gilbert > --- > hw/hyperv/hyperv.c | 22 +++

Re: [PATCH 0/2] rcu_read auto macro use

2019-12-13 Thread Paolo Bonzini
On 13/12/19 14:19, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Hi, > A couple more uses of the rcu_read macros; in qsp and > hyperv (neither of which list maintainers, so I guess > best through RCU). > > The hyperv case saves a temporary. > The qsp case uses an rcu

[PATCH] memory: use RCU_READ_LOCK_GUARD

2019-12-13 Thread Paolo Bonzini
Cc: Dr. David Alan Gilbert Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index e499dc2..e42a9d7 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -2165,7 +

[PATCH] colo: fix return without releasing RCU

2019-12-13 Thread Paolo Bonzini
Use WITH_RCU_READ_LOCK_GUARD to avoid exiting colo_init_ram_cache without releasing RCU. Cc: Dr. David Alan Gilbert Signed-off-by: Paolo Bonzini --- migration/ram.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/migration/ram.c b/migratio

[PATCH RFC] qapi: Allow getting flat output from 'query-named-block-nodes'

2019-12-13 Thread Peter Krempa
When a management application manages node names there's no reason to recurse into backing images in the output of query-named-block-nodes. Add a parameter to the command which will return just the top level structs. Signed-off-by: Peter Krempa --- block.c | 5 +++-- block/qapi.c

[PATCH] virtio: update queue size on guest write

2019-12-13 Thread Michael S. Tsirkin
Some guests read back queue size after writing it. Update the size immediatly upon write otherwise they get confused. Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index c6b47a9c7

[Bug 1805256] Re: qemu-img hangs on rcu_call_ready_event logic in Aarch64 when converting images

2019-12-13 Thread dann frazier
** Changed in: kunpeng920 Status: New => Confirmed ** Changed in: qemu (Ubuntu Bionic) Status: New => Confirmed ** Changed in: qemu (Ubuntu Disco) Status: New => Confirmed ** Changed in: qemu (Ubuntu Focal) Status: New => Confirmed -- You received this bug notificat

[PULL 0/2] Block patches

2019-12-13 Thread Stefan Hajnoczi
The following changes since commit b0ca999a43a22b38158a33d3f5881648bb4f: Update version for v4.2.0 release (2019-12-12 16:45:57 +) are available in the Git repository at: https://github.com/stefanha/qemu.git tags/block-pull-request for you to fetch changes up to 86d2a49b41832355ab50

[PULL 2/2] iothread: document -object iothread on man page

2019-12-13 Thread Stefan Hajnoczi
Add -object iothread documentation to the man page, including references to the query-iothread QMP command and qom-set syntax for adjusting adaptive polling parameters at run-time. Reported-by: Zhenyu Ye Signed-off-by: Stefan Hajnoczi Message-id: 20191025122236.29815-1-stefa...@redhat.com Messag

[PULL 1/2] virtio-blk: advertise F_WCE (F_FLUSH) if F_CONFIG_WCE is advertised

2019-12-13 Thread Stefan Hajnoczi
From: Evgeny Yakovlev Virtio spec 1.1 (and earlier), 5.2.5.2 Driver Requirements: Device Initialization: "Devices SHOULD always offer VIRTIO_BLK_F_FLUSH, and MUST offer it if they offer VIRTIO_BLK_F_CONFIG_WCE" Currently F_CONFIG_WCE and F_WCE are not connected to each other. Qemu will advertis

Re: [PATCH 092/104] virtiofsd: add man page

2019-12-13 Thread Liam Merwick
On 12/12/2019 16:38, Dr. David Alan Gilbert (git) wrote: From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi --- Makefile | 7 +++ tools/virtiofsd/virtiofsd.texi | 85 ++ 2 files changed, 92 insertions(+) create mode 100644 tools/vi

[PATCH] virtio-blk: deprecate SCSI passthrough

2019-12-13 Thread Stefan Hajnoczi
The Linux virtio_blk.ko guest driver is removing legacy SCSI passthrough support. Deprecate this feature in QEMU too. Signed-off-by: Stefan Hajnoczi --- qemu-deprecated.texi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index 4b4b74

Re: [PATCH v2 5/8] x86: move SMM property to X86MachineState

2019-12-13 Thread Philippe Mathieu-Daudé
On 12/12/19 6:29 PM, Paolo Bonzini wrote: Add it to microvm as well, it is a generic property of the x86 architecture. Suggested-by: Sergio Lopez Signed-off-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 49 -

  1   2   >