Re: [Qemu-devel] [PATCH v4 00/47] Postcopy implementation

2014-11-24 Thread zhanghailiang
On 2014/11/21 18:14, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: Hi David, When i migrated VM in postcopy way when configuring VM with '-realtime mlock=on' option, It failed, and reports "postcopy_ram_hosttest: remap_anon_pages not available: File exi

[Qemu-devel] [v2 0/4] QEMU:Xen stubdom vTPM for HVM virtual machine

2014-11-24 Thread Quan Xu
*INTRODUCTION* The goal of virtual Trusted Platform Module (vTPM) is to provide a TPM functionality to virtual machines (Fedora, Ubuntu, Redhat, Windows .etc). This allows programs to interact with a TPM in a virtual machine the same way they interact with a TPM on the physical system. Each virt

[Qemu-devel] [v2 1/4] Qemu-Xen-vTPM: Support for Xen stubdom vTPM command line options

2014-11-24 Thread Quan Xu
Signed-off-by: Quan Xu --- configure| 14 ++ hmp.c| 7 +++ qapi-schema.json | 20 ++-- qemu-options.hx | 13 +++-- tpm.c| 7 ++- 5 files changed, 56 insertions(+), 5 deletions(-) diff --git a/configure b/configure ind

[Qemu-devel] [v2 3/4] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms driver.

2014-11-24 Thread Quan Xu
This driver provides vTPM initialization and sending data and TPM commends to a Xen stubdom vTPM domain. Signed-off-by: Quan Xu --- hw/tpm/Makefile.objs | 1 + hw/tpm/tpm_xenstubdoms.c | 238 +++ 2 files changed, 239 insertions(+) create mode 10

[Qemu-devel] [v2 4/4] Qemu-Xen-vTPM: QEMU machine class is initialized before tpm_init()

2014-11-24 Thread Quan Xu
make sure QEMU machine class is initialized and QEMU has registered Xen stubdom vTPM driver when call tpm_init() Signed-off-by: Quan Xu --- vl.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index f6b3546..dd437e1 100644 --- a/vl.c +++ b/vl.c @

[Qemu-devel] [v2 2/4] Qemu-Xen-vTPM: Register Xen stubdom vTPM frontend driver

2014-11-24 Thread Quan Xu
This drvier transfers any request/repond between TPM xenstubdoms driver and Xen vTPM stubdom, and facilitates communications between Xen vTPM stubdom domain and vTPM xenstubdoms driver Signed-off-by: Quan Xu --- hw/tpm/Makefile.objs | 1 + hw/tpm/xen_stubdom_vtpm.c| 321 +++

[Qemu-devel] [RFC v2 0/4] Add Generic PCI host device update

2014-11-24 Thread Alvise Rigo
This patch series is based on the previous work [1] and [2] by Rob Herring and on [3] by myself. For sake of readability and since this is still a RFC, these patches come as a stand alone work, so there's no need to apply first [1][2][3]. it tries to enhance this work on these points: Improvemen

[Qemu-devel] [RFC v2 3/4] hw/pci-host: Add a generic PCI host controller for virtual platforms

2014-11-24 Thread Alvise Rigo
Add a generic PCI host controller for virtual platforms, based on the previous work by Rob Herring: http://lists.gnu.org/archive/html/qemu-devel/2014-06/msg03482.html The controller creates a PCI bus for PCI devices; it is intended to receive from the platform all the needed information to initiat

[Qemu-devel] [RFC v2 2/4] hw/arm/virt: find_machine_info: handle NULL value

