Re: [Qemu-devel] [Qemu-ppc] [PATCH v8 6/6] migration: Block migration while handling machine check

2019-05-28 Thread Aravinda Prasad
On Friday 10 May 2019 12:21 PM, David Gibson wrote: > On Mon, Apr 22, 2019 at 12:33:45PM +0530, Aravinda Prasad wrote: >> Block VM migration requests until the machine check >> error handling is complete as (i) these errors are >> specific to the source hardware and is irrelevant on >> the

[Qemu-devel] [PATCH v9 5/6] ppc: spapr: Enable FWNMI capability

2019-05-28 Thread Aravinda Prasad
Enable the KVM capability KVM_CAP_PPC_FWNMI so that the KVM causes guest exit with NMI as exit reason when it encounters a machine check exception on the address belonging to a guest. Without this capability enabled, KVM redirects machine check exceptions to guest's 0x200 vector. This patch also

[Qemu-devel] [PATCH v9 2/6] Wrapper function to wait on condition for the main loop mutex

2019-05-28 Thread Aravinda Prasad
Introduce a wrapper function to wait on condition for the main loop mutex. This function atomically releases the main loop mutex and causes the calling thread to block on the condition. This wrapper is required because qemu_global_mutex is a static variable. Signed-off-by: Aravinda Prasad

[Qemu-devel] [PATCH v9 6/6] migration: Include migration support for machine check handling

2019-05-28 Thread Aravinda Prasad
This patch includes migration support for machine check handling. Especially this patch blocks VM migration requests until the machine check error handling is complete as (i) these errors are specific to the source hardware and is irrelevant on the target hardware, (ii) these errors cause data

[Qemu-devel] [PATCH v9 1/6] ppc: spapr: Handle "ibm, nmi-register" and "ibm, nmi-interlock" RTAS calls

2019-05-28 Thread Aravinda Prasad
This patch adds support in QEMU to handle "ibm,nmi-register" and "ibm,nmi-interlock" RTAS calls. The machine check notification address is saved when the OS issues "ibm,nmi-register" RTAS call. This patch also handles the case when multiple processors experience machine check at or about the

[Qemu-devel] [PATCH v9 4/6] target/ppc: Build rtas error log upon an MCE

2019-05-28 Thread Aravinda Prasad
Upon a machine check exception (MCE) in a guest address space, KVM causes a guest exit to enable QEMU to build and pass the error to the guest in the PAPR defined rtas error log format. This patch builds the rtas error log, copies it to the rtas_addr and then invokes the guest registered machine

[Qemu-devel] [PATCH v9 3/6] target/ppc: Handle NMI guest exit

2019-05-28 Thread Aravinda Prasad
Memory error such as bit flips that cannot be corrected by hardware are passed on to the kernel for handling. If the memory address in error belongs to guest then the guest kernel is responsible for taking suitable action. Patch [1] enhances KVM to exit guest with exit reason set to KVM_EXIT_NMI

[Qemu-devel] [PATCH v9 0/6] target-ppc/spapr: Add FWNMI support in QEMU for PowerKVM guests

2019-05-28 Thread Aravinda Prasad
This patch set adds support for FWNMI in PowerKVM guests. System errors such as SLB multihit and memory errors that cannot be corrected by hardware is passed on to the kernel for handling by raising machine check exception (an NMI). Upon such machine check exceptions, if the address in error

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

2019-05-28 Thread Marcel Apfelbaum
Hi Gerd, On 5/29/19 8:01 AM, Gerd Hoffmann wrote: On Wed, May 29, 2019 at 07:48:03AM +0300, Marcel Apfelbaum wrote: Hi Gerd, On 5/28/19 11:43 PM, 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

Re: [Qemu-devel] [RFC PATCH 2/2] machine.py: minor delinting

2019-05-28 Thread Markus Armbruster
John Snow writes: > Since we're out in a new module, do a quick cursory pass of some of the > more obvious style issues. > > Signed-off-by: John Snow > --- > python/qemu/machine.py | 23 +++ > 1 file changed, 15 insertions(+), 8 deletions(-) > > diff --git

Re: [Qemu-devel] [PATCH v3 00/14] tests/vm: serial console autoinstall, misc fixes.

2019-05-28 Thread Gerd Hoffmann
On Mon, May 20, 2019 at 02:47:02PM +0200, Gerd Hoffmann wrote: > This patch series changes the way virtual machines for test builds are > managed. They are created locally on the developer machine now. The > installer is booted on the serial console and the scripts walks through > the dialogs to

Re: [Qemu-devel] [PATCH v2 08/10] hw/usb-storage: Use the QOM DEVICE() macro to access DeviceState.qdev

