Re: [Qemu-devel] [PATCH qemu] pci: Only unmap bus_master_enabled_region if was added previously

2017-03-31 Thread Michael S. Tsirkin
On Fri, Mar 31, 2017 at 03:47:11PM +1100, Alexey Kardashevskiy wrote: > Normally pci_init_bus_master() would be called either via > bus->machine_done.notify or directly from do_pci_register_device(). > > However if a device's realize() failed, pci_init_bus_master() is not > called, and do_pci_unre

[Qemu-devel] hitting intermittent issue with live migration from qemu-kvm-ev 2.3.0 to qemu-kvm-ev 2.6.0

2017-03-31 Thread Chris Friesen
Hi, I'm running into an issue with live-migrating a guest from a host running qemu-kvm-ev 2.3.0-31 to a host running qemu-kvm-ev 2.6.0-27.1. This is a libvirt-tunnelled migration, in the context of upgrading an OpenStack install to newer software. The source host is running CentOS 7.2.1511,

Re: [Qemu-devel] host stalls when qemu-system-aarch64 with kvm and pflash

2017-03-31 Thread Radha Mohan
On Thu, Mar 30, 2017 at 9:47 AM, Laszlo Ersek wrote: > On 03/29/17 20:56, Christoffer Dall wrote: >> On Tue, Mar 28, 2017 at 01:24:15PM -0700, Radha Mohan wrote: >>> On Tue, Mar 28, 2017 at 1:16 PM, Christoffer Dall wrote: Hi Radha, On Tue, Mar 28, 2017 at 12:58:24PM -0700, Radha M

[Qemu-devel] Project idea

2017-03-31 Thread Mihai-Drosi Caju
Good day, I'd be interested in submitting the following ideas: I'd like to enchance qemu's debugging capabilities. I was thinking to add an option to qemu to disable cpu reset on tripple-fault. Or adding support for breakpoints in the GDB stub while using kvm or another accelerator. Or emulating a

[Qemu-devel] [RFC 02/19] s390: Add FIXME for unexplained user_creatable=false line

2017-03-31 Thread Eduardo Habkost
TYPE_S390_PCI_HOST_BRIDGE has user_creatable=false but has no comment explaining why. Add a FIXME to document that. Cc: Frank Blaschka Cc: Cornelia Huck Cc: Christian Borntraeger Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Eduardo Habkost --- hw/s390x/s390-pci-bus.c | 2 +- 1 fi

[Qemu-devel] [RFC 05/19] pflash_cfi01: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
TYPE_CFI_PFLASH01 devices need to be mapped by pflash_cfi01_register() and can't be used with -device. Remove user_creatable from the device class. Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-bl...@nongnu.org Cc: Laszlo Ersek Signed-off-by: Eduardo Habkost --- hw/block/pflash_cfi01.c | 5 - 1 f

[Qemu-devel] [RFC 00/19] sysbus: Don't allow -device/device_add by default

2017-03-31 Thread Eduardo Habkost
This series refactor the cannot_instantiate_with_device_add code for sysbus. First, cannot_instantiate_with_device_add is replaced by !user_creatable. Then, we change TYPE_SYS_BUS_DEVICE to set user_creatable=false by default, while keeping the existing devices that are not rejected by -device with

[Qemu-devel] [RFC 01/19] qdev: Replace cannot_instantiate_with_device_add_yet with !user_creatable

2017-03-31 Thread Eduardo Habkost
cannot_instantiate_with_device_add_yet was introduced by commit 837d37167dc446af8a91189108b363c04609e296 to replace no_user. It was supposed to be a temporary measure. When it was introduced, we had 54 cannot_instantiate_with_device_add_yet=true lines in the code. Today (3 years later) this number

[Qemu-devel] [RFC 04/19] fdc: Remove user_creatable flag from sysbus-fdc & SUNW, fdtwo

2017-03-31 Thread Eduardo Habkost
sysbus-fdc and SUNW,fdtwo devices need to be wired by the fdc initialization code, and can't be used with -device. Unset user_creatable on their device classes. Cc: John Snow Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-bl...@nongnu.org Cc: Thomas Huth Signed-off-by: Eduardo Habkost --- hw/block/fd

[Qemu-devel] [RFC 08/19] ioapic: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
An ioapic device is already created by the q35 initialization code, and using "-device ioapic" or "-device kvm-ioapic" will always fail with "Only 1 ioapics allowed". Remove the user_creatable flag from the ioapic device classes. Cc: Igor Mammedov Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc:

[Qemu-devel] [RFC 06/19] iommu: Remove FIXME comment about user_creatable=true

