[Qemu-devel] [PATCH 00/17 v3] spapr: migration, pci, msi, power8

2013-06-27 Thread Alexey Kardashevskiy
This series spent quite a lot of time waiting when David's PCI series reaches the upstream but it does not seem to happen soon so I rebased those on top of agraf/ppc-next rebased on top qemu.org/master. While this series applies and compiles, the migration will often fail until the migration:

[Qemu-devel] [PATCH 04/17] target-ppc: Convert ppc cpu savevm to VMStateDescription

2013-06-27 Thread Alexey Kardashevskiy
From: David Gibson da...@gibson.dropbear.id.au The savevm code for the powerpc cpu emulation is currently based around the old register_savevm() rather than register_vmstate() method. It's also rather broken, missing some important state on some CPU models. This patch completely rewrites the

[Qemu-devel] [PATCH 02/17] pseries: rework XICS

2013-06-27 Thread Alexey Kardashevskiy
Currently XICS interrupt controller is not a QEMU device. As we are going to support in-kernel emulated XICS which is a part of KVM, it make sense not to extend the existing XICS and have multiple KVM stub functions but to create yet another device and share pieces between fully emulated XICS and

[Qemu-devel] [PATCH 01/17] pseries: move interrupt controllers to hw/intc/

2013-06-27 Thread Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- default-configs/ppc64-softmmu.mak |1 + hw/intc/Makefile.objs |1 + hw/{ppc = intc}/xics.c |0 hw/ppc/Makefile.objs |2 +- 4 files changed, 3 insertions(+), 1 deletion(-) rename hw/{ppc =

[Qemu-devel] [PATCH 07/17] pseries: savevm support for PAPR VIO logical lan

2013-06-27 Thread Alexey Kardashevskiy
From: David Gibson da...@gibson.dropbear.id.au This patch adds the necessary VMStateDescription information to support savevm/loadvm for the spapr_llan (PAPR logical lan) device. Signed-off-by: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru ---

[Qemu-devel] [PATCH 03/17] savevm: Implement VMS_DIVIDE flag

2013-06-27 Thread Alexey Kardashevskiy
From: David Gibson da...@gibson.dropbear.id.au The vmstate infrastructure includes a VMS_MULTIPY flag, and associated VMSTATE_VBUFFER_MULTIPLY helper macro. These can be used to save a variably sized buffer where the size in bytes of the buffer isn't directly accessible as a structure field, but

[Qemu-devel] [PATCH 08/17] pseries: savevm support for PAPR TCE tables

2013-06-27 Thread Alexey Kardashevskiy
From: David Gibson da...@gibson.dropbear.id.au This patch adds the necessary VMStateDescription information to save the state of PAPR TCE tables (that is, the PAPR specified IOMMU). Signed-off-by: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru ---

[Qemu-devel] [PATCH 05/17] pseries: savevm support for XICS interrupt controller

2013-06-27 Thread Alexey Kardashevskiy
From: David Gibson da...@gibson.dropbear.id.au This patch adds the necessary VMStateDescription information to support savevm/loadvm for the XICS interrupt controller used on the pseries machine. Signed-off-by: David Gibson da...@gibson.dropbear.id.au [aik: added ics_resend() on post_load]

[Qemu-devel] [PATCH 13/17] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN

2013-06-27 Thread Alexey Kardashevskiy
From: David Gibson da...@gibson.dropbear.id.au Recent PowerKVM allows the kernel to intercept some RTAS calls from the guest directly. This is used to implement the more efficient in-kernel XICS for example. qemu is still responsible for assigning the RTAS token numbers however, and needs to

[Qemu-devel] [PATCH 10/17] pseries: savevm support for PAPR virtual SCSI

2013-06-27 Thread Alexey Kardashevskiy
From: David Gibson da...@gibson.dropbear.id.au This patch adds the necessary support for saving the state of the PAPR VIO virtual SCSI device. This also saves and restores active SCSI requests. [aik: implemented vscsi_req save/restore] Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Cc: David

[Qemu-devel] [PATCH 06/17] pseries: savevm support for VIO devices

2013-06-27 Thread Alexey Kardashevskiy
From: David Gibson da...@gibson.dropbear.id.au This patch adds helpers to allow PAPR VIO devices to save state common to all VIO devices during savevm. Signed-off-by: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- hw/ppc/spapr_vio.c |

[Qemu-devel] [PATCH 11/17] pseries: savevm support for pseries machine

2013-06-27 Thread Alexey Kardashevskiy
From: David Gibson da...@gibson.dropbear.id.au This adds the necessary pieces to implement savevm / migration for the pseries machine. The most complex part here is migrating the hash table - for the paravirtualized pseries machine the guest's hash page table is not stored within guest memory,

[Qemu-devel] [PATCH 09/17] pseries: rework PAPR virtual SCSI

2013-06-27 Thread Alexey Kardashevskiy
The patch reimplements handling of indirect requests in order to simplify upcoming live migration support. - all pointers (except SCSIRequest*) were replaces with integer indexes and offsets; - DMA'ed srp_direct_buf kept untouched (ie. BE format); - vscsi_fetch_desc() is added, now it is the only

[Qemu-devel] [PATCH 14/17] pseries: Support for in-kernel XICS interrupt controller

2013-06-27 Thread Alexey Kardashevskiy
From: David Gibson da...@gibson.dropbear.id.au Recent (host) kernels support emulating the PAPR defined XICS interrupt controller system within KVM. This patch allows qemu to initialize and configure the in-kernel XICS, and keep its state in sync with qemu's XICS state as necessary. This should

[Qemu-devel] [PATCH 12/17] pseries: savevm support for PCI host bridge

2013-06-27 Thread Alexey Kardashevskiy
From: David Gibson da...@gibson.dropbear.id.au This adds the necessary support for saving the state of the PAPR virtual PCI host bridge (or host bridges). Signed-off-by: David Gibson da...@gibson.dropbear.id.au Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru --- hw/ppc/spapr_pci.c |

[Qemu-devel] [PATCH 17/17] spapr-pci: rework MSI/MSIX

2013-06-27 Thread Alexey Kardashevskiy
The specific of sPAPR platform is that the guest allocates MSI/MSIX vectors via RTAS hypercalls and only operates with global IRQ numbers. In the real hardware, PHB is expected to convert MSIMessage to an IRQ number. So it is up to the host kernel to setup correct MSIMessage in a real device and a

[Qemu-devel] [PATCH 15/17] pseries: savevm support with KVM

2013-06-27 Thread Alexey Kardashevskiy
From: David Gibson da...@gibson.dropbear.id.au At present, the savevm / migration support for the pseries machine will not work when KVM is enabled. That's because KVM manages the guest's hash page table in the host kernel, so qemu has no visibility of it. This patch fixes this by using new

[Qemu-devel] [PATCH 16/17] ppc64: Enable QEMU to run on POWER 8 DD1 chip.

2013-06-27 Thread Alexey Kardashevskiy
From: Prerna Saxena pre...@linux.vnet.ibm.com This patch enables QEMU to launch VM guests on POWER8 chip. I have tested this to work with BML kernel on P8 dd1 chip. Signed-off-by: Prerna Saxena pre...@linux.vnet.ibm.com Signed-off-by: Alexey Kardashevskiy a...@ozlabs.ru Reviewed-by: Paul

Re: [Qemu-devel] [PATCH v5 05/14] vl: handle -device dimm

2013-06-27 Thread Paolo Bonzini
Il 27/06/2013 07:08, Wanlong Gao ha scritto: Do we really need to specify the memory range? I suspect that we can follow current design of normal memory in hot-plug memory. I think we can do both. I'm afraid that the configuration of the VM will not be perfectly reproducible without specifying

Re: [Qemu-devel] [PATCH 0/3] make bh safe with hot-unplug

2013-06-27 Thread Paolo Bonzini
Il 27/06/2013 04:08, liu ping fan ha scritto: qdev_free is triggered by the guest, but free is a misnomer. It is really make it inaccessible from the guest and management (the kernel equivalent would be removal of /dev and /sys entries, for example). The actual free will happen later.

Re: [Qemu-devel] [PATCH] vmdk: remove wrong calculation of relative path

2013-06-27 Thread Paolo Bonzini
Il 26/06/2013 17:05, Kevin Wolf ha scritto: Am 26.06.2013 um 11:24 hat Fam Zheng geschrieben: When creating image with backing file, the driver tries to calculate the relative path from created image file to backing file, but the path computation is incorrect. e.g.: $ qemu-img

Re: [Qemu-devel] [PATCH v4 0/9] Make 'dump-guest-memory' dump in kdump-compressed format

2013-06-27 Thread Qiao Nuohan
Sorry for replying late. On 06/20/2013 04:57 PM, Stefan Hajnoczi wrote: Please link to the code that writes DISKDUMP kdump files on a physical machine. I only see the crash utility code to read the DISKDUMP code but I haven't found anything in the Linux kernel, the crash utility, or the

[Qemu-devel] [Bug 1195012] Re: x86_64 and i386 return 0 when reading MSR_TSC

2013-06-27 Thread Jeff Rizzo
I should mention, the NetBSD 6.1 ISO I used for testing is here: http://iso.netbsd.org/pub/NetBSD/iso/6.1/NetBSD-6.1-amd64.iso -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1195012 Title: x86_64

[Qemu-devel] [Bug 1195012] [NEW] x86_64 and i386 return 0 when reading MSR_TSC

2013-06-27 Thread Jeff Rizzo
Public bug reported: Running NetBSD 6.1 (i386 and amd64) under QEMU (from git - 1.5.50 is the version it shows) results in an incorrectly set TSC frequency (set to 0), because NetBSD uses rdmsr(TSC_MSR) for its serializing CPU counter. To reproduce the problem, you can run an install ISO of

[Qemu-devel] [Bug 1195170] [NEW] cpu hot-add doesn't work with upstream qemu 1.5.50

2013-06-27 Thread chandrashekar shastri
Public bug reported: cpu hot-add doesn't work with upstream qemu 1.5.50. When we add the cpu [through QMP] it throws error as {error: {class: GenericError, desc: Unable to add CPU: 2, max allowed: 1}} , when we have booted the guest with two cpus. Host Kernel Version: 3.10.0-rc5+ Libvirt

[Qemu-devel] [Bug 1195012] Re: x86_64 and i386 return 0 when reading MSR_TSC

2013-06-27 Thread Jeff Rizzo
The NetBSD problem report where this issue was raised: http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=47967 a workaround has been put in place for now, but it would be good to fix this in QEMU. -- You received this bug notification because you are a member of qemu- devel-ml, which

Re: [Qemu-devel] qemu-img create encryption

2013-06-27 Thread Markus Armbruster
Hamilton, Peter A. peter.hamil...@jhuapl.edu writes: I've been doing some work with qemu-img and encrypted qcow2 images and have noticed that qemu-img create does not prompt for a password to encrypt new images, defaulting (from the documentation I've read) to the empty string as a password.