2019-05-28 Thread Gerd Hoffmann
On Tue, May 28, 2019 at 06:40:18PM +0200, Philippe Mathieu-Daudé wrote: > Rather than looking inside the definition of a DeviceState with > "s->qdev", use the QOM prefered style: "DEVICE(s)". > > This patch was generated using the following Coccinelle script: > > // Use DEVICE() macros to

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

2019-05-28 Thread Gerd Hoffmann
On Wed, May 29, 2019 at 07:48:03AM +0300, Marcel Apfelbaum wrote: > Hi Gerd, > > On 5/28/19 11:43 PM, 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.

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

2019-05-28 Thread Marcel Apfelbaum
Hi Gerd, On 5/28/19 11:43 PM, 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 excluded as well.

Re: [Qemu-devel] [PATCH] q35: split memory at 2G

2019-05-28 Thread Gerd Hoffmann
On Tue, May 28, 2019 at 10:49:55PM -0400, Michael S. Tsirkin wrote: > On Wed, May 29, 2019 at 03:21:16AM +0200, Paolo Bonzini wrote: > > On 28/05/19 22:48, Gerd Hoffmann wrote: > > > Original q35 behavior was to split memory 2.75 GB, leaving space for the > > > mmconfig bar at 0xb00 and pci

[Qemu-devel] [PULL 2/9] virtio-gpu: add bswap helpers header

2019-05-28 Thread Gerd Hoffmann
From: Marc-André Lureau The helper functions are useful to build the vhost-user-gpu backend. Signed-off-by: Marc-André Lureau Message-id: 20190524130946.31736-3-marcandre.lur...@redhat.com Signed-off-by: Gerd Hoffmann --- include/hw/virtio/virtio-gpu-bswap.h | 61

[Qemu-devel] [PULL 8/9] virtio-gpu: split virtio-gpu-pci & virtio-vga

2019-05-28 Thread Gerd Hoffmann
From: Marc-André Lureau Add base classes that are common to vhost-user-gpu-pci and vhost-user-vga. Signed-off-by: Marc-André Lureau Message-id: 20190524130946.31736-9-marcandre.lur...@redhat.com Signed-off-by: Gerd Hoffmann --- hw/display/virtio-vga.h | 32 +

Re: [Qemu-devel] [PATCH] q35: split memory at 2G

2019-05-28 Thread Gerd Hoffmann
On Wed, May 29, 2019 at 03:21:16AM +0200, Paolo Bonzini wrote: > On 28/05/19 22:48, Gerd Hoffmann wrote: > > Original q35 behavior was to split memory 2.75 GB, leaving space for the > > mmconfig bar at 0xb00 and pci I/O window starting at 0xc000. > > > > Note: Those machine types have

[Qemu-devel] [PULL 7/9] virtio-gpu: split virtio-gpu, introduce virtio-gpu-base

2019-05-28 Thread Gerd Hoffmann
From: Marc-André Lureau Add a base class that is common to virtio-gpu and vhost-user-gpu devices. The VirtIOGPUBase base class provides common functionalities necessary for both virtio-gpu and vhost-user-gpu: - common configuration (max-outputs, initial resolution, flags) - virtio device

[Qemu-devel] [PULL 6/9] spice-app: fix running when !CONFIG_OPENGL

2019-05-28 Thread Gerd Hoffmann
From: Marc-André Lureau Do not set 'gl' parameter, fixes: qemu-system-x86_64: Invalid parameter 'gl' Signed-off-by: Marc-André Lureau Message-id: 20190524130946.31736-7-marcandre.lur...@redhat.com Signed-off-by: Gerd Hoffmann --- ui/spice-app.c | 3 ++- 1 file changed, 2 insertions(+), 1

[Qemu-devel] [PULL 9/9] hw/display: add vhost-user-vga & gpu-pci

2019-05-28 Thread Gerd Hoffmann
From: Marc-André Lureau Add new virtio-gpu devices with a "vhost-user" property. The associated vhost-user backend is used to handle the virtio rings and provide rendering results thanks to the vhost-user-gpu protocol. Example usage: -object vhost-user-backend,id=vug,cmd="./vhost-user-gpu"

[Qemu-devel] [PULL 3/9] virtio-gpu: add a pixman helper header

2019-05-28 Thread Gerd Hoffmann
From: Marc-André Lureau This will allow to share the format conversion function with vhost-user-gpu. Signed-off-by: Marc-André Lureau Message-id: 20190524130946.31736-4-marcandre.lur...@redhat.com Signed-off-by: Gerd Hoffmann --- include/hw/virtio/virtio-gpu-pixman.h | 45

[Qemu-devel] [PULL 5/9] contrib: add vhost-user-gpu

2019-05-28 Thread Gerd Hoffmann
From: Marc-André Lureau Add a vhost-user gpu backend, based on virtio-gpu/3d device. It is associated with a vhost-user-gpu device. Various TODO and nice to have items: - multi-head support - crash & resume handling - accelerated rendering/display that avoids the waiting round trips - edid

