Re: [Qemu-devel] i386: EFER vs 32-bit CPU

2019-05-29 Thread Pavel Dovgalyuk
> From: Peter Xu [mailto:pet...@redhat.com] > On Wed, May 29, 2019 at 02:26:39PM +0300, Pavel Dovgalyuk wrote: > > Hello! > > > > > > > > I found this while debugging the inconsistent saved/restored state of the > > virtual machine. > > > > > > > > i386 (32 bit) emulation uses this register (in

[Qemu-devel] [PATCH v2 7/8] spapr: Direct all PCI hotplug to host bridge, rather than P2P bridge

2019-05-29 Thread David Gibson
A P2P bridge will attempt to handle the hotplug with SHPC, which doesn't work in the PAPR environment. Instead we want to direct all PCI hotplug actions to the PAPR specific host bridge which will use the PAPR hotplug mechanism. Signed-off-by: David Gibson Acked-by: Michael S. Tsirkin ---

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/8] spapr: Clean up dt creation for PCI buses

2019-05-29 Thread David Gibson
On Fri, May 24, 2019 at 03:31:54PM +1000, Alexey Kardashevskiy wrote: > > > On 23/05/2019 15:29, David Gibson wrote: > > Device nodes for PCI bridges (both host and P2P) describe both the bridge > > device itself and the bus hanging off it, handling of this is a bit of a > > mess. > > > >

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/8] spapr: Clean up dt creation for PCI buses

2019-05-29 Thread Alexey Kardashevskiy
On 30/05/2019 15:33, David Gibson wrote: > On Fri, May 24, 2019 at 03:31:54PM +1000, Alexey Kardashevskiy wrote: >> >> >> On 23/05/2019 15:29, David Gibson wrote: >>> Device nodes for PCI bridges (both host and P2P) describe both the bridge >>> device itself and the bus hanging off it, handling

[Qemu-devel] [PATCH v2 2/8] spapr: Clean up device tree construction for PCI devices

2019-05-29 Thread David Gibson
spapr_create_pci_child_dt() is a trivial wrapper around spapr_populate_pci_child_dt(), but is the latter's only caller. So fold them together into spapr_dt_pci_device(), which closer matches our modern naming convention. While there, make a number of cleanups to the function itself. This is

[Qemu-devel] [PATCH v2 3/8] spapr: Clean up dt creation for PCI buses

2019-05-29 Thread David Gibson
Device nodes for PCI bridges (both host and P2P) describe both the bridge device itself and the bus hanging off it, handling of this is a bit of a mess. spapr_dt_pci_device() has a few things it only adds for non-bridges, but always adds #address-cells and #size-cells which should only appear for

[Qemu-devel] [PATCH v2 6/8] spapr: Don't use bus number for building DRC ids

2019-05-29 Thread David Gibson
DRC ids are more or less arbitrary, as long as they're consistent. For PCI, we notionally build them from the phb's index along with PCI bus number, slot and function number. Using bus number is broken, however, because it can change if the guest re-enumerates the PCI topology for whatever

[Qemu-devel] [PATCH v2 8/8] spapr: Allow hot plug/unplug of PCI bridges and devices under PCI bridges

2019-05-29 Thread David Gibson
The pseries machine type already allows PCI hotplug and unplug via the PAPR mechanism, but only on the root bus of each PHB. This patch extends this to allow PCI to PCI bridges to be hotplugged, and devices to be hotplugged or unplugged under P2P bridges. For now we disallow hot unplugging P2P

[Qemu-devel] [PATCH v2 5/8] spapr: Clean up DRC index construction

2019-05-29 Thread David Gibson
spapr_pci.c currently has several confusingly similarly named functions for various conversions between representations of DRCs. Make things clearer by renaming things in a more consistent XXX_from_YYY() manner and remove some called-only-once variants in favour of open coding. While we're at

[Qemu-devel] [PATCH v2 4/8] spapr: Clean up spapr_drc_populate_dt()

2019-05-29 Thread David Gibson
This makes some minor cleanups to spapr_drc_populate_dt(), renaming it to the shorter and more idiomatic spapr_dt_drc() along the way. Signed-off-by: David Gibson Reviewed-by: Greg Kurz Acked-by: Michael S. Tsirkin --- hw/ppc/spapr.c | 7 +++ hw/ppc/spapr_drc.c | 13

[Qemu-devel] [PATCH v2 0/8] pseries: Allow hotplug of P2P bridges and devices under P2P bridges

2019-05-29 Thread David Gibson
PAPR has its own PCI hotplug mechanism which we implemented quite a while ago. However, we weren't able to hotplug devices under PCI bridges, because the pci-bridge code would try to handle the hotplug using SHPC which won't work with PAPR. We now have the infrastructure in the hotplug core to

[Qemu-devel] [PATCH v2 1/8] spapr: Clean up device node name generation for PCI devices

2019-05-29 Thread David Gibson
spapr_populate_pci_child_dt() adds a 'name' property to the device tree node for PCI devices. This is never necessary for a flattened device tree, it is implicit in the name added when the node is constructed. In fact anything we do add to a 'name' property will be overwritten with something

Re: [Qemu-devel] [PATCH 1/8] spapr: Clean up device node name generation for PCI devices

