Re: [Qemu-devel] [PATCH 4/5] target-ppc: Handle ibm, nmi-register RTAS call

2014-08-25 Thread Aravinda Prasad
On Tuesday 26 August 2014 11:32 AM, David Gibson wrote: > On Mon, Aug 25, 2014 at 07:15:45PM +0530, Aravinda Prasad wrote: >> This patch adds FWNMI support in qemu for powerKVM >> guests by handling the ibm,nmi-register rtas call. >> Whenever OS issues ibm,nmi-register RTAS call, the >> machine c

[Qemu-devel] [PATCH] block: Always compile virtio-blk dataplane

2014-08-25 Thread Fam Zheng
Dataplane doesn't depend on linux-aio any more, so we don't need the compiling condition now. Configure options are kept but just print a message. Signed-off-by: Fam Zheng --- configure | 21 ++--- hw/block/Makefile.objs | 2 +- hw/block/virtio-blk.

Re: [Qemu-devel] [PATCH v3 2/2] docs: update ivshmem device spec

2014-08-25 Thread David Marchand
Hello Stefan, On 08/08/2014 05:02 PM, Stefan Hajnoczi wrote: On Fri, Aug 08, 2014 at 10:55:18AM +0200, David Marchand wrote: +For each client (QEMU processes) that connects to the server: +- the server assigns an ID for this client and sends this ID to him as the first + message, +- the serve

Re: [Qemu-devel] [PATCH] block: Make op blockers recursive

2014-08-25 Thread Benoît Canet
On Tue, Aug 26, 2014 at 12:42:04PM +0800, Fam Zheng wrote: > On Mon, 08/25 12:12, Benoît Canet wrote: > > On Mon, Aug 25, 2014 at 05:37:37PM +0800, Fam Zheng wrote: > > > On Mon, 08/25 09:06, Benoît Canet wrote: > > > > On Mon, Aug 25, 2014 at 02:04:24PM +0800, Fam Zheng wrote: > > > > > On Fri, 08

Re: [Qemu-devel] [RFC PATCH v2 06/13] spapr_iommu: Implement free_table() helper

2014-08-25 Thread David Gibson
On Fri, Aug 15, 2014 at 08:12:28PM +1000, Alexey Kardashevskiy wrote: > Every sPAPRTCETable object holds an IOMMU memory region which holds > a referenced to the sPAPRTCETable instance. So if we want to free > an sPAPRTCETable instance, calling object_unref() will not be enough > as embedded memory

Re: [Qemu-devel] [PATCH] tests: set QEMU_AUDIO_DRV=none for pci sound cards

2014-08-25 Thread Gerd Hoffmann
On Di, 2014-08-05 at 16:05 +0200, Markus Armbruster wrote: > Ping? Back online. What is the state here? I've seen Stefan (Cc'ed) posted a different patch for the same issue? Anything merged meanwhile? cheers, Gerd > > Markus Armbruster writes: > > > Gerd Hoffmann writes: > > > >> This w

[Qemu-devel] [PATCH v2 2/2] device_tree.c: dump all err mesages with error_report

2014-08-25 Thread john.liuli
From: Li Liu Signed-off-by: Li Liu --- device_tree.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/device_tree.c b/device_tree.c index 9d47195..df9eed9 100644 --- a/device_tree.c +++ b/device_tree.c @@ -60,13 +60,13 @@ void *cre

Re: [Qemu-devel] [PATCH 3/5] target-ppc: Build error log

2014-08-25 Thread Aravinda Prasad
On Tuesday 26 August 2014 11:17 AM, David Gibson wrote: > On Mon, Aug 25, 2014 at 07:15:35PM +0530, Aravinda Prasad wrote: >> Whenever there is a physical memory error due to bit >> flips, which cannot be corrected by hardware, the error >> is passed on to the kernel. If the memory address in >>

[Qemu-devel] [PATCH v2 1/2] device_tree.c: redirect load_device_tree err message to stderr

2014-08-25 Thread john.liuli
From: Li Liu Reviewed-by: Peter Crosthwaite Signed-off-by: Li Liu --- changes v1 -> v2: 1) fix indent issue as peter suggested. 2) dump all err mesages with error_report. --- device_tree.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/device_tree.c b/d

Re: [Qemu-devel] [PATCH v5 0/8] modify boot order of guest, and take effect after rebooting

2014-08-25 Thread Gerd Hoffmann
> The patchsets add one qmp interface, and add an fw_cfg_machine_reset() > to achieve it. > (qemu) set-bootindex ide0-0-1 1 > The bootindex 1 has already been used What happened to the idea to use qom-set instead? I liked that suggestion. Solves the suffix issue in a nice way. cheers, Gerd

Re: [Qemu-devel] [PATCH 1/5] target-ppc: Extend rtas-blob

2014-08-25 Thread Aravinda Prasad
On Tuesday 26 August 2014 11:08 AM, David Gibson wrote: > On Mon, Aug 25, 2014 at 07:15:16PM +0530, Aravinda Prasad wrote: >> Extend rtas-blob to accommodate error log. Error log >> structure is saved in rtas space upon a machine check >> exception. > > Hrm. Putting the reserved space into the

[Qemu-devel] [PATCH] virtio-scsi: Report error if num_queues is 0 or too large

2014-08-25 Thread Fam Zheng
No cmd vq surprises guest (Linux panics in virtscsi_probe), too many queues abort qemu (in the following virtio_add_queue). Signed-off-by: Fam Zheng --- hw/scsi/virtio-scsi.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 2dd9255..86