[Qemu-devel] [PULL 0/9] Vga 20190529 patches

2019-05-28 Thread Gerd Hoffmann
The following changes since commit da35f7f1eeff9f249a9597400fc514c83fd3a0f8: virtio-gpu: add sanity check (2019-05-28 08:14:44 +0200) are available in the Git repository at: git://git.kraxel.org/qemu tags/vga-20190529-pull-request for you to fetch changes up to

[Qemu-devel] [PULL 1/9] vhost-user: add vhost_user_gpu_set_socket()

2019-05-28 Thread Gerd Hoffmann
From: Marc-André Lureau Add a new vhost-user message to give a unix socket to a vhost-user backend for GPU display updates. Back when I started that work, I added a new GPU channel because the vhost-user protocol wasn't bidirectional. Since then, there is a vhost-user-slave channel for the

[Qemu-devel] [PULL 4/9] util: compile drm.o on posix

2019-05-28 Thread Gerd Hoffmann
From: Marc-André Lureau OpenGL isn't required to use DRM rendernodes. The following patches uses it for 2d resources for ex. Signed-off-by: Marc-André Lureau Message-id: 20190524130946.31736-5-marcandre.lur...@redhat.com [ kraxel s/LINUX/POSIX/ (fixes openbsd build failure) ] Signed-off-by:

[Qemu-devel] [Bug 1569053] Re: Qemu crashes when I start a second VM from command line

2019-05-28 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1569053 Title: Qemu

[Qemu-devel] [Bug 1542965] Re: Failed to set NBD socket ubuntu 15.10 & nbd client 3.10

2019-05-28 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1542965 Title: Failed to

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

2019-05-28 Thread David Gibson
On Tue, May 28, 2019 at 08:12:24PM +0200, 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. > > Why do I ask?

Re: [Qemu-devel] [PATCH v17 02/10] ACPI: add some GHES structures and macros definition

2019-05-28 Thread Michael S. Tsirkin
On Tue, May 14, 2019 at 04:18:15AM -0700, Dongjiu Geng wrote: > Add Generic Error Status Block structures and some macros > definitions, which is referred to the ACPI 4.0 or ACPI 6.2. The > HEST table generation and CPER record will use them. > > Signed-off-by: Dongjiu Geng Are these all still

Re: [Qemu-devel] [PATCH v17 07/10] ACPI: Add APEI GHES table generation support

2019-05-28 Thread Michael S. Tsirkin
On Tue, May 14, 2019 at 04:18:20AM -0700, Dongjiu Geng wrote: > This implements APEI GHES Table generation via fw_cfg blobs. > Now it only support GPIO-Signal and ARMv8 SEA two types of GHESv2 error > source. Afterwards, we can extend the supported types if needed. For the > CPER section type,

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

2019-05-28 Thread Michael S. Tsirkin
On Tue, May 14, 2019 at 02:14:41PM -0600, Alex Williamson wrote: > Commit b2fc91db8447 ("q35: set split kernel irqchip as default") changed > the default for the pc-q35-4.0 machine type to use split irqchip, which > turned out to have disasterous effects on vfio-pci INTx support. KVM > resampling

Re: [Qemu-devel] [PATCH v2 0/2] Deferred incoming migration through fd

2019-05-28 Thread Peter Xu
On Tue, May 28, 2019 at 12:16:31PM +0300, Yury Kotov wrote: > Hi, > > V2: > * Revert odd changes in migrate() > * Add short description for socket_send_fds() > and remove ifdef WIN32 as it's not needed > > This series is a continuation of the previous two: > * migration: Fix handling fd

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

2019-05-28 Thread Michael S. Tsirkin
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 1/8] spapr: Clean up device node name generation for PCI devices

2019-05-28 Thread Michael S. Tsirkin
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 implicit in the name added when the node is constructed. In fact > anything

Re: [Qemu-devel] [PATCH 00/20] hw/i386/pc: Do not restrict the fw_cfg functions to the PC machine

2019-05-28 Thread Michael S. Tsirkin
On Fri, May 24, 2019 at 08:35:33AM +0200, Philippe Mathieu-Daudé wrote: > Hi, > > This is my take at salvaging some NEMU good work. > Samuel worked in adding the fw_cfg device to the x86-virt NEMU machine. > This series is inspired by NEMU's commit 3cb92d080835 [*] and adapted > to upstream

Re: [Qemu-devel] [PATCH] virtio-gpu: add sanity check

2019-05-28 Thread Michael S. Tsirkin
On Mon, May 27, 2019 at 11:12:26AM +0200, Gerd Hoffmann wrote: > Require a minimum 16x16 size for the scanout, to make sure the guest > can't set either width or height to zero. This (a) doesn't make sense > at all and (b) causes problems in some UI code. When using spice this > will triggers an

