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

2015-03-18 Thread Gerd Hoffmann
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, d); Uh, oh, DO_UPCAST() is long deprecated. There are other instances of this in the

Re: [Qemu-devel] [Qemu-block] [PATCH] qtest/ahci: Fix clang 3.5.0 error

2015-03-18 Thread Markus Armbruster
John Snow writes: > A thinko that clang 3.5.0 caught. > Thankfully does not introduce any new failures. > > Signed-off-by: John Snow How you caught the bug is interesting enough to be mentioned in the commit message, but the nature of the bug surely is more interesting than that. Suggest to ch

Re: [Qemu-devel] [PATCH] add pci-bridge-seat

2015-03-18 Thread Gerd Hoffmann
Hi, > Could you explain a bit more please? What does it mean that > a bridge is a new seat? How is this used? seat: kbd+mouse+display adapter. multiseat: When you have multiple of them on a single machine. When configured properly logind will show a login screen on each seat. why a pci bridge

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:02, Gerd Hoffmann wrote: > 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, d); > > Uh, oh, DO_UPCAST() is lon

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

2015-03-18 Thread Paolo Bonzini
On 17/03/2015 20:08, Daniel P. Berrange wrote: > 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 create the -chardev instances, > then create the -object rng-egd instanc

Re: [Qemu-devel] Duplicate definition of 'qemu_time' building git master

2015-03-18 Thread Paolo Bonzini
On 17/03/2015 21:36, B Cran wrote: > When trying to build the latest git master on openSUSE 13.2, it failed with: > > vl.c:711:15: error: ‘qemu_time’ redeclared as different kind of symbol > static time_t qemu_time(void) >^ > In file included from qemu/include/block/aio.h:23:0,

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

2015-03-18 Thread Chen, Tiejun
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 very user friendly though, so you may want to consider adding a new

Re: [Qemu-devel] [PATCH] virtio-scsi-dataplane: fix memory leak in virtio_scsi_vring_init

2015-03-18 Thread Paolo Bonzini
On 18/03/2015 10:42, Bo Su wrote: > if k->set_host_notifier failed, VirtIOSCSIVring *r will leak > > Signed-off-by: Bo Su > --- > hw/scsi/virtio-scsi-dataplane.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-d

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

2015-03-18 Thread Markus Armbruster
Gerd Hoffmann 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, d); > > Uh, oh, DO_UPCAST() is long deprecated. Ther

Re: [Qemu-devel] [PATCH] raw-posix: Deprecate host floppy passthrough

2015-03-18 Thread Markus Armbruster
John Snow writes: > On 03/17/2015 12:02 PM, Markus Armbruster wrote: >> Raise your hand if you have a physical floppy drive in a computer >> you've powered on in 2015. Okay, I see we got a few weirdos in the >> audience. That's okay, weirdos are welcome here. >> > > May I introduce to you my re

Re: [Qemu-devel] [PATCH] raw-posix: Deprecate host floppy passthrough

2015-03-18 Thread Gerd Hoffmann
On Di, 2015-03-17 at 17:02 +0100, Markus Armbruster wrote: > Raise your hand if you have a physical floppy drive in a computer > you've powered on in 2015. /me raises the hand, my amd test box has one. I was surprised when I got the machine a few years back. And I never ever actually used the flo

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 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, d

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 > > 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 >

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/nonsecu

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 >> >> 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