2019-05-29 Thread David Gibson
On Fri, May 24, 2019 at 03:32:19PM +0200, Greg Kurz wrote: > On Thu, 23 May 2019 15:29:11 +1000 > David Gibson wrote: > > > spapr_populate_pci_child_dt() adds a 'name' property to the device tree > > node for PCI devices. This is never necessary for a flattened device tree, > > it is implicit

Re: [Qemu-devel] [PATCH 1/8] spapr: Clean up device node name generation for PCI devices

2019-05-29 Thread David Gibson
On Tue, May 28, 2019 at 11:23:54PM -0400, Michael S. Tsirkin wrote: > On Thu, May 23, 2019 at 03:29:11PM +1000, David Gibson wrote: > > spapr_populate_pci_child_dt() adds a 'name' property to the device tree > > node for PCI devices. This is never necessary for a flattened device tree, > > it is

Re: [Qemu-devel] [PATCH 2/8] spapr: Clean up device tree construction for PCI devices

2019-05-29 Thread David Gibson
On Fri, May 24, 2019 at 05:34:10PM +0200, Greg Kurz wrote: 65;5603;1c> On Thu, 23 May 2019 15:29:12 +1000 > David Gibson wrote: > > > spapr_create_pci_child_dt() is a trivial wrapper around > > spapr_populate_pci_child_dt(), but is the latter's only caller. So fold > > them together into

Re: [Qemu-devel] [PATCH] riscv: virt: Correct pci "bus-range" encoding

2019-05-29 Thread Bin Meng
Hi Alistair, On Thu, May 30, 2019 at 11:14 AM Alistair Francis wrote: > > On Wed, May 29, 2019 at 1:52 AM Bin Meng wrote: > > > > The largest pci bus number should be calculated from ECAM size, > > instead of its base address. > > > > Signed-off-by: Bin Meng > > This seems ok, can you maybe

Re: [Qemu-devel] [PATCH] riscv: virt: Correct pci "bus-range" encoding

2019-05-29 Thread Alistair Francis
On Wed, May 29, 2019 at 1:52 AM Bin Meng wrote: > > The largest pci bus number should be calculated from ECAM size, > instead of its base address. > > Signed-off-by: Bin Meng This seems ok, can you maybe explain what this fixes? Alistair > --- > > hw/riscv/virt.c | 2 +- > 1 file changed, 1

Re: [Qemu-devel] [PATCHv3 1/5] RISC-V: Only Check PMP if MMU translation succeeds

2019-05-29 Thread Alistair Francis
On Wed, May 22, 2019 at 2:13 AM Hesham Almatary wrote: > > The current implementation unnecessarily checks for PMP even if MMU > translation > failed. This may trigger a wrong PMP access exception instead of > a page exception. > > For example, the very first instruction fetched after the first

Re: [Qemu-devel] [PATCHv3 3/5] RISC-V: Check PMP during Page Table Walks

2019-05-29 Thread Alistair Francis
On Wed, May 22, 2019 at 2:27 AM Hesham Almatary wrote: > > On Tue, 21 May 2019 at 23:40, Alistair Francis wrote: > > > > On Tue, May 21, 2019 at 3:44 AM Hesham Almatary > > wrote: > > > > > > The PMP should be checked when doing a page table walk, and report access > > > fault exception if the

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/1] spapr: Do not re-read the clock on pre_save handler on migration

2019-05-29 Thread David Gibson
On Thu, May 23, 2019 at 05:18:51PM -0300, Maxiwell S. Garcia wrote: > On Thu, May 23, 2019 at 09:29:52AM +1000, David Gibson wrote: > > On Mon, May 20, 2019 at 05:43:40PM -0300, Maxiwell S. Garcia wrote: > > > This handler was added in the commit: > > > 42043e4f1241: spapr: clock should count

Re: [Qemu-devel] [PATCH] spapr_pci: Improve error message

2019-05-29 Thread David Gibson
On Wed, May 29, 2019 at 07:15:09PM +0200, Greg Kurz wrote: > Every PHB must have a unique index. This is checked at realize but when > a duplicate index is detected, an error message mentioning BUIDs is > printed. This doesn't help much, especially since BUID is an internal > concept that is no

Re: [Qemu-devel] i386: EFER vs 32-bit CPU

2019-05-29 Thread Peter Xu
On Wed, May 29, 2019 at 02:26:39PM +0300, Pavel Dovgalyuk wrote: > Hello! > > > > I found this while debugging the inconsistent saved/restored state of the > virtual machine. > > > > i386 (32 bit) emulation uses this register (in wrmsr and in MMU fault > processing). Sorry if this

Re: [Qemu-devel] [PULL v2 04/36] virtio: Introduce started flag to VirtioDevice

2019-05-29 Thread Yongji Xie
On Wed, 29 May 2019 at 22:42, Dr. David Alan Gilbert wrote: > > * Yongji Xie (elohi...@gmail.com) wrote: > > On Wed, 29 May 2019 at 21:43, Dr. David Alan Gilbert > > wrote: > > > > > > * Greg Kurz (gr...@kaod.org) wrote: > > > > On Wed, 29 May 2019 13:38:19 +0100 > > > > "Dr. David Alan Gilbert"

Re: [Qemu-devel] [PATCH] hw/i386/pc: check apci hotplug capability before nvdimm's