Re: [Qemu-devel] Bug#758881: [bisected] VNC server can't get all sent chars correctly

2014-08-25 Thread Marc
Hi, On August 25, 2014 at 3:40:01 AM, Gabriele Giacone (1o5g4...@gmail.com) wrote: > IMO vncdotool should be fixed to add small delays between keyboard  > events, as if a real person is typing, instead of sending the key events  > at the maximum possible speed.  vncdotool does have a —delay=MILLIS

Re: [Qemu-devel] [libvirt] Mentors wanted for Outreach Program for Women October 2014

2014-08-25 Thread Marina Zhurakhinskaya
- Original Message - > From: "Stefan Hajnoczi" > To: "Martin Kletzander" > Cc: "qemu-devel" , libvir-l...@redhat.com, "kvm" > , "Marina > Zhurakhinskaya" > Sent: Monday, August 25, 2014 12:29:27 PM > Subject: Re: [libvirt] Mentors wanted for Outreach Program for Women October > 2014 >

Re: [Qemu-devel] [PATCH 2/5] target-ppc: Register and handle HCALL to receive updated RTAS region

2014-08-25 Thread Benjamin Herrenschmidt
On Tue, 2014-08-26 at 15:39 +1000, David Gibson wrote: > On Mon, Aug 25, 2014 at 07:15:26PM +0530, Aravinda Prasad wrote: > > Receive updates from SLOF about the updated rtas-base. > > A separate patch for SLOF [1] adds functionality to invoke a > > a private HCALL whenever OS issues instantiate-rt

Re: [Qemu-devel] Bug#758881: [bisected] VNC server can't get all sent chars correctly

2014-08-25 Thread Gerd Hoffmann
On Di, 2014-08-26 at 09:55 +0400, Michael Tokarev wrote: > 26.08.2014 09:40, Gerd Hoffmann wrote: > > There should be a delay after every character. It can be pretty small. > > 10ms should be enough (you should set TCP_NODELAY though to make sure > > the key events are not buffered in the network

Re: [Qemu-devel] [PATCH 3/3] target-ppc: virtex-ml507 machine type should depend on CONFIG_XILINX

2014-08-25 Thread Peter Crosthwaite
On Tue, Aug 26, 2014 at 2:30 PM, David Gibson wrote: > The virtex-ml507 is a Xilinx CPU based system, and requires several sub > devices which are only included with CONFIG_XILINX. Therefore, it should > only be compiled if CONFIG_XILINX is set. > > Signed-off-by: David Gibson Reviewed-by: Pete

[Qemu-devel] [RFC PATCH v2 7/8] block: Implement bdrv_em_co_aiocb_info.cancel_async

2014-08-25 Thread Fam Zheng
Nothing to do here. Signed-off-by: Fam Zheng --- block.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block.c b/block.c index f4c77ec..ac1cfb4 100644 --- a/block.c +++ b/block.c @@ -4746,9 +4746,16 @@ static void bdrv_aio_co_cancel_em(BlockDriverAIOCB *blockacb) } } +stati

[Qemu-devel] [RFC PATCH v2 8/8] iscsi: Implement .cancel_async in acb info

2014-08-25 Thread Fam Zheng
Factor out the cancellation submission part in iscsi_aio_cancel, which is all what is needed for .cancel_async. The cb passed to iscsi_task_mgmt_abort_task_async, iscsi_abort_task_cb, will be called later, so for iscsi_bh_cb. In iscsi_bh_cb, acb->canceled is not set if canceled by .cancel_async, s

Re: [Qemu-devel] 9p mapped-* security model infos are architecture-specific

2014-08-25 Thread Aneesh Kumar K.V
Michael Tokarev writes: > I haven't noticed this email - which is almost a month old now - until today. > So replying now... > > 30.07.2014 21:43, Aneesh Kumar K.V wrote: >> "Aneesh Kumar K.V" writes: >> >>> Michael Tokarev writes: >>> Apparently the the mapped-* security models results i

Re: [Qemu-devel] [PATCH] xhci: fix debug print compiling error

2014-08-25 Thread Gerd Hoffmann
On Do, 2014-08-21 at 20:48 +0800, arei.gong...@huawei.com wrote: > after commit 003e15a180373048f0c1f4df0bfe303746eb2676 > the DPRINTF will broke compiling, adjust its location. Added to usb queue. thanks, Gerd

[Qemu-devel] [RFC PATCH v2 6/8] dma: Implement .cancel_async

2014-08-25 Thread Fam Zheng
Just forward the request to bdrv_aio_cancel_async. Use a flag to fix the ret value in completion code. Also check memory address before calling dma_memory_unmap. Signed-off-by: Fam Zheng --- dma-helpers.c | 28 1 file changed, 28 insertions(+) diff --git a/dma-helpe

[Qemu-devel] [RFC PATCH v2 5/8] thread-pool: Implement .cancel_async

2014-08-25 Thread Fam Zheng
The .cancel_async reuses the first half of .cancel: try to steal the request if not submitted yet. In this case set the elem to a special status THREAD_CANCELED_ASYNC, which means thread_pool_completion_bh should call the cb with -ECANCELED. If the request is already submitted, do nothing, as we k

[Qemu-devel] [RFC PATCH v2 3/8] tests: Add testing code for bdrv_aio_cancel_async