Re: [Qemu-devel] [PATCH v3 2/2] drm/i915/gvt: export migration_version to mdev sysfs for Intel vGPU

2019-05-28 Thread Zhenyu Wang
On 2019.05.26 23:44:37 -0400, Yan Zhao wrote: > This feature implements the migration_version attribute for Intel's vGPU > mdev devices. > > migration_version attribute is rw. > It's used to check migration compatibility for two mdev devices of the > same mdev type. > migration_version string is

Re: [Qemu-devel] [PATCH v6] hw/acpi: extract acpi_add_rom_blob()

2019-05-28 Thread Michael S. Tsirkin
On Tue, Mar 26, 2019 at 10:43:20AM +0800, Wei Yang wrote: > arm and i386 has almost the same function acpi_add_rom_blob(), except > giving different FWCfgCallback function. > > This patch moves acpi_add_rom_blob() to utils.c by passing > FWCfgCallback to it. > > Signed-off-by: Wei Yang >

Re: [Qemu-devel] [PATCH 0/4] add failover feature for assigned network devices

2019-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2019 at 05:14:22PM -0700, si-wei liu wrote: > > > On 5/21/2019 11:49 AM, Jens Freimann wrote: > > On Tue, May 21, 2019 at 07:37:19AM -0400, Michael S. Tsirkin wrote: > > > On Tue, May 21, 2019 at 09:21:57AM +0200, Jens Freimann wrote: > > > > On Mon, May 20, 2019 at 04:56:57PM

Re: [Qemu-devel] [PATCH] q35: split memory at 2G

2019-05-28 Thread Michael S. Tsirkin
On Wed, May 29, 2019 at 03:21:16AM +0200, Paolo Bonzini wrote: > On 28/05/19 22:48, Gerd Hoffmann wrote: > > Original q35 behavior was to split memory 2.75 GB, leaving space for the > > mmconfig bar at 0xb00 and pci I/O window starting at 0xc000. > > > > Note: Those machine types have

Re: [Qemu-devel] [RFC PATCH 0/2] implement the failover feature for assigned network devices

2019-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2019 at 05:35:26PM -0700, si-wei liu wrote: > > > On 4/5/2019 4:22 PM, Michael S. Tsirkin wrote: > > On Fri, Apr 05, 2019 at 09:56:29AM +0100, Dr. David Alan Gilbert wrote: > > > * Jens Freimann (jfreim...@redhat.com) wrote: > > > > ping > > > > > > > > FYI: I'm also working on

Re: [Qemu-devel] [PATCH 0/4] add failover feature for assigned network devices

2019-05-28 Thread Michael S. Tsirkin
On Tue, May 21, 2019 at 08:49:18PM +0200, Jens Freimann wrote: > On Tue, May 21, 2019 at 07:37:19AM -0400, Michael S. Tsirkin wrote: > > On Tue, May 21, 2019 at 09:21:57AM +0200, Jens Freimann wrote: > > > On Mon, May 20, 2019 at 04:56:57PM -0600, Alex Williamson wrote: > > > > On Fri, 17 May 2019

Re: [Qemu-devel] [PATCH] q35: split memory at 2G

2019-05-28 Thread Paolo Bonzini
On 28/05/19 22:48, Gerd Hoffmann wrote: > Original q35 behavior was to split memory 2.75 GB, leaving space for the > mmconfig bar at 0xb00 and pci I/O window starting at 0xc000. > > Note: Those machine types have been removed from the qemu codebase > meanwhile because they could not be

Re: [Qemu-devel] [PATCH 3/4] migration/ram.c: MultiFDSendParams.sem_sync is not really used

2019-05-28 Thread Wei Yang
On Tue, May 28, 2019 at 10:16:06AM +0200, Juan Quintela wrote: >Wei Yang wrote: >> Besides init and destroy, MultiFDSendParams.sem_sync is not really used. >> >> Signed-off-by: Wei Yang > >Reviewed-by: Juan Quintela > >I mad SendParamas and RecvParams identical, but they are different. You

Re: [Qemu-devel] [PATCH v3 2/2] drm/i915/gvt: export migration_version to mdev sysfs for Intel vGPU

2019-05-28 Thread Yan Zhao
On Tue, May 28, 2019 at 05:01:35PM +0800, Cornelia Huck wrote: > On Sun, 26 May 2019 23:44:37 -0400 > Yan Zhao wrote: > > > This feature implements the migration_version attribute for Intel's vGPU > > mdev devices. > > > > migration_version attribute is rw. > > It's used to check migration

Re: [Qemu-devel] [PATCH v3 00/10] Refactor cpu topo into machine properties