2019-05-29 Thread Wei Yang
On Wed, May 29, 2019 at 10:57:50AM +0200, Igor Mammedov wrote: >On Wed, 29 May 2019 08:32:14 +0800 >Wei Yang wrote: > >> On Tue, May 28, 2019 at 02:26:27PM +0200, Igor Mammedov wrote: >> >On Tue, 28 May 2019 09:35:48 +0800 >> >Wei Yang wrote: >> > >> >> On Mon, May 27, 2019 at 02:21:14PM

Re: [Qemu-devel] [RFC v3 0/3] scsi: restart dma after vm change state handlers

2019-05-29 Thread Kevin Wolf
Am 24.05.2019 um 20:47 hat Paolo Bonzini geschrieben: > On 24/05/19 20:36, Stefan Hajnoczi wrote: > > v3: > > * Fix s/k->vmstate_change/vdc->vmstate_change/ > > * Still RFC, waiting for customer to confirm this fixes the issue > > v2: > > * Do it properly with a clean API instead of deferring

Re: [Qemu-devel] [RFC 1/3] block: Add ImageRotationalInfo

2019-05-29 Thread Kevin Wolf
Am 24.05.2019 um 19:28 hat Max Reitz geschrieben: > This enum indicates whether a file is stored on a rotating disk or a > solid-state drive. Drivers report it via the .bdrv_get_info() callback, > and if they do not, the global bdrv_get_info() implementation > automatically takes it from bs->file

Re: [Qemu-devel] [PATCH v2 4/6] qapi: Disentangle QAPIDoc code

2019-05-29 Thread Kevin Wolf
Am 24.05.2019 um 18:11 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Documentation comment follow a certain structure: First, we have a text > > with a general description (called QAPIDoc.body). After this, > > descriptions of the arguments follow. Finally, we have part that > >

Re: [Qemu-devel] [PATCH v2 2/6] tests/qapi-schema: Test for good feature lists in structs

2019-05-29 Thread Kevin Wolf
Am 24.05.2019 um 15:29 hat Markus Armbruster geschrieben: > Let's add > >{ 'command': 'test-features', > 'data': { 'fs0': 'FeatureStruct0', >'fs1': 'FeatureStruct1', >'fs2': 'FeatureStruct2', >'fs3': 'FeatureStruct3', >

Re: [Qemu-devel] [PATCH] q35: fix mmconfig and PCI0._CRS

2019-05-29 Thread Michael S. Tsirkin
On Tue, May 28, 2019 at 10:43:31PM +0200, Gerd Hoffmann wrote: > This patch changes the handling of the mmconfig area. Thanks to the > pci(e) expander devices we already have the logic to exclude address > ranges from PCI0._CRS. We can simply add the mmconfig address range > to the list get it

Re: [Qemu-devel] [PULL 00/10] virtio, pci, pc: cleanups

2019-05-29 Thread Michael S. Tsirkin
On Wed, May 29, 2019 at 12:37:07PM -0400, Michael S. Tsirkin wrote: > The following changes since commit 8c1ecb590497b0349c550607db923972b37f6963: > > Merge remote-tracking branch > 'remotes/stsquad/tags/pull-testing-next-280519-2' into staging (2019-05-28 > 17:38:32 +0100) > > are available

Re: [Qemu-devel] [PATCH v2] hw/block/fdc: floppy command FIFO memory initialization

2019-05-29 Thread Max Reitz
On 29.05.19 20:20, Andrey Shinkevich wrote: > The uninitialized memory allocated for the command FIFO of the > floppy controller during the VM hardware initialization incurs > many unwanted reports by Valgrind when VM state is being saved. > That verbosity hardens a search for the real memory

[Qemu-devel] [PATCH] sifive_prci: Read and write PRCI registers

2019-05-29 Thread Palmer Dabbelt
From: Nathaniel Graff Writes to the SiFive PRCI registers are preserved while leaving the ready bits set for the HFX/HFR oscillators and the lock bit set for the PLL. Signed-off-by: Nathaniel Graff Reviewed-by: Michael Clark Signed-off-by: Palmer Dabbelt --- hw/riscv/sifive_prci.c |

Re: [Qemu-devel] [PATCH 2/3] MAINTAINERS: Improve section headlines

2019-05-29 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 5/29/19 5:08 PM, Markus Armbruster wrote: >> When scripts/get_maintainer.pl reports something like >> >> John Doe (maintainer:Overall) >> >> the user is left to wonder *which* of our three "Overall" sections >> applies. We have three, one each under

Re: [Qemu-devel] [PATCH 2/3] MAINTAINERS: Improve section headlines

2019-05-29 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 5/29/19 5:16 PM, Eric Blake wrote: >> On 5/29/19 10:08 AM, Markus Armbruster wrote: >>> When scripts/get_maintainer.pl reports something like >>> >>> John Doe (maintainer:Overall) >>> >>> the user is left to wonder *which* of our three "Overall" sections

Re: [Qemu-devel] [PATCH 1/3] MAINTAINERS: Drop redundant L: qemu-devel@nongnu.org

