[Qemu-devel] [PATCH v8 1/4] sPAPR: Implement EEH RTAS calls

2014-06-04 Thread Gavin Shan
The emulation for EEH RTAS requests from guest isn't covered by QEMU yet and the patch implements them. The patch defines constants used by EEH RTAS calls and adds callback sPAPRPHBClass::eeh_handler, which is going to be used this way: 1. RTAS calls are received in spapr_pci.c, sanity check is d

[Qemu-devel] [PATCH v8 0/4] EEH Support for VFIO PCI Device

2014-06-04 Thread Gavin Shan
The series of patches adds support EEH for VFIO PCI devices on sPAPR platform. It requires corresponding host kernel support. Also, it is based on top of Alexey's VFIO-for-sPAPR git repository. QEMU: git://github.com/aik/qemu.git (branch: vfio) Kernel: git://github.com/aik/linux.git (branch: vfi

[Qemu-devel] [PATCH v8 2/4] headers: Update kernel header

2014-06-04 Thread Gavin Shan
This updates kernel header (vfio.h) for EEH support on VFIO PCI devices. Signed-off-by: Gavin Shan --- linux-headers/linux/vfio.h | 35 +++ 1 file changed, 35 insertions(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index f0aa97d..cf703d

[Qemu-devel] [PATCH v8 4/4] sPAPR: Implement sPAPRPHBClass::eeh_handler

2014-06-04 Thread Gavin Shan
The patch implements sPAPRPHBClass::eeh_handler so that the EEH RTAS requests can be routed to VFIO for further handling. Signed-off-by: Gavin Shan --- hw/ppc/spapr_pci_vfio.c | 54 + 1 file changed, 54 insertions(+) diff --git a/hw/ppc/spapr_pci_

[Qemu-devel] [PATCH v8 3/4] VFIO: Introduce helper vfio_pci_container_ioctl()

2014-06-04 Thread Gavin Shan
The patch introduces helper function vfio_pci_container_ioctl() to pass ioctl commands to the specified VFIO container that is identified by IOMMU group id. On sPAPR platform, each container only has one IOMMU group. Signed-off-by: Gavin Shan --- hw/misc/vfio.c | 31 +

Re: [Qemu-devel] [PATCH 2/2] virtio-blk-test.c: add hotplug subtest

2014-06-04 Thread Markus Armbruster
Amos Kong writes: > On Thu, Jun 05, 2014 at 01:12:46PM +0800, Amos Kong wrote: >> On Wed, Jun 04, 2014 at 05:35:06PM +0200, Stefan Hajnoczi wrote: >> > On Tue, May 27, 2014 at 03:14:41PM +0800, Amos Kong wrote: >> > > This patch adds a new subtest, it hotplugs 29 * 8 = 232 virtio-blk >> > > devic

Re: [Qemu-devel] [PATCH v7 1/4] spapr_iommu: Make in-kernel TCE table optional

2014-06-04 Thread Alexey Kardashevskiy
On 06/05/2014 03:49 PM, Alexey Kardashevskiy wrote: > POWER KVM supports an KVM_CAP_SPAPR_TCE capability which allows allocating > TCE tables in the host kernel memory and handle H_PUT_TCE requests > targeted to specific LIOBN (logical bus number) right in the host without > switching to QEMU. At t

Re: [Qemu-devel] qemu does not support PAPR

2014-06-04 Thread sonia verma
Hi Paolo I'm running this on ubuntu with powerpc arch with kernel 3.8.13-rt9-QorIQ-SDK-V1.4. Thanks On Thu, Jun 5, 2014 at 11:21 AM, Paolo Bonzini wrote: > Il 05/06/2014 06:50, sonia verma ha scritto: > > Hi >> >> I'm trying to run libguestfs-test-tool which in turn is using kvm >> utility

Re: [Qemu-devel] qemu does not support PAPR

2014-06-04 Thread Paolo Bonzini
Il 05/06/2014 06:50, sonia verma ha scritto: Hi I'm trying to run libguestfs-test-tool which in turn is using kvm utility on powerpc ubuntu.Below are the logs when I'm trying to run the libguesfs-test-tool utility.. What machine are you running on? What kernel version? Paolo

[Qemu-devel] [PATCH] scsi-disk.c: Fix compilation with -DDEBUG_SCSI

2014-06-04 Thread Paul Janzen
In scsi-disk.c, if you #define DEBUG_SCSI=1, you get: hw/scsi/scsi-disk.c: In function 'scsi_disk_emulate_command': hw/scsi/scsi-disk.c:2018: error: 'SCSIRequest' has no member named 'buf' Change the debugging statement to match the actual value tested. Signed-off-by: Paul Janzen --- hw/scsi/sc

Re: [Qemu-devel] [PATCH V9 3/4] raw-posix: Add full image preallocation option

2014-06-04 Thread Hu Tao
On Thu, Jun 05, 2014 at 07:48:12AM +0200, Peter Lieven wrote: > On 05.06.2014 07:39, Hu Tao wrote: > >On Thu, May 29, 2014 at 08:55:59PM +0200, Peter Lieven wrote: > >>Am 29.05.2014 03:55, schrieb Hu Tao: > >>>On Wed, May 28, 2014 at 07:36:26AM +0200, Markus Armbruster wrote: > Peter Lieven wr

[Qemu-devel] [PATCH v7 2/4] vfio: Add vfio_container_spapr_get_info()

2014-06-04 Thread Alexey Kardashevskiy
To perform DMA mapping via TCE table correctly, the guest must know where DMA window is located on the PCI bus. A hypervisor is expected to provide such information. Since QEMU has no control over this setting, we need a way to obtain a start address and size from the host VFIO driver. This adds a

[Qemu-devel] [PATCH v7 0/4] vfio on spapr-ppc64

2014-06-04 Thread Alexey Kardashevskiy
Yet another try with VFIO on SPAPR (server PPC64). This adds VFIO support on SPAPR for the existing VFIO-SPAPR-TCE driver in the upstream kernel. Individual patches have more detailed commit logs. While patch #1 is questionable, others are pretty much ready to but I do not know via which maintai

[Qemu-devel] [PATCH v7 1/4] spapr_iommu: Make in-kernel TCE table optional

2014-06-04 Thread Alexey Kardashevskiy
POWER KVM supports an KVM_CAP_SPAPR_TCE capability which allows allocating TCE tables in the host kernel memory and handle H_PUT_TCE requests targeted to specific LIOBN (logical bus number) right in the host without switching to QEMU. At the moment this is used for emulated devices only and the han

[Qemu-devel] [PATCH v7 4/4] vfio: Enable for spapr

2014-06-04 Thread Alexey Kardashevskiy
This turns the sPAPR support on and enables VFIO container use in the kernel. This extends vfio_connect_container to support VFIO_SPAPR_TCE_IOMMU type in the host kernel. This registers a memory listener which sPAPR IOMMU will notify when executing H_PUT_TCE/etc DMA calls. The listener then will

[Qemu-devel] [PATCH v7 3/4] spapr_pci_vfio: Add spapr-pci-vfio-host-bridge to support vfio

2014-06-04 Thread Alexey Kardashevskiy
The patch adds a spapr-pci-vfio-host-bridge device type which is a PCI Host Bridge with VFIO support. The new device inherits from the spapr-pci-host-bridge device and adds an "iommu" property which is an IOMMU id. This ID represents a minimal entity for which IOMMU isolation can be guaranteed. In

Re: [Qemu-devel] [PATCH V9 3/4] raw-posix: Add full image preallocation option

2014-06-04 Thread Peter Lieven
On 05.06.2014 07:39, Hu Tao wrote: On Thu, May 29, 2014 at 08:55:59PM +0200, Peter Lieven wrote: Am 29.05.2014 03:55, schrieb Hu Tao: On Wed, May 28, 2014 at 07:36:26AM +0200, Markus Armbruster wrote: Peter Lieven writes: Am 27.05.2014 um 21:24 schrieb Eric Blake : On 05/27/2014 02:22 AM,

[Qemu-devel] [PATCH v2 4/4] qtest: use qmp_exec_hmp_cmd() in blockdev-test

2014-06-04 Thread Amos Kong
Signed-off-by: Amos Kong --- tests/blockdev-test.c | 23 ++- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/tests/blockdev-test.c b/tests/blockdev-test.c index c940e00..a84345c 100644 --- a/tests/blockdev-test.c +++ b/tests/blockdev-test.c @@ -16,35 +16,16 @@

[Qemu-devel] [PATCH v2 3/4] virtio-blk-test.c: add hotplug subtest

2014-06-04 Thread Amos Kong
This patch adds a new subtest, it hotplugs 29 * 8 = 232 virtio-blk devices to guest, and try to hot-unplug them. Note: the hot-unplug can't work without cooperation of guest OS. Signed-off-by: Amos Kong --- tests/virtio-blk-test.c | 38 ++ 1 file changed, 38

[Qemu-devel] [PATCH v2 1/4] virtio-blk-test.c: change pci_nop() to virtblk_init()

2014-06-04 Thread Amos Kong
I want to add a new subtest in virtio-blk-test.c, it will start guest without network. The original pci_init() did nothing, but it's good to reserve a very simple initialization testing. Signed-off-by: Amos Kong --- tests/virtio-blk-test.c | 13 ++--- 1 file changed, 6 insertions(+), 7 d

[Qemu-devel] [PATCH v2 2/4] qtest: introduce qmp_exec_hmp_cmd()

2014-06-04 Thread Amos Kong
Signed-off-by: Amos Kong --- tests/libqtest.c | 16 tests/libqtest.h | 8 2 files changed, 24 insertions(+) diff --git a/tests/libqtest.c b/tests/libqtest.c index 71468ac..ceb1734 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -646,3 +646,19 @@ void qmp_discar

[Qemu-devel] [PATCH v2 0/4] test virtio-blk hotplug

2014-06-04 Thread Amos Kong
It's worth to add a hotplug test to qtest, but without cooperation of guest OS, new devices can't be initialized by guest, and hot-unplug doesn't work. However, the new test can cover some part of code of hotplug/unplug. I will write another subtest to test hotplug with pci support. V2: move qmp

Re: [Qemu-devel] [PATCH V9 3/4] raw-posix: Add full image preallocation option

2014-06-04 Thread Hu Tao
On Thu, May 29, 2014 at 08:55:59PM +0200, Peter Lieven wrote: > Am 29.05.2014 03:55, schrieb Hu Tao: > > On Wed, May 28, 2014 at 07:36:26AM +0200, Markus Armbruster wrote: > >> Peter Lieven writes: > >> > >>> Am 27.05.2014 um 21:24 schrieb Eric Blake : > >>> > On 05/27/2014 02:22 AM, Chen Fan

Re: [Qemu-devel] [PATCH 2/2] virtio-blk-test.c: add hotplug subtest

2014-06-04 Thread Amos Kong
On Thu, Jun 05, 2014 at 01:12:46PM +0800, Amos Kong wrote: > On Wed, Jun 04, 2014 at 05:35:06PM +0200, Stefan Hajnoczi wrote: > > On Tue, May 27, 2014 at 03:14:41PM +0800, Amos Kong wrote: > > > This patch adds a new subtest, it hotplugs 29 * 8 = 232 virtio-blk > > > devices to guest, and try to ho

Re: [Qemu-devel] [PATCH 2/2] virtio-blk-test.c: add hotplug subtest

2014-06-04 Thread Amos Kong
On Wed, Jun 04, 2014 at 05:35:06PM +0200, Stefan Hajnoczi wrote: > On Tue, May 27, 2014 at 03:14:41PM +0800, Amos Kong wrote: > > This patch adds a new subtest, it hotplugs 29 * 8 = 232 virtio-blk > > devices to guest, and try to hot-unplug them. > > > > Note: the hot-unplug can't work without coo

[Qemu-devel] qemu does not support PAPR

2014-06-04 Thread sonia verma
Hi I'm trying to run libguestfs-test-tool which in turn is using kvm utility on powerpc ubuntu.Below are the logs when I'm trying to run the libguesfs-test-tool utility.. libguestfs: launch: umask=0002 libguestfs: launch: euid=1000 libguestfs: [0ms] begin building supermin appliance libguest

Re: [Qemu-devel] [PATCH v2 8/8] virtio-blk: Fill in VirtIOBlockReq.out in dataplane code

2014-06-04 Thread Paolo Bonzini
Il 05/06/2014 05:50, Fam Zheng ha scritto: > Can you try moving the req allocation and assignments inside process_request > instead? Then you can fill in req->out directly without the struct > assignment. > The owners of req are do_rdwr_cmd and do_flush_cmd, but do_scsi_cmd and do_get_id_cmd do

Re: [Qemu-devel] [PATCH 0/3] mirror: Fix behavior for zero byte image

2014-06-04 Thread Eric Blake
On 06/04/2014 09:42 PM, Fam Zheng wrote: > The current behavior of mirroring zero byte image is slightly different from > non-zero image: the BLOCK_JOB_READY event is skipped and job is completed > immediately. This is not a big problem for human user but only makes > management > software harder

Re: [Qemu-devel] [PATCH v2 8/8] virtio-blk: Fill in VirtIOBlockReq.out in dataplane code

2014-06-04 Thread Fam Zheng
On Thu, 06/05 04:55, Paolo Bonzini wrote: > Il 05/06/2014 03:58, Fam Zheng ha scritto: > >Signed-off-by: Fam Zheng > >--- > > hw/block/dataplane/virtio-blk.c | 14 +- > > 1 file changed, 9 insertions(+), 5 deletions(-) > > > >diff --git a/hw/block/dataplane/virtio-blk.c > >b/hw/block/d

[Qemu-devel] [PATCH 3/3] qemu-iotests: Test 0-length image for mirror

2014-06-04 Thread Fam Zheng
All behavior and invariant should hold for images with 0 length, so add a class to repeat all the tests in TestSingleDrive. Signed-off-by: Fam Zheng --- tests/qemu-iotests/041 | 5 + tests/qemu-iotests/041.out | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests

[Qemu-devel] [PATCH 1/3] mirror: Go through ready -> complete process for 0 len image

2014-06-04 Thread Fam Zheng
When mirroring or active committing a zero length image, BLOCK_JOB_READY is not reported now, instead the job completes because we short circuit the mirror job loop. This is inconsistent with non-zero length images, and only confuses management software. Let's do the same thing when seeing a 0-le

[Qemu-devel] [PATCH 2/3] qemu-iotests: Test BLOCK_JOB_READY event for 0Kb image active commit

2014-06-04 Thread Fam Zheng
There should be a BLOCK_JOB_READY event with active commit, regardless of image length. Let's test the 0 length image case, and make sure it goes through the ready->complete process. Signed-off-by: Fam Zheng --- tests/qemu-iotests/040 | 11 ++- tests/qemu-iotests/040.out | 4 ++-- 2

[Qemu-devel] [PATCH 0/3] mirror: Fix behavior for zero byte image

2014-06-04 Thread Fam Zheng
The current behavior of mirroring zero byte image is slightly different from non-zero image: the BLOCK_JOB_READY event is skipped and job is completed immediately. This is not a big problem for human user but only makes management software harder to write. Since we are focusing on an good API inste

Re: [Qemu-devel] [PATCH v27 07/33] QemuOpts: add qemu_opt_get_*_del functions for replace work

2014-06-04 Thread Chun Yan Liu
>>> On 6/4/2014 at 04:54 PM, in message <20140604085436.ga26...@stefanha-thinkpad.redhat.com>, Stefan Hajnoczi wrote: > On Wed, May 07, 2014 at 05:58:32PM +0800, Chunyan Liu wrote: > > diff --git a/util/qemu-option.c b/util/qemu-option.c > > index 4d2d4d1..32e1d50 100644 > > --- a/util/qemu-

Re: [Qemu-devel] active block commit bug?

2014-06-04 Thread Fam Zheng
On Wed, 06/04 20:55, Eric Blake wrote: > On 06/04/2014 08:09 PM, Fam Zheng wrote: > > >> Sounds like we have an off-by-one condition if empty files behave > >> differently from other files. We ought to fix that bug (not that your > >> normal guest will ever have a 0-length backing file, but this

Re: [Qemu-devel] [PATCH v2 8/8] virtio-blk: Fill in VirtIOBlockReq.out in dataplane code

2014-06-04 Thread Paolo Bonzini
Il 05/06/2014 03:58, Fam Zheng ha scritto: Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index 96068cd..323793a 100644 --- a/hw/blo

Re: [Qemu-devel] active block commit bug?

2014-06-04 Thread Eric Blake
On 06/04/2014 08:09 PM, Fam Zheng wrote: >> Sounds like we have an off-by-one condition if empty files behave >> differently from other files. We ought to fix that bug (not that your >> normal guest will ever have a 0-length backing file, but this was what I >> was trying to use for libvirt's pro

Re: [Qemu-devel] [PATCH v2 7/8] virtio-blk: Convert VirtIOBlockReq.out to structrue

2014-06-04 Thread Paolo Bonzini
Il 05/06/2014 03:58, Fam Zheng ha scritto: -if (req->elem->out_sg[0].iov_len < sizeof(*req->out) || +if (req->elem->out_sg[0].iov_len < sizeof(req->out) || This is not needed anymore. req->elem->in_sg[req->elem->in_num - 1].iov_len < sizeof(*req->in)) { error_report

Re: [Qemu-devel] [PATCH v2 6/8] virtio-blk: Use VirtIOBlockReq.in to drop VirtIOBlockReq.inhdr

2014-06-04 Thread Paolo Bonzini
Il 05/06/2014 03:58, Fam Zheng ha scritto: /* Grab inhdr for later */ -in_size = iov_size(in_iov, in_num); -if (in_size < sizeof(struct virtio_blk_inhdr)) { -error_report("virtio_blk request inhdr too short"); -return -EFAULT; -} -inhdr = g_slice_new(QEMUIOVec

Re: [Qemu-devel] [PATCH v4 10/10] block: add QAPI command to allow live backing file change

2014-06-04 Thread Eric Blake
On 06/04/2014 07:51 AM, Jeff Cody wrote: > This allows a user to make a live change to the backing file recorded in > an open image. > > The image file to modify can be specified 2 ways: > > 1) image filename > 2) image node-name > > Note: this does not cause the backing file itself to be reopen

[Qemu-devel] [PATCH v2 4/8] virtio-blk: Drop VirtIOBlockRequest.read

2014-06-04 Thread Fam Zheng
Since it's set but not used. Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index 4873726..8393ecf 100644 --- a/hw/block/dataplane/virtio-blk.c +++ b/hw/block/data

Re: [Qemu-devel] [PATCH v27 00/33] replace QEMUOptionParameter with QemuOpts

2014-06-04 Thread Chun Yan Liu
>>> On 6/4/2014 at 05:18 PM, in message <20140604091824.gb26...@stefanha-thinkpad.redhat.com>, Stefan Hajnoczi wrote: > On Wed, May 07, 2014 at 05:58:25PM +0800, Chunyan Liu wrote: > > This patch series is to replace QEMUOptionParameter with QemuOpts, so that > only > > one Qemu Option stru

[Qemu-devel] [PATCH v2 1/8] virtio-blk: Move VirtIOBlockReq to header

2014-06-04 Thread Fam Zheng
For later reusing by dataplane code. Signed-off-by: Fam Zheng --- hw/block/virtio-blk.c | 11 --- include/hw/virtio/virtio-blk.h | 11 +++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 0b1446e..49507a

[Qemu-devel] [PATCH v2 2/8] virtio-blk: Convert VirtIOBlockReq.elem to pointer

2014-06-04 Thread Fam Zheng
This will make converging with dataplane code easier. Add virtio_blk_free_request to handle the freeing of request internal fields. Signed-off-by: Fam Zheng --- hw/block/virtio-blk.c | 85 +++--- include/hw/virtio/virtio-blk.h | 2 +- 2 files change

[Qemu-devel] [PATCH v2 3/8] virtio-blk: Drop bounce buffer from dataplane code

2014-06-04 Thread Fam Zheng
The block layer will handle the unaligned request. Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 25 - 1 file changed, 25 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index d81652f..4873726 100644 --- a/hw/b

[Qemu-devel] [PATCH v2 5/8] virtio-blk: Replace VirtIOBlockRequest with VirtIOBlockReq

2014-06-04 Thread Fam Zheng
Field "inhdr" is added temporarily for a more mechanical change, and will be dropped in the next commit. Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 34 +++--- include/hw/virtio/virtio-blk.h | 4 2 files changed, 19 insertions(+), 19 deletion

[Qemu-devel] [PATCH v2 8/8] virtio-blk: Fill in VirtIOBlockReq.out in dataplane code

2014-06-04 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/block/dataplane/virtio-blk.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c index 96068cd..323793a 100644 --- a/hw/block/dataplane/virtio-blk.c +++ b/hw/block/data

Re: [Qemu-devel] [PATCH v4 07/10] block: add ability for block-stream to use node-name

2014-06-04 Thread Eric Blake
On 06/04/2014 07:51 AM, Jeff Cody wrote: > This adds the ability for block-stream to use node-name arguments > for base, to specify the backing image to stream from. > > Both 'base' and 'base-node-name' are optional, but mutually exclusive. > Either can be specified, but not both together. > > Th

Re: [Qemu-devel] active block commit bug?

2014-06-04 Thread Fam Zheng
On Wed, 06/04 19:54, Eric Blake wrote: > On 06/04/2014 06:12 PM, Jeff Cody wrote: > > >> Huh? I thought that an active commit was not supposed to complete > >> automatically, but that the job would remain around until I either > >> 'block-job-cancel' or 'block-job-complete' it. That is, I should

[Qemu-devel] [PATCH v2 6/8] virtio-blk: Use VirtIOBlockReq.in to drop VirtIOBlockReq.inhdr

2014-06-04 Thread Fam Zheng
In current virtio spec, inhdr is a single byte, and is unlikely to change for both functionality and compatibility considerations. Non-dataplane uses .in, and we are on the way to converge them. So let's unify it to get cleaner code. Remove .inhdr and use .in. Signed-off-by: Fam Zheng --- hw/bl

[Qemu-devel] [PATCH v2 7/8] virtio-blk: Convert VirtIOBlockReq.out to structrue

2014-06-04 Thread Fam Zheng
The virtio code currently assumes that the outhdr is in its own iovec. This is not guaranteed by the spec, so we should relax this assumption. Convert the VirtIOBlockReq.out field to structrue so that we can use iov_to_buf and then discard the header from the beginning of iovec. Suggested-by: Pao

[Qemu-devel] [PATCH v2 0/8] virtio-blk: Converge VirtIOBlockRequest into VirtIOBlockReq

2014-06-04 Thread Fam Zheng
This unifies the request structure used by dataplane and non-dataplane code, while dropping unnessary fields for bounce buffer and read flag. Applies on top of Stefan's block tree. v2: Address Paolo's comments. Thanks for reviewing! [03/08] virtio-blk: Drop bounce buffer from dataplane code

Re: [Qemu-devel] [PATCH 3/3] nbd: Shutdown socket before closing.

2014-06-04 Thread Paolo Bonzini
Il 05/06/2014 00:33, Hani Benhabiles ha scritto: > IIUC, what this does is ensure that the other side gets a FIN before it gets > a RST. Is this correct? Yes. Without shutdown(), this could be reproduced (unreliably) on multiple tries. This is done in nbd_client_close() too, for the same reason

Re: [Qemu-devel] active block commit bug?

2014-06-04 Thread Eric Blake
On 06/04/2014 06:12 PM, Jeff Cody wrote: >> Huh? I thought that an active commit was not supposed to complete >> automatically, but that the job would remain around until I either >> 'block-job-cancel' or 'block-job-complete' it. That is, I should have >> gotten a BLOCK_JOB_READY event and still

[Qemu-devel] 答复: Expansion Ratio Issue

2014-06-04 Thread Chaos Shu
Hi I'm running SPEC CPU2006 on three kinds of situation, native aarch64 binary and emulator x86_64 system running SPEC CPU2006 and linux user mode level running x86_64 SPEC CPU2006 binary. To find where the performance lose, translator ? or execution of instruction after TCG? Or something else

Re: [Qemu-devel] [PATCH v4 05/10] block: Accept node-name arguments for block-commit

2014-06-04 Thread Jeff Cody
On Wed, Jun 04, 2014 at 03:38:55PM -0600, Eric Blake wrote: > On 06/04/2014 07:51 AM, Jeff Cody wrote: > > This modifies the block operation block-commit so that it will > > accept node-name arguments for either 'top' or 'base' BDS. > > > > The filename and node-name are mutually exclusive to each

Re: [Qemu-devel] [PATCH v4 04/10] block: make 'top' argument to block-commit optional

2014-06-04 Thread Jeff Cody
On Wed, Jun 04, 2014 at 02:59:44PM -0600, Eric Blake wrote: > On 06/04/2014 07:51 AM, Jeff Cody wrote: > > Now that active layer block-commit is supported, the 'top' argument > > no longer needs to be mandatory. > > > > Change it to optional, with the default being the active layer in the > > devi

Re: [Qemu-devel] active block commit bug?

2014-06-04 Thread Jeff Cody
On Wed, Jun 04, 2014 at 04:55:04PM -0600, Eric Blake wrote: > Testing on Fedora 20 (JSON output slightly modified for legibility): > > $ qemu-kvm --version > QEMU emulator version 2.0.0, Copyright (c) 2003-2008 Fabrice Bellard > $ touch f > $ qemu-kvm -qmp stdio -drive file=f > <= {"QMP": {"versi

Re: [Qemu-devel] [PATCH v5 00/30] book3s powerpc classes (970, power5, power7, power8) rework

2014-06-04 Thread Alexey Kardashevskiy
On 06/05/2014 07:51 AM, Alexander Graf wrote: > > On 04.06.14 19:37, Tom Musta wrote: >> On 6/4/2014 7:50 AM, Alexey Kardashevskiy wrote: >>> Started as POWER7/8 SPRs patchset, this became a rework of book3s/970 CPU >>> classes initialization. >>> >>> The aim is to boot little endian guests in TCG

Re: [Qemu-devel] [PATCH v4 1/4] cpus: Define callback for QEMU "nmi" command

2014-06-04 Thread Alexey Kardashevskiy
On 06/05/2014 04:10 AM, Eric Blake wrote: > On 06/04/2014 08:25 AM, Alexey Kardashevskiy wrote: >> This introduces an NMI (non maskable interrupt) nmi_monitor_handler() >> callback to the CPU class. It is called from QMP's "nmi" command and >> performs an action required to cause debug crash dump o

[Qemu-devel] active block commit bug?

2014-06-04 Thread Eric Blake
Testing on Fedora 20 (JSON output slightly modified for legibility): $ qemu-kvm --version QEMU emulator version 2.0.0, Copyright (c) 2003-2008 Fabrice Bellard $ touch f $ qemu-kvm -qmp stdio -drive file=f <= {"QMP": {"version": {"qemu": {"micro": 0, "minor": 0, "major": 2}, "package": ""}, "capab

Re: [Qemu-devel] [PATCH 2/3] nbd: Add exports listing support.

2014-06-04 Thread Hani Benhabiles
On Tue, Jun 03, 2014 at 01:36:35PM +0200, Paolo Bonzini wrote: > Il 31/05/2014 23:39, Hani Benhabiles ha scritto: > >This is added by handling the NBD_OPT_LIST and NBD_OPT_ABORT options. > > > >NBD_REP_ERR_UNSUP is also sent for unknown NBD option values. > > > >Signed-off-by: Hani Benhabiles > >-

Re: [Qemu-devel] [PATCH 3/3] nbd: Shutdown socket before closing.

2014-06-04 Thread Hani Benhabiles
On Tue, Jun 03, 2014 at 01:33:41PM +0200, Paolo Bonzini wrote: > Il 31/05/2014 23:39, Hani Benhabiles ha scritto: > >This forces finishing data sending to client before closing the socket like > >in > >exports listing or replying with NBD_REP_ERR_UNSUP cases. > > > >Signed-off-by: Hani Benhabiles

Re: [Qemu-devel] [PATCH 2/2] PPC: e500: Merge 32 and 64 bit SPE emulation

2014-06-04 Thread Richard Henderson
On 06/04/2014 02:51 PM, Alexander Graf wrote: > > On 04.06.14 23:38, Richard Henderson wrote: >> On 06/04/2014 02:09 PM, Alexander Graf wrote: >>> @@ -9030,13 +8820,10 @@ static inline void gen_evmwumi(DisasContext *ctx) >>> t1 = tcg_temp_new_i64(); >>> /* t0 := rA; t1 := rB */ >>> -

Re: [Qemu-devel] [PATCH 2/2] PPC: e500: Merge 32 and 64 bit SPE emulation

2014-06-04 Thread Alexander Graf
On 04.06.14 23:38, Richard Henderson wrote: On 06/04/2014 02:09 PM, Alexander Graf wrote: @@ -9030,13 +8820,10 @@ static inline void gen_evmwumi(DisasContext *ctx) t1 = tcg_temp_new_i64(); /* t0 := rA; t1 := rB */ -#if defined(TARGET_PPC64) -tcg_gen_ext32u_tl(t0, cpu_gpr[rA(

Re: [Qemu-devel] [PATCH v5 00/30] book3s powerpc classes (970, power5, power7, power8) rework

2014-06-04 Thread Alexander Graf
On 04.06.14 19:37, Tom Musta wrote: On 6/4/2014 7:50 AM, Alexey Kardashevskiy wrote: Started as POWER7/8 SPRs patchset, this became a rework of book3s/970 CPU classes initialization. The aim is to boot little endian guests in TCG mode with -cpu POWER8 (ironically, POWER8 emulation still fails,

[Qemu-devel] [PULL 3/4] tcg: Remove TCG_TARGET_HAS_new_ldst

2014-06-04 Thread Richard Henderson
Since all backends have been converted, remove the compatibility code. Acked-by: Claudio Fontana Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 2 - tcg/arm/tcg-target.h | 2 - tcg/i386/tcg-target.h| 2 - tcg/ia64/tcg-target.h| 2 - tcg/mips/tcg-target.h

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target-ppc: Fix Temporary Variable Leak in bctar

2014-06-04 Thread Alexander Graf
On 04.06.14 19:26, Tom Musta wrote: Fix a temporary variable leak detected in the bctar instruction: Opcode 13 10 11 (4d910460) leaked temporaries Signed-off-by: Tom Musta Thanks, applied to ppc-next. Alex

Re: [Qemu-devel] [PATCH v4 05/10] block: Accept node-name arguments for block-commit

2014-06-04 Thread Eric Blake
On 06/04/2014 07:51 AM, Jeff Cody wrote: > This modifies the block operation block-commit so that it will > accept node-name arguments for either 'top' or 'base' BDS. > > The filename and node-name are mutually exclusive to each other; > i.e.: > "top" and "top-node-name" are mutually exclusive

Re: [Qemu-devel] [PATCH 2/2] PPC: e500: Merge 32 and 64 bit SPE emulation

2014-06-04 Thread Richard Henderson
On 06/04/2014 02:09 PM, Alexander Graf wrote: > @@ -9030,13 +8820,10 @@ static inline void gen_evmwumi(DisasContext *ctx) > t1 = tcg_temp_new_i64(); > > /* t0 := rA; t1 := rB */ > -#if defined(TARGET_PPC64) > -tcg_gen_ext32u_tl(t0, cpu_gpr[rA(ctx->opcode)]); > -tcg_gen_ext32u_tl

Re: [Qemu-devel] [PATCH] Qemu: Fix eax for cpuid leaf 0x40000000

2014-06-04 Thread Bandan Das
Jidong Xiao writes: .. >> > Hi, Bandan, > > Thanks for the advice. I think Paolo has incorporated this patch into > his patch sets, and he sent the revised version in a separate email > earlier today with the subject "[PULL 11/11] kvm: Fix eax for cpuid > leaf 0x4000". Oops! Sorry, must have

[Qemu-devel] [PULL 4/4] TCG: Fix tcg_gen_extr_i64_tl for 32bit

2014-06-04 Thread Richard Henderson
From: Alexander Graf We expose a generic helper "tcg_gen_extr_i64_tl" for 64bit targets, but the same function for 32bit targets is a misnomer and refers to an invalid function name. Fix up the definition to point to the correct internal helper names instead. Signed-off-by: Alexander Graf Sign

[Qemu-devel] [PULL 2/4] tci: Convert to new ldst opcodes

2014-06-04 Thread Richard Henderson
Tested-by: Stefan Weil Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c | 76 +--- tcg/tci/tcg-target.h | 2 +- tci.c| 322 --- 3 files changed, 207 insertions(+), 193 deletions(-) diff --git a/tcg/tci/tcg-targe

[Qemu-devel] [PULL 1/4] tcg-i386: Fix win64 qemu store

2014-06-04 Thread Richard Henderson
The first non-register argument isn't placed at offset 0. Cc: qemu-sta...@nongnu.org Reviewed-by: Stefan Weil Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index d910

[Qemu-devel] [PULL 0/4] tcg patch queue

2014-06-04 Thread Richard Henderson
TCG patches accumulated over the last 2 weeks. Please pull. r~ The following changes since commit e00fcfeab3d452cba3d0a08991a39ab15df66424: Merge remote-tracking branch 'remotes/awilliam/tags/vfio-pci-for-qemu-20140602.0' into staging (2014-06-03 14:37:43 +0100) are available in the git r

Re: [Qemu-devel] [PATCH 1/2] TCG: Fix tcg_gen_extr_i64_tl for 32bit

2014-06-04 Thread Richard Henderson
On 06/04/2014 02:09 PM, Alexander Graf wrote: > We expose a generic helper "tcg_gen_extr_i64_tl" for 64bit targets, but the > same function for 32bit targets is a misnomer and refers to an invalid > function > name. > > Fix up the definition to point to the correct internal helper names instead.

[Qemu-devel] [Bug 1326533] [NEW] SDL2 UI sends a NULL to sdl_grab_start if fullscreen, which crashes

2014-06-04 Thread Brandon Schaefer
Public bug reported: in ui/sdl2.c: if (full_screen) { gui_fullscreen = 1; sdl_grab_start(0); } Is sent, but no null checks are made in sdl_grab_start (its assumed to be an allocated pointer). So a crash happens if you start qemu -full- screen. It should at lease send the

[Qemu-devel] [PATCH 1/2] TCG: Fix tcg_gen_extr_i64_tl for 32bit

2014-06-04 Thread Alexander Graf
We expose a generic helper "tcg_gen_extr_i64_tl" for 64bit targets, but the same function for 32bit targets is a misnomer and refers to an invalid function name. Fix up the definition to point to the correct internal helper names instead. Signed-off-by: Alexander Graf --- tcg/tcg-op.h | 2 +- 1

Re: [Qemu-devel] [PATCH v4 04/10] block: make 'top' argument to block-commit optional

2014-06-04 Thread Eric Blake
On 06/04/2014 07:51 AM, Jeff Cody wrote: > Now that active layer block-commit is supported, the 'top' argument > no longer needs to be mandatory. > > Change it to optional, with the default being the active layer in the > device chain. > > Reviewed-by: Eric Blake > Reviewed-by: Benoit Canet > S

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10 00/18] Vhost and vhost-net support for userspace based backends

2014-06-04 Thread Nikolay Nikolaev
On Wed, Jun 4, 2014 at 10:30 PM, Michael S. Tsirkin wrote: > On Tue, May 27, 2014 at 03:03:21PM +0300, Nikolay Nikolaev wrote: > > In this patch series we would like to introduce our approach for putting > a > > virtio-net backend in an external userspace process. Our eventual target > is to > >

Re: [Qemu-devel] [PATCH v5 20/30] target-ppc: Add POWER8's TIR SPR

2014-06-04 Thread Tom Musta
On 6/4/2014 7:50 AM, Alexey Kardashevskiy wrote: > This adds TIR (Thread Identification Register) SPR first defined for server > CPUs in PowerISA 2.07. > > Signed-off-by: Alexey Kardashevskiy > --- > Changes: > v5: > * TIR is defined for servers from 2.07 so it is power8 only > > v4: > * disable

Re: [Qemu-devel] [PATCH v4 0/3, ping] SMBIOS cleanup round

2014-06-04 Thread Gabriel L. Somlo
On Wed, Jun 04, 2014 at 10:47:21PM +0300, Michael S. Tsirkin wrote: > On Mon, Jun 02, 2014 at 01:13:18PM -0400, Gabriel L. Somlo wrote: > > Hi, > > > > On Mon, May 19, 2014 at 10:44:48PM +0300, Michael S. Tsirkin wrote: > > > On Mon, May 19, 2014 at 10:09:52AM -0400, Gabriel L. Somlo wrote: > > >

Re: [Qemu-devel] [PATCH v5 28/30] target-ppc: Enable DABRX SPR and limit it to <=POWER7

2014-06-04 Thread Tom Musta
On 6/4/2014 7:51 AM, Alexey Kardashevskiy wrote: > This adds DABRX SPR. > > As DABR(X) are present in POWER CPUs till POWER7 only and POWER8 does not > have them (as it implements more powerful facility instead), this limits > DABR/DABRX registration by POWER7 (inclusive). > > Signed-off-by: Alex

[Qemu-devel] [PATCH v4 4/4] target-ppc: Add support for new nmi_monitor_handler() CPU callback

2014-06-04 Thread Alexey Kardashevskiy
This defines a nmi_monitor_handler() callback for POWERPC CPU class so the "nmi" HMP/QMP command gets supported for POWERPC machines. This calls POWERPC_EXCP_RESET (vector 0x100) in the guest to deliver NMI. The expected result is XMON (in-kernel debugger) invocation. Signed-off-by: Alexey Kardas

Re: [Qemu-devel] [PATCH] hw/sd/sd.c: Drop unused sd_acmd_type[] array

2014-06-04 Thread Peter Crosthwaite
On Wed, Jun 4, 2014 at 3:29 AM, Peter Maydell wrote: > Drop the sd_acmd_type[] array: it is never used. (The equivalent > sd_cmd_type[] array for normal commands is used to identify > those commands whose argument includes the card address in the > top 16 bits; but for app commands the card addres

Re: [Qemu-devel] [PATCH v5 21/30] target-ppc: Add POWER8's FSCR SPR

2014-06-04 Thread Tom Musta
On 6/4/2014 7:50 AM, Alexey Kardashevskiy wrote: > This adds an FSCR (Facility Status and Control Register) SPR. This defines > names for FSCR bits. > > This defines new exception type - POWERPC_EXCP_FU - "facility unavailable" > (FU). > This registers an interrupt vector for it at 0xF60 as Power

Re: [Qemu-devel] [PATCH] Qemu: Fix eax for cpuid leaf 0x40000000

2014-06-04 Thread Jidong Xiao
On Wed, Jun 4, 2014 at 3:08 PM, Bandan Das wrote: > Jidong Xiao writes: > >> On Wed, Jun 4, 2014 at 3:09 AM, Paolo Bonzini wrote: >>> Il 04/06/2014 03:10, Jidong Xiao ha scritto: >>> diff --git a/qemu-2.0.0/target-i386/kvm.c.orig b/qemu-2.0.0/target-i386/kvm.c index 4389959..b8b28

Re: [Qemu-devel] [PATCH v4 0/3, ping] SMBIOS cleanup round

2014-06-04 Thread Michael S. Tsirkin
On Mon, Jun 02, 2014 at 01:13:18PM -0400, Gabriel L. Somlo wrote: > Hi, > > On Mon, May 19, 2014 at 10:44:48PM +0300, Michael S. Tsirkin wrote: > > On Mon, May 19, 2014 at 10:09:52AM -0400, Gabriel L. Somlo wrote: > > > Changelog: > > > > > > new in v4: > > > - slightly improved commit blurbs >

Re: [Qemu-devel] [PATCH v4 03/10] block: simplify bdrv_find_base() and bdrv_find_overlay()

2014-06-04 Thread Eric Blake
On 06/04/2014 07:51 AM, Jeff Cody wrote: > This simplifies the function bdrv_find_overlay(). With this change, > bdrv_find_base() is just a subset of usage of bdrv_find_overlay(), > so this also take advantage of that. s/take/takes/ > > Signed-off-by: Jeff Cody > --- > block.c | 45 ++

[Qemu-devel] [PATCH v5 24/30] target-ppc: Add POWER8's TM SPRs

2014-06-04 Thread Alexey Kardashevskiy
This adds TM (Transactional Memory) SPRs. This adds generic spr_read_prev_upper32()/spr_write_prev_upper32() to handle upper half SPRs such as TEXASRU which is upper half of TEXASR. Since this is not the only register like that and their numbers go consequently, it makes sense to generalize the he

Re: [Qemu-devel] [RFC 3/5] nbd: Use aio_set_fd_handler2()

2014-06-04 Thread Paolo Bonzini
Il 04/06/2014 14:37, Stefan Hajnoczi ha scritto: Why is this design cleaner? Because NBD code doesn't have to worry about fd handlers. It uses straightforward coroutine send/recv for socket I/O inside nbd_read_req() and nbd_write_resp(). It's easy to see that only one coroutine receives from t

Re: [Qemu-devel] [PATCH 003/124] savevm: Remove all the unneded version_minimum_id_old (ppc)

2014-06-04 Thread Alexey Kardashevskiy
On 06/04/2014 09:35 PM, Juan Quintela wrote: > Juan Quintela wrote: >> After previous Peter patch, they are redundant. This way we don't asign them >> except when needed. Once there, there were lots of case where the ".fields" >> indentation was wrong: >> >> .fields = (VMStateField []) { >>

Re: [Qemu-devel] [PATCH v10 00/18] Vhost and vhost-net support for userspace based backends

2014-06-04 Thread Michael S. Tsirkin
On Tue, May 27, 2014 at 03:03:21PM +0300, Nikolay Nikolaev wrote: > In this patch series we would like to introduce our approach for putting a > virtio-net backend in an external userspace process. Our eventual target is to > run the network backend in the Snabbswitch ethernet switch, while receivi

Re: [Qemu-devel] [PATCH] Qemu: Fix eax for cpuid leaf 0x40000000

2014-06-04 Thread Bandan Das
Jidong Xiao writes: > On Wed, Jun 4, 2014 at 3:09 AM, Paolo Bonzini wrote: >> Il 04/06/2014 03:10, Jidong Xiao ha scritto: >> >>> diff --git a/qemu-2.0.0/target-i386/kvm.c.orig >>> b/qemu-2.0.0/target-i386/kvm.c >>> index 4389959..b8b282d 100644 >>> --- a/qemu-2.0.0/target-i386/kvm.c.orig >>> ++

[Qemu-devel] [PULL 064/118] PPC: Make all e500 CPUs SVR aware

2014-06-04 Thread Alexander Graf
Our pre-e500mc e500 CPU types didn't get instanciated with SVR information, even though those systems do support the SVR register. Spawn them with the SVR tag so that they don't get confused when someone tries to read SPR_SVR. Signed-off-by: Alexander Graf --- target-ppc/cpu-models.c | 28 +

[Qemu-devel] [PULL 024/118] libdecnumber: Introduce decNumberIntegralToInt64

2014-06-04 Thread Alexander Graf
From: Tom Musta Introduce a new conversion function to the libdecnumber library. This function converts a decNumber to a signed 64-bit integer. In order to support 64-bit integers (which may have up to 19 decimal digits), the existing "powers of 10" array is expanded from 10 to 19 entries. Signe

Re: [Qemu-devel] [PATCH v5 24/30] target-ppc: Add POWER8's TM SPRs

2014-06-04 Thread Tom Musta
On 6/4/2014 7:50 AM, Alexey Kardashevskiy wrote: > This adds TM (Transactional Memory) SPRs. > > This adds generic spr_read_prev_upper32()/spr_write_prev_upper32() to > handle upper half SPRs such as TEXASRU which is upper half of TEXASR. > Since this is not the only register like that and their n

[Qemu-devel] [PULL 011/118] spapr_pci: Fix number of returned vectors in ibm, change-msi

2014-06-04 Thread Alexander Graf
From: Alexey Kardashevskiy Current guest kernels try allocating as many vectors as the quota is. For example, in the case of virtio-net (which has just 3 vectors) the guest requests 4 vectors (that is the quota in the test) and the existing ibm,change-msi handler returns 4. But before it returns,

[Qemu-devel] [PATCH v5 10/30] target-ppc: Introduce and reuse generalized init_proc_book3s_64()

2014-06-04 Thread Alexey Kardashevskiy
At the moment every POWER CPU family has its own init_proc_POWERX function. E500 already has common init function so we try to do the same thing. This introduces BOOK3S_CPU_TYPE enum with 2 values - 970 and POWER5+. This introduces generalized init_proc_book3s_64() which accepts a CPU type as a p

[Qemu-devel] [PULL 043/118] target-ppc: Introduce DFP Convert to Long/Extended

2014-06-04 Thread Alexander Graf
From: Tom Musta Add emulation of the PowerPC Convert to DFP Long (dctdp[.]) and Convert to DFP Extended (dctqpq[.]) instructions. Signed-off-by: Tom Musta Signed-off-by: Alexander Graf --- target-ppc/dfp_helper.c | 33 + target-ppc/helper.h | 2 ++ target-

  1   2   3   4   5   >