Re: [Qemu-devel] [PATCH] net: prevent sending packets while guest is stopped

2014-09-03 Thread Michael S. Tsirkin
On Thu, Sep 04, 2014 at 12:55:38PM +0800, Jason Wang wrote: > On 09/02/2014 10:23 PM, Stefan Hajnoczi wrote: > > Do not modify guest memory or devices when the guest is stopped. > > Currently the netdevs still send packets while the guest is stopped if > > their file descriptor was being monitored

Re: [Qemu-devel] [PATCH] net: prevent sending packets while guest is stopped

2014-09-03 Thread Michael S. Tsirkin
On Tue, Sep 02, 2014 at 05:25:53PM +0300, Michael S. Tsirkin wrote: > On Tue, Sep 02, 2014 at 03:23:10PM +0100, Stefan Hajnoczi wrote: > > Do not modify guest memory or devices when the guest is stopped. > > Currently the netdevs still send packets while the guest is stopped if > > their file descr

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-03 Thread Gonglei (Arei)
Hi, > > Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path function > > > > On Wed, Sep 03, 2014 at 06:45:56AM +, Gonglei (Arei) wrote: > > [...] > > > > > 4. When we hotplug the virtio-net-pci device, only pass > > > > > virtio-net-pci's > > pointer > > > > to > > > > > del_bo

[Qemu-devel] [RFC PATCH v0 08/15] ppc: Add CPU dynamic reconfiguration (DR) support

2014-09-03 Thread Bharata B Rao
Add DR specific device tree entries for CPU. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 122 include/hw/ppc/spapr.h | 2 + target-ppc/translate_init.c | 5 ++ 3 files changed, 129 insertions(+) diff --git a/hw/ppc/spapr.c

[Qemu-devel] [RFC PATCH v0 13/15] ppc: Make ibm, configure-connector endian-safe

2014-09-03 Thread Bharata B Rao
Store RTAS data in ibm,configure-connector RTAS call in big endian format as per sPAPR specifications. Signed-off-by: Bharata B Rao --- hw/ppc/spapr_pci.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 76463b3..4a384aa

[Qemu-devel] [RFC PATCH v0 15/15] ppc: Allow hotplugging of CPU cores only

2014-09-03 Thread Bharata B Rao
pseries kernels support hot-plugging CPUs in core granularity. i,e., when a core is hotplugged, guest kernel tries to bring up all the threads in that core. This doesn't match 1-to-1 with QEMU hotplug semantics where cpu-add monitor command hotplugs 1 CPU at a time. While it is still an open quest

[Qemu-devel] [RFC PATCH v0 02/15] ppc: Rename SPAPR_DRC_TABLE_SIZE to SPAPR_DRC_PHB_TABLE_SIZE

2014-09-03 Thread Bharata B Rao
DRC table could contain entries for both PHB and CPU types. The existing size of this table is only for PHB entries, reflect the same in the code. This patch doesn't change the code functionality. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 26 +- include/h

[Qemu-devel] [RFC PATCH v0 12/15] ppc: Support ibm, lrdr-capacity device tree property

2014-09-03 Thread Bharata B Rao
Add support for ibm,lrdr-capacity since this is needed by the guest kernel to know about the possible hot-pluggable CPUs. Also start storing maximum possible memory for the guest in sPAPREnvironment. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 3 ++- hw/ppc/spapr_rtas.c| 28 ++

[Qemu-devel] [RFC PATCH v0 11/15] ppc: Move RTAS indicator defines to a header file

2014-09-03 Thread Bharata B Rao
Move RTAS indicator defines and helpers from spapr_pci.c to spapr.h as these are needed by CPU hotplug code too. This patch doesn't change any functionality. Signed-off-by: Bharata B Rao --- hw/ppc/spapr_pci.c | 30 -- include/hw/ppc/spapr.h | 30

[Qemu-devel] [RFC PATCH v0 05/15] ppc: Accommodate CPU DRC entries in DRC table

2014-09-03 Thread Bharata B Rao
Extend the DRC table to accommodate CPU DRC entries too. Generalize spapr_add_phb_to_drc_table() to add CPU entries too. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 73 +- include/hw/ppc/spapr.h | 8 +- 2 files changed, 62 insert

[Qemu-devel] [RFC PATCH v0 10/15] ppc: Factor out CPU initialization code to a new routine

2014-09-03 Thread Bharata B Rao
Separate out CPU initialization code into a new routine ppc_new_cpu() so that it can be used from CPU hotplug path too. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 73 +- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a

[Qemu-devel] [RFC PATCH v0 14/15] ppc: Add CPU hotplug support for sPAPR guests

2014-09-03 Thread Bharata B Rao
Add support for cpu-add monitor command. Use the exising EPOW event infrastructure to send CPU hotplug notification to the guest. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 240 - hw/ppc/spapr_events.c | 35 ++-- include/hw/ppc

[Qemu-devel] [RFC PATCH v0 04/15] ppc: Make creation of DRC entries in FDT endian safe