2014-11-24 Thread Alvise Rigo
Signed-off-by: Alvise Rigo --- hw/arm/virt.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index e8d527d..4e7b869 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -151,6 +151,10 @@ static VirtBoardInfo *find_machine_info(const char *cpu) { int i; +

[Qemu-devel] [RFC v2 1/4] hw/arm/virt: Allow multiple agents to modify dt

2014-11-24 Thread Alvise Rigo
Keep a global list with all the functions that need to modify the device tree. Using qemu_add_machine_init_done_notifier we register a notifier that executes all the functions on the list and loads the kernel. Signed-off-by: Alvise Rigo --- hw/arm/virt.c | 55 +++

Re: [Qemu-devel] [PATCH v4 00/47] Postcopy implementation

2014-11-24 Thread zhanghailiang
On 2014/11/22 2:56, Andrea Arcangeli wrote: On Fri, Nov 21, 2014 at 11:48:03AM +0800, zhanghailiang wrote: Hi David, When i migrated VM in postcopy way when configuring VM with '-realtime mlock=on' option, It failed, and reports "postcopy_ram_hosttest: remap_anon_pages not available: File exi

Re: [Qemu-devel] [PATCH v6 08/10] qapi: Add transaction support to block-dirty-bitmap-{add, enable, disable}

2014-11-24 Thread Max Reitz
On 2014-11-21 at 23:24, John Snow wrote: On 11/04/2014 06:03 AM, Max Reitz wrote: On 2014-10-30 at 04:22, Fam Zheng wrote: This adds three qmp commands to transactions. Users can stop a dirty bitmap, start backup of it, and start another dirty bitmap atomically, so that the dirty bitmap is t

[Qemu-devel] qemu crash with virtio on Xen domUs (backtrace included)

2014-11-24 Thread Fabio Fantoni
Il 24/11/2014 02:58, Wen Congyang ha scritto: When I try to use virtio on xen(HVM guest), qemu crashed. Here is the backtrace: (gdb) bt #0 0x7f49581f0b55 in raise () from /lib64/libc.so.6 #1 0x7f49581f2131 in abort () from /lib64/libc.so.6 #2 0x7f495af2af32 in xen_ram_addr_from_map

Re: [Qemu-devel] [PATCH 2/2] vga: flip qemu 2.2 pc machine types from cirrus to stdvga

2014-11-24 Thread Gerd Hoffmann
On So, 2014-11-23 at 14:11 +0200, Michael S. Tsirkin wrote: > On Tue, Oct 28, 2014 at 10:09:12AM +0100, Gerd Hoffmann wrote: > > This patch switches the default display from cirrus to vga > > for the new (qemu 2.2+) machine types. Old machines types > > stay as-is for compatibility reasons. > > >

Re: [Qemu-devel] [RFC] Break cross migration from qemu-1.5 to qemu-2.1. because of input/hid rewriting

2014-11-24 Thread Gonglei
On 2014/11/21 23:16, Dr. David Alan Gilbert wrote: > * Gonglei (arei.gong...@huawei.com) wrote: >> > Hi, Gerd >> > >> > I encounter a problem that breaking migration from qemu-1.5 to qemu-2.1. >> > The error message as below: >> > qemu-system-x86_64: hw/input/hid.c:121: hid_pointer_event: Asser

Re: [Qemu-devel] [RFC] Break cross migration from qemu-1.5 to qemu-2.1. because of input/hid rewriting

2014-11-24 Thread Gonglei
On 2014/11/24 17:08, Gonglei wrote: > On 2014/11/21 23:16, Dr. David Alan Gilbert wrote: > >> * Gonglei (arei.gong...@huawei.com) wrote: Hi, Gerd I encounter a problem that breaking migration from qemu-1.5 to qemu-2.1. The error message as below: qemu-system-x86_64: hw/

Re: [Qemu-devel] [PATCH 1/1] block migration: fix return value mismatch

2014-11-24 Thread Dr. David Alan Gilbert
* Gary R Hook (grhookatw...@gmail.com) wrote: > Stefan Hajnoczi writes: > > > On Wed, Nov 12, 2014 at 06:48:18PM +, Gary Hook wrote: > >> -return qemu_ftell(f) - last_ftell; > >> +delta_ftell = qemu_ftell(f) - last_ftell; > >> +return( (delta_ftell > 0) ? 1 : (delta_ftell < 0) ? -

Re: [Qemu-devel] [PATCH v2] persistent dirty bitmap: add QDB file spec.

2014-11-24 Thread Vladimir Sementsov-Ogievskiy
Active dirty bitmaps should migrate too. I'm thinking now that the appropriate thing is to add live migration of dirty bitmaps to QEMU (regardless of whether they are active or not). Only for persistent bitmaps, or for all named bitmaps? If for all named bitmaps, then this migration should not b

Re: [Qemu-devel] qemu crash with virtio on Xen domUs (backtrace included)

2014-11-24 Thread Wen Congyang
On 11/24/2014 04:52 PM, Fabio Fantoni wrote: > Il 24/11/2014 02:58, Wen Congyang ha scritto: >> When I try to use virtio on xen(HVM guest), qemu crashed. Here is the >> backtrace: >> (gdb) bt >> #0 0x7f49581f0b55 in raise () from /lib64/libc.so.6 >> #1 0x7f49581f2131 in abort () from /li

[Qemu-devel] [Bug 1356969] Re: qemu-io: the 'map' command hangs on the fuzzed image

2014-11-24 Thread Max Reitz
Hi, well, the issue for this specific image is fixed because it is detected to be corrupt before the mapping can reach the point in question (unaligned L2 table entry). However, commit 4b25bbc4c22cf39350b75bd250d568a4d975f7c5 should have fixed the problem this bug report is really about. Thus, sho

Re: [Qemu-devel] [RESEND PATCH V3] qemu-img info: show nocow info

2014-11-24 Thread Kevin Wolf
Am 24.11.2014 um 04:11 hat Chun Yan Liu geschrieben: > > > >>> On 11/22/2014 at 12:25 AM, in message > <20141121162505.gf3...@noname.redhat.com>, Kevin Wolf > wrote: > > > Am 30.07.2014 um 04:55 hat Chunyan Liu geschrieben: > > > Add nocow info in 'qemu-img info' output to show whether the fi

Re: [Qemu-devel] [PATCH] qtest/bios-tables: Add DMAR unit test on intel_iommu for q35

2014-11-24 Thread Marcel Apfelbaum
On Sat, 2014-11-22 at 20:05 +0100, Vasilis Liaskovitis wrote: > The test enables intel_iommu on q35 and reads the DMAR table and its only > DRHC structure (for now), checking only the header and checksums. > > Signed-off-by: Vasilis Liaskovitis > --- > tests/bios-tables-test.c | 34 +

Re: [Qemu-devel] [PATCH v6 08/10] qapi: Add transaction support to block-dirty-bitmap-{add, enable, disable}

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 09:35, Max Reitz wrote: >>> >>> But what if the dirty bitmap was enabled before so that this enabling >>> transaction was supposed to be a no-op? >> >> Maybe it's not a problem: The only case in which the enable/disable >> operation will fail is if it cannot find the device or bitma

[Qemu-devel] [PATCH v3 0/5] block: Relative backing files

2014-11-24 Thread Max Reitz
Cover letter of v1: Sometimes, qemu does not have a filename to work with (it then generates a JSON filename), so it does not know which directory to use for a backing file specified by a relative filename. In this case, qemu should not somehow try to append the backing file's name to the JSON ob

[Qemu-devel] [PATCH v3 1/5] block: Get full backing filename from string

2014-11-24 Thread Max Reitz
Introduce bdrv_get_full_backing_filename_from_filename(), a function which takes the name of the backed file and a potentially relative backing filename to produce the full (absolute) backing filename. Use this function from bdrv_get_full_backing_filename(). Signed-off-by: Max Reitz Reviewed-by:

[Qemu-devel] [PATCH v3 3/5] block: Relative backing file for image creation

2014-11-24 Thread Max Reitz
Relative backing filenames are always relative to the backed image's directory; the same applies to image creation. Therefore, if the backing file has to be opened for determining its size (in case the size has not been explicitly specified) its filename should be interpreted relative to the new im

[Qemu-devel] [PATCH v3 2/5] block: JSON filenames and relative backing files

2014-11-24 Thread Max Reitz
When using a relative backing file name, qemu needs to know the directory of the top image file. For JSON filenames, such a directory cannot be easily determined (e.g. how do you determine the directory of a qcow2 BDS directly on top of a quorum BDS?). Therefore, do not allow relative filenames for

[Qemu-devel] [PATCH v3 4/5] block/vmdk: Relative backing file for creation

2014-11-24 Thread Max Reitz
When a vmdk image is created with a backing file, it is opened to check whether it is indeed a vmdk file by letting qemu probe it. When doing so, the backing filename is relative to the image's base directory so it should be interpreted accordingly. Signed-off-by: Max Reitz --- block/vmdk.c | 13

[Qemu-devel] [PATCH v3 5/5] iotests: Add test for relative backing file names

2014-11-24 Thread Max Reitz
Sometimes, qemu does not have a filename to work with, so it does not know which directory to use for a backing file specified by a relative filename. Add a test which tests that qemu exits with an appropriate error message. Additionally, add a test for qemu-img create with a backing filename rela

Re: [Qemu-devel] [PATCH v3 1/3] linux-aio: fix submit aio as a batch

2014-11-24 Thread Paolo Bonzini
On 22/11/2014 13:16, Ming Lei wrote: > > > +static int ioq_enqueue(struct qemu_laio_state *s, struct iocb *iocb) > > > { > > > unsigned int idx = s->io_q.idx; > > > > > > +if (unlikely(idx == s->io_q.size)) { > > > +return -1; > > > > return -EAGAIN? > > It means the io queue is

Re: [Qemu-devel] [PATCH v6 08/10] qapi: Add transaction support to block-dirty-bitmap-{add, enable, disable}

2014-11-24 Thread Max Reitz
On 2014-11-24 at 10:41, Paolo Bonzini wrote: On 24/11/2014 09:35, Max Reitz wrote: But what if the dirty bitmap was enabled before so that this enabling transaction was supposed to be a no-op? Maybe it's not a problem: The only case in which the enable/disable operation will fail is if it cann

Re: [Qemu-devel] [Qemu-ppc] [PATCH V2 0/3] spapr: Fix stale HTAB during live migration

2014-11-24 Thread Alexander Graf
On 24.11.14 07:48, Alexey Kardashevskiy wrote: > On 11/17/2014 11:26 PM, Alexander Graf wrote: >> >> >> >>> Am 17.11.2014 um 05:12 schrieb Samuel Mendoza-Jonas : >>> >>> If a spapr guest reboots during a live migration, the guest HTAB on the >>> destination is not updated properly, usually result

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

2014-11-24 Thread Paolo Bonzini
On 18/11/2014 15:06, Paolo Bonzini wrote: >> > +/* don't submit until next completion for -EAGAIN of non plug case */ >> > +if (unlikely(!s->io_q.plugged)) { >> > +return 0; >> > +} >> > + > Is this an optimization or a fix for something? Ah, if !io_q.plugged we must be in th

Re: [Qemu-devel] [PATCH v6 08/10] qapi: Add transaction support to block-dirty-bitmap-{add, enable, disable}

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 10:46, Max Reitz wrote: > On 2014-11-24 at 10:41, Paolo Bonzini wrote: >> >> On 24/11/2014 09:35, Max Reitz wrote: > But what if the dirty bitmap was enabled before so that this enabling > transaction was supposed to be a no-op? Maybe it's not a problem: The only case i

Re: [Qemu-devel] [PATCH v3 1/3] linux-aio: fix submit aio as a batch

2014-11-24 Thread Ming Lei
On Mon, Nov 24, 2014 at 5:47 PM, Paolo Bonzini wrote: > > > On 22/11/2014 13:16, Ming Lei wrote: >> > > +static int ioq_enqueue(struct qemu_laio_state *s, struct iocb *iocb) >> > > { >> > > unsigned int idx = s->io_q.idx; >> > > >> > > +if (unlikely(idx == s->io_q.size)) { >> > > +

Re: [Qemu-devel] [PATCH] hw/arm/boot: fix uninitialized scalar variable warning reported by coverity

2014-11-24 Thread Peter Maydell
On 24 November 2014 at 03:30, zhanghailiang wrote: > Coverity reports the 'size' may be used uninitialized, but that can't happen, > because the caller has checked "if (binfo->dtb_filename || binfo->get_dtb)" > before call 'load_dtb'. > > Here we simply remove the 'if (binfo->get_dtb)' to satisfy

Re: [Qemu-devel] [PATCH v3 1/3] linux-aio: fix submit aio as a batch

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 11:02, Ming Lei wrote: >> > Right, but "-1" is "-EPERM" which doesn't make much sense. I think the >> > right thing to do is to return EAGAIN, and let the owner figure it out. >> > For example, a SCSI device might return a "BUSY" status code. > We can do that, but laio_submit() do

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

2014-11-24 Thread Ming Lei
On Mon, Nov 24, 2014 at 5:52 PM, Paolo Bonzini wrote: > > > On 18/11/2014 15:06, Paolo Bonzini wrote: >>> > +/* don't submit until next completion for -EAGAIN of non plug case */ >>> > +if (unlikely(!s->io_q.plugged)) { >>> > +return 0; >>> > +} >>> > + >> Is this an optimizati

Re: [Qemu-devel] "File too large" error from "qemu-img snapshot" (was Re: AW: Bug Repoting Directions Request)

2014-11-24 Thread Kashyap Chamarthy
On Wed, Nov 19, 2014 at 11:13:27AM -0700, Eric Blake wrote: > On 11/19/2014 10:32 AM, Prof. Dr. Michael Schefczyk wrote: [. . .] > > virsh snapshot-create-as vm XXX --disk-only qemu-img convert -f > > qcow2 -s XXX -O qcow2 XXX.img /backup/YYY.img virsh snapshot-delete > > vm XXX > > Yes, virsh i

Re: [Qemu-devel] [PATCH] hw/arm/boot: fix uninitialized scalar variable warning reported by coverity

2014-11-24 Thread zhanghailiang
On 2014/11/24 18:03, Peter Maydell wrote: On 24 November 2014 at 03:30, zhanghailiang wrote: Coverity reports the 'size' may be used uninitialized, but that can't happen, because the caller has checked "if (binfo->dtb_filename || binfo->get_dtb)" before call 'load_dtb'. Here we simply remove t

Re: [Qemu-devel] [RFC v2 3/4] hw/pci-host: Add a generic PCI host controller for virtual platforms

2014-11-24 Thread Claudio Fontana
On 21.11.2014 19:07, Alvise Rigo wrote: > Add a generic PCI host controller for virtual platforms, based on the > previous work by Rob Herring: > http://lists.gnu.org/archive/html/qemu-devel/2014-06/msg03482.html Would it not be better to add rob herring's signoff, and then the explanation of what

Re: [Qemu-devel] [RFC v2 4/4] hw/arm/virt: Add generic-pci device support

2014-11-24 Thread Claudio Fontana
On 21.11.2014 19:07, Alvise Rigo wrote: > Instantiate a generic-pci PCI controller to add a PCI bus to the > mach-virt platform. The platform memory map has now three more memory > ranges to map the device's memory regions (Configuration region, I/O > region and Memory region). Now that a PCI bus i

Re: [Qemu-devel] [RFC v2 4/4] hw/arm/virt: Add generic-pci device support

2014-11-24 Thread alvise rigo
Yes, I forgot to remove this hard-coded (wrong) value. I will fix it in the next release. On Mon, Nov 24, 2014 at 11:38 AM, Claudio Fontana < claudio.font...@huawei.com> wrote: > On 21.11.2014 19:07, Alvise Rigo wrote: > > Instantiate a generic-pci PCI controller to add a PCI bus to the > > mach-

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

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 11:11, Ming Lei wrote: > Yes, the above change need the corresponding comment, but this > patch needn't since the 1st case won't reach here, :-) I'm not sure I follow, but you can send v4 with a clearer comment I guess. :) Paolo

[Qemu-devel] [PATCH v2] hw/arm/boot: fix uninitialized scalar variable warning reported by coverity

2014-11-24 Thread zhanghailiang
Coverity reports the 'size' may be used uninitialized, but that can't happen, because the caller has checked "if (binfo->dtb_filename || binfo->get_dtb)" before call 'load_dtb'. Here we simply remove the 'if (binfo->get_dtb)' to satisfy coverity. Signed-off-by: zhanghailiang --- v2: - add a note

Re: [Qemu-devel] [PATCH] mips: Fix the 64-bit case for microMIPS MOVE16 and MOVEP

2014-11-24 Thread Leon Alrae
On 12/11/2014 15:21, Maciej W. Rozycki wrote: > Fix microMIPS MOVE16 and MOVEP instructions on 64-bit processors by > using register addition operations. > > This copies the approach taken with MIPS16 MOVE instructions (I8_MOV32R > and I8_MOVR32 opcodes) and follows the observation that OPC_ADDU

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

2014-11-24 Thread Ming Lei
In the submit path, we can't complete request directly, 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 in following completion cb which is run in BH context

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

2014-11-24 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 v4 0/3] linux-aio: fix batch submission

2014-11-24 Thread Ming Lei
The 1st patch fixes batch submission. The 2nd one fixes -EAGAIN for non-batch case. The 3rd one is a cleanup. This patchset is splitted from previous patchset(dataplane: optimization and multi virtqueue support), as suggested by Stefan. V4: - abort reuqests in BH to abvoid potential "Co

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

2014-11-24 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. Reviewed-by: Paolo Bonzini 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-ai

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

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 12:31, Ming Lei wrote: > +/* don't submit until next completion for -EAGAIN of non plug case */ > +if (unlikely(!s->io_q.plugged)) { > +return 0; > +} > + > /* submit immediately if queue depth is above 2/3 */ > if (idx > s->io_q.size * 2 / 3) { >

Re: [Qemu-devel] [PATCH v4 1/3] linux-aio: fix submit aio as a batch

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 12:31, Ming Lei wrote: > +static int ioq_enqueue(struct qemu_laio_state *s, struct iocb *iocb) > { > unsigned int idx = s->io_q.idx; > > +if (unlikely(idx == s->io_q.size)) { > +ioq_submit(s); > +return -EAGAIN; Only return -EAGAIN if ioq_submit(s) retur

Re: [Qemu-devel] [PATCH v4 0/3] linux-aio: fix batch submission

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 12:31, Ming Lei wrote: > The 1st patch fixes batch submission. > > The 2nd one fixes -EAGAIN for non-batch case. > > The 3rd one is a cleanup. > > This patchset is splitted from previous patchset(dataplane: optimization > and multi virtqueue support), as suggested by Stefan. Jus

Re: [Qemu-devel] [RFC v2 1/4] hw/arm/virt: Allow multiple agents to modify dt

2014-11-24 Thread Claudio Fontana
On 21.11.2014 19:07, Alvise Rigo wrote: > Keep a global list with all the functions that need to modify the device > tree. Using qemu_add_machine_init_done_notifier we register a notifier > that executes all the functions on the list and loads the kernel. > > Signed-off-by: Alvise Rigo Peter, c

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

2014-11-24 Thread Ming Lei
On Mon, Nov 24, 2014 at 7:38 PM, Paolo Bonzini wrote: > > > On 24/11/2014 12:31, Ming Lei wrote: >> +/* don't submit until next completion for -EAGAIN of non plug case */ >> +if (unlikely(!s->io_q.plugged)) { >> +return 0; >> +} >> + >> /* submit immediately if queue depth

Re: [Qemu-devel] [PATCH 2/2] vga: flip qemu 2.2 pc machine types from cirrus to stdvga

2014-11-24 Thread Michael S. Tsirkin
On Mon, Nov 24, 2014 at 09:55:11AM +0100, Gerd Hoffmann wrote: > On So, 2014-11-23 at 14:11 +0200, Michael S. Tsirkin wrote: > > On Tue, Oct 28, 2014 at 10:09:12AM +0100, Gerd Hoffmann wrote: > > > This patch switches the default display from cirrus to vga > > > for the new (qemu 2.2+) machine type

Re: [Qemu-devel] [PATCH v4 1/3] linux-aio: fix submit aio as a batch

2014-11-24 Thread Ming Lei
On Mon, Nov 24, 2014 at 7:39 PM, Paolo Bonzini wrote: > > > On 24/11/2014 12:31, Ming Lei wrote: >> +static int ioq_enqueue(struct qemu_laio_state *s, struct iocb *iocb) >> { >> unsigned int idx = s->io_q.idx; >> >> +if (unlikely(idx == s->io_q.size)) { >> +ioq_submit(s); >> +

Re: [Qemu-devel] "File too large" error from "qemu-img snapshot" (was Re: AW: Bug Repoting Directions Request)

2014-11-24 Thread Paolo Bonzini
On 22/11/2014 18:02, Prof. Dr. Michael Schefczyk wrote: > The further features seem to be reserved to RHEL (and potentially > other distributions) but not included in Centos: > > virsh snapshot-create-as issues "Live Disk Snapshot not supported in > this version of QEMU" (retranslated from Germa

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

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 12:49, Ming Lei wrote: > On Mon, Nov 24, 2014 at 7:38 PM, Paolo Bonzini wrote: >> >> >> On 24/11/2014 12:31, Ming Lei wrote: >>> +/* don't submit until next completion for -EAGAIN of non plug case */ >>> +if (unlikely(!s->io_q.plugged)) { >>> +return 0; >>> +} >

[Qemu-devel] [PATCH RESEND for 2.3 5/6] migration: optimize xbzrle by reducing data copy

2014-11-24 Thread arei.gonglei
From: ChenLiang Signed-off-by: ChenLiang Signed-off-by: Gonglei Reviewed-by: Dr. David Alan Gilbert --- arch_init.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/arch_init.c b/arch_init.c index 846e4c5..0d0ba4a 100644 --- a/arch_init.c +++ b/arch_init.c @@ -376,1

[Qemu-devel] [PATCH RESEND for 2.3 6/6] migration: clear the dead code

2014-11-24 Thread arei.gonglei
From: ChenLiang clear the dead code Signed-off-by: ChenLiang Signed-off-by: Gonglei Reviewed-by: Juan Quintela --- arch_init.c | 12 page_cache.c | 58 -- 2 files changed, 70 deletions(-) diff --git a/arch_init.c b/arch_i

[Qemu-devel] [PATCH RESEND for 2.3 3/6] xbzrle: don't check the value in the vm ram repeatedly

2014-11-24 Thread arei.gonglei
From: ChenLiang xbzrle_encode_buffer checks the value in the vm ram repeatedly. It is risk if runs xbzrle_encode_buffer on changing data. Signed-off-by: ChenLiang Signed-off-by: Gonglei Reviewed-by: Dr. David Alan Gilbert --- xbzrle.c | 16 1 file changed, 12 insertions(+),

[Qemu-devel] [PATCH RESEND for 2.3 4/6] xbzrle: check 8 bytes at a time after an concurrency scene

2014-11-24 Thread arei.gonglei
From: ChenLiang The logic of old code is correct. But Checking byte by byte will consume time after an concurrency scene. Signed-off-by: ChenLiang Signed-off-by: Gonglei --- xbzrle.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/xbzrle.c b/

[Qemu-devel] [PATCH RESEND for 2.3 1/6] xbzrle: optimize XBZRLE to decrease the cache misses

2014-11-24 Thread arei.gonglei
From: ChenLiang Avoid hot pages being replaced by others to remarkably decrease cache misses Sample results with the test program which quote from xbzrle.txt ran in vm:(migrate bandwidth:1GE and xbzrle cache size 8MB) the test program: include include int main() { char *buf = (char

[Qemu-devel] [PATCH RESEND for 2.3 2/6] xbzrle: rebuild the cache_is_cached function

2014-11-24 Thread arei.gonglei
From: ChenLiang Rebuild the cache_is_cached function by cache_get_by_addr. And drops the asserts because the caller is also asserting the same thing. Signed-off-by: ChenLiang Signed-off-by: Gonglei Reviewed-by: Dr. David Alan Gilbert --- page_cache.c | 38

Re: [Qemu-devel] [PATCH v2 5/5] libqos: Add virtio MMIO support

2014-11-24 Thread Stefan Hajnoczi
On Sun, Nov 23, 2014 at 12:41:25PM +0100, Marc Marí wrote: > El Mon, 17 Nov 2014 15:48:09 + > Stefan Hajnoczi escribió: > > On Sat, Nov 01, 2014 at 06:02:30PM +0100, Marc Marí wrote: > > > > > +static void mmio_basic(void) > > > +{ > > > +QVirtioMMIODevice *dev; > > > +QVirtQueue *vq;

[Qemu-devel] [PATCH RESEND for 2.3 0/6] xbzrle: optimize the xbzrle

2014-11-24 Thread arei.gonglei
From: ChenLiang Hi, This set of patches rebase on https://lists.nongnu.org/archive/html/qemu-devel/2014-04/msg04956.html, Those patches have been reviewed before half a year. For now I rebase them with the master branch. Hope those optimization can be merged in Qemu-2.3, Thanks! a. Optimizat

Re: [Qemu-devel] [PATCH for-2.2] Revert "qemu-img info: show nocow info"

2014-11-24 Thread Stefan Hajnoczi
On Fri, Nov 21, 2014 at 06:05:30PM +0100, Kevin Wolf wrote: > This reverts commit 000c4dfff4d7686e2fba3066a477a1290ed60622. > > The main reason for reverting this commit before the 2.2 release is that > it adds a QAPI interface that we don't want to keep: The 'nocow' flag > doesn't generally make

[Qemu-devel] strange behavior when using iotune

2014-11-24 Thread Vasiliy Tolstov
Hi. I'm try to shape disk via total_iops_sec in libvirt libvirt 1.2.10 qemu 2.0.0 Firstly when i'm run vm with predefined 5000 i have around 11000 iops (dd if=/dev/sda bs=512K of=/dev/null) After that i'm try to set via virsh --total_iops_sec 10 to want to minimize io, but nothing changed. After t

Re: [Qemu-devel] [PATCH 2/2] vga: flip qemu 2.2 pc machine types from cirrus to stdvga

2014-11-24 Thread Gerd Hoffmann
Hi, > > > This is not new - it was disabled with -vga std previously - > > > but poses a bigger problem now it's the default? > > > Thoughts? Something we can fix for 2.2? > > > > Which windows version is this? > > > > I'm wondering why windows handles stdvga different from cirrus. Recent >

Re: [Qemu-devel] [PATCH v2 5/5] libqos: Add virtio MMIO support

2014-11-24 Thread Marc Marí
El Mon, 24 Nov 2014 11:59:19 + Stefan Hajnoczi escribió: > On Sun, Nov 23, 2014 at 12:41:25PM +0100, Marc Marí wrote: > > El Mon, 17 Nov 2014 15:48:09 + > > Stefan Hajnoczi escribió: > > > On Sat, Nov 01, 2014 at 06:02:30PM +0100, Marc Marí wrote: > > > > > > > +static void mmio_basic(vo

Re: [Qemu-devel] [PULL 00/15] pc, pci, misc bugfixes

2014-11-24 Thread Peter Maydell
On 23 November 2014 at 11:17, Michael S. Tsirkin wrote: > The following changes since commit 0e88f478508b566152c6681f4889ed9830a2c0a5: > > Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into > staging (2014-11-21 14:15:37 +) > > are available in the git repository at:

[Qemu-devel] [PATCH v2] qtest/bios-tables: Add DMAR unit test on intel_iommu for q35

2014-11-24 Thread Vasilis Liaskovitis
The test enables intel_iommu on q35, looks for and reads the DMAR table as well as its only DRHC structure (for now), checking the header and checksums. Signed-off-by: Vasilis Liaskovitis --- tests/bios-tables-test.c | 46 +- 1 file changed, 45 inserti

Re: [Qemu-devel] [PATCH] qtest/bios-tables: Add DMAR unit test on intel_iommu for q35

2014-11-24 Thread Vasilis Liaskovitis
Hi, On Mon, Nov 24, 2014 at 11:37:05AM +0200, Marcel Apfelbaum wrote: > On Sat, 2014-11-22 at 20:05 +0100, Vasilis Liaskovitis wrote: > > The test enables intel_iommu on q35 and reads the DMAR table and its only > > DRHC structure (for now), checking only the header and checksums. > > > > Signed-

[Qemu-devel] [PULL for-2.2 0/3] APIC fixes for 2014-11-24

2014-11-24 Thread Paolo Bonzini
The following changes since commit 0e88f478508b566152c6681f4889ed9830a2c0a5: Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging (2014-11-21 14:15:37 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you t

[Qemu-devel] [PULL 1/3] apic: avoid getting out of halted state on masked PIC interrupts

2014-11-24 Thread Paolo Bonzini
After the next patch, if a masked PIC interrupts causes CPU_INTERRUPT_POLL to be set, the CPU will spuriously get out of halted state. While this is technically valid, we should avoid that. Make CPU_INTERRUPT_POLL run apic_update_irq in the right thread and then look at CPU_INTERRUPT_HARD. If CP

[Qemu-devel] [PULL 3/3] apic: fix incorrect handling of ExtINT interrupts wrt processor priority

2014-11-24 Thread Paolo Bonzini
This fixes another failure with ExtINT, demonstrated by QNX. The failure mode is as follows: - IPI sent to cpu 0 (bit set in APIC irr) - IPI accepted by cpu 0 (bit cleared in irr, set in isr) - IPI sent to cpu 0 (bit set in both irr and isr) - PIC interrupt sent to cpu 0 The PIC interrupt causes

[Qemu-devel] [PULL 2/3] apic: fix loss of IPI due to masked ExtINT

2014-11-24 Thread Paolo Bonzini
This patch fixes an obscure failure of the QNX kernel on QEMU x86 SMP. In QNX, all hardware interrupts come via the PIC, and are delivered by the cpu 0 LAPIC in ExtINT mode, while IPIs are delivered by the LAPIC in fixed mode. This bug happens as follows: - cpu 0 masks a particular PIC interrupt -

Re: [Qemu-devel] [PATCH 2/5] exec: qemu_ram_alloc_device, qemu_ram_resize

2014-11-24 Thread Paolo Bonzini
On 20/11/2014 15:04, Michael S. Tsirkin wrote: > On Thu, Nov 20, 2014 at 02:35:14PM +0100, Markus Armbruster wrote: >> What am I missing here that can justify the complexity of partially >> overriding target configuration in the migration stream plus >> infrastructure for resizing memory? > > Th

Re: [Qemu-devel] [PATCH 3/4] blockdev: acquire AioContext in QMP 'transaction' actions

2014-11-24 Thread Stefan Hajnoczi
On Fri, Nov 21, 2014 at 02:51:30PM +0100, Max Reitz wrote: > On 2014-11-21 at 11:48, Stefan Hajnoczi wrote: > >The transaction QMP command performs operations atomically on a group of > >drives. This command needs to acquire AioContext in order to work > >safely when virtio-blk dataplane IOThreads

Re: [Qemu-devel] strange behavior when using iotune

2014-11-24 Thread Andrey Korolyov
On Mon, Nov 24, 2014 at 3:02 PM, Vasiliy Tolstov wrote: > Hi. I'm try to shape disk via total_iops_sec in libvirt > libvirt 1.2.10 > qemu 2.0.0 > > Firstly when i'm run vm with predefined > 5000 i have around 11000 iops (dd > if=/dev/sda bs=512K of=/dev/null) > After that i'm try to set via virsh

Re: [Qemu-devel] [PATCH 4/4] blockdev: check for BLOCK_OP_TYPE_EXTERNAL_SNAPSHOT

2014-11-24 Thread Stefan Hajnoczi
On Fri, Nov 21, 2014 at 12:58:56PM +0100, Paolo Bonzini wrote: > > > On 21/11/2014 11:49, Stefan Hajnoczi wrote: > > The BLOCK_OP_TYPE_EXTERNAL_SNAPSHOT op blocker exists but was never > > used! Let's fix that so external snapshot can be blocked. > > The patch is about internal snapshots tho. :

[Qemu-devel] [PULL] Block patches for 2.2.0-rc3

2014-11-24 Thread Kevin Wolf
The following changes since commit 0e88f478508b566152c6681f4889ed9830a2c0a5: Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging (2014-11-21 14:15:37 +) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to

[Qemu-devel] [PULL] Revert "qemu-img info: show nocow info"

2014-11-24 Thread Kevin Wolf
This reverts commit 000c4dfff4d7686e2fba3066a477a1290ed60622. The main reason for reverting this commit before the 2.2 release is that it adds a QAPI interface that we don't want to keep: The 'nocow' flag doesn't generally make sense for block nodes, but only for the raw-posix driver. It should th

Re: [Qemu-devel] strange behavior when using iotune

2014-11-24 Thread Vasiliy Tolstov
2014-11-24 16:57 GMT+03:00 Andrey Korolyov : > Hello Vasiliy, > > can you please check actual values via qemu-monitor-command domid '{ > "execute": "query-block"}', just to be sure to pin the potential > problem to the emulator itself? virsh qemu-monitor-command 11151 '{ "execute": "query-block"}'

Re: [Qemu-devel] [PATCH] input: improve docs for input-send-event qmp command

2014-11-24 Thread Markus Armbruster
Gerd Hoffmann writes: > On Fr, 2014-11-21 at 12:59 +0100, Markus Armbruster wrote: >> [Copying Eric] >> >> Gerd Hoffmann writes: >> >> > Text partly suggested by Markus Armbruster >> > >> > Signed-off-by: Gerd Hoffmann >> > --- >> > qapi-schema.json | 12 >> > 1 file changed, 1

[Qemu-devel] [PATCH 08/15] fixup! pc: explicitly check maxmem limit when adding DIMM

2014-11-24 Thread Igor Mammedov
Fix build breakage on 32 bit host: hw/i386/pc.c:1623:9: error: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'ram_addr_t' [-Werror=format] introduced by: pc: explicitly check maxmem limit when adding DIMM Signed-off-by: Igor Mammedov --- hw/i386/pc.

Re: [Qemu-devel] strange behavior when using iotune

2014-11-24 Thread Andrey Korolyov
On Mon, Nov 24, 2014 at 5:09 PM, Vasiliy Tolstov wrote: > 2014-11-24 16:57 GMT+03:00 Andrey Korolyov : >> Hello Vasiliy, >> >> can you please check actual values via qemu-monitor-command domid '{ >> "execute": "query-block"}', just to be sure to pin the potential >> problem to the emulator itself?

Re: [Qemu-devel] [PATCH v2] qtest/bios-tables: Add DMAR unit test on intel_iommu for q35

2014-11-24 Thread Marcel Apfelbaum
On Mon, 2014-11-24 at 14:37 +0100, Vasilis Liaskovitis wrote: > The test enables intel_iommu on q35, looks for and reads the DMAR table as > well > as its only DRHC structure (for now), checking the header and checksums. Hi Vaisilis, I had a deeper look to your patch and the code already checks h

[Qemu-devel] [PATCH v5 0/3] linux-aio: fix batch submission

2014-11-24 Thread Ming Lei
The 1st patch fixes batch submission. The 2nd one fixes -EAGAIN for non-batch case. The 3rd one is a cleanup. This patchset is splitted from previous patchset(dataplane: optimization and multi virtqueue support), as suggested by Stefan. V5: - in case of submission failure, return -EIO for n

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

2014-11-24 Thread Ming Lei
In the submit path, we can't complete request directly, 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 in following completion cb which is run in BH context

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

2014-11-24 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 v5 3/3] linux-aio: remove 'node' from 'struct qemu_laiocb'

2014-11-24 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. Reviewed-by: Paolo Bonzini 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-ai

Re: [Qemu-devel] [PATCH v5 0/3] linux-aio: fix batch submission

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 15:29, Ming Lei wrote: > The 1st patch fixes batch submission. > > The 2nd one fixes -EAGAIN for non-batch case. > > The 3rd one is a cleanup. > > This patchset is splitted from previous patchset(dataplane: optimization > and multi virtqueue support), as suggested by Stefan. > >

Re: [Qemu-devel] [PATCH] input: improve docs for input-send-event qmp command

2014-11-24 Thread Gerd Hoffmann
Hi, > >> > # @console: #optional console to send event(s) to. > >> > +# This parameter can be used to send the input event to > >> > +# specific input devices in case (a) multiple input devices > >> > +# of the same kind are added to the virtual machine and (b) > >

[Qemu-devel] [PATCH for-2.2] qmp: document input-send-event detail

2014-11-24 Thread Amos Kong
This patch documents what exactly input-send-event is supposed to do. Signed-off-by: Amos Kong --- qapi-schema.json | 11 +++ 1 file changed, 11 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index d0926d9..9aa19bc 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@

Re: [Qemu-devel] [PATCH v5 0/3] linux-aio: fix batch submission

2014-11-24 Thread Ming Lei
On Mon, Nov 24, 2014 at 10:31 PM, Paolo Bonzini wrote: > > > On 24/11/2014 15:29, Ming Lei wrote: >> The 1st patch fixes batch submission. >> >> The 2nd one fixes -EAGAIN for non-batch case. >> >> The 3rd one is a cleanup. >> >> This patchset is splitted from previous patchset(dataplane: optimizat

Re: [Qemu-devel] [RFC v2 3/4] hw/pci-host: Add a generic PCI host controller for virtual platforms

2014-11-24 Thread alvise rigo
Hi Claudio, Thank you for your review. Please see my in-line comments. On Mon, Nov 24, 2014 at 11:34 AM, Claudio Fontana wrote: > On 21.11.2014 19:07, Alvise Rigo wrote: >> Add a generic PCI host controller for virtual platforms, based on the >> previous work by Rob Herring: >> http://lists.gnu.

Re: [Qemu-devel] [PULL for-2.2 0/3] APIC fixes for 2014-11-24

2014-11-24 Thread Peter Maydell
On 24 November 2014 at 13:40, Paolo Bonzini wrote: > The following changes since commit 0e88f478508b566152c6681f4889ed9830a2c0a5: > > Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into > staging (2014-11-21 14:15:37 +) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH v4 0/2] hw/pci: fixed hotplug crash when using rombar=0 with devices having romfile

2014-11-24 Thread Marcel Apfelbaum
On Mon, 2014-10-27 at 19:34 +0200, Marcel Apfelbaum wrote: > Hot-plugging a device that has a romfile (either supplied by user > or built-in) using rombar=0 option is a user error, > do not allow the device to be hot-plugged. Hi Michael, The series has been reviewed, can you please add it to your

  1   2   >