[Qemu-devel] [PATCH] hw/mips: align initrd to 64KB to avoid kernel error

2013-06-27 Thread Leon Alrae
From: James Hogan james.ho...@imgtec.com The Linux kernel can be configured to use 64KB pages, but it also requires initrd to be page aligned. Therefore, to be safe, align the initrd to 64KB using a new INITRD_PAGE_MASK rather than TARGET_PAGE_MASK. Signed-off-by: James Hogan

[Qemu-devel] [PATCH 0/2] Add infinite loop checking in img_create()

2013-06-27 Thread Xu Wang
From: Xu Wang cngesa...@outlook.com If user creates a image with loop in backing file, qemu doesn't give any warning or error report and creation successful. If this image was opend by qemu, no response would occure and segment fault would happend at last. Hence these patches refine and export

[Qemu-devel] [PATCH 2/2] Check infinite loop in img_create()

2013-06-27 Thread Xu Wang
From: Xu Wang cngesa...@outlook.com Signed-off-by: Xu Wang cngesa...@outlook.com --- qemu-img.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/qemu-img.c b/qemu-img.c index 0bc265d..fe11421 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -415,6 +415,7 @@ static int img_create(int

[Qemu-devel] [PATCH 1/2] Refine and export infinite loop checking in collect_image_info_list()

2013-06-27 Thread Xu Wang
From: Xu Wang cngesa...@outlook.com Signed-off-by: Xu Wang cngesa...@outlook.com --- qemu-img.c | 110 + 1 file changed, 89 insertions(+), 21 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 809b4f1..0bc265d 100644 ---

[Qemu-devel] Level of details in log file

2013-06-27 Thread ammad rehmat
Hi, I am trying to debug my program with the help of QEMU, I use the following command to generate the log : ./mips64-softmmu/qemu-system-mips64 -d in_asm,cpu,int,exec -m 1024 -M octeon -nographic -bios ~/work/sme_test/guest/OCTEON-SDK/bootloader/u-boot/u-boot-octeon_ebh5610.bin The problem is

Re: [Qemu-devel] [PATCH] vmdk: remove wrong calculation of relative path

2013-06-27 Thread Kevin Wolf
Am 27.06.2013 um 09:09 hat Paolo Bonzini geschrieben: Il 26/06/2013 17:05, Kevin Wolf ha scritto: Am 26.06.2013 um 11:24 hat Fam Zheng geschrieben: When creating image with backing file, the driver tries to calculate the relative path from created image file to backing file, but the path

[Qemu-devel] [Bug 1195170] Re: cpu hot-add doesn't work with upstream qemu 1.5.50

2013-06-27 Thread Paolo Bonzini
You need to specify -smp maxcpus=N on the command-line, for example -smp cpus=2,maxcpus=4 will start the VM with 2 CPUs and let you add 2 more. Also, the argument to cpu-add is zero-based, so the range is 0..(maxcpus-1). ** Changed in: qemu Status: New = Invalid -- You received this bug

Re: [Qemu-devel] [PATCH] hw/mips: align initrd to 64KB to avoid kernel error

2013-06-27 Thread Peter Maydell
On 27 June 2013 08:35, Leon Alrae leon.al...@imgtec.com wrote: From: James Hogan james.ho...@imgtec.com The Linux kernel can be configured to use 64KB pages, but it also requires initrd to be page aligned. Therefore, to be safe, align the initrd to 64KB using a new INITRD_PAGE_MASK rather

Re: [Qemu-devel] [RFC PATCH 1/3] block: add target-id option to drive-backup QMP command

2013-06-27 Thread Stefan Hajnoczi
On Wed, Jun 26, 2013 at 11:59:19AM +0800, Fam Zheng wrote: Add target-id (optional) to drive-backup command, to make the target bs a named drive so that we can operate on it (e.g. export with NBD). Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 4 +++- qapi-schema.json |

Re: [Qemu-devel] [RFC PATCH 0/3] Point-in-time snapshot exporting with drive-backup

2013-06-27 Thread Stefan Hajnoczi
On Wed, Jun 26, 2013 at 03:31:19PM +0800, Fam Zheng wrote: On Wed, 06/26 09:23, Paolo Bonzini wrote: Il 26/06/2013 05:59, Fam Zheng ha scritto: This leads to another observation: a sync:'none' block-backup job probably should never complete, and should instead go on until explicit

Re: [Qemu-devel] [Xen-devel] [PATCH] Add Xen platform PCI device version 2.

2013-06-27 Thread Paul Durrant
-Original Message- From: Alex Bligh [mailto:a...@alex.org.uk] Sent: 26 June 2013 21:00 To: Paul Durrant; Tim (Xen.org) Cc: Ian Campbell; Matt Wilson; xen-de...@lists.xen.org; qemu- de...@nongnu.org; Alex Bligh Subject: RE: [Xen-devel] [Qemu-devel] [PATCH] Add Xen platform PCI device

Re: [Qemu-devel] [PATCH v4 0/9] Make 'dump-guest-memory' dump in kdump-compressed format

2013-06-27 Thread Stefan Hajnoczi
On Thu, Jun 27, 2013 at 03:11:09PM +0800, Qiao Nuohan wrote: You asked about using ELF more efficiently. For implementing *excluding zero* pages, *PT_LOAD* can be made use of. p_memsz and p_filesz fields of PT_LOAD entry are used to describe memory size and the size of corresponding data in

Re: [Qemu-devel] [RFC] qemu-img: add option -d in convert

2013-06-27 Thread Stefan Hajnoczi
On Tue, Jun 25, 2013 at 07:14:19PM +0800, Wenchao Xia wrote: 于 2013-6-25 17:13, Stefan Hajnoczi 写道: On Thu, Jun 20, 2013 at 04:59:17PM +0800, Wenchao Xia wrote: If I understand correctly, you have a backing chain with internal snapshots: imageA(sn0)-imageB(sn0,sn1)-imageC(sn0) And you

Re: [Qemu-devel] [Bug 1195170] Re: cpu hot-add doesn't work with upstream qemu 1.5.50

2013-06-27 Thread chandrashekar shastri
Hi Bonzini, Thanks, cpu hot-plug is working. Could you please help me with cpu hot-unplug It is working. Thanks, chandrashekar On 06/27/2013 01:19 PM, Paolo Bonzini wrote: You need to specify -smp maxcpus=N on the command-line, for example -smp cpus=2,maxcpus=4 will start the VM with 2 CPUs

Re: [Qemu-devel] [Bug 1195170] Re: cpu hot-add doesn't work with upstream qemu 1.5.50

2013-06-27 Thread Paolo Bonzini
Il 27/06/2013 11:03, chandrashekar shastri ha scritto: Hi Bonzini, Thanks, cpu hot-plug is working. Could you please help me with cpu hot-unplug It is working. It is not implemented yet. Paolo -- You received this bug notification because you are a member of qemu- devel-ml, which is

Re: [Qemu-devel] [Bug 1195170] Re: cpu hot-add doesn't work with upstream qemu 1.5.50

2013-06-27 Thread chandrashekar shastri
Ok. Thanks. On 06/27/2013 02:39 PM, Paolo Bonzini wrote: Il 27/06/2013 11:03, chandrashekar shastri ha scritto: Hi Bonzini, Thanks, cpu hot-plug is working. Could you please help me with cpu hot-unplug It is working. It is not implemented yet. Paolo -- You received this bug

Re: [Qemu-devel] qemu-img create encryption

2013-06-27 Thread Daniel P. Berrange
On Wed, Jun 26, 2013 at 02:52:51PM -0400, Hamilton, Peter A. wrote: I've been doing some work with qemu-img and encrypted qcow2 images and have noticed that qemu-img create does not prompt for a password to encrypt new images, defaulting (from the documentation I've read) to the empty string as

