[Qemu-devel] [v7][PATCH 05/10] xen, gfx passthrough: basic graphics passthrough support

2015-03-18 Thread Tiejun Chen
basic gfx passthrough support: - add a vga type for gfx passthrough - register/unregister legacy VGA I/O ports and MMIOs for passthrough GFX Signed-off-by: Tiejun Chen tiejun.c...@intel.com Signed-off-by: Yang Zhang yang.z.zh...@intel.com --- hw/core/machine.c| 20

[Qemu-devel] [PATCH V4 11/19] virtio-s390: switch to bus specific queue limit

2015-03-18 Thread Jason Wang
Instead of depending on marco, switch to use a bus specific queue limit. Cc: Alexander Graf ag...@suse.de Cc: Richard Henderson r...@twiddle.net Cc: Christian Borntraeger borntrae...@de.ibm.com Cc: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com ---

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add myself as the maintainer of the Quorum driver

2015-03-18 Thread Alberto Garcia
On Tue, Mar 17, 2015 at 05:23:56PM +, Stefan Hajnoczi wrote: + +Quorum +M: Alberto Garcia be...@igalia.com +S: Supported +F: block/quorum.c I'd like to also add the qemu-bl...@nongnu.org mailing list to your MAINTAINERS stanza because patches should be CCed to the block list:

[Qemu-devel] [PATCH V4 03/19] ppc: spapr: add 2.4 machine type

2015-03-18 Thread Jason Wang
The following patches will limit the following things to legacy machine type: - maximum number of virtqueues for virtio-pci were limited to 64 - auto msix bar size for virtio-net-pci were disabled by default Cc: Alexander Graf ag...@suse.de Cc: qemu-...@nongnu.org Signed-off-by: Jason Wang

[Qemu-devel] [PATCH V4 08/19] virtio-net: fix the upper bound when trying to delete queues

2015-03-18 Thread Jason Wang
Virtqueue were indexed from zero, so don't delete virtqueue whose index is n-max_queues * 2 + 1. Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c

Re: [Qemu-devel] RFC: -object vs -chardev creation order

2015-03-18 Thread Daniel P. Berrange
On Wed, Mar 18, 2015 at 10:43:25AM +0100, Markus Armbruster wrote: Daniel P. Berrange berra...@redhat.com writes: A third option is to not process -object args in one go, instead process each type of object at a time. eg we'd first create all the -object tls-credential instances, then

Re: [Qemu-devel] [PATCH for-2.3] numa: pc: fix default VCPU to node mapping

2015-03-18 Thread Igor Mammedov
On Tue, 17 Mar 2015 17:59:48 +0100 Andreas Färber afaer...@suse.de wrote: Am 17.03.2015 um 17:42 schrieb Eduardo Habkost: On Tue, Mar 17, 2015 at 03:48:38PM +, Igor Mammedov wrote: since commit dd0247e0 pc: acpi: mark all possible CPUs as enabled in SRAT Linux kernel actually

[Qemu-devel] [PULL 05/19] nbd: Pass return value from nbd_handle_list()

2015-03-18 Thread Paolo Bonzini
From: Max Reitz mre...@redhat.com While it does not make a difference in practice, nbd_receive_options() generally returns -errno, so it should do that here as well; and the easiest way to achieve this is by passing on the value returned by nbd_handle_list(). Signed-off-by: Max Reitz

[Qemu-devel] [PULL 18/19] virtio-scsi-dataplane: fix memory leak in virtio_scsi_vring_init

2015-03-18 Thread Paolo Bonzini
From: Bo Su su...@huawei.com if k-set_host_notifier failed, VirtIOSCSIVring *r will leak Signed-off-by: Bo Su su...@huawei.com Message-Id: 1426671732-80213-1-git-send-email-su...@huawei.com Reviewed-by: Fam Zheng f...@redhat.com Reviewed-by: Gonglei arei.gong...@huawei.com Signed-off-by: Paolo

[Qemu-devel] [v7][PATCH 03/10] piix: create host bridge to passthrough

2015-03-18 Thread Tiejun Chen
Implement a pci host bridge specific to passthrough. Actually this just inherits the standard one. And we also just expose a minimal real host bridge pci configuration subset. Signed-off-by: Tiejun Chen tiejun.c...@intel.com --- hw/pci-host/piix.c | 82

[Qemu-devel] [v7][PATCH 08/10] xen, gfx passthrough: register a isa bridge

2015-03-18 Thread Tiejun Chen
Currently we just register this isa bridge when we use IGD passthrough in Xen side. Signed-off-by: Tiejun Chen tiejun.c...@intel.com --- hw/xen/xen_pt.c | 18 ++ include/hw/xen/xen.h | 1 + 2 files changed, 19 insertions(+) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c

[Qemu-devel] [v7][PATCH 07/10] igd gfx passthrough: create a isa bridge

2015-03-18 Thread Tiejun Chen
Currently IGD drivers always need to access PCH by 1f.0. But we don't want to poke that directly to get ID, and although in real world different GPU should have different PCH. But actually the different PCH DIDs likely map to different PCH SKUs. We do the same thing for the GPU. For PCH, the