2019-05-28 Thread Like Xu
Ping for [PATCH v3 00/10] Refactor cpu topo into machine properties. On 2019/5/26 21:51, Like Xu wrote: On 2019/5/19 4:54, Like Xu wrote: This patch series make existing cores/threads/sockets into machine properties and get rid of global smp_* variables they use currently. The purpose of

Re: [Qemu-devel] [RFC PATCH 0/2] implement the failover feature for assigned network devices

2019-05-28 Thread si-wei liu
On 4/5/2019 4:22 PM, Michael S. Tsirkin wrote: On Fri, Apr 05, 2019 at 09:56:29AM +0100, Dr. David Alan Gilbert wrote: * Jens Freimann (jfreim...@redhat.com) wrote: ping FYI: I'm also working on a few related tools to detect driver behaviour when assigning a MAC to the vf device. Code is

Re: [Qemu-devel] [PATCH 2/4] migration/ram.c: use same type in MultiFDPages_t to define offsest

2019-05-28 Thread Wei Yang
On Tue, May 28, 2019 at 10:12:39AM +0200, Juan Quintela wrote: >Wei Yang wrote: >> MultiFDPacket_t.offset is allocated to store MultiFDPages_t.offset. >> >> It would be better to use the same type. >> >> Signed-off-by: Wei Yang >> --- >> migration/ram.c | 2 +- >> 1 file changed, 1

Re: [Qemu-devel] [PATCH 1/4] migration: multifd_save_setup always return 0

2019-05-28 Thread Wei Yang
On Tue, May 28, 2019 at 10:11:11AM +0200, Juan Quintela wrote: >Wei Yang wrote: >> Signed-off-by: Wei Yang >> --- >> migration/migration.c | 7 +-- >> 1 file changed, 1 insertion(+), 6 deletions(-) >> >> diff --git a/migration/migration.c b/migration/migration.c >> index

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

2019-05-28 Thread Wei Yang
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 +0200, Igor Mammedov wrote: >> >On Thu, 11 Apr 2019 15:17:39 +0800 >> >Wei Yang wrote: >> > >> >> pc_memory_pre_plug() is called during

Re: [Qemu-devel] [PATCH v3 1/2] vfio/mdev: add migration_version attribute for mdev device

2019-05-28 Thread Yan Zhao
On Tue, May 28, 2019 at 04:53:32PM +0800, Cornelia Huck wrote: > On Sun, 26 May 2019 23:43:42 -0400 > Yan Zhao wrote: > > > migration_version attribute is used to check migration compatibility > > between two mdev device of the same mdev type. > > s/device/devices/ > yes... sorry and thanks :)

Re: [Qemu-devel] [PATCH 0/4] add failover feature for assigned network devices

2019-05-28 Thread si-wei liu
On 5/21/2019 11:49 AM, Jens Freimann wrote: On Tue, May 21, 2019 at 07:37:19AM -0400, Michael S. Tsirkin wrote: On Tue, May 21, 2019 at 09:21:57AM +0200, Jens Freimann wrote: On Mon, May 20, 2019 at 04:56:57PM -0600, Alex Williamson wrote: > On Fri, 17 May 2019 14:58:16 +0200 > Jens

[Qemu-devel] [PULL 3/3] iotests: test external snapshot with bitmap copying

2019-05-28 Thread John Snow
From: Vladimir Sementsov-Ogievskiy This test shows that external snapshots and incremental backups are friends. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id: 20190517152111.206494-3-vsement...@virtuozzo.com Signed-off-by: John Snow --- tests/qemu-iotests/254

[Qemu-devel] [PULL 1/3] migration/dirty-bitmaps: change bitmap enumeration method

2019-05-28 Thread John Snow
Shift from looking at every root BDS to *every* BDS. This will migrate bitmaps that are attached to blockdev created nodes instead of just ones attached to emulated storage devices. Note that this will not migrate anonymous or internal-use bitmaps, as those are defined as having no name. This

[Qemu-devel] [PULL 2/3] qapi: support external bitmaps in block-dirty-bitmap-merge

2019-05-28 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Add new optional parameter making possible to merge bitmaps from different nodes. It is needed to maintain external snapshots during incremental backup chain history. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Message-id:

[Qemu-devel] [PULL 0/3] Bitmaps patches

2019-05-28 Thread John Snow
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: https://github.com/jnsnow/qemu.git

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

2019-05-28 Thread John Snow
On 5/23/19 11:47 AM, 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

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

2019-05-28 Thread BALATON Zoltan
On Tue, 28 May 2019, Markus Armbruster wrote: sam460ex M: BALATON Zoltan hw/display/sm501_template.h This is like other *_template.h files mentioned by Peter in his reply and is intended to be included multiple times. Regards, BALATON Zoltan

Re: [Qemu-devel] Sketch of a transition of QEMU docs to Sphinx