2019-05-29 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 5/29/19 5:08 PM, Markus Armbruster wrote: >> Redundant since commit c9a19d5b95 "MAINTAINERS: add all-match entry >> for qemu-devel@". > > https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg05019.html > > :( Oh. I'm happy to take your patch if it

Re: [Qemu-devel] [PATCH 3/5] tests/vm: Detect the image changed on server

2019-05-29 Thread Alex Bennée
Wainer dos Santos Moschetta writes: > The current implementation of basevm does not check if the image > file to be downloaded has changed on server side before honouring > the cache. So any change on server-side file can go unnoticed, > keeping the cached image. > > This change implements a

Re: [Qemu-devel] [PATCH v2] hw/block/fdc: floppy command FIFO memory initialization

2019-05-29 Thread John Snow
On 5/29/19 2:20 PM, Andrey Shinkevich wrote: > The uninitialized memory allocated for the command FIFO of the > floppy controller during the VM hardware initialization incurs > many unwanted reports by Valgrind when VM state is being saved. > That verbosity hardens a search for the real memory

Re: [Qemu-devel] [PATCHv3 3/5] RISC-V: Check PMP during Page Table Walks

2019-05-29 Thread Hesham Almatary
ping On Wed, 22 May 2019 at 11:26, Hesham Almatary wrote: > > On Tue, 21 May 2019 at 23:40, Alistair Francis wrote: > > > > On Tue, May 21, 2019 at 3:44 AM Hesham Almatary > > wrote: > > > > > > The PMP should be checked when doing a page table walk, and report access > > > fault exception if

Re: [Qemu-devel] [PATCH v2] hw/block/fdc: floppy command FIFO memory initialization

2019-05-29 Thread John Snow
On 5/29/19 2:20 PM, Andrey Shinkevich wrote: > The uninitialized memory allocated for the command FIFO of the > floppy controller during the VM hardware initialization incurs > many unwanted reports by Valgrind when VM state is being saved. > That verbosity hardens a search for the real memory

[Qemu-devel] [Bug 1830821] Re: Expose ARCH_CAP_MDS_NO in guest

2019-05-29 Thread Tyler Hicks
** Also affects: qemu (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1830821 Title: Expose ARCH_CAP_MDS_NO in guest Status in intel: New

[Qemu-devel] [Bug 1830821] Re: Expose ARCH_CAP_MDS_NO in guest

2019-05-29 Thread Steve Beattie
The specific upstream commit is 20140a82c67467f53814ca197403d5e1b561a5e5 and is incorporated into qemu 1:3.1+dfsg-2ubuntu3.1 in disco-security (19.04) and 1:3.1+dfsg-2ubuntu4 in eoan-proposed. For backporting to cosmic and older, I believe it requires the infrastructure to support

[Qemu-devel] [PATCH v2] hw/block/fdc: floppy command FIFO memory initialization

2019-05-29 Thread Andrey Shinkevich
The uninitialized memory allocated for the command FIFO of the floppy controller during the VM hardware initialization incurs many unwanted reports by Valgrind when VM state is being saved. That verbosity hardens a search for the real memory issues when the iotests run. Particularly, the patch

Re: [Qemu-devel] [PATCH 3/3] block/qcow2-bitmap: rewrite bitmap reopening logic

2019-05-29 Thread Max Reitz
On 29.05.19 17:58, Vladimir Sementsov-Ogievskiy wrote: > 29.05.2019 18:33, Max Reitz wrote: >> On 23.05.19 17:47, Vladimir Sementsov-Ogievskiy wrote: >>> Current logic >>> = >>> >>> Reopen rw -> ro: >>> >>> Store bitmaps and release BdrvDirtyBitmap's. >>> >>> Reopen ro -> rw: >>> >>>

Re: [Qemu-devel] [PATCH 3/3] block/qcow2-bitmap: rewrite bitmap reopening logic

2019-05-29 Thread John Snow
Max has picked this thread up for block discussion, so I'm going to stick to slightly more bitmap related discussion here; we'll resume block discussion in the other tail of this thread. On 5/29/19 5:10 AM, Vladimir Sementsov-Ogievskiy wrote: > 29.05.2019 2:24, John Snow wrote: >> >> >> On

[Qemu-devel] [PATCH v7 3/3] block/stream: introduce a bottom node

2019-05-29 Thread Andrey Shinkevich
The bottom node is the intermediate block device that has the base as its backing image. It is used instead of the base node while a block stream job is running to avoid dependency on the base that may change due to the parallel jobs. The change may take place due to a filter node as well that is

[Qemu-devel] [PATCH v7 2/3] block/stream: refactor stream_run: drop goto

2019-05-29 Thread Andrey Shinkevich
The goto is unnecessary in the stream_run() since the common exit code was removed in the commit eb23654dbe43b549ea2a9ebff9d8e: "jobs: utilize job_exit shim". Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz ---

[Qemu-devel] [PATCH v7 1/3] block: include base when checking image chain for block allocation

2019-05-29 Thread Andrey Shinkevich
This patch is used in the 'block/stream: introduce a bottom node' that is following. Instead of the base node, the caller may pass the node that has the base as its backing image to the function bdrv_is_allocated_above() with a new parameter include_base = true and get rid of the dependency on the

[Qemu-devel] [PATCH v7 0/3] block/stream: get rid of the base

2019-05-29 Thread Andrey Shinkevich
This series introduces a bottom intermediate node that eliminates the dependency on the base that may change while stream job is running. It happens when stream/commit parallel jobs are running on the same backing chain. The base node of the stream job may be a top node of the parallel commit job

Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables

2019-05-29 Thread P J P
+-- On Wed, 29 May 2019, Marc-André Lureau wrote --+ | The error is handled before guest_exec_get_args(), isn't it? Yes, which is okay I think. | The qga commands are only called through QMP, afaik. I see, cool! Thanks much for the confirmation. Thank you. -- Prasad J Pandit / Red Hat

Re: [Qemu-devel] [PATCH] MAINTAINERS: Remove bouncing email in AArch64 target

2019-05-29 Thread Claudio Fontana
Hi Philippe, On Wed, May 29, 2019 at 4:02 PM Philippe Mathieu-Daudé wrote: > > Claudio Fontana's email at Huawei is bouncing: remove it. > > From: Mail Delivery Subsystem > Auto-Submitted: auto-replied > Subject: Delivery Status Notification (Failure) > X-Failed-Recipients:

Re: [Qemu-devel] [PATCH v3 8/8] multifd: rest of zlib compression

2019-05-29 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > This is still a work in progress, but get everything sent as expected > and it is faster than the code that is already there. > > Signed-off-by: Juan Quintela > --- > migration/ram.c | 106 +++- > 1 file

[Qemu-devel] [PATCH] spapr_pci: Improve error message

2019-05-29 Thread Greg Kurz
Every PHB must have a unique index. This is checked at realize but when a duplicate index is detected, an error message mentioning BUIDs is printed. This doesn't help much, especially since BUID is an internal concept that is no longer exposed to the user. Fix the message to mention the index

Re: [Qemu-devel] [PATCH 0/5] tests/vm: Python 3, improve image caching, and misc

2019-05-29 Thread Alex Bennée
Wainer dos Santos Moschetta writes: > Ping. More reviews needed. > > I've already got Philippe's reviewed-by, thanks! I've queued patches 1,2,4,5 to testing/next, thanks. I'm going to see is 3 is obviated by Gerd's VM rebuild work but I've added it for now. Sorry about the delay. -- Alex

Re: [Qemu-devel] [PATCH v3 7/8] multifd: Add zlib compression support

2019-05-29 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela > --- > hw/core/qdev-properties.c | 2 +- > migration/migration.c | 9 > migration/migration.h | 1 + > migration/ram.c | 47 +++ > qapi/migration.json

[Qemu-devel] [PULL 09/10] vhost: fix incorrect print type

2019-05-29 Thread Michael S. Tsirkin
From: Jie Wang fix incorrect print type in vhost_virtqueue_stop Signed-off-by: Jie Wang Message-Id: <1556605773-42019-1-git-send-email-wangji...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé --- hw/virtio/vhost.c | 2 +- 1

[Qemu-devel] [PULL 04/10] pcie: Simplify pci_adjust_config_limit()

2019-05-29 Thread Michael S. Tsirkin
From: David Gibson Since c2077e2c "pci: Adjust PCI config limit based on bus topology", pci_adjust_config_limit() has been used in the config space read and write paths to only permit access to extended config space on buses which permit it. Specifically it prevents access on devices below a

[Qemu-devel] [PULL 05/10] pci: Make is_bridge a bool

2019-05-29 Thread Michael S. Tsirkin
From: David Gibson The is_bridge field in PCIDevice acts as a bool, but is declared as an int. Declare it as a bool for clarity, and change everything that writes it to use true/false instead of 0/1 to match. Signed-off-by: David Gibson Reviewed-by: Greg Kurz Message-Id:

[Qemu-devel] [PULL 10/10] vhost: fix memory leak in vhost_user_scsi_realize

2019-05-29 Thread Michael S. Tsirkin
From: Jie Wang fix memory leak in vhost_user_scsi_realize Signed-off-by: Jie Wang Message-Id: <1556608500-12183-1-git-send-email-wangji...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi --- hw/scsi/vhost-user-scsi.c | 3 +++ 1

[Qemu-devel] [PULL 01/10] bios-tables-test: add diff allowed list

2019-05-29 Thread Michael S. Tsirkin
Expected table change is then handled like this: 1. add table to diff allowed list 2. change generating code (can be combined with 1) 3. maintainer runs a script to update expected + blows away allowed diff list Signed-off-by: Michael S. Tsirkin --- tests/bios-tables-test-allowed-diff.h | 1

[Qemu-devel] [PULL 08/10] vhost: remove the dead code

2019-05-29 Thread Michael S. Tsirkin
From: Jie Wang remove the dead code Signed-off-by: Jie Wang Message-Id: <1556604614-32081-1-git-send-email-wangji...@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi --- hw/virtio/vhost.c | 1 - 1 file changed, 1 deletion(-) diff

[Qemu-devel] [PULL 06/10] pci: Fold pci_get_bus_devfn() into its sole caller

2019-05-29 Thread Michael S. Tsirkin
From: David Gibson The only remaining caller of pci_get_bus_devfn() is pci_nic_init_nofail(), itself an old compatibility function. Fold the two together to avoid re-using the stale interface. While we're there replace the explicit fprintf()s with error_report(). Signed-off-by: David Gibson

[Qemu-devel] [PULL 00/10] virtio, pci, pc: cleanups

2019-05-29 Thread Michael S. Tsirkin
The following changes since commit 8c1ecb590497b0349c550607db923972b37f6963: Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-next-280519-2' into staging (2019-05-28 17:38:32 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git

Re: [Qemu-devel] [PATCH v3 6/8] migration: Make none operations into its own structure

2019-05-29 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > It will be used later. 'none' is confusing - I think this is no-compression specifically - right? I'd be happy with something abbreviated like 'nocomp' > Signed-off-by: Juan Quintela > --- > migration/ram.c | 54

[Qemu-devel] [RFC PATCH] qemu-io-cmds: use clock_gettime for benchmarking

2019-05-29 Thread Alex Bennée
The previous use of gettimeofday() ran into undefined behaviour when we ended up doing a div 0 for a very short operation. This is because gettimeofday only works at the microsecond level as well as being prone to discontinuous jumps in system time. Using clock_gettime with CLOCK_MONOTONIC gives

[Qemu-devel] [PATCH v4] numa: improve cpu hotplug error message with a wrong node-id

2019-05-29 Thread Laurent Vivier
On pseries, core-ids are strongly binded to a node-id by the command line option. If an user tries to add a CPU to the wrong node, he has an error but it is not really helpful: qemu-system-ppc64 ... -smp 1,maxcpus=64,cores=1,threads=1,sockets=1 \ -numa node,nodeid=0

Re: [Qemu-devel] [PATCH 2/3] MAINTAINERS: Improve section headlines

2019-05-29 Thread Philippe Mathieu-Daudé
On 5/29/19 5:08 PM, Markus Armbruster wrote: > When scripts/get_maintainer.pl reports something like > > John Doe (maintainer:Overall) > > the user is left to wonder *which* of our three "Overall" sections > applies. We have three, one each under "Guest CPU cores (TCG)", > "Guest CPU

Re: [Qemu-devel] [PATCH for-4.1 v2] q35: Revert to kernel irqchip

2019-05-29 Thread Michael S. Tsirkin
On Wed, May 29, 2019 at 07:43:56AM -0600, Alex Williamson wrote: > On Tue, 28 May 2019 23:30:20 -0400 > "Michael S. Tsirkin" wrote: > > > On Tue, May 14, 2019 at 02:14:41PM -0600, Alex Williamson wrote: > > > Commit b2fc91db8447 ("q35: set split kernel irqchip as default") changed > > > the

Re: [Qemu-devel] [PATCH 3/3] block/qcow2-bitmap: rewrite bitmap reopening logic

2019-05-29 Thread Vladimir Sementsov-Ogievskiy
29.05.2019 18:33, Max Reitz wrote: > On 23.05.19 17:47, Vladimir Sementsov-Ogievskiy wrote: >> Current logic >> = >> >> Reopen rw -> ro: >> >> Store bitmaps and release BdrvDirtyBitmap's. >> >> Reopen ro -> rw: >> >> Load bitmap list >> Skip bitmaps which for which we don't have

Re: [Qemu-devel] [PATCH 1/3] MAINTAINERS: Drop redundant L: qemu-devel@nongnu.org

2019-05-29 Thread Philippe Mathieu-Daudé
On 5/29/19 5:08 PM, Markus Armbruster wrote: > Redundant since commit c9a19d5b95 "MAINTAINERS: add all-match entry > for qemu-devel@". https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg05019.html :( > Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé > --- >

Re: [Qemu-devel] [PATCH 2/3] MAINTAINERS: Improve section headlines

2019-05-29 Thread Philippe Mathieu-Daudé
On 5/29/19 5:16 PM, Eric Blake wrote: > On 5/29/19 10:08 AM, Markus Armbruster wrote: >> When scripts/get_maintainer.pl reports something like >> >> John Doe (maintainer:Overall) >> >> the user is left to wonder *which* of our three "Overall" sections >> applies. We have three, one each

[Qemu-devel] [PATCH v8 4/7] block: introduce backup-top filter driver

2019-05-29 Thread Vladimir Sementsov-Ogievskiy
Backup-top filter does copy-before-write operation. It should be inserted above active disk and has a target node for CBW, like the following: +---+ | Guest | +---+ |r,w v ++ target +---+ | backup_top |-->|

[Qemu-devel] [PATCH v8 7/7] block/backup: use backup-top instead of write notifiers

2019-05-29 Thread Vladimir Sementsov-Ogievskiy
Drop write notifiers and use filter node instead. Changes: 1. copy-before-writes now handled by filter node, so, drop all is_write_notifier arguments. 2. we don't have intersecting requests, so their handling is dropped. Instead, synchronization works as follows: when backup or backup-top

[Qemu-devel] [PATCH v8 6/7] block: add lock/unlock range functions

2019-05-29 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Introduce lock/unlock range functionality, based on serialized requests. This is needed to refactor backup, dropping local tracked-request-like synchronization. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block_int.h | 4 block/io.c

[Qemu-devel] [PATCH v8 0/7] backup-top filter driver for backup

2019-05-29 Thread Vladimir Sementsov-Ogievskiy
Hi all! These series introduce backup-top driver. It's a filter-node, which do copy-before-write operation. Mirror uses filter-node for handling guest writes, let's move to filter-node (from write-notifiers) for backup too v8: 01-03: new 05: add Max's r-b others changed, change description in

[Qemu-devel] [PATCH v8 2/7] block: swap operation order in bdrv_append

2019-05-29 Thread Vladimir Sementsov-Ogievskiy
bs_top parents may conflict with bs_new backing child permissions, so let's do bdrv_replace_node first, it covers more possible cases. It is needed for further implementation of backup-top filter, which don't want to share write permission on its backing child. Side effect is that we may set

[Qemu-devel] [PATCH v8 3/7] block: allow not one child for implicit node

2019-05-29 Thread Vladimir Sementsov-Ogievskiy
Upcoming backup-top filter wants to operate like usual implicit filter node with fall-through to backing child. But also needs additional target child, let's support that. On the other hand, after backup completion (before job dismiss) filter is still attached to job blk, but don't have any

[Qemu-devel] [PATCH v8 5/7] block/io: refactor wait_serialising_requests

2019-05-29 Thread Vladimir Sementsov-Ogievskiy
Split out do_wait_serialising_requests with additional possibility to not actually wait but just check, that there is something to wait for. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/io.c | 24 1 file changed, 16 insertions(+), 8

[Qemu-devel] [PATCH v8 1/7] block: teach bdrv_debug_breakpoint skip filters with backing

2019-05-29 Thread Vladimir Sementsov-Ogievskiy
Teach bdrv_debug_breakpoint and bdrv_debug_remove_breakpoint skip filters with backing. This is needed to implement and use in backup job it's own backup_top filter driver (like mirror already has one), and without this improvement, breakpoint removal will fail at least in 55 iotest.

Re: [Qemu-devel] [PATCH 3/3] block/qcow2-bitmap: rewrite bitmap reopening logic

2019-05-29 Thread Max Reitz
On 23.05.19 17:47, Vladimir Sementsov-Ogievskiy wrote: > Current logic > = > > Reopen rw -> ro: > > Store bitmaps and release BdrvDirtyBitmap's. > > Reopen ro -> rw: > > Load bitmap list > Skip bitmaps which for which we don't have BdrvDirtyBitmap [this is >the worst thing] > A

Re: [Qemu-devel] [PATCH 2/3] MAINTAINERS: Improve section headlines

2019-05-29 Thread Eric Blake
On 5/29/19 10:08 AM, Markus Armbruster wrote: > When scripts/get_maintainer.pl reports something like > > John Doe (maintainer:Overall) > > the user is left to wonder *which* of our three "Overall" sections > applies. We have three, one each under "Guest CPU cores (TCG)", > "Guest CPU

[Qemu-devel] [PATCH 3/3] MAINTAINERS: Polish headline decorations

2019-05-29 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- MAINTAINERS | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 196282d165..f8a5a3d448 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -65,7 +65,7 @@ F: * F: */ Responsible

[Qemu-devel] [PATCH 1/3] MAINTAINERS: Drop redundant L: qemu-devel@nongnu.org

2019-05-29 Thread Markus Armbruster
Redundant since commit c9a19d5b95 "MAINTAINERS: add all-match entry for qemu-devel@". Signed-off-by: Markus Armbruster --- MAINTAINERS | 11 --- 1 file changed, 11 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1f5f8b7a2c..edc260e503 100644 --- a/MAINTAINERS +++

[Qemu-devel] [PATCH 2/3] MAINTAINERS: Improve section headlines

2019-05-29 Thread Markus Armbruster
When scripts/get_maintainer.pl reports something like John Doe (maintainer:Overall) the user is left to wonder *which* of our three "Overall" sections applies. We have three, one each under "Guest CPU cores (TCG)", "Guest CPU Cores (KVM)", and "Overall usermode emulation". Rename sections

[Qemu-devel] [PATCH 0/3] MAINTAINERS: Clean up and improve section headlines

2019-05-29 Thread Markus Armbruster
Markus Armbruster (3): MAINTAINERS: Drop redundant L: qemu-devel@nongnu.org MAINTAINERS: Improve section headlines MAINTAINERS: Polish headline decorations MAINTAINERS | 113 +++- 1 file changed, 50 insertions(+), 63 deletions(-) -- 2.17.2

Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables

2019-05-29 Thread Marc-André Lureau
Hi On Wed, May 29, 2019 at 4:35 PM P J P wrote: > > +-- On Wed, 29 May 2019, Marc-André Lureau wrote --+ > | assert() is good if it's a programming error: that is if it should never > | happen at run-time. It's a decent way to document the code. > > True; But terminating server because a user

Re: [Qemu-devel] [PULL v2 04/36] virtio: Introduce started flag to VirtioDevice

2019-05-29 Thread Dr. David Alan Gilbert
* Yongji Xie (elohi...@gmail.com) wrote: > On Wed, 29 May 2019 at 21:43, Dr. David Alan Gilbert > wrote: > > > > * Greg Kurz (gr...@kaod.org) wrote: > > > On Wed, 29 May 2019 13:38:19 +0100 > > > "Dr. David Alan Gilbert" wrote: > > > > > > > * Greg Kurz (gr...@kaod.org) wrote: > > > > > On Wed,

[Qemu-devel] [PATCH v7 3/4] virtio-rng: Keep the default backend out of VirtIORNGConf

2019-05-29 Thread Laurent Vivier
From: Markus Armbruster The default backend is only used within virtio_rng_device_realize(). Replace VirtIORNGConf member default_backend by a local variable. Adjust its type to reduce conversions. While there, pass _abort instead of NULL when failure would be a programming error.

Re: [Qemu-devel] [PULL v2 04/36] virtio: Introduce started flag to VirtioDevice

2019-05-29 Thread Yongji Xie
On Wed, 29 May 2019 at 21:43, Dr. David Alan Gilbert wrote: > > * Greg Kurz (gr...@kaod.org) wrote: > > On Wed, 29 May 2019 13:38:19 +0100 > > "Dr. David Alan Gilbert" wrote: > > > > > * Greg Kurz (gr...@kaod.org) wrote: > > > > On Wed, 29 May 2019 12:18:50 +0100 > > > > "Dr. David Alan Gilbert"

Re: [Qemu-devel] [PATCH v2] qga: check length of command-line & environment variables

2019-05-29 Thread P J P
+-- On Wed, 29 May 2019, Marc-André Lureau wrote --+ | assert() is good if it's a programming error: that is if it should never | happen at run-time. It's a decent way to document the code. True; But terminating server because a user sent more input parameters does not sound good.

[Qemu-devel] [PATCH v7 2/4] rng-builtin: add an RNG backend that uses qemu_guest_getrandom()

2019-05-29 Thread Laurent Vivier
Add a new RNG backend using QEMU builtin getrandom function. It can be created and used with something like: ... -object rng-builtin,id=rng0 -device virtio-rng,rng=rng0 ... Signed-off-by: Laurent Vivier --- backends/Makefile.objs | 2 +- backends/rng-builtin.c | 78

[Qemu-devel] [PATCH v7 4/4] virtio-rng: change default backend to rng-builtin

2019-05-29 Thread Laurent Vivier
Reviewed-by: Markus Armbruster Signed-off-by: Laurent Vivier --- backends/rng-builtin.c | 1 - hw/virtio/virtio-rng.c | 3 +-- include/sysemu/rng.h | 2 ++ qemu-options.hx| 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backends/rng-builtin.c

[Qemu-devel] [PATCH v7 0/4] rng-builtin: add an RNG backend that uses qemu_guest_getrandom()

2019-05-29 Thread Laurent Vivier
Add a new RNG backend using QEMU builtin getrandom function. v7: rebase on master Make rng-builtin asynchronous with QEMUBH (removed existing R-b) v6: remove "sysemu/rng-random.h" from virtio-rng.c rebase on qemu_getrandom v8 v5: PATCH 1 s/linux/Linux/ remove superfluous includes

[Qemu-devel] [PATCH v7 1/4] VirtIO-RNG: Update default entropy source to `/dev/urandom`

2019-05-29 Thread Laurent Vivier
From: Kashyap Chamarthy When QEMU exposes a VirtIO-RNG device to the guest, that device needs a source of entropy, and that source needs to be "non-blocking", like `/dev/urandom`. However, currently QEMU defaults to the problematic `/dev/random`, which on Linux is "blocking" (as in, it waits

Re: [Qemu-devel] Malta-related files in MAINTAINERS

2019-05-29 Thread Aleksandar Markovic
On May 29, 2019 3:45 PM, "Philippe Mathieu-Daudé" wrote: > > Hi Aleksandar, > > On 5/29/19 10:22 AM, Aleksandar Markovic wrote: > > Hello, Philippe. > > > > Currently, we have these two files in Malta MAINTAINERS section: > > F: hw/mips/mips_malta.c > > F: tests/acceptance/linux_ssh_mips_malta.py

Re: [Qemu-devel] [PATCH v2 0/3] Update documentation and help related to the preallocation parameter

2019-05-29 Thread Markus Armbruster
Stefano Garzarella writes: > Following Markus' advice, I updated the documentation of preallocation > parameter in qapi/block-core.json adding default and allowed values (patch 1). > I also updated the help related to BLOCK_OPT_PREALLOC in the QemuOptsList of > file-posix (patch 2) and gluster

Re: [Qemu-devel] Headers without multiple inclusion guards

2019-05-29 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 5/28/19 8:12 PM, Markus Armbruster wrote: >> We have a bunch of headers without multiple inclusion guards. Some are >> clearly intentional, some look accidental. Too many for me to find out >> by examining each of them, so I'm asking their maintainers. >>

Re: [Qemu-devel] [libvirt] [PATCH v2 1/2] vfio/mdev: add version attribute for mdev device

2019-05-29 Thread Alex Williamson
On Tue, 28 May 2019 22:57:15 +0200 Boris Fiuczynski wrote: > On 5/14/19 5:31 PM, Alex Williamson wrote: > > On Wed, 8 May 2019 17:27:47 +0200 > > Boris Fiuczynski wrote: > > > >> On 5/8/19 11:22 PM, Alex Williamson wrote: > > I thought there was a request to make this more specific to

Re: [Qemu-devel] [PATCH] iotests: Fix intermittent failure in 219

2019-05-29 Thread Max Reitz
On 16.05.19 18:11, Max Reitz wrote: > In 219, we wait for the job to make progress before we emit its status. > This makes the output reliable. > > Unfortunately, there is a bug: We do not wait for any more progress if > the job has already reached its total-progress. Right after the job has >

[Qemu-devel] [PATCH v2] docs/devel/build-system: Update an example

2019-05-29 Thread Philippe Mathieu-Daudé
The default-configs/ example added in 717171bd2025 is no more accurate since fa212a2b8b60 (and various further other commits). The Kconfig build system is now in place. Use the aarch64-softmmu config as example. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- v2: rephrased

Re: [Qemu-devel] i386: EFER vs 32-bit CPU

2019-05-29 Thread Pavel Dovgalyuk
> From: Dr. David Alan Gilbert [mailto:dgilb...@redhat.com] > * Pavel Dovgalyuk (dovga...@ispras.ru) wrote: > > > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > > > On 29/05/19 13:30, Dr. David Alan Gilbert wrote: > > > >> Should we add a section for i386, which duplicates efer, or just > > >

  1   2   3   4   >