2017-03-31 Thread Eduardo Habkost
amd-iommu and intel-iommu are really meant to be used with -device, so they need user_creatable=true. Remove the FIXME comment. Cc: Marcel Apfelbaum Cc: "Michael S. Tsirkin" Signed-off-by: Eduardo Habkost --- hw/i386/amd_iommu.c | 4 hw/i386/intel_iommu.c | 4 2 files changed, 8 de

[Qemu-devel] [RFC 07/19] kvmclock: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
kvmclock should be used by guests only when the appropriate CPUID feature flags are set on the VCPU, and it is automatically created by kvmclock_create() when those feature flags are set. This means creating a kvmclock device using -device is useless. Remove user_creatable from its device class. C

[Qemu-devel] [RFC 03/19] sysbus: Set user_creatable=false by default on TYPE_SYS_BUS_DEVICE

2017-03-31 Thread Eduardo Habkost
commit 33cd52b5d7b9adfd009e95f07e6c64dd88ae2a31 unset cannot_instantiate_with_device_add_yet in TYPE_SYSBUS, making all kinds of untested devices available to -device and device_add. The problem with that is: setting has_dynamic_sysbus on a machine-type lets it accept all the 288 sysbus device typ

[Qemu-devel] [RFC 12/19] isabus-bridge: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
isabus-bridge needs to be created by isa_bus_new(), and won't work with -device, as it won't create the TYPE_ISA_BUS bus itself. Remove the user_creatable flag from the device class. Cc: Marcel Apfelbaum Cc: "Michael S. Tsirkin" Signed-off-by: Eduardo Habkost --- hw/isa/isa-bus.c | 5 - 1

[Qemu-devel] [RFC 09/19] kvmvapic: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
The kvmvapic device needs to be created by apic_common_realize() when apic-common.vapic=on is set, not using -device. Remove the user_creatable flag from the device class. Cc: Igor Mammedov Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Cc: "Michael S. Tsirkin" Signed-off-by: Edu

[Qemu-devel] [RFC 13/19] unimplemented-device: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
unimplemented-device needs to be created and mapped using create_unimplemented_device(), and won't work with -device. Remove the user_creatable flag from the device class. Cc: Peter Maydell Signed-off-by: Eduardo Habkost --- hw/misc/unimp.c | 5 - 1 file changed, 5 deletions(-) diff --git

[Qemu-devel] [RFC 15/19] esp: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
esp devices aren't going to work with -device, as they need to be wired by esp_init(). Remove the user_creatable flag from the device class. Cc: Paolo Bonzini Signed-off-by: Eduardo Habkost --- hw/scsi/esp.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c i

[Qemu-devel] [RFC 11/19] allwinner-ahci: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
allwinner-ahci needs to be created and wired by the alwinner-a10 device, and won't work with -device. Remove the user_creatable flag from the device class. Cc: John Snow Cc: qemu-bl...@nongnu.org Cc: Beniamino Galvani Cc: Peter Maydell Cc: qemu-...@nongnu.org Signed-off-by: Eduardo Habkost ---

[Qemu-devel] [RFC 10/19] sysbus-ahci: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
The sysbus-ahci devices are supposed to be created and wired by code from other devices, like calxeda_init() and xlnx_zynqmp_realize(), and won't work with -device. Remove the user_creatable flag from the device class. Cc: John Snow Cc: qemu-bl...@nongnu.org Cc: Rob Herring Cc: Peter Maydell Cc

[Qemu-devel] [RFC 17/19] hpet: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
hpet needs to be mappend and wired by the board code and won't work with -device. Remove the user_creatable flag from the device class. Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Signed-off-by: Eduardo Habkost --- hw/timer/hpet.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/timer

[Qemu-devel] [RFC 14/19] fw_cfg: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
fw_cfg won't work with -device, as: * fw_cfg_init1() won't get called for the device; * The device won't appear at /machine/fw_cfg, and won't work with the -fw_cfg command-line option. Remove the user_creatable flag from the device class. Cc: "Michael S. Tsirkin" Cc: Laszlo Ersek Cc: Gabriel

[Qemu-devel] [RFC 16/19] generic-sdhci: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
generic-sdhci needs to be wired by other devices' code, so it can't be used with -device. Remove the user_creatable flag from the device class. Cc: Peter Maydell Cc: "Edgar E. Iglesias" Cc: David Gibson Cc: Alexander Graf Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Cc: Prasad J Pandit Cc:

Re: [Qemu-devel] [RFC v3 0/5] SMMUv3 Emmulation Support