Re: [Qemu-devel] RFC: -object vs -chardev creation order

2015-03-18 Thread Markus Armbruster
Daniel P. Berrange berra...@redhat.com writes: The current QEMU startup code will create -chardev backends first, then create -object backends, then -fsdev backends and so on, in some pretty arbitrary order of types. There is already a dependancy from the rng-egd object type, which has a

[Qemu-devel] [PATCH V4 10/19] virtio-ccw: introduce ccw specific queue limit

2015-03-18 Thread Jason Wang
Instead of depending on marco, using a bus specific limit. Cc: Alexander Graf ag...@suse.de Cc: Cornelia Huck cornelia.h...@de.ibm.com Cc: Christian Borntraeger borntrae...@de.ibm.com Cc: Richard Henderson r...@twiddle.net Signed-off-by: Jason Wang jasow...@redhat.com ---

Re: [Qemu-devel] [v7][PATCH 03/10] piix: create host bridge to passthrough

2015-03-18 Thread Gerd Hoffmann
On Mi, 2015-03-18 at 17:06 +0800, Tiejun Chen wrote: Implement a pci host bridge specific to passthrough. Actually this just inherits the standard one. And we also just expose a minimal real host bridge pci configuration subset. +/* Here we just expose minimal host bridge offset subset. */

Re: [Qemu-devel] [RFC 0/5] Memory transaction attributes API

2015-03-18 Thread Edgar E. Iglesias
On Mon, Mar 16, 2015 at 05:20:17PM +, Peter Maydell wrote: This is an RFC patchset aimed at getting comment on some memory API changes to support transaction attributes, ie sideband information that goes along with a memory read or write access to define things like ARM secure/nonsecure,

[Qemu-devel] [v7][PATCH 10/10] xen, gfx passthrough: add opregion mapping

2015-03-18 Thread Tiejun Chen
The OpRegion shouldn't be mapped 1:1 because the address in the host can't be used in the guest directly. This patch traps read and write access to the opregion of the Intel GPU config space (offset 0xfc). The original patch is from Jean Guyader jean.guya...@eu.citrix.com Signed-off-by: Tiejun

[Qemu-devel] [v7][PATCH 02/10] pc_init1: pass parameters just with types

2015-03-18 Thread Tiejun Chen
Pass types to configure pc_init1(). Signed-off-by: Tiejun Chen tiejun.c...@intel.com --- hw/i386/pc_piix.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 07faec9..cea3a5c 100644 --- a/hw/i386/pc_piix.c +++

[Qemu-devel] [PATCH V4 15/19] virtio: introduce virtio_queue_get_index()

2015-03-18 Thread Jason Wang
This patch introduces a helper that can get the queue index of a VirtQueue. This is useful when traversing the list of VirtQueues. Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio/virtio.c | 5 + include/hw/virtio/virtio.h | 1 + 2

[Qemu-devel] [PATCH V4 12/19] virtio-mmio: switch to bus specific queue limit

2015-03-18 Thread Jason Wang
Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio/virtio-mmio.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 2ae6942..dbd44b6 100644 ---

Re: [Qemu-devel] [PATCH for-2.3] numa: pc: fix default VCPU to node mapping

2015-03-18 Thread Igor Mammedov
On Tue, 17 Mar 2015 13:42:36 -0300 Eduardo Habkost ehabk...@redhat.com wrote: On Tue, Mar 17, 2015 at 03:48:38PM +, Igor Mammedov wrote: since commit dd0247e0 pc: acpi: mark all possible CPUs as enabled in SRAT Linux kernel actually tries to use CPU to Node mapping from QEMU

Re: [Qemu-devel] [PATCH] migration: flush the bdrv before stopping VM

2015-03-18 Thread Kevin Wolf
[ Cc: qemu-block ] Am 18.03.2015 um 04:19 hat Li, Liang Z geschrieben: This needs further review/changes on the block layer. First explanation, why I think this don't fix the full problem. Whith this patch, we fix the problem where we have a dirty block layer but basically nothing

[Qemu-devel] [PULL 02/19] util/uri: Add overflow check to rfc3986_parse_port

2015-03-18 Thread Paolo Bonzini
From: Max Reitz mre...@redhat.com And while at it, replace tabs by eight spaces in this function. Signed-off-by: Max Reitz mre...@redhat.com Message-Id: 1424887718-10800-2-git-send-email-mre...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- util/uri.c | 24

[Qemu-devel] [PULL 00/19] Misc bugfixes for 2.3.0-rc1