[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 dev

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

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

[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 --- hw/xen/xen_pt.c | 10 ++ hw/xen/xen_pt.

[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 Signed-off-by: Yang Zhang --- hw/core/machine.c| 20 hw/xen/Makefile.objs | 1 + hw/xen/xen-hos

[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 --- 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 index fcc9f1c..2d5cebb 1

[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 differ

[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 --- hw/pci-host/piix.c | 82 include/h

[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 --- 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 +++ b/hw/i386/pc_piix.c @@ -75,7

[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 Signed-off-by: Tiejun Chen Signed-off-by: Yang Z

[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 --- 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 --- a/hw/i386/pc_piix.c +++ b/

[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 --- hw/i386/Makefile.objs | 1 + hw/i386/kvm/pci-assign.c | 82 --

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

2015-03-18 Thread arei.gonglei
From: Gonglei 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 hook up reset via Devic

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

2015-03-18 Thread arei.gonglei
From: Gonglei 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 hook up reset via D

[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. -

[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 Cc: qemu-...@nongnu.org Signed-off-by: Jason Wang --- hw/ppc/spapr.c | 23 +++

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 > > +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: > > L

[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 Cc: qemu-...@nongnu.org Signed-off-by: Jason Wang --- hw/ppc/spapr

[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 Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 59f76bc.

[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 Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 12 +++- include/hw/virtio/virtio.h | 2 -- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/virtio/virtio-pci.c

[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 Cc: Richard Henderson Cc: Michael S. Tsirkin Signed-off-by: Jason Wa

[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 hundre

[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 Cc: Cornelia Huck CC: Christian Borntraeger Cc: Richard Henderson Cc: Alexander Graf Signed-off-by: Jason Wang --- hw/s390x/virtio-ccw.c | 2 +- 1 file change

[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 Cc: Alexander Graf Cc: Richard Henderson Cc: Cornelia Huck Cc: Christian Borntraeger Cc: Paolo Bonzini Signed-off-by: Ja

[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 Signed-off-by: Jason Wang --- monitor.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/monitor.c b/monitor.

[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 st

[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

[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 Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 7 +++ 1 file changed, 7 insertions(+)

[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 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 Cc: Richard Henderson Cc: Christian Borntraeger Cc: Cornelia Huck Signed-off-by: Jason Wang --- hw/s390x/s390-virtio-bus.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/h

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

2015-03-18 Thread Markus Armbruster
"Daniel P. Berrange" 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 > link to a char

[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 Cc: Cornelia Huck Cc: Christian Borntraeger Cc: Richard Henderson Signed-off-by: Jason Wang --- hw/s390x/s390-virtio-ccw.c | 7 +-- hw/s390x/virtio-ccw.c| 19 --- include/hw/s390x/s39

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

2015-03-18 Thread Jason Wang
Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- 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 --- a/hw/virtio/virtio-mmio.c +++ b/hw/virtio/virtio-mmio.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 Signed-off-by: Jason Wang --- hw/virtio/virtio.c | 5 + include/hw/virtio/virtio.h | 1 + 2 files changed, 6 insertions(+) diff

[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 thro

[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 409

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" 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 create the -char

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

2015-03-18 Thread arei.gonglei
From: Gonglei 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 hook up reset via Devic

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

2015-03-18 Thread arei.gonglei
From: Gonglei 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 hook up reset via Devic

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 Peter Maydell
On 18 March 2015 at 08:38, Edgar E. Iglesias 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 rw; > hwaddr add

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). > > > > T

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 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 provided SRAT ta

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 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 tries to

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

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 not

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

2015-03-18 Thread Paolo Bonzini
From: Yik Fang The value of reply.error should be the type unsigned int. Signed-off-by: Yik Fang Message-Id: <1423722111-12902-1-git-send-email-eric.fan...@huawei.com> Signed-off-by: Paolo Bonzini --- nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nbd.c b/nbd.c inde

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

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

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

2015-03-18 Thread Paolo Bonzini
From: Max Reitz 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 Reitz Message-Id

[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 c3c1bb99d1c11978d9ce94d1b

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

2015-03-18 Thread Paolo Bonzini
From: Max Reitz 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 Message-Id: <1424887718-10800-4-git-send-email-mre...@redhat.com> Signed-off-by: Paol

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

2015-03-18 Thread Paolo Bonzini
From: Max Reitz And while at it, replace tabs by eight spaces in this function. Signed-off-by: Max Reitz Message-Id: <1424887718-10800-2-git-send-email-mre...@redhat.com> Signed-off-by: Paolo Bonzini --- util/uri.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(

[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 if k->set_host_notifier failed, VirtIOSCSIVring *r will leak Signed-off-by: Bo Su Message-Id: <1426671732-80213-1-git-send-email-su...@huawei.com> Reviewed-by: Fam Zheng Reviewed-by: Gonglei Signed-off-by: Paolo Bonzini --- hw/scsi/virtio-scsi-dataplane.c | 4 +++- 1 file change

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

2015-03-18 Thread Paolo Bonzini
From: Max Reitz 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 Message-Id: <1424887718-1080

[Qemu-devel] [PULL 09/19] nbd: Set block size to BDRV_SECTOR_SIZE

2015-03-18 Thread Paolo Bonzini
From: Max Reitz Signed-off-by: Max Reitz Message-Id: <1424887718-10800-13-git-send-email-mre...@redhat.com> Signed-off-by: Paolo Bonzini --- block/nbd-client.c | 3 +-- block/nbd-client.h | 1 - include/block/nbd.h | 4 ++-- nbd.c | 15 +++ qemu-nbd.c |

[Qemu-devel] [PULL 12/19] nbd: Drop unexpected data for NBD_OPT_LIST

2015-03-18 Thread Paolo Bonzini
From: Max Reitz When requesting the list of exports, no data should be sent. If data is sent, the NBD server should not just inform the client of the invalid request, but also drop the data. Signed-off-by: Max Reitz Message-Id: <1424887718-10800-22-git-send-email-mre...@redhat.com> Signed-off-b

[Qemu-devel] [PULL 17/19] profiler: Reenable built-in profiler

2015-03-18 Thread Paolo Bonzini
From: Alexey Kardashevskiy 2ed1ebcf6 "timer: replace time() with QEMU_CLOCK_HOST" broke compile when configured with --enable-profiler. Turned out the profiler has been broken for a while. This does s/qemu_time/tcg_time/ as the profiler only works in a TCG mode. This also fixes the compile error

[Qemu-devel] [PULL 08/19] nbd: Fix potential signed overflow issues

2015-03-18 Thread Paolo Bonzini
From: Max Reitz Signed-off-by: Max Reitz Message-Id: <1424887718-10800-11-git-send-email-mre...@redhat.com> Signed-off-by: Paolo Bonzini --- include/block/nbd.h | 4 ++-- qemu-nbd.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/block/nbd.h b/include

[Qemu-devel] [PULL 10/19] nbd: Fix nbd_receive_options()

2015-03-18 Thread Paolo Bonzini
From: Max Reitz The client flags are sent exactly once overall, not once per option. Signed-off-by: Max Reitz Message-Id: <1424887718-10800-19-git-send-email-mre...@redhat.com> Signed-off-by: Paolo Bonzini --- nbd.c | 49 + 1 file changed, 29 in

[Qemu-devel] [PULL 14/19] build: pass .d file name to scripts/make_device_config.sh, fix makefile target

2015-03-18 Thread Paolo Bonzini
The .d file name must match exactly what is used in the SUBDIR_DEVICES_MAK_DEP variable. Instead of making assumptions in the make_device_config.sh script, just pass it in. Similarly, the makefile target may not match the output file name, because Makefile uses a temporary file. Instead of makin

[Qemu-devel] [PULL 07/19] qemu-nbd: fork() can fail

2015-03-18 Thread Paolo Bonzini
From: Max Reitz It is very unlikely, but it is possible. Signed-off-by: Max Reitz Message-Id: <1424887718-10800-10-git-send-email-mre...@redhat.com> Signed-off-by: Paolo Bonzini --- qemu-nbd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index

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

2015-03-18 Thread Paolo Bonzini
From: Peter Crosthwaite 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 just always using *plen as

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

2015-03-18 Thread Paolo Bonzini
From: Max Reitz 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 bug fixed by this p

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

2015-03-18 Thread Paolo Bonzini
From: Greg Kurz 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 Signed-off-by: Greg Kurz Message-Id: <20150313212337.31142.3991.stgit@bahia.local> Signed-off-by: Paolo Bonzini ---

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

2015-03-18 Thread Paolo Bonzini
From: Fam Zheng 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) which didn't check

[Qemu-devel] [PULL 13/19] coroutine-io: Return -errno in case of error

2015-03-18 Thread Paolo Bonzini
From: Max Reitz In case qemu_co_sendv_recvv() fails without any data read, there is no reason not to return the perfectly fine error number retrieved from socket_error(). Signed-off-by: Max Reitz Message-Id: <1424887718-10800-16-git-send-email-mre...@redhat.com> Signed-off-by: Paolo Bonzini --

[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 poin

Re: [Qemu-devel] GSOC 2015 Project Proposal

2015-03-18 Thread Stefan Hajnoczi
On Mon, Feb 9, 2015 at 12:44 AM, Xin Tong 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 supported by QEMU, e

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

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

[Qemu-devel] [PATCH] 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 Reported-by: Michael Tokarev Signed-off-by: Michael S. Tsirkin --- hw/pci/pcie_aer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci/pcie_aer.c b/hw/pci/pc

Re: [Qemu-devel] Google SoC 2015 Idea - Extracting Virtual Device Implementation from QEMU

2015-03-18 Thread Stefan Hajnoczi
On Tue, Mar 17, 2015 at 7:38 PM, Guodong Zhu wrote: > The purpose of the project is to implement an interface that can extract the > implementation of the virtual devices and make them executable outside of > the QEMU environment, which will benefit later testing and making the test > of the virtu

[Qemu-devel] [Bug 1297218] Re: guest hangs after live migration due to tsc jump

2015-03-18 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: glusterfs (Ubuntu Trusty) Status: New => Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1297218 T

Re: [Qemu-devel] [PATCH v4] block/null: Latency simulation by adding new option "latency-ns"

2015-03-18 Thread Eric Blake
On 03/18/2015 12:49 AM, Fam Zheng wrote: > Aio context switch should just work because the requests will be > drained, so the scheduled timer(s) on the old context will be freed. > > Signed-off-by: Fam Zheng > > --- > v4: If errp is not null, return -EINVAL. [Kevin] > --- > block/null.c

Re: [Qemu-devel] [PATCH 2/3] block: Add QMP support for streaming to an intermediate layer

2015-03-18 Thread Alberto Garcia
On Thu, Mar 12, 2015 at 04:45:17PM +0100, Kevin Wolf wrote: > > One issue that I'm finding is that when we move the block-stream > > job to an intermediate node, where the device name is empty, we > > get messages like "Device '' is busy". > My first thought was "then make it 'Source/Target devic

Re: [Qemu-devel] [PATCH 0/2] virtio len fixes for qemu.

2015-03-18 Thread Michael S. Tsirkin
On Wed, Mar 11, 2015 at 04:29:30PM +1030, Rusty Russell wrote: > The virtio 'used' ring describes descriptors which have been used. It > also says how many bytes have been written to the ring. For some cases, > this value is ignored by Linux guests, thus errors have not been noticed. > I was work

[Qemu-devel] [PULL 1/8] virtio: validate the existence of handle_output before calling it

2015-03-18 Thread Michael S. Tsirkin
From: Jason Wang We don't validate the existence of handle_output which may let a buggy guest to trigger a SIGSEV easily. E.g: 1) write 10 to queue_sel to a virtio net device with only 1 queue 2) setup an arbitrary pfn 3) then notify queue 10 Fixing this by validating the existence of handle_ou

[Qemu-devel] [PULL 0/8] pci, virtio bugfixes for 2.3

2015-03-18 Thread Michael S. Tsirkin
The following changes since commit 18bf9e2f379334306530cbfd44218748eceaf67d: virtio-scsi: remove empty wrapper for cmd (2015-03-11 18:24:30 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to ce39

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

2015-03-18 Thread Juan Quintela
Kevin Wolf 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 block

[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 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. Signed-off-by: Chen Fan Reviewed-by: Mich

[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 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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/pcie_aer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

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

2015-03-18 Thread Michael S. Tsirkin
From: Stefan Weil All four leaks are similar, so fix them in one patch. Signed-off-by: Stefan Weil Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/9pfs/virtio-9p-local.c | 28 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a

[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 Reported-by: Michael Tokarev Signed-off-by: Michael S. Tsirkin --- hw/pci/pcie_aer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci/pcie_aer.c b/hw/pci/pc

[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 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 Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pcie_regs.h | 2 +- hw/pci/pcie.c | 2 +-

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

2015-03-18 Thread Michael S. Tsirkin
From: Chen Fan Signed-off-by: Chen Fan Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/pci/pci.h | 2 +- include/hw/pci/pcie_aer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index be2

[Qemu-devel] [PULL 6/8] aer: fix a wrong init PCI_ERR_COR_STATUS w1cmask type register

2015-03-18 Thread Michael S. Tsirkin
From: Chen Fan Error Status Register, so this patch fix a wrong definition for PCI_ERR_COR_STATUS register with w1cmask type. Signed-off-by: Chen Fan Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/pcie_aer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

  1   2   3   >