Re: [Qemu-devel] [PATCH] block: Make BlockJobTypes const

2013-06-27 Thread Stefan Hajnoczi
On Tue, Jun 25, 2013 at 03:15:12PM +0200, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- block/commit.c | 2 +- block/mirror.c | 2 +- block/stream.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com

Re: [Qemu-devel] [RFC PATCH 1/3] block: add target-id option to drive-backup QMP command

2013-06-27 Thread Fam Zheng
On Thu, 06/27 10:15, Stefan Hajnoczi wrote: On Wed, Jun 26, 2013 at 11:59:19AM +0800, Fam Zheng wrote: Add target-id (optional) to drive-backup command, to make the target bs a named drive so that we can operate on it (e.g. export with NBD). Signed-off-by: Fam Zheng f...@redhat.com ---

Re: [Qemu-devel] [PATCH 1/2] fbdev: add linux framebuffer display driver.

2013-06-27 Thread Gerd Hoffmann
Hi, +/* open framebuffer */ +if (device == NULL) { +device = getenv(FRAMEBUFFER); +} +if (device == NULL) { +device = /dev/fb0; +} Maybe this is a matter of taste, but I think that having this logic at this layer makes the API harder to use. What

Re: [Qemu-devel] [PATCH 2/2] fbdev: add monitor commands to enable/disable/query