2014-09-03 Thread Bharata B Rao
Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 29b7de4..bdbda1f 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -397,10 +397,10 @@ static void spapr_create_drc_dt_entries(vo

[Qemu-devel] [RFC PATCH v0 07/15] ppc: Initialize DRC table before initializing CPUs

2014-09-03 Thread Bharata B Rao
CPU initialization code expects the DRC table to be setup already. Hence do spapr_init_drc_table() early before the CPUs are initialized. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 6a

[Qemu-devel] [RFC PATCH v0 06/15] ppc: stop after getting first unused DR slot in DRC table

2014-09-03 Thread Bharata B Rao
When adding a new entry to the DRC table, stop looking at more entries after finding the first free slot. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 441a4a7..6a0b9c5 100644 --- a/hw/ppc/spapr.c +++ b/h

[Qemu-devel] [RFC PATCH v0 00/15] CPU hotplug support of PowerPC sPAPR guests

2014-09-03 Thread Bharata B Rao
Hi, This is an early RFC patchset that adds CPU hotplug support for sPAPR guests. The patchset applies on top of spapr-pci-hotplug-ppc-next-cleanup4 branch of Michael Roth's tree (git://github.com/mdroth/qemu). I realize that Michael's branch is a fast moving target and is under review now, but my

[Qemu-devel] [RFC PATCH v0 09/15] ppc: Consider max_cpus during xics initialization

2014-09-03 Thread Bharata B Rao
Use max_cpus instead of smp_cpus when intializating xics system. Also report max_cpus in ibm,interrupt-server-ranges device tree property of interrupt controller node. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/s

[Qemu-devel] [RFC PATCH v0 01/15] ppc: Store dr entity state bits at the right bit offset

2014-09-03 Thread Bharata B Rao
Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index c65b13a..47fc21d 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -367,7 +367,7 @@ sPAPRDrcEntry *spapr_add_phb_to_drc_table(uint64_t buid,

[Qemu-devel] [RFC PATCH v0 03/15] ppc: Rename sPAPRDrcEntry.phb_buid to sPAPRDrcEntry.id

2014-09-03 Thread Bharata B Rao
sPAPRDrcEntry.phb_buid field can be reused for CPU entries too, hence call it by a generic name. This patch doesn't change any functionality. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 8 include/hw/ppc/spapr.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) di

Re: [Qemu-devel] [PATCH v4 04/20] block: Convert bdrv_em_aiocb_info.cancel to .cancel_async

2014-09-03 Thread Paolo Bonzini
Il 04/09/2014 03:20, Fam Zheng ha scritto: >> > >> > This requires auditing all callbacks though, doesn't it? Or at least >> > adding an >> > >> > if (ret == -ECANCELED) { >> > return; >> > } >> > >> > at the beginning. > You are right, this is an unexpected error code for ide a

Re: [Qemu-devel] [question] e1000 interrupt stormhappenedbecauseofits correspondingioapic->irr bit always set

2014-09-03 Thread Jason Wang
On 09/04/2014 09:56 AM, Zhang Haoyu wrote: >>> Hi Jason, >>> >> I tested below patch, it's okay, the e1000 interrupt storm disappeared. >>> >> But I am going to make a bit change on it, could you help review it? >>> >> >> >Currently, we call ioapic_service() immediately when we find the irq

Re: [Qemu-devel] [PATCH] net: prevent sending packets while guest is stopped

2014-09-03 Thread Jason Wang
On 09/02/2014 10:23 PM, Stefan Hajnoczi wrote: > Do not modify guest memory or devices when the guest is stopped. > Currently the netdevs still send packets while the guest is stopped if > their file descriptor was being monitored for write (e.g. the socket > write buffer filled before the guest wa

Re: [Qemu-devel] [question] e1000 interrupt stormhappenedbecauseofits correspondingioapic->irr bit always set

2014-09-03 Thread Zhang Haoyu
>> Hi Jason, >> I tested below patch, it's okay, the e1000 interrupt storm disappeared. >> But I am going to make a bit change on it, could you help review it? >> >> >Currently, we call ioapic_service() immediately when we find the irq is >> >still >> >active during eoi broadcast. But for real ha

Re: [Qemu-devel] [question] virtio-blk performancedegradationhappened with virito-serial

2014-09-03 Thread Zhang Haoyu
>> >>> Hi, all >> >>> >> >>> I start a VM with virtio-serial (default ports number: 31), and found >> >>> that virtio-blk performance degradation happened, about 25%, this >> >>> problem can be reproduced 100%. >> >>> without virtio-serial: >> >>> 4k-read-random 1186 IOPS >> >>> with virtio-seri

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-03 Thread Gonglei (Arei)
Hi, > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > Sent: Thursday, September 04, 2014 2:13 AM > Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path function > > On Wed, Sep 03, 2014 at 06:45:56AM +, Gonglei (Arei) wrote: > [...] > > > > 4. When we hotplug the virtio-net-

[Qemu-devel] [PATCH v1 2/4] linux-aio: handling -EAGAIN for !s->io_q.plugged case

2014-09-03 Thread Ming Lei
Previously -EAGAIN is simply ignored for !s->io_q.plugged case, and sometimes it is easy to cause -EIO to VM, such as NVME device. This patch handles -EAGAIN by io queue for !s->io_q.plugged case, and it will be retried in following aio completion cb. Suggested-by: Paolo Bonzini Signed-off-by: M

[Qemu-devel] [PATCH v1 4/4] linux-aio: increase max event to 256

2014-09-03 Thread Ming Lei
This patch increases max event to 256 for the comming virtio-blk multi virtqueue support. Signed-off-by: Ming Lei --- block/linux-aio.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/linux-aio.c b/block/linux-aio.c index ee125bc..4536106 100644 --- a/block/linux-aio

[Qemu-devel] [PATCH v1 0/4] linux-aio: fix batch submission

2014-09-03 Thread Ming Lei
Hi, The 1st patch fixes batch submission. The 2nd one fixes -EAGAIN for non-batch case. The 3rd one is a cleanup. The 4th one increase max event to 256 for supporting the comming multi virt-queue. This patchset is splitted from previous patchset(dataplane: optimization and multi virtqueue supp

[Qemu-devel] [PATCH v1 3/4] linux-aio: remove 'node' from 'struct qemu_laiocb'

2014-09-03 Thread Ming Lei
No one uses the 'node' field any more, so remove it from 'struct qemu_laiocb', and this can save 16byte for the struct on 64bit arch. Signed-off-by: Ming Lei --- block/linux-aio.c |1 - 1 file changed, 1 deletion(-) diff --git a/block/linux-aio.c b/block/linux-aio.c index a979331..ee125bc 1

[Qemu-devel] [PATCH v1 1/4] linux-aio: fix submit aio as a batch

2014-09-03 Thread Ming Lei
In the enqueue path, we can't complete request, otherwise "Co-routine re-entered recursively" may be caused, so this patch fixes the issue with below ideas: - for -EAGAIN or partial completion, retry the submision by schedule an BH in following completion cb - for part of c

[Qemu-devel] [PATCH v6 2/3] qdev: using NULL instead of local_err for qbus_child unrealize

2014-09-03 Thread arei.gonglei
From: Gonglei Forcefully unrealize all children regardless of early-iteration errors(if happened). We should keep going with cleanup operation rather than report a error immediately, meanwhile store the first child unrealize failure and propagate it at the end. We also forcefully un-vmsding and u

[Qemu-devel] [PATCH v6 3/3] qdev: add cleanup logic in device_set_realized() to avoid resource leak

2014-09-03 Thread arei.gonglei
From: Gonglei At present, this function doesn't have partial cleanup implemented, which will cause resource leak in some scenarios. Example: 1. Assuming that "dc->realize(dev, &local_err)" execute successful and local_err == NULL; 2. Executing device hotplug in hotplug_handler_plug(), but fa

[Qemu-devel] [PATCH v6 0/3] Refactor device_set_realized to avoid resource leak

2014-09-03 Thread arei.gonglei
From: Gonglei after committing [PATCH v6 0/9] Refactor PCI/SHPC/PCIE hotplug to use a more generic hotplug API If devcie hotplugging failed, will casuse resource leak. This patch series include address resouce leak and two other issuses. v6 -> v5: - rework patch 2/3 by Peter's suggestion. -

[Qemu-devel] [PATCH v6 1/3] qdev: using error_abort instead of using local_err

2014-09-03 Thread arei.gonglei
From: Gonglei This error can not happen normally. If it happens indicates something very wrong, we should abort QEMU. moreover, The user can only refer to /machine/peripheral, not /machine/unattached. Meanwhile remove superfluous check about local_err. Signed-off-by: Gonglei Reviewed-by: Peter

Re: [Qemu-devel] [PATCH] xen-hvm.c: Improve the return method for xen_hvm_init()

2014-09-03 Thread Chen Gang
On 9/4/14 7:32, Stefano Stabellini wrote: > On Wed, 3 Sep 2014, Chen Gang wrote: >> On 9/3/14 0:22, Chen Gang wrote: [...] >>> xen_hvm_init() may also return -errno, which may let upper caller think >>> more (e.g. free some other related resources and try again), although at >>> present, all relate

Re: [Qemu-devel] [PATCH v4 04/20] block: Convert bdrv_em_aiocb_info.cancel to .cancel_async

2014-09-03 Thread Fam Zheng
On Wed, 09/03 13:28, Paolo Bonzini wrote: > Il 03/09/2014 13:23, Fam Zheng ha scritto: > > All the difference is that the old .cancel doesn't call cb, but > > .cancel_async does. > > This requires auditing all callbacks though, doesn't it? Or at least > adding an > > if (ret == -ECANCELED) {

Re: [Qemu-devel] [PATCH] gtk.c: Fix memory leak in gd_set_keycode_type()

2014-09-03 Thread chen.fan.f...@cn.fujitsu.com
ping... On Tue, 2014-09-02 at 14:33 +0800, Chen Fan wrote: > this memory leak is introduced by the original > commit 3158a3482b0093e41f2b2596fba50774ea31ae08 > > valgrind out showing: > ==14553== 21,459 (72 direct, 21,387 indirect) bytes in 1 blocks are > definitely > lost in loss record 8

[Qemu-devel] [RFC PATCH v1] monitor: add parameter 'memory-devices' to the 'info' command

2014-09-03 Thread Zhu Guihua
When you hot remove hotpluggable memory devices, you should know the id of memory devices. But before this, you could not know the id of memory devices unless you remember all infomation about hotpluggable memory devices. This patch provides the function, if you input command 'info memory-devices

Re: [Qemu-devel] [PATCH v5 1/4] qdev: using error_abort instead of using local_err

2014-09-03 Thread Gonglei (Arei)
Hi, > Subject: Re: [Qemu-devel] [PATCH v5 1/4] qdev: using error_abort instead of > using local_err > > Am 02.09.2014 14:03, schrieb arei.gong...@huawei.com: > > From: Gonglei > > > > This error can not happen normally. If it happens indicates > > something very wrong, we should abort QEMU. more

Re: [Qemu-devel] [PATCH v5 2/4] qdev: using NULL instead of local_err for qbus_child unrealize

2014-09-03 Thread Gonglei (Arei)
> From: peter.crosthwa...@petalogix.com > [mailto:peter.crosthwa...@petalogix.com] On Behalf Of Peter Crosthwaite > Sent: Wednesday, September 03, 2014 9:09 PM g NULL instead of local_err > for qbus_child unrealize > > On Tue, Sep 2, 2014 at 10:03 PM, wrote: > > From: Gonglei > > > > Forcefully

Re: [Qemu-devel] [PATCH v5 4/4] pcie: don't assert when hotplug a PCIe device with 'function != 0'

2014-09-03 Thread Gonglei (Arei)
> From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Wednesday, September 03, 2014 9:48 PM > Subject: Re: [PATCH v5 4/4] pcie: don't assert when hotplug a PCIe device with > 'function != 0' > > On Tue, Sep 02, 2014 at 08:03:08PM +0800, arei.gong...@huawei.com wrote: > > From: Gonglei > > >

Re: [Qemu-devel] [PATCH] xen-hvm.c: Improve the return method for xen_hvm_init()

2014-09-03 Thread Stefano Stabellini
On Wed, 3 Sep 2014, Chen Gang wrote: > Oh, sorry, forgot Cc to qemu trivial. > > Thanks. > On 9/3/14 0:22, Chen Gang wrote: > > When failure occurs, it need use "return -1" instead of exit(1), so can > > let upper caller has chance to print failure information, too, then user > > can know the fail

Re: [Qemu-devel] qemu-system-sparc64 hang (possibly virtio related?) with 2.1

2014-09-03 Thread Aneesh Kumar K.V
Alexander Graf writes: > On 03.09.14 23:21, Aneesh Kumar K.V wrote: >> "Aneesh Kumar K.V" writes: >> >>> Stefan Hajnoczi writes: >>> On Tue, Sep 02, 2014 at 02:12:45PM +0100, Mark Cave-Ayland wrote: > Fortunately I can reproduce the issue with a debug-enabled build of > qemu-syste

Re: [Qemu-devel] [PATCH 09/12] spapr_pci: enable basic hotplug operations

2014-09-03 Thread Michael Roth
Quoting Bharata B Rao (2014-09-03 05:33:56) > On Tue, Aug 19, 2014 at 5:51 AM, Michael Roth > wrote: > > This enables hotplug for PHB bridges. Upon hotplug we generate the > > OF-nodes required by PAPR specification and IEEE 1275-1994 > > "PCI Bus Binding to Open Firmware" for the device. > > > >

Re: [Qemu-devel] qemu-system-sparc64 hang (possibly virtio related?) with 2.1

2014-09-03 Thread Alexander Graf
On 03.09.14 23:21, Aneesh Kumar K.V wrote: > "Aneesh Kumar K.V" writes: > >> Stefan Hajnoczi writes: >> >>> On Tue, Sep 02, 2014 at 02:12:45PM +0100, Mark Cave-Ayland wrote: Fortunately I can reproduce the issue with a debug-enabled build of qemu-system-sparc64, and I've posted a bac

Re: [Qemu-devel] Don't return type from host in readdir on local 9p filesystem

2014-09-03 Thread Aneesh Kumar K.V
Michael Tokarev writes: > From: Bastian Blank > > When using mapped mode in 9pfs, readdir implementation > should not return file type in d_type from the host > readdir, instead, it should use the type stored in > the extended attributes. Since d_type is optional > and reading ext attrs for ev

Re: [Qemu-devel] qemu-system-sparc64 hang (possibly virtio related?) with 2.1

2014-09-03 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > Stefan Hajnoczi writes: > >> On Tue, Sep 02, 2014 at 02:12:45PM +0100, Mark Cave-Ayland wrote: >>> Fortunately I can reproduce the issue with a debug-enabled build of >>> qemu-system-sparc64, and I've posted a backtrace obtained during the hung >>> state at http://ww

Re: [Qemu-devel] [PATCH 13/17] ppc: compute mask from BI using right shift

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: > This will match the code we use in fpu_helper.c when we flip > CRF_* bit-endianness. > > Signed-off-by: Paolo Bonzini > --- > target-ppc/translate.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/target-ppc/translate.

[Qemu-devel] [engineering.redhat.com #311004] two QXL issues in QEMU

2014-09-03 Thread Red Hat Product Security
Hello Gerd, Laszlo, Thank you so much for the detailed analysis and explanations, appreciate it. On Thu, 28 Aug 2014 07:57:17 GMT, kra...@redhat.com wrote: > How to go forward with this? Ok to post the patches for review in > public (aka qemu-devel)? Or do we have a CVE with embargo? Please use

[Qemu-devel] [PATCH 0/2] kvm: Fix incorrect re-register of in-kernel MPIC

2014-09-03 Thread Bogdan Purcareata
On target-ppc, the kvm-openpic memory region is part of the E500-CCSR memory region. On the kernel side, the MPIC is mapped at the same offset as the kvm-openpic within the address space. When adding the PCI BAR0 memory region, an alias is created to point to the E500-CCSR memory region. This resu

[Qemu-devel] [PATCH 2/2] kvm-openpic: Filter region add callbacks based on memory region offset

2014-09-03 Thread Bogdan Purcareata
This is done due to the fact that the kvm-openpic region_add callbacks can be invoked for sections generated from other memory regions as well. These callbacks should handle only requests for the kvm-openpic memory region. The patch fixes a bug on target-ppc occuring when the "e500-pci-bar0" memor

[Qemu-devel] [PATCH] ui/sdl2: fix full screen initialization.

2014-09-03 Thread Juan RP
gui_fullscreen was not initialized before creating the window with SDL_CreateWindow(). Move initialization a bit early to fix the issue. Signed-off-by: Juan RP --- ui/sdl2.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index fcac87b..04ffda

[Qemu-devel] [PATCH 1/2] memory: Add MemoryRegion get address space offset helper function

2014-09-03 Thread Bogdan Purcareata
Adding this function would allow a MemoryRegion to compute its start address within the AddressSpace. This is done recursively based on mr->container. Signed-off-by: Bogdan Purcareata --- include/exec/memory.h |8 memory.c | 10 ++ 2 files changed, 18 insertio

[Qemu-devel] [engineering.redhat.com #311004] two QXL issues in QEMU

2014-09-03 Thread Red Hat Product Security
Hello Gerd, On Thu, 28 Aug 2014 07:57:17 GMT, kra...@redhat.com wrote: > In case the memory area happens to hit unmapped pages qemu segfaults. > => DoS > > The guest can't modify host memory though, so I don't think this can be > used by the guest to compromise the host. I was finally able to re

Re: [Qemu-devel] [PATCH 11/17] ppc: rename gen_set_cr6_from_fpscr

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: > It sets CR1, not CR6 (and the spec agrees). > > Signed-off-by: Paolo Bonzini > --- > target-ppc/translate.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/target-ppc/translate.c b/target-ppc/translate.c > ind

Re: [Qemu-devel] [PATCH 12/17] ppc: use movcond for isel

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > target-ppc/translate.c | 23 +++ > 1 file changed, 11 insertions(+), 12 deletions(-) > > diff --git a/target-ppc/translate.c b/target-ppc/translate.c > index 67f13f7..48c7b66 100644 > --- a/tar

[Qemu-devel] Audio stream handling in QEMU device model

2014-09-03 Thread Harry Cruise
Hello, I am trying to understand QEMU AUDIO backend functionality and need to implementing device which has few audio channels from which it receives audio streams (sampled at some specific frequency), and further process that data stream like mixing two stream. I am new for the QEMU, Please h

Re: [Qemu-devel] [PATCH] block/iscsi: use 16 byte CDBs only when necessary

2014-09-03 Thread Peter Lieven
Am 03.09.2014 um 16:48 schrieb ronnie sahlberg : > On Wed, Sep 3, 2014 at 7:18 AM, Paolo Bonzini wrote: >> Il 03/09/2014 16:17, ronnie sahlberg ha scritto: >>> I think (a) would be best. >>> But I would suggest some small modifications: >>> >>> Set the default max to something even smaller, lik

Re: [Qemu-devel] [Qemu-stable] Patch Round-up for stable 2.1.1, freeze on 2014-09-03

2014-09-03 Thread Michael Roth
Quoting Michael S. Tsirkin (2014-09-03 12:57:24) > On Tue, Sep 02, 2014 at 04:58:04PM -0500, Michael Roth wrote: > > Quoting Andrey Korolyov (2014-09-02 16:29:29) > > > On Wed, Sep 3, 2014 at 1:03 AM, Michael S. Tsirkin > > > wrote: > > > >> bad one is the > > > >> > > > >> Author: Jason Wang >

Re: [Qemu-devel] [PATCH 10/17] ppc: introduce gen_op_mfcr/gen_op_mtcr

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini This patch does not compile for 64 bit targets when TCG debug is enabled -- there are several places in this patch that need to be more explicit about the "i32-ness" of variables. There is also a leak of temporaries in

Re: [Qemu-devel] [PATCH 09/17] ppc: reorganize gen_compute_fprf

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > target-ppc/translate.c | 22 ++ > 1 file changed, 10 insertions(+), 12 deletions(-) > > diff --git a/target-ppc/translate.c b/target-ppc/translate.c > index 0a85a23..afbd336 100644 > --- a/targ

Re: [Qemu-devel] [PATCH 03/17] ppc: fix monitor access to CR

2014-09-03 Thread Tom Musta
On 8/28/2014 12:14 PM, Paolo Bonzini wrote: > This was off-by-one. > > Signed-off-by: Paolo Bonzini > --- > monitor.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/monitor.c b/monitor.c > index 34cee74..ec73dd4 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -2968,7 +

Re: [Qemu-devel] [PATCH 05/17] ppc: use CRF_* in fpu_helper.c

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > target-ppc/fpu_helper.c | 32 > 1 file changed, 16 insertions(+), 16 deletions(-) > > diff --git a/target-ppc/fpu_helper.c b/target-ppc/fpu_helper.c > index da93d12..0fe006a 100644

Re: [Qemu-devel] [PATCH 08/17] ppc: introduce helpers for mfocrf/mtocrf

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > target-ppc/helper.h | 3 +++ > target-ppc/int_helper.c | 22 ++ > target-ppc/translate.c | 31 --- > 3 files changed, 29 insertions(+), 27 deletions(-) > > dif

Re: [Qemu-devel] [PATCH 07/17] ppc: fix result of DLMZB when no zero bytes are found

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: > It must return 8 and place 8 in XER, but the current code uses > i directly which is 9 at this point of the code. > > Signed-off-by: Paolo Bonzini > --- > target-ppc/int_helper.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/target-ppc/in

Re: [Qemu-devel] [PATCH 06/17] ppc: use CRF_* in int_helper.c

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > target-ppc/int_helper.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c > index f6e8846..9c1c5cd 100644 > --- a/target-ppc/in

Re: [Qemu-devel] [PATCH 04/17] ppc: use ARRAY_SIZE in gdbstub.c

2014-09-03 Thread Tom Musta
On 8/28/2014 12:15 PM, Paolo Bonzini wrote: > Match the idiom used by linux-user/signal.c and > linux-user/elfload.c. > > Signed-off-by: Paolo Bonzini > --- > target-ppc/gdbstub.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/target-ppc/gdbstub.c b/target-ppc/gdbs

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-03 Thread Eduardo Habkost
On Wed, Sep 03, 2014 at 06:45:56AM +, Gonglei (Arei) wrote: [...] > > > 4. When we hotplug the virtio-net-pci device, only pass virtio-net-pci's > > > pointer > > to > > > del_boot_device_path(). But virtio-net-pci != virtio-net-device, so I add > > > a > > function > > > named is_same_fw_dev

Re: [Qemu-devel] [Qemu-stable] Patch Round-up for stable 2.1.1, freeze on 2014-09-03

2014-09-03 Thread Michael S. Tsirkin
On Tue, Sep 02, 2014 at 04:58:04PM -0500, Michael Roth wrote: > Quoting Andrey Korolyov (2014-09-02 16:29:29) > > On Wed, Sep 3, 2014 at 1:03 AM, Michael S. Tsirkin wrote: > > >> bad one is the > > >> > > >> Author: Jason Wang > > >> Date: Tue Sep 2 18:07:46 2014 +0300 > > >> > > >> vhost_n

Re: [Qemu-devel] qemu-system-sparc64 hang (possibly virtio related?) with 2.1

2014-09-03 Thread Aneesh Kumar K.V
Stefan Hajnoczi writes: > On Tue, Sep 02, 2014 at 02:12:45PM +0100, Mark Cave-Ayland wrote: >> Fortunately I can reproduce the issue with a debug-enabled build of >> qemu-system-sparc64, and I've posted a backtrace obtained during the hung >> state at http://www.ilande.co.uk/tmp/sparc64-gdb-bt.tx

[Qemu-devel] [PATCH 2/2] tcg-aarch64: Use 32-bit loads for qemu_ld_i32

2014-09-03 Thread Richard Henderson
The "old" qemu_ld opcode did not specify the size of the result, and so we had to assume full register width. With the new opcodes, we can narrow the result. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c | 29 - tcg/tcg-be-ldst.h| 1 + tcg/tc

[Qemu-devel] [PATCH 0/2] tcg/aarch64 improvement

2014-09-03 Thread Richard Henderson
It's quite minor, using a narrower register reference. But every little bit helps, I suppose. r~ Richard Henderson (2): tcg: Compress TCGLabelQemuLdst tcg-aarch64: Use 32-bit loads for qemu_ld_i32 tcg/aarch64/tcg-target.c | 29 - tcg/tcg-be-ldst.h| 20 +

[Qemu-devel] [PATCH 1/2] tcg: Compress TCGLabelQemuLdst

2014-09-03 Thread Richard Henderson
Use 1 32-bit word instead of 6. Signed-off-by: Richard Henderson --- tcg/tcg-be-ldst.h | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tcg/tcg-be-ldst.h b/tcg/tcg-be-ldst.h index 49b3de6..904eeda 100644 --- a/tcg/tcg-be-ldst.h +++ b/tcg/tcg-be-ldst.h @@ -

[Qemu-devel] NBD TLS support in QEMU

2014-09-03 Thread Stefan Hajnoczi
Hi, QEMU offers both NBD client and server functionality. The NBD protocol runs unencrypted, which is a problem when the client and server communicate over an untrusted network. The particular use case that prompted this mail is storage migration in OpenStack. The goal is to encrypt the NBD conn

[Qemu-devel] Open Firmware for qemu-system-ppc -M prep

2014-09-03 Thread Artyom Tarasenko
Hello PPC PReP community and digital archaeologists, I'm glad to announce the result of some weekends of work: a new firmware which is not just open, but is also powerful (it runs on Power CPUs), free (the individual files are licensed under MIT and BSD licenses) and of course legendary - it's bas

Re: [Qemu-devel] [PATCH v4 00/14] ivshmem: update documentation, add client/server tools

2014-09-03 Thread Eric Blake
On 09/03/2014 07:01 AM, David Marchand wrote: >> Rather than introducing new files with bugs, followed by patches to >> clean it up, why not just introduce the new files correct in the first >> place? I think you are better off squashing in a lot of the cleanup >> patches into patch 1. > > Actua

Re: [Qemu-devel] [PATCH 4/4] blocksize: add blkconf_blocksize call to all block devices

2014-09-03 Thread Stefan Hajnoczi
On Tue, Jul 29, 2014 at 02:27:19PM +0200, Ekaterina Tumanova wrote: > This patch add the blkconf_blocksize call to all > devices, which use DEFINE_BLOCK_PROPERTIES. > If the underlying driver function fails, blkconf_blocksizes > will set blocksizes to default (512) value. > > Signed-off-by: Ekater

Re: [Qemu-devel] [PATCH 2/4] blocksize: support auto-sensing of blocksizes

2014-09-03 Thread Stefan Hajnoczi
On Tue, Jul 29, 2014 at 02:27:17PM +0200, Ekaterina Tumanova wrote: > The block device model does not impose fixed block sizes for > access to backing devices. This patch introduces support for > auto lookup of the block sizes of the backing block device. > > To achieve this, a new function blkcon

Re: [Qemu-devel] Question about cow format with hexdump

2014-09-03 Thread Kevin Wolf
Am 03.09.2014 um 12:59 hat Stefan Hajnoczi geschrieben: > On Wed, Sep 03, 2014 at 01:27:00PM +0800, shhuiw wrote: > > I'm reading the source code of cow.c: > > https://github.com/qemu/qemu/blob/master/block/cow.c > > and try to understand the format better. > > The 'cow' format is an old format t

Re: [Qemu-devel] [PATCH v2 2/3] target-sparc: address_mask(), asi_address_mask() are TARGET_SPARC64 only

2014-09-03 Thread Richard Henderson
On 09/03/2014 01:49 AM, Artyom Tarasenko wrote: > On Tue, Sep 2, 2014 at 1:52 PM, Peter Maydell > wrote: >> The address_mask() and asi_address_mask() functions are only used in >> TARGET_SPARC64 configs, so guard with ifdefs to avoid warnings about >> unused functions in 32-bit builds. >> >> Sinc

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-09-03 Thread Kay, Allen M
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Tuesday, September 02, 2014 11:27 PM > To: Kay, Allen M > Cc: Chen, Tiejun; xen-de...@lists.xensource.com; qemu- > de...@nongnu.org; Konrad Rzeszutek Wilk > Subject: Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] x

[Qemu-devel] [Bug 1364501] Re: Gdb hangs when trying to single-step after an invalid instruction

2014-09-03 Thread Martin
Notice there are actually two sides to this problem: not only the internal exception instruction isn't being processed, but also when we go back to the cpu_exec loop the syndrome exception won't have any actual effect since we won't compute the new PC we need in order to jump to the exception handl

Re: [Qemu-devel] QEMU correctness and performance testing

2014-09-03 Thread Christopher Covington
On 09/02/2014 04:42 PM, Xin Tong wrote: > ​where can i find most recent correctness and performance #s for QEMU ? are > there any organizations running these and making their data available online ? There are a set of canned OS images [1] that are sometimes used for testing and at least for ARM so

Re: [Qemu-devel] [PATCH] block/iscsi: use 16 byte CDBs only when necessary

2014-09-03 Thread ronnie sahlberg
On Wed, Sep 3, 2014 at 7:18 AM, Paolo Bonzini wrote: > Il 03/09/2014 16:17, ronnie sahlberg ha scritto: >> I think (a) would be best. >> But I would suggest some small modifications: >> >> Set the default max to something even smaller, like 256 sectors. This >> should not have much effect on throu

Re: [Qemu-devel] [PATCH v5 1/4] qdev: using error_abort instead of using local_err

2014-09-03 Thread Andreas Färber
Am 02.09.2014 14:03, schrieb arei.gong...@huawei.com: > From: Gonglei > > This error can not happen normally. If it happens indicates > something very wrong, we should abort QEMU. moreover, The > user can only refer to /machine/peripheral, not > /machine/unattached. > > Meanwhile remove superflu

Re: [Qemu-devel] [engineering.redhat.com #311004] two QXL issues in QEMU

2014-09-03 Thread Gerd Hoffmann
Hi, > There is a gap in the sequence above wherein it's not clear which function is > invoked by - watch_func(...), which in turn calls > dispatcher_handle_recv_read(). (gdb) thread apply all bt Thread 2 (Thread 0x7fa703fff700 (LWP 25303)): This is the spice worker thread, reading messages /

Re: [Qemu-devel] [PATCH] block/iscsi: use 16 byte CDBs only when necessary

2014-09-03 Thread Paolo Bonzini
Il 03/09/2014 16:17, ronnie sahlberg ha scritto: > I think (a) would be best. > But I would suggest some small modifications: > > Set the default max to something even smaller, like 256 sectors. This > should not have much effect on throughput since the client/initiator > can just send several con

Re: [Qemu-devel] [PATCH] block/iscsi: use 16 byte CDBs only when necessary

2014-09-03 Thread ronnie sahlberg
On Wed, Sep 3, 2014 at 1:09 AM, Peter Lieven wrote: > > >> Am 02.09.2014 um 21:30 schrieb Peter Lieven : >> >> Looking at the code, is it possible that not the guest is causing trouble >> here, but >> multiwrite_merge code? >> >> From what I see the only limit it has when merging requests is the

[Qemu-devel] [PULL v2 13/16] vhost_net: start/stop guest notifiers properly

2014-09-03 Thread Michael S. Tsirkin
From: Jason Wang commit a9f98bb5ebe6fb1869321dcc58e72041ae626ad8 "vhost: multiqueue support" changed the order of stopping the device. Previously vhost_dev_stop would disable backend and only afterwards, unset guest notifiers. We now unset guest notifiers while vhost is still active. This can los

Re: [Qemu-devel] [PATCH v2 2/3] docs/qcow2: Correct refcount_block_entries

2014-09-03 Thread Stefan Hajnoczi
On Wed, Sep 03, 2014 at 12:25:08AM +0200, Max Reitz wrote: > A refblock entry may have a different size than 16 bits, it may even be > smaller than a byte. Correct the refcount_block_entries calculation > accordingly. > > Signed-off-by: Max Reitz > --- > docs/specs/qcow2.txt | 2 +- > 1 file cha

Re: [Qemu-devel] [PATCH v2 3/3] docs/qcow2: Limit refcount_order to [0, 6]

2014-09-03 Thread Stefan Hajnoczi
On Wed, Sep 03, 2014 at 12:25:09AM +0200, Max Reitz wrote: > Specify the upper limit of refcount_order to be 6 (that is, > refcount_bits = 64). Any larger value does not make much sense when all > offsets, sizes, cluster counts etc. "only" have a width of 64 bit as > well, and very large values wou

Re: [Qemu-devel] [PATCH v5 4/4] pcie: don't assert when hotplug a PCIe device with 'function != 0'

2014-09-03 Thread Michael S. Tsirkin
On Tue, Sep 02, 2014 at 08:03:08PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > It's enough to report an error. Assert() is not acceptable > because the error is not a fatal error. > > Signed-off-by: Gonglei I think it's an unrelated issue, don't send this as part of a bugfix qde

[Qemu-devel] [PULL v2 11/16] virtio-net: don't run bh on vm stopped

2014-09-03 Thread Michael S. Tsirkin
commit 783e7706937fe15523b609b545587a028a2bdd03 virtio-net: stop/start bh when appropriate is incomplete: BH might execute within the same main loop iteration but after vmstop, so in theory, we might trigger an assertion. I was unable to reproduce this in practice, but it seems clear enough th

[Qemu-devel] [PULL v2 08/16] intel-iommu: add IOTLB using hash table

2014-09-03 Thread Michael S. Tsirkin
From: Le Tan Add IOTLB to cache information about the translation of input-addresses. IOTLB use a GHashTable as cache. The key of the hash table is the logical-OR of gfn and source id after left-shifting. Signed-off-by: Le Tan Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin

[Qemu-devel] [PULL v2 15/16] vhost-scsi: init backend features earlier

2014-09-03 Thread Michael S. Tsirkin
As vhost core can use backend_features during init, clear it earlier to avoid using uninitialized memory. This use would be harmless since vhost scsi ignores the result anyway, but initializing earlier will help prevent valgrind errors, and make scsi and net behave similarly. Cc: qemu-sta...@nongn

[Qemu-devel] [PULL v2 14/16] vhost_net: init acked_features to backend_features

2014-09-03 Thread Michael S. Tsirkin
From: Jason Wang commit 2e6d46d77ed328d34a94688da8371bcbe243479b (vhost: add vhost_get_features and vhost_ack_features) removes the step that initializes the acked_features to backend_features. As this field is now uninitialized, vhost initialization will sometimes fail. To fix, initialize acke

[Qemu-devel] [PULL v2 12/16] pci: avoid losing config updates to MSI/MSIX cap regs

2014-09-03 Thread Michael S. Tsirkin
From: Knut Omang Since commit 95d658002401e2e47a5404298ebe9508846e8a39 msi: Invoke msi/msix_write_config from PCI core msix config writes are lost, the value written is always 0. Fix pci_default_write_config to avoid this. Cc: qemu-sta...@nongnu.org Signed-off-by: Knut Omang Reviewed-by: M

[Qemu-devel] [PULL v2 16/16] acpi-build: Set FORCE_APIC_CLUSTER_MODEL bit for FADT flags

2014-09-03 Thread Michael S. Tsirkin
From: zhanghailiang If we start Windows 2008 R2 DataCenter with number of cpu less than 8, The system will use APIC Flat Logical destination mode as default configuration, Which has an upper limit of 8 CPUs. The fault is that VM can not show all processors within Task Manager if we hot-add cpus

[Qemu-devel] [PULL v2 09/16] vhost_net: cleanup start/stop condition

2014-09-03 Thread Michael S. Tsirkin
Checking vhost device internal state in vhost_net looks like a layering violation since vhost_net does not set this flag: it is set and tested by vhost.c. There seems to be no reason to check this: caller in virtio net uses its own flag, vhost_started, to ensure vhost is started/stopped as appropri

[Qemu-devel] [PULL v2 01/16] iommu: add is_write as a parameter to the translate function of MemoryRegionIOMMUOps

2014-09-03 Thread Michael S. Tsirkin
From: Le Tan Add a bool variable is_write as a parameter to the translate function of MemoryRegionIOMMUOps to indicate the operation of the access. It can be used for correct fault reporting from within the callback. Change the interface of related functions. Signed-off-by: Le Tan Reviewed-by:

  1   2   3   >