2015-03-18 Thread Paolo Bonzini
The following changes since commit cd232acfa0d70002fed89e9293f04afda577a513: Update version for v2.3.0-rc0 release (2015-03-17 18:58:33 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to

[Qemu-devel] [PULL 04/19] nbd: Fix nbd_establish_connection()'s return value

2015-03-18 Thread Paolo Bonzini
From: Max Reitz mre...@redhat.com unix_connect_opts() and inet_connect_opts() do not necessarily set errno (if at all); therefore, nbd_establish_connection() should not literally return -errno on error. Signed-off-by: Max Reitz mre...@redhat.com Message-Id:

[Qemu-devel] [PATCH v4 1/3] uhci: fix segfault when hot-unplugging uhci controller

2015-03-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's

[Qemu-devel] [PATCH v4 0/3] usb: fix segfault when hot-unplugging usb host adapter

2015-03-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging.

[Qemu-devel] [PATCH V4 17/19] virtio-pci: increase the maximum number of virtqueues to 513

2015-03-18 Thread Jason Wang
This patch increases the maximum number of virtqueues for pci from 64 to 513. This will allow booting a virtio-net-pci device with 256 queue pairs. To keep migration compatibility, 64 was kept for legacy machine types. This is because qemu in fact allows guest to probe the limit of virtqueues

[Qemu-devel] [PATCH V4 19/19] virtio-pci: introduce auto_msix_bar_size property

2015-03-18 Thread Jason Wang
Currently we don't support more than 128 MSI-X vectors for a pci devices, trying to use vector=129 for a virtio-net-pci device may get: qemu-system-x86_64: -device virtio-net-pci,netdev=hn0,vectors=129: unable to init msix vectors to 129 This this because the MSI-X bar size were hard-coded as

[Qemu-devel] [PATCH v4 3/3] ohci: fix resource cleanup leak

2015-03-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's

Re: [Qemu-devel] [PATCH] exec: Respect as_tranlsate_internal length clamp

2015-03-18 Thread Paolo Bonzini
On 17/03/2015 06:35, Peter Crosthwaite wrote: address_space_translate_internal will clamp the *plen length argument based on the size of the memory region being queried. The iommu walker logic in addresss_space_translate was ignoring this by discarding the post fn call value of *plen. Fix by

Re: [Qemu-devel] [PATCH v3 2/3] ehci: fix segfault when hot-unplugging ehci controller

2015-03-18 Thread Gonglei
On 2015/3/18 16:23, Gerd Hoffmann wrote: On Mi, 2015-03-18 at 09:49 +0800, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it

[Qemu-devel] [PATCH V4 16/19] virtio-pci: speedup MSI-X masking and unmasking

2015-03-18 Thread Jason Wang
This patch tries to speed up the MSI-X masking and unmasking through the mapping between vector and queues. With this patch it will there's no need to go through all possible virtqueues, which may help to reduce the time spent when doing MSI-X masking/unmasking a single vector when more than

[Qemu-devel] [PATCH V4 06/19] virtio-ccw: using VIRTIO_NO_VECTOR instead of 0 for invalid virtqueue

2015-03-18 Thread Jason Wang
There's no need to use vector 0 for invalid virtqueue. So this patch changes to use VIRTIO_NO_VECTOR instead. Cc: Michael S. Tsirkin m...@redhat.com Cc: Cornelia Huck cornelia.h...@de.ibm.com CC: Christian Borntraeger borntrae...@de.ibm.com Cc: Richard Henderson r...@twiddle.net Cc: Alexander

[Qemu-devel] [PATCH V4 09/19] virito: introduce bus specific queue limit

2015-03-18 Thread Jason Wang
This patch introduces a bus specific queue limitation. It will be useful for increasing the limit for one of the bus without disturbing other buses. Cc: Michael S. Tsirkin m...@redhat.com Cc: Alexander Graf ag...@suse.de Cc: Richard Henderson r...@twiddle.net Cc: Cornelia Huck

[Qemu-devel] [PATCH V4 04/19] monitor: replace the magic number 255 with MAX_QUEUE_NUM

2015-03-18 Thread Jason Wang
This patch replace the magic number 255, and increase it to MAX_QUEUE_NUM which is maximum number of queues supported by a nic. Cc: Luiz Capitulino lcapitul...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- monitor.c | 17 ++--- 1 file changed, 10 insertions(+), 7

[Qemu-devel] [v7][PATCH 00/10] xen: add Intel IGD passthrough support

2015-03-18 Thread Tiejun Chen
v7: * Instead of -gfx_passthru we'd like to make that a machine option, -machine xxx,igd-passthru=on * try to make something as common shared by others like KvmGT in the future * Just read those real value from host bridge pci configuration space when create host bridge then put in

[Qemu-devel] [v7][PATCH 01/10] i440fx: make types configurable at run-time

2015-03-18 Thread Tiejun Chen
From: Michael S. Tsirkin m...@redhat.com IGD passthrough wants to supply a different pci and host devices, inheriting i440fx devices. Make types configurable. Signed-off-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Tiejun Chen tiejun.c...@intel.com --- hw/i386/pc_piix.c| 4 +++-

[Qemu-devel] [v7][PATCH 06/10] xen, gfx passthrough: retrieve VGA BIOS to work

2015-03-18 Thread Tiejun Chen
Now we retrieve VGA bios like kvm stuff in qemu but we need to fix Device Identification in case if its not matched with the real IGD device since Seabios is always trying to compare this ID to work out VGA BIOS. Signed-off-by: Tiejun Chen tiejun.c...@intel.com --- hw/xen/xen_pt.c | 10

[Qemu-devel] [PATCH V4 01/19] pc: add 2.4 machine types

2015-03-18 Thread Jason Wang
The following patches will limit the following things to legacy machine type: - maximum number of virtqueues for virtio-pci were limited to 64 - auto msix bar size for virtio-net-pci were disabled by default Cc: Paolo Bonzini pbonz...@redhat.com Cc: Richard Henderson r...@twiddle.net Cc: Michael

[Qemu-devel] [PATCH V4 13/19] virtio-pci: switch to use bus specific queue limit

2015-03-18 Thread Jason Wang
Instead of depending on a macro, switch to use a bus specific queue limit. Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio/virtio-pci.c | 12 +++- include/hw/virtio/virtio.h | 2 -- 2 files changed, 7 insertions(+), 7 deletions(-)

[Qemu-devel] [PATCH v4 2/3] ehci: fix segfault when hot-unplugging ehci controller

2015-03-18 Thread arei.gonglei
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's

Re: [Qemu-devel] [v2][PATCH 2/2] libxl: introduce gfx_passthru_kind

2015-03-18 Thread Ian Campbell
On Wed, 2015-03-18 at 15:32 +0800, Chen, Tiejun wrote: I think the _libxl_ message needs to be just Unable to detect graphics passthru kind. i.e. it can't/shouldn't reference anything to do with xl config options etc (which would make no sense if libvirt was being used). That's not

[Qemu-devel] [PULL 06/19] nbd: Handle blk_getlength() failure

2015-03-18 Thread Paolo Bonzini
From: Max Reitz mre...@redhat.com Signed-off-by: Max Reitz mre...@redhat.com Message-Id: 1424887718-10800-9-git-send-email-mre...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- blockdev-nbd.c | 6 +- include/block/nbd.h | 3 ++- nbd.c | 16

[Qemu-devel] [PULL 03/19] qemu-nbd: Detect unused partitions by system == 0

2015-03-18 Thread Paolo Bonzini
From: Max Reitz mre...@redhat.com Unused partitions do not necessarily have a total sector count of 0 (although they should have), but they always do have the system field set to 0, so use that for testing whether a partition is in use rather than the sector count field alone. Signed-off-by: Max

[Qemu-devel] [PULL 01/19] nbd: Fix overflow return value

2015-03-18 Thread Paolo Bonzini
From: Yik Fang eric.fan...@huawei.com The value of reply.error should be the type unsigned int. Signed-off-by: Yik Fang eric.fan...@huawei.com Message-Id: 1423722111-12902-1-git-send-email-eric.fan...@huawei.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- nbd.c | 2 +- 1 file changed,

Re: [Qemu-devel] [PATCH v3 1/3] uhci: fix segfault when hot-unplugging uhci controller

2015-03-18 Thread Gonglei
On 2015/3/18 15:35, Markus Armbruster wrote: Gerd Hoffmann kra...@redhat.com writes: Hi, -static void uhci_reset(void *opaque) +static void uhci_reset(DeviceState *dev) { -UHCIState *s = opaque; +PCIDevice *d = PCI_DEVICE(dev); +UHCIState *s = DO_UPCAST(UHCIState, dev,

[Qemu-devel] [PATCH V4 02/19] spapr: add machine type specific instance init function

2015-03-18 Thread Jason Wang
This patches adds machine type specific instance initialization functions. Those functions will be used by following patches to compat class properties for legacy machine types. Cc: Alexander Graf ag...@suse.de Cc: qemu-...@nongnu.org Signed-off-by: Jason Wang jasow...@redhat.com ---

[Qemu-devel] [PATCH V4 00/19] Support more virtio queues

2015-03-18 Thread Jason Wang
We current limit the max virtio queues to 64. This is not sufficient to support multiqueue devices (e.g recent Linux support up to 256 tap queues). So this series tries to let virtio to support more queues. No much works need to be done except: - Introducing transport specific queue limitation.

Re: [Qemu-devel] [PATCH v3 2/3] ehci: fix segfault when hot-unplugging ehci controller

2015-03-18 Thread Gerd Hoffmann
On Mi, 2015-03-18 at 09:49 +0800, arei.gong...@huawei.com wrote: From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or

[Qemu-devel] [v7][PATCH 09/10] xen, gfx passthrough: register host bridge specific to passthrough

2015-03-18 Thread Tiejun Chen
Just register that pci host bridge specific to passthrough. Signed-off-by: Tiejun Chen tiejun.c...@intel.com --- hw/i386/pc_piix.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 8fbfc09..eae2d20 100644 ---

[Qemu-devel] [v7][PATCH 04/10] hw/pci-assign: split pci-assign.c

2015-03-18 Thread Tiejun Chen
We will try to reuse assign_dev_load_option_rom in xen side, and especially its a good beginning to unify pci assign codes both on kvm and xen in the future. Signed-off-by: Tiejun Chen tiejun.c...@intel.com --- hw/i386/Makefile.objs | 1 + hw/i386/kvm/pci-assign.c | 82

[Qemu-devel] [PATCH V4 14/19] virtio: introduce vector to virtqueues mapping

2015-03-18 Thread Jason Wang
Currently we will try to traverse all virtqueues to find a subset that using a specific vector. This is sub optimal when we will support hundreds or even thousands of virtqueues. So this patch introduces a method which could be used by transport to get all virtqueues that using a same vector. This

[Qemu-devel] [PATCH V4 07/19] virtio-net: validate backend queue numbers against bus limitation

2015-03-18 Thread Jason Wang
We don't validate the backend queue numbers against bus limitation, this will easily crash qemu if it exceeds the limitation. Fixing this by doing the validation and fail early. Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- hw/net/virtio-net.c | 7

[Qemu-devel] [PATCH V4 18/19] pci: remove hard-coded bar size in msix_init_exclusive_bar()

2015-03-18 Thread Jason Wang
This patch let msix_init_exclusive_bar() can accept bar_size parameter other than a hard-coded limit 4096. Then caller can specify a bar_size depends on msix entries and can use up to 2048 msix entries as PCI spec allows. To keep migration compatibility, 4096 is used for all callers and pba were

[Qemu-devel] [PATCH V4 05/19] monitor: check return value of qemu_find_net_clients_except()

2015-03-18 Thread Jason Wang
qemu_find_net_clients_except() may return a value which is greater than the size of array we provided. So we should check this value before using it, otherwise this may cause unexpected memory access. This patch fixes the net related command completion when we have a virtio-net nic with more than

Re: [Qemu-devel] [RFC 0/5] Memory transaction attributes API

2015-03-18 Thread Peter Maydell
On 18 March 2015 at 08:38, Edgar E. Iglesias edgar.igles...@gmail.com wrote: 2. The series introduces the read and write _with_attrs. Another approach could be to add a (for example) single .access callback. The callback could take a structure pointer as input, e.g: struct MemTx { bool

[Qemu-devel] [PULL 15/19] virtio-scsi: Fix assert in virtio_scsi_push_event

2015-03-18 Thread Paolo Bonzini
From: Fam Zheng f...@redhat.com Hotplugging a scsi-disk may trigger the assertion in qemu_sgl_concat. qemu-system-x86_64: qemu/hw/scsi/virtio-scsi.c:115: qemu_sgl_concat: Assertion `skip == 0' failed. This is introduced by commit 55783a55 (virtio-scsi: work around bug in old BIOSes)

[Qemu-devel] [PULL 16/19] kvm: fix ioeventfd endianness on bi-endian architectures

2015-03-18 Thread Paolo Bonzini
From: Greg Kurz gk...@linux.vnet.ibm.com KVM expects host endian values. Hosts that don't use the default endianness need to negate the swap performed in adjust_endianness(). Suggested-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com Message-Id:

Re: [Qemu-devel] [PATCH v2] hw/usb: Include USB files only if necessary

2015-03-18 Thread Gerd Hoffmann
On Di, 2015-03-17 at 14:52 +0100, Thomas Huth wrote: Everything should now also compile fine again when configure has been run with the --enable-usb-redir and/or --enable-libusb option. Survived test now. Added to usb queue. thanks, Gerd

Re: [Qemu-devel] GSOC 2015 Project Proposal

2015-03-18 Thread Stefan Hajnoczi
On Mon, Feb 9, 2015 at 12:44 AM, Xin Tong trent.t...@gmail.com wrote: I would like to do GSOC this summer. The project i have in mind is to implement a set of facilities to make implementing Hardware transactional memory (HTM) easier in QEMU. HTM has become available in many architecture

Re: [Qemu-devel] [PATCH v4 0/3] usb: fix segfault when hot-unplugging usb host adapter

2015-03-18 Thread Gerd Hoffmann
On Mi, 2015-03-18 at 17:33 +0800, arei.gong...@huawei.com wrote: v4 - v3: - add reset hookup for sysbus devices (ehci/ohci). (Gerd) Replaced patches. make check failure is gone. Good. thanks, Gerd

[Qemu-devel] [PULL 3/8] pcie: correct mistaken register bit for End-End TLP Prefix Blocking

2015-03-18 Thread Michael S. Tsirkin
From: Chen Fan chen.fan.f...@cn.fujitsu.com from pcie spec 7.8.17, the End-End TLP Prefix Blocking bit local is 15(e.g. 0x8000) in device control 2 register. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Reviewed-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Michael S. Tsirkin

[Qemu-devel] [PULL 7/8] pci: fix several trivial typos in comment

2015-03-18 Thread Michael S. Tsirkin
From: Chen Fan chen.fan.f...@cn.fujitsu.com Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Reviewed-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- include/hw/pci/pci.h | 2 +- include/hw/pci/pcie_aer.h | 2 +- 2 files changed, 2

Re: [Qemu-devel] [PATCH V4 19/19] virtio-pci: introduce auto_msix_bar_size property

2015-03-18 Thread Michael S. Tsirkin
On Wed, Mar 18, 2015 at 05:35:09PM +0800, Jason Wang wrote: Currently we don't support more than 128 MSI-X vectors for a pci devices, trying to use vector=129 for a virtio-net-pci device may get: qemu-system-x86_64: -device virtio-net-pci,netdev=hn0,vectors=129: unable to init msix vectors

Re: [Qemu-devel] [RFC PATCH 03/14] quorum: ignore 0-length child

2015-03-18 Thread Max Reitz
On 2015-03-18 at 01:29, Wen Congyang wrote: On 02/24/2015 04:43 AM, Max Reitz wrote: On 2015-02-11 at 22:07, Wen Congyang wrote: We connect to NBD server when starting block replication, so the length is 0 before starting block replication. Signed-off-by: Wen Congyang we...@cn.fujitsu.com

Re: [Qemu-devel] [PATCH V4 08/19] virtio-net: fix the upper bound when trying to delete queues

2015-03-18 Thread Michael S. Tsirkin
On Wed, Mar 18, 2015 at 05:34:58PM +0800, Jason Wang wrote: Virtqueue were indexed from zero, so don't delete virtqueue whose index is n-max_queues * 2 + 1. Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com Bugfix? needed on master? stable? ---

[Qemu-devel] [PULL 10/13] hw/usb: Include USB files only if necessary

2015-03-18 Thread Gerd Hoffmann
From: Thomas Huth th...@linux.vnet.ibm.com Boards that do not include an USB controller should not provide USB devices. However, when running qemu-system-s390x -device help for example, there's still a usb-hub, usb-kbd, usb-mouse and usb-tablet in the list of supported devices. Let's fix that by

[Qemu-devel] [PULL 07/13] monitor usb: Inline monitor_read_bdrv_key_start()'s first part

2015-03-18 Thread Gerd Hoffmann
From: Markus Armbruster arm...@redhat.com monitor_read_bdrv_key_start() does several things: 1. If no key is needed, call completion_cb() and succeed 2. If we're in QMP context, call qerror_report_err() and fail 3. Start reading the key in the monitor. This is two things too many. Inline 1.

[Qemu-devel] [PULL 03/13] ohci: Complete conversion to realize

2015-03-18 Thread Gerd Hoffmann
From: Markus Armbruster arm...@redhat.com Commit 457215ec ohci: Use QOM realize for OHCI converted only sysbus-ohci. Finish the job: convert pci-ohci. Signed-off-by: Markus Armbruster arm...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/hcd-ohci.c | 34

[Qemu-devel] [PULL 09/13] usb/dev-storage: Avoid qerror_report_err() outside QMP handlers

2015-03-18 Thread Gerd Hoffmann
From: Markus Armbruster arm...@redhat.com qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. usb_msd_password_cb() is only called from within an HMP command handler. Replace by error_report_err().

[Qemu-devel] [PULL 5/9] ui: split setup of VNC auth scheme into separate method

2015-03-18 Thread Gerd Hoffmann
From: Daniel P. Berrange berra...@redhat.com The vnc_display_open method is quite long and complex, so move the VNC auth scheme decision logic into a separate method for clarity. Also update the comment to better describe what we are trying to achieve. Signed-off-by: Daniel P. Berrange

[Qemu-devel] [PATCH 1/8] memory: Add global-locking property to memory regions

2015-03-18 Thread Paolo Bonzini
From: Jan Kiszka jan.kis...@siemens.com This introduces the memory region property global_locking. It is true by default. By setting it to false, a device model can request BQL-free dispatching of region accesses to its r/w handlers. The actual BQL break-up will be provided in a separate patch.

Re: [Qemu-devel] [PATCH v5 7/7] pc: add PC_I440FX_COMPAT to disable aercap for vifo device

2015-03-18 Thread Michael S. Tsirkin
typo in subject: vfio, not vifo. On Thu, Mar 12, 2015 at 06:23:59PM +0800, Chen Fan wrote: for piix4 chipset, we don't need to expose aer, so introduce PC_I440FX_COMPAT for all piix4 machines to disable aercap, and add HW_COMPAT_2_2 to disable aercap for all lower than 2.3. Signed-off-by:

Re: [Qemu-devel] [PATCH 09/11] iotests: test 124 - drive object refactoring

2015-03-18 Thread Max Reitz
On 2015-03-17 at 19:40, John Snow wrote: On 03/17/2015 04:44 PM, Max Reitz wrote: On 2015-03-04 at 23:15, John Snow wrote: The original test was not particularly good about keeping the relationships between bitmaps, drives, and images very explicit, so this patch adds an explicit 'drive'

[Qemu-devel] [PULL 19/19] exec: Respect as_tranlsate_internal length clamp

2015-03-18 Thread Paolo Bonzini
From: Peter Crosthwaite peter.crosthwa...@xilinx.com address_space_translate_internal will clamp the *plen length argument based on the size of the memory region being queried. The iommu walker logic in addresss_space_translate was ignoring this by discarding the post fn call value of *plen. Fix

[Qemu-devel] [PULL 11/19] nbd: Fix interpretation of the export flags

2015-03-18 Thread Paolo Bonzini
From: Max Reitz mre...@redhat.com The export flags are a 16 bit value, so be16_to_cpu() has to be used to interpret them correctly. This makes discard and flush actually work for named NBD exports (they did not work before, because the client always assumed them to be unsupported because of the

[Qemu-devel] [PATCH] virtio: move sanity checks to ifdef DEBUG

2015-03-18 Thread Michael S. Tsirkin
All that happens when virtqueue_fill is invoked incorrectly is that we corrupt guest memory, so this check is not a security measure. Move the check to ifdef DEBUG to make sure we don't introduce new crashes close to release. Array scans aren't free either, so it's a good idea from performance

Re: [Qemu-devel] [PATCH 05/11] block: add delayed bitmap successor cleanup

2015-03-18 Thread Max Reitz
On 2015-03-17 at 18:46, John Snow wrote: On 03/17/2015 02:44 PM, Max Reitz wrote: On 2015-03-04 at 23:15, John Snow wrote: [snip] +} +} + +BdrvDirtyBitmap *bdrv_dirty_bitmap_decref(BlockDriverState *bs, I don't know whether I'm that content with the name chosen, because you're

Re: [Qemu-devel] [PATCH target-arm v3 04/15] arm: xlnx-zynqmp: Add GIC

2015-03-18 Thread Peter Crosthwaite
On Wed, Mar 18, 2015 at 10:26 AM, Alistair Francis alistair.fran...@xilinx.com wrote: On Mon, Mar 16, 2015 at 10:12 PM, Peter Crosthwaite peter.crosthwa...@xilinx.com wrote: And connect IRQ outputs to the CPUs. Reviewed-by: Alistair Francis alistair.fran...@xilinx.com Signed-off-by: Peter

[Qemu-devel] [PULL 2/9] ui: remove unused 'wiremode' variable in VncState struct

2015-03-18 Thread Gerd Hoffmann
From: Daniel P. Berrange berra...@redhat.com Signed-off-by: Daniel P. Berrange berra...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/vnc-auth-vencrypt.c | 1 - ui/vnc-tls.c | 2 -- ui/vnc-tls.h | 7 --- ui/vnc-ws.c| 1 - 4 files changed, 11

[Qemu-devel] [PULL for-2.3 0/9] vnc patch queue.

2015-03-18 Thread Gerd Hoffmann
-20150318-1 for you to fetch changes up to 4a48aaa9f52dbac148be24f591de2f28c58ccb5d: ui: ensure VNC websockets server checks the ACL if requested (2015-03-18 09:25:14 +0100) vnc: fix websockets QMP

Re: [Qemu-devel] [PATCH 3/8] pci: Remove unused functions

2015-03-18 Thread Michael S. Tsirkin
On Mon, Mar 09, 2015 at 06:30:10PM +0100, Thomas Huth wrote: The functions pcie_ari_init(), pcie_cap_is_arifwd_enabled() and ich9_d2pbr_init() are completely unused and thus can be deleted. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com Cc: Michael S. Tsirkin m...@redhat.com Cc:

Re: [Qemu-devel] [PATCH] migration: flush the bdrv before stopping VM

2015-03-18 Thread Li, Liang Z
First explanation, why I think this don't fix the full problem. Whith this patch, we fix the problem where we have a dirty block layer but basically nothing dirtying the memory on the guest (we are moving the 20 seconds from max_downtime for the blocklayer flush), to 20 seconds

Re: [Qemu-devel] [PATCH] migration: flush the bdrv before stopping VM

2015-03-18 Thread Kevin Wolf
Am 18.03.2015 um 13:36 hat Juan Quintela geschrieben: Kevin Wolf kw...@redhat.com wrote: The problem is that the block layer really doesn't have an option to control what is getting synced once the data is cached outside of qemu. Essentially we can do an fdatasync() or we can leave it,

Re: [Qemu-devel] [PATCH] migration: flush the bdrv before stopping VM

2015-03-18 Thread Juan Quintela
Kevin Wolf kw...@redhat.com wrote: [ Cc: qemu-block ] Am 18.03.2015 um 04:19 hat Li, Liang Z geschrieben: This needs further review/changes on the block layer. First explanation, why I think this don't fix the full problem. Whith this patch, we fix the problem where we have a dirty

[Qemu-devel] [PULL 4/8] aer: fix wrong check on expose aer tlp prefix log

2015-03-18 Thread Michael S. Tsirkin
From: Chen Fan chen.fan.f...@cn.fujitsu.com when specify TLP Prefix log as using pcie_aer_inject_error, the TLP prefix log is always discarded. because the check is incorrect, the End-End TLP Prefix Supported bit (PCI_EXP_DEVCAP2_EETLPP) should be in Device Capabilities 2 Register.

[Qemu-devel] [PULL 5/8] pcie_aer: fix typos in pcie_aer_inject_error comment

2015-03-18 Thread Michael S. Tsirkin
From: Chen Fan chen.fan.f...@cn.fujitsu.com Refer to PCI Express Base Spec3.0, this comments can't fit the description in spec, so we should fix them. Signed-off-by: Chen Fan chen.fan.f...@cn.fujitsu.com Reviewed-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Michael S. Tsirkin

Re: [Qemu-devel] [PATCH V4 07/19] virtio-net: validate backend queue numbers against bus limitation

2015-03-18 Thread Michael S. Tsirkin
On Wed, Mar 18, 2015 at 05:34:57PM +0800, Jason Wang wrote: We don't validate the backend queue numbers against bus limitation, this will easily crash qemu if it exceeds the limitation. Fixing this by doing the validation and fail early. Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by:

[Qemu-devel] [PULL 04/13] uhci: Convert to realize

2015-03-18 Thread Gerd Hoffmann
From: Markus Armbruster arm...@redhat.com Signed-off-by: Markus Armbruster arm...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/hcd-uhci.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index

[Qemu-devel] [PULL 13/13] ehci: fix segfault when hot-unplugging ehci controller

2015-03-18 Thread Gerd Hoffmann
From: Gonglei arei.gong...@huawei.com When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's

[Qemu-devel] [PULL 1/9] vnc: Fix QMP change not to use funky error class

2015-03-18 Thread Gerd Hoffmann
From: Markus Armbruster arm...@redhat.com Error classes are a leftover from the days of rich error objects. New code should always use ERROR_CLASS_GENERIC_ERROR. Commit 1d0d59f added a use of ERROR_CLASS_DEVICE_NOT_FOUND. Replace it. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/vnc.c

[Qemu-devel] [PULL 6/9] ui: fix setup of VNC websockets auth scheme with TLS

2015-03-18 Thread Gerd Hoffmann
From: Daniel P. Berrange berra...@redhat.com The way the websockets TLS code was integrated into the VNC server made it essentially useless. The only time that the websockets TLS support could be used is if the primary VNC server had its existing TLS support disabled. ie QEMU had to be launched

[Qemu-devel] [PULL 8/9] ui: remove separate gnutls_session for websockets server

2015-03-18 Thread Gerd Hoffmann
From: Daniel P. Berrange berra...@redhat.com The previous change to the auth scheme handling guarantees we can never have nested TLS sessions in the VNC websockets server. Thus we can remove the separate gnutls_session instance. Signed-off-by: Daniel P. Berrange berra...@redhat.com

[Qemu-devel] [PATCH 6/8] exec: mark unassigned_io_ops as unlocked

2015-03-18 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/exec.c b/exec.c index d60abfc..c1a2e9e 100644 --- a/exec.c +++ b/exec.c @@ -2197,6 +2197,7 @@ static void memory_map_init(void) system_io = g_malloc(sizeof(*system_io));

[Qemu-devel] [PULL 4/9] ui: report error if user requests VNC option that is unsupported

2015-03-18 Thread Gerd Hoffmann
From: Daniel P. Berrange berra...@redhat.com If the VNC server is built without tls, sasl or websocket support and the user requests one of these features, they are just silently ignored. This is bad because it means the VNC server ends up running in a configuration that is less secure than the

[Qemu-devel] [PULL 2/8] virtio: Fix memory leaks reported by Coverity

2015-03-18 Thread Michael S. Tsirkin
From: Stefan Weil s...@weilnetz.de All four leaks are similar, so fix them in one patch. Signed-off-by: Stefan Weil s...@weilnetz.de Reviewed-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/9pfs/virtio-9p-local.c | 28

[Qemu-devel] [PULL 8/8] pcie_aer: fix comment to match pcie spec

2015-03-18 Thread Michael S. Tsirkin
Code comment says table 6-2 but in fact it's is not a table, it is Figure 6-2 on page 479. Cc: Chen Fan chen.fan.f...@cn.fujitsu.com Reported-by: Michael Tokarev m...@tls.msk.ru Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/pci/pcie_aer.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [Qemu-devel] [RFC PATCH] cpus: Don't kick un-inited cpus.

2015-03-18 Thread Paolo Bonzini
On 18/03/2015 13:53, Peter Crosthwaite wrote: following a464982499b2f637f6699e3d03e0a9d2e0b5288b, it's now possible for there to be attempts to take the BQL before CPUs have been realized in cases where a machine model inits peripherals before the first CPU. BQL lock aquisition kicks the

[Qemu-devel] [PATCH for-2.4 0/8] memory: enable unlocked PIO/MMIO in KVM

2015-03-18 Thread Paolo Bonzini
And here we are... These are the changes required to make the BQL optional for memory access, and use that support in KVM. For now, only one device model is changed to do unlocked accesses. Please review! Jan Kiszka (4): memory: Add global-locking property to memory regions memory: Provide

  1   2   3   >