2013-06-27 Thread Gerd Hoffmann
Hi, --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3608,3 +3608,46 @@ '*cpuid-input-ecx': 'int', 'cpuid-register': 'X86CPURegister32', 'features': 'int' } } + +## +# @framebuffer-display: Let me bike-shed: we're trying to make command's

Re: [Qemu-devel] [RFC PATCH 0/3] Point-in-time snapshot exporting with drive-backup

2013-06-27 Thread Paolo Bonzini
Il 27/06/2013 10:17, Stefan Hajnoczi ha scritto: Il 26/06/2013 05:59, Fam Zheng ha scritto: This leads to another observation: a sync:'none' block-backup job probably should never complete, and should instead go on until explicit cancellation. This is because the job does no

Re: [Qemu-devel] [PATCH v4] Add timestamp to error message

2013-06-27 Thread Laszlo Ersek
comments below On 06/27/13 04:08, Seiji Aguchi wrote: [Issue] When we offer a customer support service and a problem happens in a customer's system, we try to understand the problem by comparing what the customer reports with message logs of the customer's system. In this case, we often

[Qemu-devel] [PULL 00/12] migration queue

2013-06-27 Thread Juan Quintela
Hi Anthony, please pull. - improve error message (Alon) - Make zero pages to work again (Peter Lieven) - First 10 patches of RDMA support Thanks, Juan. The following changes since commit 3e5087329489e0beceecf3426f1216619821937f: Merge remote-tracking branch