2019-05-28 Thread Peter Maydell
On Tue, 28 May 2019 at 20:09, John Snow wrote: > > > > On 5/21/19 2:56 PM, Peter Maydell wrote: > > Currently we have a vague plan that we should migrate our > > documentation away from Texinfo to using Sphinx, plus some isolated > > bits of documentation already in .rst format. This email is an

Re: [Qemu-devel] [PULL 16/16] tcg/i386: Use MOVDQA for TCG_TYPE_V128 load/store

2019-05-28 Thread Richard Henderson
On 5/28/19 1:46 PM, David Hildenbrand wrote: > FWIW, this seems to be the easiest way: > > diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h > index f0d9a6a36d..d363ae0fb3 100644 > --- a/target/s390x/cpu.h > +++ b/target/s390x/cpu.h > @@ -66,7 +66,7 @@ struct CPUS390XState { > * The

Re: [Qemu-devel] [PATCH] q35: split memory at 2G

2019-05-28 Thread Eric Blake
On 5/28/19 3:48 PM, Gerd Hoffmann wrote: > Original q35 behavior was to split memory 2.75 GB, leaving space for the s/memory/memory at/ > mmconfig bar at 0xb00 and pci I/O window starting at 0xc000. > > Note: Those machine types have been removed from the qemu codebase > meanwhile

[Qemu-devel] [PATCH] q35: split memory at 2G

2019-05-28 Thread Gerd Hoffmann
Original q35 behavior was to split memory 2.75 GB, leaving space for the mmconfig bar at 0xb00 and pci I/O window starting at 0xc000. Note: Those machine types have been removed from the qemu codebase meanwhile because they could not be live-migrated so there was little value in keeping

[Qemu-devel] [RFC PATCH 1/2] python/qemu: split QEMUMachine out from underneath __init__.py

2019-05-28 Thread John Snow
It's not obvious that something named __init__.py actually houses important code that isn't relevant to python packaging glue. Move the QEMUMachine and related error classes out into their own module. Adjust users to the new import location. Signed-off-by: John Snow --- python/qemu/__init__.py

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

2019-05-28 Thread Gerd Hoffmann
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 excluded as well. With that in place we can go with a fixed pci hole

[Qemu-devel] [RFC PATCH 0/2] python: refactor qemu/__init__.py

2019-05-28 Thread John Snow
There's a lot of code hiding in what is ostensibly a package configuration file. Let's break that out into something more visible. This is based on top of a recent patch I sent to Max; "[Qemu-devel] [PATCH v2] event_match: always match on None value". John Snow (2): python/qemu: split

[Qemu-devel] [RFC PATCH 2/2] machine.py: minor delinting

2019-05-28 Thread John Snow
Since we're out in a new module, do a quick cursory pass of some of the more obvious style issues. Signed-off-by: John Snow --- python/qemu/machine.py | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/python/qemu/machine.py b/python/qemu/machine.py

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

2019-05-28 Thread Richard Henderson
On 5/28/19 1:12 PM, Markus Armbruster wrote: > accel/tcg/atomic_template.h Intentional; could be renamed atomic_template.inc.c. > accel/tcg/tcg-runtime.h Intentional. > tcg/aarch64/tcg-target.opc.h > tcg/i386/tcg-target.opc.h Intentional. > tcg/tcg-gvec-desc.h > tcg/tcg-op-gvec.h Not

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

2019-05-28 Thread Max Filippov
On Tue, May 28, 2019 at 11:12 AM Markus Armbruster wrote: > target/xtensa/helper.h Intentional. > target/xtensa/overlay_tool.h Unintentional. > target/xtensa/xtensa-isa.h It's a one-liner that includes another header. -- Thanks. -- Max

[Qemu-devel] [PATCH] linux-user: emulate msgsnd(), msgrcv() and semtimedop()

2019-05-28 Thread Laurent Vivier
When we have updated kernel headers to 5.2-rc1 we have introduced new syscall numbers that can be not supported by older kernels and fail with ENOSYS while the guest emulation succeeded before because the syscalls were emulated with ipc(). This patch fixes the problem by using ipc() if the new

[Qemu-devel] [PATCH] qemu-img: Fix options leakage in img_rebase()

2019-05-28 Thread Max Reitz
img_rebase() can leak a QDict in two occasions. Fix it. Coverity: CID 1401416 Fixes: d16699b64671466b42079c45b89127aeea1ca565 Fixes: 330c72957196e0ae382abcaa97ebf4eb9bc8574f Signed-off-by: Max Reitz --- qemu-img.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qemu-img.c b/qemu-img.c

[Qemu-devel] [PULL 12/21] block/backup: unify different modes code path

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Do full, top and incremental mode copying all in one place. This unifies the code path and helps further improvements. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id: 20190429090842.57910-5-vsement...@virtuozzo.com

Re: [Qemu-devel] [PATCH v2] event_match: always match on None value

2019-05-28 Thread Max Reitz
On 28.05.19 20:38, John Snow wrote: > Before, event_match didn't always recurse if the event value was not a > dictionary, and would instead check for equality immediately. > > By delaying equality checking to post-recursion, we can allow leaf > values like "5" to match "None" and take advantage

[Qemu-devel] [PULL 20/21] qcow2-bitmap: initialize bitmap directory alignment

2019-05-28 Thread Max Reitz
From: Andrey Shinkevich Valgrind detects multiple issues in QEMU iotests when the memory is used without being initialized. Valgrind may dump lots of unnecessary reports what makes the memory issue analysis harder. Particularly, that is true for the aligned bitmap directory and can be seen while

Re: [Qemu-devel] qapi/misc.json is too big, let's bite off a few chunks

2019-05-28 Thread Eduardo Habkost
On Mon, May 27, 2019 at 12:03:50PM +0200, Paolo Bonzini wrote: > On 27/05/19 10:00, Markus Armbruster wrote: > > As long as we don't have an active QOM maintainer[*], the benefit is > > low. > > > > > > [*] We need one. I'm not volunteering. > > I think Daniel, Eduardo and I could count as de

[Qemu-devel] [PULL 08/21] qcow2: do encryption in threads

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Do encryption/decryption in threads, like it is already done for compression. This improves asynchronous encrypted io. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz Message-id:

[Qemu-devel] [PULL 17/21] qemu-img: rebase: Reduce reads on in-chain rebase

2019-05-28 Thread Max Reitz
From: Sam Eiderman In the following case: (base) A <- B <- C (tip) when running: qemu-img rebase -b A C QEMU would read all sectors not allocated in the file being rebased (C) and compare them to the new base image (A), regardless of whether they were changed or even allocated anywhere

[Qemu-devel] [PULL 19/21] qcow2: skip writing zero buffers to empty COW areas

2019-05-28 Thread Max Reitz
From: Anton Nefedov If COW areas of the newly allocated clusters are zeroes on the backing image, efficient bdrv_write_zeroes(flags=BDRV_REQ_NO_FALLBACK) can be used on the whole cluster instead of writing explicit zero buffers later in perform_cow(). iotest 060: write to the discarded cluster

[Qemu-devel] [PULL 15/21] block: Make bdrv_root_attach_child() unref child_bs on failure

2019-05-28 Thread Max Reitz
From: Alberto Garcia A consequence of the previous patch is that bdrv_attach_child() transfers the reference to child_bs from the caller to parent_bs, which will drop it on bdrv_close() or when someone calls bdrv_unref_child(). But this only happens when bdrv_attach_child() succeeds. If it

[Qemu-devel] [PULL 09/21] block/backup: simplify backup_incremental_init_copy_bitmap

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Simplify backup_incremental_init_copy_bitmap using the function bdrv_dirty_bitmap_next_dirty_area. Note: move to job->len instead of bitmap size: it should not matter but less code. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

[Qemu-devel] [PULL 11/21] block/backup: refactor and tolerate unallocated cluster skipping

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Split allocation checking to separate function and reduce nesting. Consider bdrv_is_allocated() fail as allocated area, as copying more than needed is not wrong (and we do it anyway) and seems better than fail the whole job. And, most probably we will fail on

[Qemu-devel] [PULL 18/21] qemu-img: rebase: Reuse in-chain BlockDriverState

2019-05-28 Thread Max Reitz
From: Sam Eiderman If a chain was detected, don't open a new BlockBackend from the target backing file which will create a new BlockDriverState. Instead, create an empty BlockBackend and attach the already open BlockDriverState. Permissions for blk_new() were copied from blk_new_open() when

[Qemu-devel] [PULL 16/21] qemu-img: rebase: Reuse parent BlockDriverState

2019-05-28 Thread Max Reitz
From: Sam Eiderman In safe mode we open the entire chain, including the parent backing file of the rebased file. Do not open a new BlockBackend for the parent backing file, which saves opening the rest of the chain twice, which for long chains saves many "pricy" bdrv_open() calls. Permissions

[Qemu-devel] [PULL 13/21] block/backup: refactor: split out backup_calculate_cluster_size

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Split out cluster_size calculation. Move copy-bitmap creation above block-job creation, as we are going to share it with upcoming backup-top filter, which also should be created before actual block job creation. Signed-off-by: Vladimir Sementsov-Ogievskiy

[Qemu-devel] [PULL 10/21] block/backup: move to copy_bitmap with granularity

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy We are going to share this bitmap between backup and backup-top filter driver, so let's share something more meaningful. It also simplifies some calculations. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id:

[Qemu-devel] [PULL 21/21] blockdev: loosen restrictions on drive-backup source node

2019-05-28 Thread Max Reitz
From: John Snow We mandate that the source node must be a root node; but there's no reason I am aware of that it needs to be restricted to such. In some cases, we need to make sure that there's a medium present, but in the general case we can allow the backup job itself to do the graph checking.

[Qemu-devel] [PULL 03/21] qcow2-threads: use thread_pool_submit_co

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Use thread_pool_submit_co, instead of reinventing it here. Note, that thread_pool_submit_aio() never returns NULL, so checking it was an extra thing. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz Message-id:

[Qemu-devel] [PULL 14/21] block: Use bdrv_unref_child() for all children in bdrv_close()

2019-05-28 Thread Max Reitz
From: Alberto Garcia bdrv_unref_child() does the following things: - Updates the child->bs->inherits_from pointer. - Calls bdrv_detach_child() to remove the BdrvChild from bs->children. - Calls bdrv_unref() to unref the child BlockDriverState. When bdrv_unref_child() was introduced in

[Qemu-devel] [PULL 07/21] qcow2: bdrv_co_pwritev: move encryption code out of the lock

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Encryption will be done in threads, to take benefit of it, we should move it out of the lock first. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz Message-id: 20190506142741.41731-8-vsement...@virtuozzo.com

[Qemu-devel] [PULL 02/21] qcow2: add separate file for threaded data processing functions

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Move compression-on-threads to separate file. Encryption will be in it too. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz Message-id: 20190506142741.41731-3-vsement...@virtuozzo.com Signed-off-by: Max Reitz

[Qemu-devel] [PULL 04/21] qcow2-threads: qcow2_co_do_compress: protect queuing by mutex

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Drop dependence on AioContext lock. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Paolo Bonzini Reviewed-by: Max Reitz Message-id: 20190506142741.41731-5-vsement...@virtuozzo.com Signed-off-by: Max Reitz ---

[Qemu-devel] [PULL 06/21] qcow2: qcow2_co_preadv: improve locking

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Background: decryption will be done in threads, to take benefit of it, we should move it out of the lock first. But let's go further: it turns out, that only qcow2_get_cluster_offset() needs locking, so reduce locking to it. Signed-off-by: Vladimir

[Qemu-devel] [PULL 05/21] qcow2-threads: split out generic path

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Move generic part out of qcow2_co_do_compress, to reuse it for encryption and rename things that would be shared with encryption path. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Max Reitz Message-id:

[Qemu-devel] [PULL 00/21] Block patches

2019-05-28 Thread Max Reitz
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: https://github.com/XanClic/qemu.git

[Qemu-devel] [PULL 01/21] qcow2.h: add missing include

2019-05-28 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy qcow2.h depends on block_int.h. Compilation isn't broken currently only due to block_int.h always included before qcow2.h. Though, it seems better to directly include block_int.h in qcow2.h. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto

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

2019-05-28 Thread Eduardo Habkost
On Tue, May 28, 2019 at 08:12:24PM +0200, 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. > > Why do I ask?

Re: [Qemu-devel] Sketch of a transition of QEMU docs to Sphinx

2019-05-28 Thread John Snow
On 5/21/19 2:56 PM, Peter Maydell wrote: > Currently we have a vague plan that we should migrate our > documentation away from Texinfo to using Sphinx, plus some isolated > bits of documentation already in .rst format. This email is an attempt > to sketch out a transition plan for getting us

Re: [Qemu-devel] [PULL 16/16] tcg/i386: Use MOVDQA for TCG_TYPE_V128 load/store

2019-05-28 Thread David Hildenbrand
On 28.05.19 20:33, David Hildenbrand wrote: > On 28.05.19 19:28, David Hildenbrand wrote: >> On 23.05.19 00:28, Richard Henderson wrote: >>> This instruction raises #GP, aka SIGSEGV, if the effective address >>> is not aligned to 16-bytes. >>> >>> We have assertions in tcg-op-gvec.c that the

[Qemu-devel] [PATCH v2] event_match: always match on None value

2019-05-28 Thread John Snow
Before, event_match didn't always recurse if the event value was not a dictionary, and would instead check for equality immediately. By delaying equality checking to post-recursion, we can allow leaf values like "5" to match "None" and take advantage of the generic None-returns-True clause. This

Re: [Qemu-devel] Make target check-report.tap is broken

2019-05-28 Thread Markus Armbruster
Paolo Bonzini writes: > On 28/05/19 10:11, Markus Armbruster wrote: >> Commit 9df43317b82 "test: replace gtester with a TAP driver" replaced >> targets check-report.xml and check-report.html by >> >> check-report.tap: $(patsubst %,check-report-qtest-%.tap, $(QTEST_TARGETS)) >>

  1   2   3   >