2017-03-31 Thread Radha Mohan
Hi Eric On Thu, Mar 30, 2017 at 12:42 PM, Eric Auger wrote: > This series introduces the emulation code for ARM SMMUv3. > This is the continuation of Prem's work [1]. > > At the moment only AArch64 translation format is supported, ie. > no support for AArch32 (LPAE) translation. > > stage1, stage

[Qemu-devel] [RFC 18/19] sysbus-ohci: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
sysbus-ohci needs to be mappend and wired by device or board code, and won't work with -device. Remove the user_creatable flag from the device class. Cc: Gerd Hoffmann Signed-off-by: Eduardo Habkost --- hw/usb/hcd-ohci.c | 5 - 1 file changed, 5 deletions(-) diff --git a/hw/usb/hcd-ohci.c

[Qemu-devel] [RFC 19/19] virtio-mmio: Remove user_creatable flag

2017-03-31 Thread Eduardo Habkost
virtio-mmio needs to be wired and mapped by other device or board code, and won't work with -device. Remove the user_creatable flag from the device class. Cc: Peter Maydell Cc: Shannon Zhao Cc: "Michael S. Tsirkin" Signed-off-by: Eduardo Habkost --- hw/virtio/virtio-mmio.c | 5 - 1 file c

[Qemu-devel] [PULL for-2.9 0/3] Block patches

2017-03-31 Thread Jeff Cody
The following changes since commit 95b31d709ba343ad237c3630047ee7438bac4065: Merge remote-tracking branch 'remotes/awilliam/tags/vfio-updates-20170331.0' into staging (2017-03-31 18:06:13 +0100) are available in the git repository at: git://github.com/codyprime/qemu-kvm-jtc.git tags/block-p

[Qemu-devel] [PULL for-2.9 3/3] block/curl: Check protocol prefix

2017-03-31 Thread Jeff Cody
From: Max Reitz If the user has explicitly specified a block driver and thus a protocol, we have to make sure the URL's protocol prefix matches. Otherwise the latter will silently override the former which might catch some users by surprise. Signed-off-by: Max Reitz Reviewed-by: Philippe Mathie

[Qemu-devel] [PULL for-2.9 1/3] rbd: Fix regression in legacy key/values containing escaped :

2017-03-31 Thread Jeff Cody
From: Eric Blake Commit c7cacb3 accidentally broke legacy key-value parsing through pseudo-filename parsing of -drive file=rbd://..., for any key that contains an escaped ':'. Such a key is surprisingly common, thanks to mon_host specifying a 'host:port' string. The break happens because passin

[Qemu-devel] [PULL for-2.9 2/3] qapi/curl: Extend and fix blockdev-add schema

2017-03-31 Thread Jeff Cody
From: Max Reitz The curl block driver accepts more options than just "filename"; also, the URL is actually expected to be passed through the "url" option instead of "filename". Signed-off-by: Max Reitz Reviewed-by: Jeff Cody Reviewed-by: Eric Blake Message-id: 20170331120431.1767-2-mre...@red

Re: [Qemu-devel] [PATCH for-2.10 0/5] x86/vIOMMU: move init back to machine init phase

2017-03-31 Thread Peter Xu
On Fri, Mar 31, 2017 at 07:17:34PM +0300, Michael S. Tsirkin wrote: > On Fri, Mar 31, 2017 at 03:36:28PM +0800, Peter Xu wrote: > > At the very beginning, the x86 vIOMMUs are created via "-M iommu=on". > > We moved one step further a year ago to have the vIOMMUs just like a > > general device, so t

Re: [Qemu-devel] [for-2.9 PATCH 1/3] 9pfs: clear migration blocker at session reset

2017-03-31 Thread 李强
> -Original Message- > From: Greg Kurz [mailto:gr...@kaod.org] > Sent: Friday, March 31, 2017 7:27 PM > To: qemu-devel@nongnu.org > Cc: Eric Blake; 李强; Greg Kurz > Subject: [for-2.9 PATCH 1/3] 9pfs: clear migration blocker at session reset > > The migration blocker survives a device rese

Re: [Qemu-devel] [for-2.9 PATCH 2/3] 9pfs: cancel active PDUs in virtfs_reset()

2017-03-31 Thread 李强
> -Original Message- > From: Greg Kurz [mailto:gr...@kaod.org] > Sent: Friday, March 31, 2017 7:27 PM > To: qemu-devel@nongnu.org > Cc: Eric Blake; 李强; Greg Kurz > Subject: [for-2.9 PATCH 2/3] 9pfs: cancel active PDUs in virtfs_reset() > > According to the 9P spec [1], the version operat