Re: [Qemu-devel] [PULL 2/8] i.MX: Implement a more complete version of the GPT timer.

2013-06-27 Thread Peter Maydell
On 26 June 2013 23:32, Jean-Christophe DUBOIS j...@tribudubois.net wrote: On 06/27/2013 12:15 AM, Peter Maydell wrote: Just leave the memory region and vmstate names as they were before your patches. OK, I will. Now, please notice that the EPIT timer has been changed recently (on main

Re: [Qemu-devel] [RFC PATCH 1/3] block: add target-id option to drive-backup QMP command

2013-06-27 Thread Paolo Bonzini
Il 27/06/2013 11:41, Fam Zheng ha scritto: On Thu, 06/27 10:15, Stefan Hajnoczi wrote: On Wed, Jun 26, 2013 at 11:59:19AM +0800, Fam Zheng wrote: Add target-id (optional) to drive-backup command, to make the target bs a named drive so that we can operate on it (e.g. export with NBD).

Re: [Qemu-devel] [Xen-devel] [PATCH] Add Xen platform PCI device version 2.

2013-06-27 Thread Paul Durrant
-Original Message- From: qemu-devel-bounces+paul.durrant=citrix@nongnu.org [mailto:qemu-devel-bounces+paul.durrant=citrix@nongnu.org] On Behalf Of Paul Durrant Sent: 27 June 2013 09:29 To: Alex Bligh; Tim (Xen.org) Cc: qemu-devel@nongnu.org; Ian Campbell; Matt Wilson; xen-

[Qemu-devel] [PATCH] Avoid use of QOM type name macros in VMStateDescriptions

2013-06-27 Thread Peter Maydell
The name field in a VMStateDescription is part of the migration state versioning, so changing it will break migration. It's therefore a bad idea to use a QOM typename macro to initialize it, because in general we're free to rename QOM types as part of code refactoring and cleanup. For the

Re: [Qemu-devel] [RFC PATCH 1/3] block: add target-id option to drive-backup QMP command

2013-06-27 Thread Fam Zheng
On Thu, 06/27 12:57, Paolo Bonzini wrote: Il 27/06/2013 11:41, Fam Zheng ha scritto: On Thu, 06/27 10:15, Stefan Hajnoczi wrote: On Wed, Jun 26, 2013 at 11:59:19AM +0800, Fam Zheng wrote: Add target-id (optional) to drive-backup command, to make the target bs a named drive so that we can

Re: [Qemu-devel] [RFC PATCH 1/3] block: add target-id option to drive-backup QMP command

2013-06-27 Thread Paolo Bonzini
Il 27/06/2013 13:37, Fam Zheng ha scritto: Yes, this makes me realize that ref count it not a solution to retire bs-in_use, because we can't tell if drive-del or block-resize is safe with only reference number. But I can't think of two situations to deny different subsets of

Re: [Qemu-devel] [PATCH] Avoid use of QOM type name macros in VMStateDescriptions

2013-06-27 Thread Gerd Hoffmann
On 06/27/13 13:03, Peter Maydell wrote: The one I didn't touch was hw/usb/host-linux.c, since that changes the QOM typename and the VMStateDescription name depending on whether QEMU was built with CONFIG_USB_LIBUSB defined or not. That seems a bit fishy to me but I've left it alone. vmstate

Re: [Qemu-devel] [PATCH 02/17] pseries: rework XICS

2013-06-27 Thread David Gibson
On Thu, Jun 27, 2013 at 04:45:45PM +1000, Alexey Kardashevskiy wrote: Currently XICS interrupt controller is not a QEMU device. As we are going to support in-kernel emulated XICS which is a part of KVM, it make sense not to extend the existing XICS and have multiple KVM stub functions but to

Re: [Qemu-devel] qemu-img create encryption

2013-06-27 Thread Hamilton, Peter A.
It also means you can't change the password of an existing image - you have to create a new image with a new password re-encrypt the data. Following up on this point, since qemu-img create cannot be used to specify a password, is qemu-img convert the only command that can be used to provide

Re: [Qemu-devel] [PATCH 02/17] pseries: rework XICS

2013-06-27 Thread Alexey Kardashevskiy
On 06/27/2013 09:47 PM, David Gibson wrote: On Thu, Jun 27, 2013 at 04:45:45PM +1000, Alexey Kardashevskiy wrote: Currently XICS interrupt controller is not a QEMU device. As we are going to support in-kernel emulated XICS which is a part of KVM, it make sense not to extend the existing XICS

Re: [Qemu-devel] [PATCH v4 00/17] aio: drop io_flush()

2013-06-27 Thread Stefan Hajnoczi
On Fri, Jun 14, 2013 at 1:43 PM, Stefan Hajnoczi stefa...@redhat.com wrote: v4: * Ensure pending BHs are processed in bdrv_drain_all() [bonzini] v3: * I forgot about this series, time to push it again! * Rebase onto qemu.git/master * Drop now-unused AioFlushHandler typedef [bonzini]

Re: [Qemu-devel] [RFC] qemu-img: add option -d in convert

2013-06-27 Thread Wenchao Xia
于 2013-6-27 17:01, Stefan Hajnoczi 写道: On Tue, Jun 25, 2013 at 07:14:19PM +0800, Wenchao Xia wrote: 于 2013-6-25 17:13, Stefan Hajnoczi 写道: On Thu, Jun 20, 2013 at 04:59:17PM +0800, Wenchao Xia wrote: If I understand correctly, you have a backing chain with internal snapshots:

Re: [Qemu-devel] [RFC] qemu-img: add option -d in convert

2013-06-27 Thread Wenchao Xia
于 2013-6-27 17:01, Stefan Hajnoczi 写道: On Tue, Jun 25, 2013 at 07:14:19PM +0800, Wenchao Xia wrote: 于 2013-6-25 17:13, Stefan Hajnoczi 写道: On Thu, Jun 20, 2013 at 04:59:17PM +0800, Wenchao Xia wrote: If I understand correctly, you have a backing chain with internal snapshots:

Re: [Qemu-devel] qemu-img create encryption

2013-06-27 Thread Daniel P. Berrange
On Thu, Jun 27, 2013 at 08:05:38AM -0400, Hamilton, Peter A. wrote: It also means you can't change the password of an existing image - you have to create a new image with a new password re-encrypt the data. Following up on this point, since qemu-img create cannot be used to specify a

[Qemu-devel] [PATCH 6/8] arm/boot: Allow boards to modify the FDT blob

2013-06-27 Thread Peter Maydell
Add a callback hook in arm_boot_info to allow board models to modify the device tree blob if they need to. (The major expected use case is to add virtio-mmio nodes for virtio-mmio transports that exist in QEMU but not in the hardware.) Signed-off-by: Peter Maydell peter.mayd...@linaro.org ---

[Qemu-devel] Dumping USB packets

2013-06-27 Thread Jordan Bouyat
Hi ! I recently grab a dummy usb driver(https://github.com/pkt/qemu-dummyusb/commit/c5f61398dcebc9831f4ca409553ae85b438f27a2) and modified it to behave like an HID mouse with the help of (hw/usb/dev-hid.c). It works, but my goal is to dump the whole USB packet in order to modify it or replaying

[Qemu-devel] [PATCHv2 03/11] iscsi: add bdrv_co_is_allocated

2013-06-27 Thread Peter Lieven
this patch adds a coroutine for .bdrv_co_is_allocated as well as a generic framework that can be used to build coroutines in block/iscsi. Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 123 + 1 file changed, 123 insertions(+)

[Qemu-devel] [PATCHv2 00/11] iscsi/qemu-img/block-migration enhancements

2013-06-27 Thread Peter Lieven
this series adds logical block provisioning functions to the iscsi layer. it adds the ability to write sparse images to iscsi targets which support UNMAP and LBPRZ via qemu-img. additional block-migration is enhanced to support an encoding for zero blocks on the network and efficiently writing

[Qemu-devel] [PATCHv2 05/11] block: add bdrv_write_zeroes()

2013-06-27 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block.c | 27 +++ include/block/block.h |2 ++ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/block.c b/block.c index 8e77d46..08b7325 100644 --- a/block.c +++ b/block.c @@ -2163,6 +2163,7 @@

[Qemu-devel] [PATCHv2 06/11] block/raw: add bdrv_co_write_zeroes

2013-06-27 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block/raw.c |8 1 file changed, 8 insertions(+) diff --git a/block/raw.c b/block/raw.c index ce10422..8c81de9 100644 --- a/block/raw.c +++ b/block/raw.c @@ -42,6 +42,13 @@ static int coroutine_fn raw_co_is_allocated(BlockDriverState *bs,

[Qemu-devel] [PATCHv2 10/11] iscsi: ignore aio_discard if unsupported

2013-06-27 Thread Peter Lieven
if the target does not support UNMAP or the request is too big silently ignore the discard request. Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c |8 1 file changed, 8 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index e9ecfce..0567b46 100644 ---

[Qemu-devel] [PATCHv2 02/11] iscsi: read unmap info from block limits vpd page

2013-06-27 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 80 - 1 file changed, 56 insertions(+), 24 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index a38a1bf..2e2455d 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -54,6

[Qemu-devel] [PATCHv2 09/11] iscsi: factor out sector conversions

2013-06-27 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 621ca40..e9ecfce 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -293,6 +293,11 @@ static int64_t

[Qemu-devel] [PATCHv2 01/11] iscsi: add logical block provisioning information to iscsilun

2013-06-27 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de Reviewed-by: Paolo Bonzini pbonz...@redhat.com --- block/iscsi.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index 0bbf0b1..a38a1bf 100644 --- a/block/iscsi.c +++

[Qemu-devel] [PATCHv2 04/11] iscsi: add bdrv_co_write_zeroes

2013-06-27 Thread Peter Lieven
write zeroes is emulated by unmap if the target supports unmapping an unmapped blocks read as zero. this emulation is only done if the device was opened with BDRV_O_UNMAP and the request can be handled within a single request. a failback to writev is performed otherwise. Signed-off-by: Peter

Re: [Qemu-devel] [PATCH v4 01/17] block: stop relying on io_flush() in bdrv_drain_all()

2013-06-27 Thread Paolo Bonzini
Il 14/06/2013 13:43, Stefan Hajnoczi ha scritto: If a block driver has no file descriptors to monitor but there are still active requests, it can return 1 from .io_flush(). This is used to spin during synchronous I/O. Stop relying on .io_flush() and instead check

Re: [Qemu-devel] [PATCH v4 03/17] tests: adjust test-aio to new aio_poll() semantics

2013-06-27 Thread Paolo Bonzini
Il 14/06/2013 13:43, Stefan Hajnoczi ha scritto: aio_poll(ctx, true) will soon block if any fd handlers have been set. Previously it would only block when .io_flush() returned true. This means that callers must check their wait condition *before* aio_poll() to avoid deadlock.

[Qemu-devel] [PATCHv2 11/11] iscsi: assert that sectors are aligned to LUN blocksize

2013-06-27 Thread Peter Lieven
if the blocksize of an iSCSI LUN is bigger than the BDRV_SECTOR_SIZE it is possible that sector_num or nb_sectors are not correctly alligned. to avoid corruption we fail requests which are misaligned. Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 27 +++

[Qemu-devel] [PATCHv2 08/11] block-migration: efficiently encode zero blocks

2013-06-27 Thread Peter Lieven
this patch adds a efficient encoding for zero blocks by adding a new flag indiciating a block is completly zero. additionally bdrv_write_zeros() is used at the destination to efficiently write these zeroes. if the driver supports it this avoids blindly allocating all sectors consumed by zero

Re: [Qemu-devel] [PATCH v4 02/17] dataplane/virtio-blk: check exit conditions before aio_poll()

2013-06-27 Thread Paolo Bonzini
Il 14/06/2013 13:43, Stefan Hajnoczi ha scritto: Check exit conditions before entering blocking aio_poll(). This is mainly for consistency since it's unlikely that we are stopping in the first event loop iteration. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com ---

Re: [Qemu-devel] [PATCH v4 05/17] aio: stop using .io_flush()

2013-06-27 Thread Paolo Bonzini
Il 14/06/2013 13:43, Stefan Hajnoczi ha scritto: Now that aio_poll() users check their termination condition themselves, it is no longer necessary to call .io_flush() handlers. The behavior of aio_poll() changes as follows: 1. .io_flush() is no longer invoked and file descriptors are

Re: [Qemu-devel] [PATCH v4 04/17] tests: adjust test-thread-pool to new aio_poll() semantics

2013-06-27 Thread Paolo Bonzini
Il 14/06/2013 13:43, Stefan Hajnoczi ha scritto: -/* Wait until all aio and bh activity has finished */ -static void qemu_aio_wait_all(void) -{ -while (aio_poll(ctx, true)) { -/* Do nothing */ -} -} - static void test_submit(void) { WorkerTestData data = { .n =

Re: [Qemu-devel] [PATCH v4 16/17] tests: drop event_active_cb()

2013-06-27 Thread Paolo Bonzini
Il 14/06/2013 13:44, Stefan Hajnoczi ha scritto: The .io_flush() handler no longer exists and has no users. Drop the io_flush argument to aio_set_fd_handler() and related functions. Wrong commit message, but otherwise Reviewed-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Stefan

Re: [Qemu-devel] [PATCH v4 00/17] aio: drop io_flush()

2013-06-27 Thread Paolo Bonzini
Il 14/06/2013 13:43, Stefan Hajnoczi ha scritto: v4: * Ensure pending BHs are processed in bdrv_drain_all() [bonzini] v3: * I forgot about this series, time to push it again! * Rebase onto qemu.git/master * Drop now-unused AioFlushHandler typedef [bonzini] This series gets rid of

Re: [Qemu-devel] [PATCH v4 17/17] aio: drop io_flush argument

2013-06-27 Thread Paolo Bonzini
Il 14/06/2013 13:44, Stefan Hajnoczi ha scritto: The .io_flush() handler no longer exists and has no users. Drop the io_flush argument to aio_set_fd_handler() and related functions. The AioFlushEventNotifierHandler and AioFlushHandler typedefs are no longer used and are dropped too.

Re: [Qemu-devel] [PATCH 1/2] fbdev: add linux framebuffer display driver.

2013-06-27 Thread Luiz Capitulino
On Thu, 27 Jun 2013 11:58:57 +0200 Gerd Hoffmann kra...@redhat.com wrote: Hi, +/* open framebuffer */ +if (device == NULL) { +device = getenv(FRAMEBUFFER); +} +if (device == NULL) { +device = /dev/fb0; +} Maybe this is a matter of taste,

[Qemu-devel] [PATCH 3/8] virtio: Add support for guest setting of queue size

2013-06-27 Thread Peter Maydell
The MMIO virtio transport spec allows the guest to tell the host how large the queue size is. Add virtio_queue_set_num() function which implements this in the QEMU common virtio support code. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/virtio/virtio.c |6 ++

[Qemu-devel] [PATCH 5/8] virtio: Implement MMIO based virtio transport

2013-06-27 Thread Peter Maydell
Add support for the generic MMIO based virtio transport. This patch includes some fixes for bugs spotted by Ying-Shiuan Pan ys...@itri.org.tw. Signed-off-by: Peter Maydell peter.mayd...@linaro.org [Fred changes: updated to new virtio-bus mechanisms] Signed-off-by: KONRAD Frederic

[Qemu-devel] [PATCH 7/8] vexpress: Make VEDBoardInfo extend arm_boot_info

2013-06-27 Thread Peter Maydell
Make the VEDBoardInfo struct extend arm_boot_info; this will allow us to get at the VEDBoardInfo information inside callbacks from arm/boot code. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/arm/vexpress.c | 31 +++ 1 file changed, 15 insertions(+),

[Qemu-devel] [PATCH 4/8] virtio: Support transports which can specify the vring alignment

2013-06-27 Thread Peter Maydell
Support virtio transports which can specify the vring alignment (ie where the guest communicates this to the host) by providing a new virtio_queue_set_align() function. (The default alignment remains as before.) Transports which wish to make use of this must set the has_variable_vring_alignment

[Qemu-devel] [PATCH 1/8] device_tree: Add qemu_devtree_setprop_sized_cells() utility functions

2013-06-27 Thread Peter Maydell
We already have a qemu_devtree_setprop_cells() which sets a dtb property to an array of cells whose values are specified by varargs. However for the fairly common case of setting a property to a list of addresses or of address,size pairs the number of cells used by each element in the list depends

[Qemu-devel] [PATCH 8/8] vexpress: Add virtio-mmio transports

2013-06-27 Thread Peter Maydell
Add some virtio-mmio transports to the vexpress board model, together with a modify_dtb hook which adds them to the device tree so that the kernel will probe for them. We put them in a reserved area of the address map. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/arm/vexpress.c |

[Qemu-devel] [PATCH 0/8] Add virtio-mmio and use it in vexpress

2013-06-27 Thread Peter Maydell
This patch series adds an implementation of the virtio-mmio transport, and uses it in the vexpress-a9 and vexpress-a15 board models. The basic idea is that the board instantiates some transports, the user can create backends which automatically plug into them (via -device virtio-blk-backend and

Re: [Qemu-devel] [PATCH v4 03/17] tests: adjust test-aio to new aio_poll() semantics

2013-06-27 Thread Paolo Bonzini
Il 14/06/2013 13:43, Stefan Hajnoczi ha scritto: aio_poll(ctx, true) will soon block if any fd handlers have been set. Previously it would only block when .io_flush() returned true. This means that callers must check their wait condition *before* aio_poll() to avoid deadlock.

[Qemu-devel] [PATCH 1/1] qemu-char: Fix ID reuse after chardev-remove for qapi-based init

2013-06-27 Thread Markus Armbruster
Commit 2c5f488 introduced qapi-based character device initialization as a new code path in qemu_chr_new_from_opts(). Unfortunately, it failed to store parameter opts in the new chardev. Therefore, qemu_chr_delete() doesn't delete it. Even though the device is gone, its options linger, and any

Re: [Qemu-devel] [PATCH 2/2] fbdev: add monitor commands to enable/disable/query

2013-06-27 Thread Luiz Capitulino
On Thu, 27 Jun 2013 12:05:33 +0200 Gerd Hoffmann kra...@redhat.com wrote: Hi, --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3608,3 +3608,46 @@ '*cpuid-input-ecx': 'int', 'cpuid-register': 'X86CPURegister32', 'features': 'int' } } +

[Qemu-devel] [PATCH] tests: Multiboot mmap test case

2013-06-27 Thread Kevin Wolf
This adds a test case for Multiboot memory map in the tests/multiboot directory, where future i386 test kernels can be dropped. Because this requires an x86 build host and an installed 32 bit libgcc, the test is not part of a regular 'make check'. The reference output for the test is verified

Re: [Qemu-devel] [PATCH 1/1] qemu-char: Fix ID reuse after chardev-remove for qapi-based init

2013-06-27 Thread Gerd Hoffmann
On 06/27/13 15:25, Markus Armbruster wrote: Commit 2c5f488 introduced qapi-based character device initialization as a new code path in qemu_chr_new_from_opts(). Unfortunately, it failed to store parameter opts in the new chardev. Therefore, qemu_chr_delete() doesn't delete it. Even though

[Qemu-devel] [PATCHv2 07/11] iscsi: let bdrv_create conditionally zero out the device

2013-06-27 Thread Peter Lieven
if the device supports unmapping and unmapped blocks read as zero ensure that the whole device is unmapped and report .has_zero_init = 1 in this case to speed up qemu-img convert. Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 72

  1   2   3   >