2014-08-25 Thread Fam Zheng
Before, done_cb is only called if the request is submitted by thread pool. Now in the async test, done_cb is always called. So update the test criteria accordingly. Signed-off-by: Fam Zheng --- tests/test-thread-pool.c | 39 +++ 1 file changed, 31 insertions(+

[Qemu-devel] [RFC PATCH v2 4/8] linux-aio: Implement .cancel_async

2014-08-25 Thread Fam Zheng
Just call io_cancel (2), if it fails, it means the request is not canceled, so the event loop will eventually call qemu_laio_process_completion. In qemu_laio_process_completion, change to call the cb unconditionally. It is required by .cancel_async, and also acceptable by .cancel. Signed-off-by:

[Qemu-devel] [RFC PATCH v2 1/8] block: Add refcnt in BlockDriverAIOCB

2014-08-25 Thread Fam Zheng
This will be useful in situations like asynchronous cancel emulation. Signed-off-by: Fam Zheng --- block.c | 12 +++- include/block/aio.h | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index e9380f6..f8e342f 100644 --- a/block.c +++

[Qemu-devel] [RFC PATCH v2 2/8] block: Add bdrv_aio_cancel_async

2014-08-25 Thread Fam Zheng
This is the async version of bdrv_aio_cancel, which doesn't block the caller. It guarantees that the cb is called either before returning or some time later. Signed-off-by: Fam Zheng --- block.c | 26 ++ include/block/aio.h | 1 + include/block/block.h |

[Qemu-devel] [RFC PATCH v2 0/8] block: Asynchronous request cancellation

2014-08-25 Thread Fam Zheng
v2: Drop the unfinished scsi part, which was broken in v1. (Paolo) Add refcnt in BlockDriverAIOCB to maintain invariant of acb availability in bdrv_aio_cancel_async. (Paolo) Drop blkdebug change. (Stefan) This series adds a new block API: void bdrv_aio_cancel_async(BlockDriverAIOCB

Re: [Qemu-devel] reporting 9pfs init errors

2014-08-25 Thread Aneesh Kumar K.V
Michael Tokarev writes: > Hello. > > I've a bugreport against debian qemu package which basically > states that 9pfs does not work. After some digging it turned > out to be error reporting problem, plain and simple. The > error message is: > > qemu-system-x86_64: -device > virtio-9p-pci,id=fs0

Re: [Qemu-devel] [PATCH 4/5] target-ppc: Handle ibm, nmi-register RTAS call

2014-08-25 Thread David Gibson
On Mon, Aug 25, 2014 at 07:15:45PM +0530, Aravinda Prasad wrote: > This patch adds FWNMI support in qemu for powerKVM > guests by handling the ibm,nmi-register rtas call. > Whenever OS issues ibm,nmi-register RTAS call, the > machine check notification address is saved and the > machine check inter

Re: [Qemu-devel] [PATCH 5/5] target-ppc: Handle cases when multi-processors get machine-check

2014-08-25 Thread David Gibson
On Mon, Aug 25, 2014 at 07:15:54PM +0530, Aravinda Prasad wrote: > It is possible for multi-processors to experience machine > check at or about the same time. As per PAPR, subsequent > processors serialize waiting for the first processor to > issue the ibm,nmi-interlock call. > > The second proce

Re: [Qemu-devel] [PATCH 1/5] target-ppc: Extend rtas-blob

2014-08-25 Thread David Gibson
On Mon, Aug 25, 2014 at 07:15:16PM +0530, Aravinda Prasad wrote: > Extend rtas-blob to accommodate error log. Error log > structure is saved in rtas space upon a machine check > exception. Hrm. Putting the reserved space into the actual firmware image file seems really clumsy to me. Wouldn't it

Re: [Qemu-devel] [PATCH 2/5] target-ppc: Register and handle HCALL to receive updated RTAS region

2014-08-25 Thread David Gibson
On Mon, Aug 25, 2014 at 07:15:26PM +0530, Aravinda Prasad wrote: > Receive updates from SLOF about the updated rtas-base. > A separate patch for SLOF [1] adds functionality to invoke a > a private HCALL whenever OS issues instantiate-rtas with > a new rtas-base. > > This is required as qemu needs

Re: [Qemu-devel] [PATCH 3/5] target-ppc: Build error log

2014-08-25 Thread David Gibson
On Mon, Aug 25, 2014 at 07:15:35PM +0530, Aravinda Prasad wrote: > Whenever there is a physical memory error due to bit > flips, which cannot be corrected by hardware, the error > is passed on to the kernel. If the memory address in > error belongs to guest address space then guest kernel > is resp

Re: [Qemu-devel] Bug#758881: [bisected] VNC server can't get all sent chars correctly

2014-08-25 Thread Michael Tokarev
26.08.2014 09:40, Gerd Hoffmann wrote: > There should be a delay after every character. It can be pretty small. > 10ms should be enough (you should set TCP_NODELAY though to make sure > the key events are not buffered in the network stack). Is this delay qemu-specific (or, rather, virtualization-

Re: [Qemu-devel] Bug#758881: [bisected] VNC server can't get all sent chars correctly

2014-08-25 Thread Gerd Hoffmann
On Mo, 2014-08-25 at 21:11 -0700, Marc wrote: > Hi, > > > On August 25, 2014 at 3:40:01 AM, Gabriele Giacone > (1o5g4...@gmail.com) wrote: > > > > > IMO vncdotool should be fixed to add small delays between > > keyboard > > > events, as if a real person is typing, instead of sending the key > >

Re: [Qemu-devel] [PATCH memory v2 1/3] xen-hvm: Constify string

2014-08-25 Thread Stefan Weil
Am 26.08.2014 um 05:09 schrieb Peter Crosthwaite: > It's constant, and sourced from existing const strings. Avoid dodgy > casts by converting to const. > > Signed-off-by: Peter Crosthwaite > --- > > xen-hvm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/xen-hvm.

Re: [Qemu-devel] [PATCH v12 0/6] qcow2, raw: add preallocation=full and preallocation=falloc

2014-08-25 Thread Hu Tao
On Fri, Aug 22, 2014 at 05:00:08PM +0100, Richard W.M. Jones wrote: > On Fri, Aug 22, 2014 at 05:53:22PM +0200, Kevin Wolf wrote: > > Am 22.08.2014 um 17:34 hat Richard W.M. Jones geschrieben: > > > On Fri, Aug 22, 2014 at 05:22:33PM +0200, Kevin Wolf wrote: > > > > It's still useful because it hap

Re: [Qemu-devel] [PATCH V3] net: Fix dealing with packets when runstate changes

2014-08-25 Thread zhanghailiang
On 2014/8/26 12:39, Jason Wang wrote: On 08/25/2014 06:47 PM, zhanghailiang wrote: For all NICs(except virtio-net) emulated by qemu, Such as e1000, rtl8139, pcnet and ne2k_pci, Qemu can still receive packets when VM is not running. If this happened in *migration's* last PAUSE VM stage, The new d

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

2014-08-25 Thread Gonglei (Arei)
Hi, Peter. Firstly, I appreciate your so careful and useful comments very much. > -Original Message- > From: peter.crosthwa...@petalogix.com > [mailto:peter.crosthwa...@petalogix.com] On Behalf Of Peter Crosthwaite > Sent: Tuesday, August 26, 2014 10:25 AM > To: Gonglei (Arei) > Cc: qemu-

Re: [Qemu-devel] [PATCH] block: Make op blockers recursive

2014-08-25 Thread Fam Zheng
On Mon, 08/25 12:12, Benoît Canet wrote: > On Mon, Aug 25, 2014 at 05:37:37PM +0800, Fam Zheng wrote: > > On Mon, 08/25 09:06, Benoît Canet wrote: > > > On Mon, Aug 25, 2014 at 02:04:24PM +0800, Fam Zheng wrote: > > > > On Fri, 08/22 18:11, Benoît Canet wrote: > > > > > Since the block layer code i

Re: [Qemu-devel] [PATCH V3] net: Fix dealing with packets when runstate changes

2014-08-25 Thread Jason Wang
On 08/25/2014 06:47 PM, zhanghailiang wrote: > For all NICs(except virtio-net) emulated by qemu, > Such as e1000, rtl8139, pcnet and ne2k_pci, > Qemu can still receive packets when VM is not running. > If this happened in *migration's* last PAUSE VM stage, > The new dirty RAM related to the packets

[Qemu-devel] [PATCH 3/3] target-ppc: virtex-ml507 machine type should depend on CONFIG_XILINX

2014-08-25 Thread David Gibson
The virtex-ml507 is a Xilinx CPU based system, and requires several sub devices which are only included with CONFIG_XILINX. Therefore, it should only be compiled if CONFIG_XILINX is set. Signed-off-by: David Gibson --- hw/ppc/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Qemu-devel] [PATCH 2/3] target-ppc: Disable ppc Mac tests when !CONFIG_MAC

2014-08-25 Thread David Gibson
The testsuites contain several tests which require the "mac99" and "g3beige" machine types, which will fail when CONFIG_MAC is not specified. Signed-off-by: David Gibson --- tests/boot-order-test.c | 6 ++ tests/endianness-test.c | 4 2 files changed, 10 insertions(+) diff --git a/test

[Qemu-devel] [0/3] target-ppc Fixes for some missing config dependencies

2014-08-25 Thread David Gibson
These 3 patches fix some places where things ought to depend on an existing config variable, but don't.

[Qemu-devel] [PATCH 1/3] target-ppc: Disable PReP testcases with !CONFIG_PREP

2014-08-25 Thread David Gibson
The test suites contain several tests which require the "prep" machine type, which will fail if that is configured out. Signed-off-by: David Gibson --- tests/boot-order-test.c | 4 tests/endianness-test.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tests/boot-order-test.c b/tests

[Qemu-devel] [PATCH target-arm v4 7/7] target-arm: Implement pmccfiltr_write function

2014-08-25 Thread Peter Crosthwaite
From: Alistair Francis This is the function that is called when writing to the PMCCFILTR_EL0 register Signed-off-by: Alistair Francis Signed-off-by: Peter Crosthwaite --- target-arm/helper.c | 9 + 1 file changed, 9 insertions(+) diff --git a/target-arm/helper.c b/target-arm/helper.

[Qemu-devel] [PATCH target-arm v4 6/7] target-arm: Remove old code and replace with new functions

2014-08-25 Thread Peter Crosthwaite
From: Alistair Francis Remove the old PMCCNTR code and replace it with calls to the new pmccntr_sync() and arm_ccnt_enabled() functions. Signed-off-by: Alistair Francis Signed-off-by: Peter Crosthwaite --- Changed since v2: Commit msg tweaks. target-arm/helper.c | 27

[Qemu-devel] [PATCH target-arm v4 5/7] target-arm: Implement pmccntr_sync function

2014-08-25 Thread Peter Crosthwaite
From: Alistair Francis This is used to synchronise the PMCCNTR counter and swap its state between enabled and disabled if required. It must always be called twice, both before and after any logic that could change the state of the PMCCNTR counter. Signed-off-by: Alistair Francis Signed-off-by:

[Qemu-devel] [PATCH target-arm v4 4/7] target-arm: Add arm_ccnt_enabled function

2014-08-25 Thread Peter Crosthwaite
From: Alistair Francis Include a helper function to determine if the CCNT counter is enabled. Signed-off-by: Alistair Francis [ PC changes * Remove EL based checks ] Signed-off-by: Peter Crosthwaite --- Changed since v3 Remove checks based on EL. Changed since v2 (PMM review): Blank line for

[Qemu-devel] [PATCH target-arm v4 3/7] target-arm: Implement PMCCNTR_EL0 and related registers

2014-08-25 Thread Peter Crosthwaite
From: Alistair Francis This patch adds support for the ARMv8 version of the PMCCNTR and related registers. It also starts to implement the PMCCFILTR_EL0 register. Signed-off-by: Alistair Francis Signed-off-by: Peter Crosthwaite --- Changed since v2: Widen cpu state fields as needed Reorder CP

[Qemu-devel] [PATCH target-arm v4 2/7] arm: Implement PMCCNTR 32b read-modify-write

2014-08-25 Thread Peter Crosthwaite
The register is now 64bit, however a 32 bit write to the register should leave the higher bits unchanged. The open coded write handler does not implement this, so we need to read-modify-write accordingly. Signed-off-by: Peter Crosthwaite --- target-arm/helper.c | 11 ++- 1 file changed,

[Qemu-devel] [PATCH target-arm v4 1/7] target-arm: Make the ARM PMCCNTR register 64-bit

2014-08-25 Thread Peter Crosthwaite
From: Alistair Francis This makes the PMCCNTR register 64-bit to allow for the 64-bit ARMv8 version. Signed-off-by: Peter Crosthwaite Signed-off-by: Alistair Francis --- changed since v2: Fixed indentation of muldiv64s target-arm/cpu.h| 2 +- target-arm/helper.c | 19 +--

[Qemu-devel] [PATCH target-arm v4 0/7] target-arm: Extend PMCCNTR for ARMv8

2014-08-25 Thread Peter Crosthwaite
This patch series continues on from Alistairs original PMCCNTR patch work. The counter is extended to 64-bit. V4: - Drop all EL awareness. V3: -Tidy up the arm_ccnt_enabled() -Fixed an old commit message refering to the CCNT_ENABLED macro -Do EL change sync in pstate_write instead of in mult

Re: [Qemu-devel] [PATCH V5] spapr: Fix stale HTAB during live migration

2014-08-25 Thread Sam Mendoza-Jonas
On 26/08/14 13:01, David Gibson wrote: > On Fri, Aug 22, 2014 at 10:24:10AM +1000, Samuel Mendoza-Jonas wrote: >> If a guest reboots during a running migration, changes to the >> hash page table are not necessarily updated on the destination. >> Opening a new file descriptor to the HTAB forces the

[Qemu-devel] [PATCH memory v2 3/3] memory: Lazy init name from QOM name as needed

2014-08-25 Thread Peter Crosthwaite
To support name retrieval of MemoryRegions that were created dynamically (that is, not via memory_region_init and friends). We cache the name in MemoryRegion's state as object_get_canonical_path_component mallocs the returned value so it's not suitable for direct return to callers. Memory already f

[Qemu-devel] [PATCH memory v2 2/3] xen: hvm: Abstract away memory region name ref

2014-08-25 Thread Peter Crosthwaite
The mr->name field is removed. This slipped through compile testing. Fix. Reviewed-by: Stefan Weil Signed-off-by: Peter Crosthwaite --- changed since v1: Removed dodgy (char *) cast xen-hvm.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xen-hvm.c b/xen-hvm.c ind

[Qemu-devel] [PATCH memory v2 1/3] xen-hvm: Constify string

2014-08-25 Thread Peter Crosthwaite
It's constant, and sourced from existing const strings. Avoid dodgy casts by converting to const. Signed-off-by: Peter Crosthwaite --- xen-hvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen-hvm.c b/xen-hvm.c index 91de2e2..d763e86 100644 --- a/xen-hvm.c +++ b/xen-

[Qemu-devel] [PATCH memory v2 0/3] Memory Region Naming - take 2

2014-08-25 Thread Peter Crosthwaite
Hi, Here is an attempt at a proper fix to the memory region naming bugs as reported by Peter. The Xen compile bug and the memory leak. Regards, Peter Changed since v1: Constify xen physmap name string (Stefan W review). Change memory_region_name to caching based approach. Peter Crosthwaite (3

Re: [Qemu-devel] [PATCH V5] spapr: Fix stale HTAB during live migration

2014-08-25 Thread David Gibson
On Fri, Aug 22, 2014 at 10:24:10AM +1000, Samuel Mendoza-Jonas wrote: > If a guest reboots during a running migration, changes to the > hash page table are not necessarily updated on the destination. > Opening a new file descriptor to the HTAB forces the migration > handler to resend the entire tab

Re: [Qemu-devel] [PATCH] spapr-vlan: Don't touch last entry in buffer list

2014-08-25 Thread David Gibson
On Fri, Aug 22, 2014 at 11:50:57AM +1000, Anton Blanchard wrote: > The last 8 bytes of the buffer list is defined to contain the number > of dropped frames. At the moment we use it to store rx entries, > which trips up ethtool -S: > > rx_no_buffer: 9223380832981355136 > > Fix this by skipping the

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

2014-08-25 Thread Chen, Tiejun
On 2014/8/25 13:18, Chen, Tiejun wrote: On 2014/8/24 19:12, Michael S. Tsirkin wrote: On Fri, Aug 22, 2014 at 09:06:20AM +0800, Chen, Tiejun wrote: On 2014/8/22 0:16, Konrad Rzeszutek Wilk wrote: On Thu, Aug 21, 2014 at 09:28:28AM +0800, Tiejun Chen wrote: Currenjly this ISA bridge should be

Re: [Qemu-devel] [PATCH] device_tree.c: redirect load_device_tree err message to stderr

2014-08-25 Thread Peter Crosthwaite
On Mon, Aug 25, 2014 at 6:44 PM, john.liuli wrote: > From: Li Liu > > Signed-off-by: Li Liu > --- > device_tree.c |8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/device_tree.c b/device_tree.c > index ca83504..ccdb039 100644 > --- a/device_tree.c > +++ b/devic

Re: [Qemu-devel] [PATCH 0/6] add dumpdts ability to convert dtb to dts

2014-08-25 Thread Peter Crosthwaite
On Tue, Aug 26, 2014 at 12:04 PM, Li Liu wrote: > > > On 2014/8/25 20:22, Peter Maydell wrote: >> On 25 August 2014 05:00, john.liuli wrote: >>> From: Li Liu >>> >>> This patchset let qemu can convert dtb file to dts for two demands: >>> >>> Some archtectures may generate the dtb file dynamicall

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

2014-08-25 Thread Peter Crosthwaite
On Thu, Aug 21, 2014 at 12:11 PM, wrote: > 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

Re: [Qemu-devel] [PATCH 1/1] add loopback for virtio-net

2014-08-25 Thread ????
Thanks for your suggestions. What I mean by this, is that we can test whether virtio-net can send and receive packets normally with ethtool in Guest OS, just as we test e1000 with ethtool [-t]. As we know, ethtool is an effective tool for testing net device, so we can provide this support by thi

Re: [Qemu-devel] [PATCH 0/6] add dumpdts ability to convert dtb to dts

2014-08-25 Thread Li Liu
On 2014/8/25 20:22, Peter Maydell wrote: > On 25 August 2014 05:00, john.liuli wrote: >> From: Li Liu >> >> This patchset let qemu can convert dtb file to dts for two demands: >> >> Some archtectures may generate the dtb file dynamically through >> qemu device tree functions. So this let it's p

Re: [Qemu-devel] [V2 PATCH 01/12] linux-user: PPC64 semid_ds Doesnt Include _unused1 and _unused2

2014-08-25 Thread David Gibson
On Tue, Aug 12, 2014 at 01:53:32PM -0500, Tom Musta wrote: > The 64 bit PowerPC platforms eliminate the _unused1 and _unused2 > elements of the semid_ds structure from . So eliminate > these from the target_semid_ds structure. > > Signed-off-by: Tom Musta Reviewed-by: David Gibson -- David G

Re: [Qemu-devel] [V2 PATCH 10/12] linux-user: clock_nanosleep errno Handling on PPC

2014-08-25 Thread David Gibson
On Tue, Aug 12, 2014 at 01:53:41PM -0500, Tom Musta wrote: > The clock_nanosleep syscall is unusual in that it returns positive > numbers in error handling situations, versus returning -1 and setting > errno, or returning a negative errno value. On POWER, the kernel will > set the SO bit of CR0 to

Re: [Qemu-devel] [V2 PATCH 06/12] linux-user: Detect Negative Message Sizes in msgsnd System Call

2014-08-25 Thread David Gibson
On Tue, Aug 12, 2014 at 01:53:37PM -0500, Tom Musta wrote: > The msgsnd system call takes an argument that describes the message > size (msgsz) and is of type size_t. The system call should set > errno to EINVAL in the event that a negative message size is passed. > > Signed-off-by: Tom Musta >

Re: [Qemu-devel] [V2 PATCH 07/12] linux-user: Handle NULL sched_param argument to sched_*

2014-08-25 Thread David Gibson
On Tue, Aug 12, 2014 at 01:53:38PM -0500, Tom Musta wrote: > The sched_getparam, sched_setparam and sched_setscheduler system > calls take a pointer argument to a sched_param structure. When > this pointer is null, errno should be set to EINVAL. > > Signed-off-by: Tom Musta Reviewed-by: David G

Re: [Qemu-devel] [V2 PATCH 08/12] linux-user: Detect fault in sched_rr_get_interval

2014-08-25 Thread David Gibson
On Tue, Aug 12, 2014 at 01:53:39PM -0500, Tom Musta wrote: > Properly detect a fault when attempting to store into an invalid > struct timespec pointer. > > Signed-off-by: Tom Musta > Reviewed-by: Peter Maydell Reviewed-by: David Gibson -- David Gibson| I'll have my music

Re: [Qemu-devel] [V2 PATCH 11/12] linux-user: Support target-to-host translation of mlockall argument

2014-08-25 Thread David Gibson
On Tue, Aug 12, 2014 at 01:53:42PM -0500, Tom Musta wrote: > The argument to the mlockall system call is not necessarily the same on > all platforms and thus may require translation prior to passing to the > host. > > For example, PowerPC 64 bit platforms define values for MCL_CURRENT > (0x2000) a

Re: [Qemu-devel] [V2 PATCH 12/12] linux-user: writev Partial Writes

2014-08-25 Thread David Gibson
On Tue, Aug 12, 2014 at 01:53:43PM -0500, Tom Musta wrote: > Although not technically not required by POSIX, the writev system call will > typically write out its buffers individually. That is, if the first buffer > is written successfully, but the second buffer pointer is invalid, then > the firs

Re: [Qemu-devel] [V2 PATCH 04/12] linux-user: Make ipc syscall's third argument an abi_long

2014-08-25 Thread David Gibson
On Tue, Aug 12, 2014 at 01:53:35PM -0500, Tom Musta wrote: > For those target ABIs that use the ipc system call (e.g. POWER), > the third argument is used in the shmat path as a pointer. It > therefore must be declared as an abi_long (versus int) so that > the address bits are not lost in truncati

Re: [Qemu-devel] [V2 PATCH 05/12] linux-user: Conditionally Pass Attribute Pointer to mq_open()

2014-08-25 Thread David Gibson
On Tue, Aug 12, 2014 at 01:53:36PM -0500, Tom Musta wrote: > The mq_open system call takes an optional struct mq_attr pointer > argument in the fourth position. This pointer is used when O_CREAT > is specified in the flags (second) argument. It may be NULL, in > which case the queue is created wi

Re: [Qemu-devel] [V2 PATCH 03/12] linux-user: Properly Handle semun Structure In Cross-Endian Situations

2014-08-25 Thread David Gibson
On Tue, Aug 12, 2014 at 01:53:34PM -0500, Tom Musta wrote: > The semun union used in the semctl system call contains both an int (val) and > pointers. In cross-endian situations on 64 bit targets, the value passed to > semctl is an 8 byte (abi_long) value and thus does not have the 4-byte val > fi

Re: [Qemu-devel] [V2 PATCH 02/12] linux-user: Dereference Pointer Argument to ipc/semctl Sys Call

2014-08-25 Thread David Gibson
On Tue, Aug 12, 2014 at 01:53:33PM -0500, Tom Musta wrote: > When the ipc system call is used to wrap a semctl system call, > the ptr argument to ipc needs to be dereferenced prior to passing > it to the semctl handler. This is because the fourth argument to > semctl is a union and not a pointer t

[Qemu-devel] [PATCH v1 5/6] qom/cpu: Add Memory Region Property

2014-08-25 Thread Peter Crosthwaite
Which is used to construct a per-CPU address space. The Address space will be created at realize time. Signed-off-by: Peter Crosthwaite --- include/qom/cpu.h | 1 + qom/cpu.c | 11 +++ 2 files changed, 12 insertions(+) diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 1

[Qemu-devel] [PATCH v1 6/6] cpu: Delay address space init until realize

2014-08-25 Thread Peter Crosthwaite
To allow it to be set by the user after init. Signed-off-by: Peter Crosthwaite --- exec.c| 1 - qom/cpu.c | 5 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/exec.c b/exec.c index 5f9857c..15ae6b7 100644 --- a/exec.c +++ b/exec.c @@ -492,7 +492,6 @@ void cpu_exec_init(C

[Qemu-devel] [PATCH v1 4/6] qom: Move cpu.o to obj-y.

2014-08-25 Thread Peter Crosthwaite
It's not really a common object and this is needed to give it access to CONFIG_USER_ONLY definition. Move it to regular obj-y. Signed-off-by: Peter Crosthwaite --- Makefile.target | 1 + qom/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.target b/

Re: [Qemu-devel] [RFC PATCH 0/2] Fix MSIx lost after PE reset

2014-08-25 Thread Gavin Shan
On Wed, Aug 20, 2014 at 07:52:06PM +1000, Gavin Shan wrote: >The 2 patches fix MSIx lost after PE reset. Otherwise, the MSIx >entries can't be restored successfully after PE reset and the >EEH recovery fails on broadcom tg3 adapter (as tested) in guest. > >Note: The patchset "EEH support for guest"

[Qemu-devel] [PATCH v1 2/6] memory: AddressSpace: Implement ref counting

2014-08-25 Thread Peter Crosthwaite
To allow for sharing of AddressSpaces between multiple masters. Signed-off-by: Peter Crosthwaite --- include/exec/memory.h | 1 + memory.c | 5 + 2 files changed, 6 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memory.h index d165b27..18cb6b2 100644 --- a/inc

[Qemu-devel] [PATCH v1 1/6] memory: address_space_init: do nothing if no root region given

2014-08-25 Thread Peter Crosthwaite
Just ignore this case. This is needed for bus master device realize when the machine model doesn't connect an attachment. Then machine model may decide to not set a memory region for mastering yet the device will attempt to create itself an address space come realize time. Gracefully do nothing. S

[Qemu-devel] [PATCH v1 0/6] PMA phase 2 - per CPU address spaces

2014-08-25 Thread Peter Crosthwaite
Hi All, This series sets up CPUs with configurable address spaces. This follows on from Edgars original work and moves towards removal of address_space_memory and support for arbitrary memory heirachies/layouts. Fuller context in RFC: http://lists.gnu.org/archive/html/qemu-devel/2014-06/msg0048

[Qemu-devel] bad error message in drive-mirror

2014-08-25 Thread Eric Blake
I just noticed today that passing "granularity":1 to QMP drive-mirror results in this confusing error message: Invalid parameter 'drive-virtio-disk0' because the code mistakenly did error_set(errp, QERR_INVALID_PARAMETER, device); instead of the correct error_set(errp, QERR_INVALI

[Qemu-devel] [Bug 1354167] Re: On VM restart: Could not open 'poppy.qcow2': Could not read snapshots: File too large

2014-08-25 Thread Todd
Just putting this up here for anyone unlucky enough to hit this. This isn't a fix but it may rescue your borked qcow2 image. Download and compile the 1.7.2 version of qemu but don't install it. For example create a directory called qemutemp, download qemu-1.7.2.tar.bz2, untar it and do ./configur

Re: [Qemu-devel] is there a limit on the number of in-flight I/O operations?

2014-08-25 Thread Chris Friesen
On 08/23/2014 01:56 AM, Benoît Canet wrote: The Friday 22 Aug 2014 à 18:59:38 (-0600), Chris Friesen wrote : On 07/21/2014 10:10 AM, Benoît Canet wrote: The Monday 21 Jul 2014 à 09:35:29 (-0600), Chris Friesen wrote : On 07/21/2014 09:15 AM, Benoît Canet wrote: The Monday 21 Jul 2014 à 08:59:

[Qemu-devel] [PATCH v2 6/6] target-i386: Disable SVM by default in KVM mode

2014-08-25 Thread Eduardo Habkost
Make SVM be disabled by default on all CPU models when in KVM mode. Nested SVM is enabled by default in the KVM kernel module, but it is probably less stable than nested VMX (which is already disabled by default). Add a new compat function, x86_cpu_compat_kvm_no_autodisable(), to keep compatibilit

[Qemu-devel] [PATCH v2 2/6] target-i386: Rename KVM auto-feature-enable compat function

2014-08-25 Thread Eduardo Habkost
The x86_cpu_compat_disable_kvm_features() name was a bit confusing, as it won't forcibly disable the feature for all CPU models (i.e. add it to kvm_default_unset_features), but it will instead turn off the KVM auto-enabling of the feature (i.e. remove it from kvm_default_features), meaning the feat

[Qemu-devel] [PATCH v2 0/6] target-i386: Make most CPU models work with "enforce" out of the box

2014-08-25 Thread Eduardo Habkost
Changes v1 -> v2: * Commit message and comment changes. * Update compat code to change pc-*-2.1, not pc-*-2.0. * Added patch to disable SVM by default in KVM mode. Most of the bits that make "enforce" breaks were introduced in 2010 by commit 8560efed6a72a816c0115f41ddb9d79f7ce63f28. The intenti

[Qemu-devel] [PATCH v2 5/6] target-i386: Don't enable nested VMX by default

2014-08-25 Thread Eduardo Habkost
TCG doesn't support VMX, and nested VMX is not enabled by default on the KVM kernel module. So, there's no reason to have VMX enabled by default on the core2duo and coreduo CPU models, today. Even the newer Intel CPU model definitions don't have it enabled. In this case, we need machine-type comp

[Qemu-devel] [PATCH v2 4/6] target-i386: Remove unsupported bits from all CPU models

2014-08-25 Thread Eduardo Habkost
The following CPU features were never supported by neither TCG or KVM, so they are useless on the CPU model definitions, today: * CPUID_DTS (DS) * CPUID_HT * CPUID_TM * CPUID_PBE * CPUID_EXT_DTES64 * CPUID_EXT_DSCPL * CPUID_EXT_EST * CPUID_EXT_TM2 * CPUID_EXT_XTPR * CPUID_EXT_PDCM * CPU

[Qemu-devel] [PATCH v2 1/6] pc: Create pc_compat_2_1() functions

2014-08-25 Thread Eduardo Habkost
We will need new compat code for the 2.1 machine-types. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 13 - hw/i386/pc_q35.c | 13 - 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 47ac1b5..5b7f9ba 1006

[Qemu-devel] [PATCH v2 3/6] target-i386: Disable CPUID_ACPI by default on KVM mode

2014-08-25 Thread Eduardo Habkost
KVM never supported the CPUID_ACPI flag, so it doesn't make sense to have it enabled by default when KVM is enabled. The motivation here is exactly the same we had for the MONITOR flag (disabled by commit 136a7e9a85d7047461f8153f7d12c514a3d68f69). And like on the MONITOR flag case, we don't need

Re: [Qemu-devel] [PATCH 0/6] target-ppc: More Cleanup of FXU Instructions

2014-08-25 Thread Richard Henderson
On 08/25/2014 12:25 PM, Tom Musta wrote: > This series follows up my previous series of bug fixes to Power fixed point > instructions > (http://lists.nongnu.org/archive/html/qemu-ppc/2014-08/msg00068.html). > Richard Henderson provided additional feedback after the patches had been > taken > into

[Qemu-devel] [PATCH v2 2/2] target-i386: Add "tsc_adjust" CPU feature name

2014-08-25 Thread Eduardo Habkost
tsc_adjust migration support is already implemented (commit f28558d3d37ad3bc4e35e8ac93f7bf81a0d5622c), so we can add it to the list of known feature names. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/cpu.c b

[Qemu-devel] [PATCH v2 1/2] target-i386: Add "mpx" CPU feature name

2014-08-25 Thread Eduardo Habkost
Migration support for MPX is already implemented (commit 79e9ebebbf2a00c46fcedb6dc7dd5e12bbd30216), so we can add it to the list of known feature names. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/ta

[Qemu-devel] [PATCH v2 0/2] target-i386: tsc_adjust and mpx feature names

2014-08-25 Thread Eduardo Habkost
Add feature names that are missing on the x86 CPU feature name tables. Both had migration support implemented many months ago. Changes v1 -> v2: * Commit message changes only. Added reference to migration support commit IDs. Note that v1 was not sent as a series, but as separate individual patch

Re: [Qemu-devel] [PATCH v2 2/2] pci: add check for pcie root ports and downstream ports

2014-08-25 Thread Michael S. Tsirkin
On Thu, Aug 21, 2014 at 05:47:46PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > If ARI Forwarding is disabled, according to PCIe spec > section 7.3.1, only slot 0 with the device attached to > logic bus representing the link from downstream > ports and root ports. > > So, adding che

  1   2   3   >