Re: [Qemu-devel] [for-2.9 PATCH 3/3] 9pfs: drop useless loop in v9fs_reset()

2017-03-31 Thread 李强
> -Original Message- > From: Greg Kurz [mailto:gr...@kaod.org] > Sent: Friday, March 31, 2017 7:28 PM > To: qemu-devel@nongnu.org > Cc: Eric Blake; 李强; Greg Kurz > Subject: [for-2.9 PATCH 3/3] 9pfs: drop useless loop in v9fs_reset() > > We don't need to wait for the PDU active list to be

Re: [Qemu-devel] [PATCH] Revert "vfio/pci-quirks.c: Disable stolen memory for igd VFIO"

2017-03-31 Thread Zhang, Xiong Y
> On Fri, 31 Mar 2017 19:03:49 +0200 > Igor Mammedov wrote: > > > On Thu, 30 Mar 2017 20:55:11 -0600 > > Alex Williamson wrote: > > > > > On Fri, 31 Mar 2017 02:27:11 + > > > "Zhang, Xiong Y" wrote: > > > > > > > > On Thu, 30 Mar 2017 18:27:21 +0800 > > > > > Xiong Zhang wrote: > > > > > >

Re: [Qemu-devel] [PATCH v7 14/17] memory: add MemoryRegionIOMMUOps.replay() callback

2017-03-31 Thread Jason Wang
On 2017年03月31日 15:30, Liu, Yi L wrote: -Original Message- From: Jason Wang [mailto:jasow...@redhat.com] Sent: Friday, March 31, 2017 3:17 PM To: Liu, Yi L ; 'Peter Xu' Cc: Lan, Tianyu ; Tian, Kevin ; 'm...@redhat.com' ; 'jan.kis...@siemens.com' ; 'bd.a...@gmail.com' ; 'qemu- de...@nong

[Qemu-devel] Performance problem and improvement about block drive on NFS shares with libnfs

2017-03-31 Thread Jaden Liang
Hello, I ran qemu with drive file via libnfs recently, and found some performance problem and an improvement idea. I started qemu with 6 drives parameter like nfs://127.0.0.1/dir/vm-disk-x.qcow2 which linked to a local NFS server, then used iometer in guest machine to test the 4K random read or r

Re: [Qemu-devel] Performance problem and improvement about block drive on NFS shares with libnfs

2017-03-31 Thread Fam Zheng
On Sat, 04/01 13:23, Jaden Liang wrote: > Hello, > > I ran qemu with drive file via libnfs recently, and found some performance > problem and an improvement idea. > > I started qemu with 6 drives parameter like > nfs://127.0.0.1/dir/vm-disk-x.qcow2 > which linked to a local NFS server, then used

Re: [Qemu-devel] Performance problem and improvement about block drive on NFS shares with libnfs

2017-03-31 Thread Jaden Liang
2017-04-01 13:37 GMT+08:00 Fam Zheng : > On Sat, 04/01 13:23, Jaden Liang wrote: >> Hello, >> >> I ran qemu with drive file via libnfs recently, and found some performance >> problem and an improvement idea. >> >> I started qemu with 6 drives parameter like >> nfs://127.0.0.1/dir/vm-disk-x.qcow2 >

[Qemu-devel] how to create threads like dataplane in qemu

2017-03-31 Thread PERSIST
Hello! I want to create a specific thread for each process in VM so that virtio block requests from each process can be sumbitted in the thread related to the process. I tried to implement it by referring to dataplane,but I can not understand the source about dataplane. What should I do?

[Qemu-devel] [PATCH] nbd: fix memory leak on socket_connect failed

2017-03-31 Thread yaolujing
From: y00357587 When TCP connection fails between nbd server and client, the local var, sioc, memory leak. This patch fixes the memory leak. Signed-off-by: y00357587 --- block/nbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/nbd.c b/block/nbd.c index 35f24be..102285e 100644 ---

Re: [Qemu-devel] [PATCH v7 14/17] memory: add MemoryRegionIOMMUOps.replay() callback

2017-03-31 Thread Liu, Yi L
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Saturday, April 1, 2017 1:01 PM > To: Liu, Yi L ; 'Peter Xu' > Cc: Lan, Tianyu ; Tian, Kevin ; > 'm...@redhat.com' ; 'jan.kis...@siemens.com' > ; 'bd.a...@gmail.com' ; 'qemu- > de...@nongnu.org' ; 'alex.william...

<    1   2   3