Re: [Qemu-devel] [PATCH][RESEND] qemu/kvm_stat: Fix I/O error from kvm_stat

2015-08-31 Thread Hemant Kumar
Hi Wei, Thanks for the review. On 09/01/2015 01:52 AM, Wei Huang wrote: On 08/30/2015 10:42 PM, Hemant Kumar wrote: Running kvm_stat on a powerpc macine where the kernel is compiled with KVM_BOOK3S_HV_EXIT_TIMING config option, generates the following error : # kvm_stat Traceback (most rec

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 0/4] target-ppc: Add FWNMI support in qemu for powerKVM guests

2015-08-31 Thread Aravinda Prasad
On Friday 07 August 2015 09:07 AM, Sam Bobroff wrote: > Hello Aravinda and all, > > On Wed, Jul 08, 2015 at 01:58:13PM +0530, Aravinda Prasad wrote: >> On Friday 03 July 2015 11:31 AM, David Gibson wrote: >>> On Thu, Jul 02, 2015 at 07:11:52PM +1000, Alexey Kardashevskiy wrote: On 04/02/201

Re: [Qemu-devel] function to execute qmp commands

2015-08-31 Thread Markus Armbruster
Programmingkid writes: > Is there a function that can execute a qmp command in QEMU? Sure you want to do that, and not call the C interface instead? Let me explain how QMP works: * QMP core: receive JSON, parse, find handler function (defined in qmp-commands.hx), call it * The handler funct

Re: [Qemu-devel] hd-geo-test creates 4GB files on FSes that don't support sparse images, doesn't delete them on error

2015-08-31 Thread Markus Armbruster
John Snow writes: > On 08/28/2015 09:06 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> On 08/27/2015 11:29 AM, Eric Blake wrote: On 08/27/2015 09:17 AM, Peter Maydell wrote: > I've noticed recently that tests/hd-geo-test.c creates test disk > images which are 4GB in size,

Re: [Qemu-devel] [Patch for-2.5 v2 5/6] qmp: add monitor command to add/remove a child

2015-08-31 Thread Wen Congyang
On 09/01/2015 03:04 AM, Eric Blake wrote: > On 08/11/2015 01:51 AM, Wen Congyang wrote: >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> --- >> blockdev.c | 79 >> >> qapi/block-core.json

Re: [Qemu-devel] [PATCH v14 29/33] target-tilegx: Handle mtspr, mfspr

2015-08-31 Thread Richard Henderson
On 08/30/2015 08:18 AM, Peter Maydell wrote: +static const TileSPR *find_spr(unsigned spr) +{ +/* Allow the compiler to construct the binary search tree. */ This feels a bit overly clever to me but if we only have three registers anyway it doesn't matter much. I was just forward looking

Re: [Qemu-devel] [PATCH v14 27/33] target-tilegx: Handle mask instructions

2015-08-31 Thread Richard Henderson
On 08/30/2015 06:52 AM, Peter Maydell wrote: I *think* this code is correct, but the ISA manual perplexes me entirely. Why on earth would you describe anything as "compute the boolean AND of something with a value of all ones", when that's just a no-op? I can't see what I'm missing that means the

Re: [Qemu-devel] [PATCH v14 26/33] target-tilegx: Handle scalar multiply instructions

2015-08-31 Thread Richard Henderson
On 08/30/2015 06:46 AM, Peter Maydell wrote: On 24 August 2015 at 17:17, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target-tilegx/translate.c | 112 ++ 1 file changed, 112 insertions(+) It seems a shame that these are all 32x3

Re: [Qemu-devel] [PATCH v14 24/33] target-tilegx: Handle shift instructions

2015-08-31 Thread Richard Henderson
On 08/30/2015 06:38 AM, Peter Maydell wrote: On 24 August 2015 at 17:17, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target-tilegx/translate.c | 57 +-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/target-tilegx

Re: [Qemu-devel] [PATCH v14 22/33] target-tilegx: Implement system and memory management instructions

2015-08-31 Thread Richard Henderson
On 08/29/2015 02:21 PM, Peter Maydell wrote: +case OE_RR_X1(SWINT3): +ret = TILEGX_EXCP_OPCODE_UNKNOWN; +mnemonic = "swint3"; +goto done0; +done0: goto to immediately following label ? Sometimes nicer than fallthrough when future patches might interpose extra c

Re: [Qemu-devel] [Qemu-ppc] [PATCH RFC] pseries: define coldplugged devices as "configured"

2015-08-31 Thread David Gibson
On Thu, Aug 13, 2015 at 02:53:02PM +0200, Laurent Vivier wrote: > When a device is hotplugged, attach() sets "configured" to > false, waiting an action from the OS to configure it and then > to call ibm,configure-connector. On ibm,configure-connector, > the hypervisor sets "configured" to true. >

[Qemu-devel] [RFC] spapr_drc: Fix potential undefined behaviour

2015-08-31 Thread David Gibson
The DRC_INDEX_ID_MASK macro does a left shift on ~0, which is a signed quantity, and therefore undefined behaviour according to the C spec. In particular this causes warnings from the clang sanitizer. This fixes it by calculating the same mask without using ~0 (I think the new method is a more co

Re: [Qemu-devel] [PATCH] pci-testdev: add nodata test

2015-08-31 Thread Jason Wang
On 08/31/2015 07:39 PM, Michael S. Tsirkin wrote: Since you're at this, how about introduce a test that mixes datamatch > >> and wildcard? >>> > > How do you mean? wildcard means ignore data ... >>> > > >> > >> > I mean for example having both datamatch and wildcard eventfds in a >> >

Re: [Qemu-devel] [PATCH v3 2/2] rtl8139: correctly track full receive buffer in standard mode

2015-08-31 Thread Jason Wang
On 08/31/2015 10:24 PM, Vlad Yasevich wrote: > On 08/31/2015 05:59 AM, Jason Wang wrote: >> >> On 08/28/2015 10:06 PM, Vladislav Yasevich wrote: >>> In standard operation mode, when the receive ring buffer >>> is full, the buffer actually appears empty to the driver since >>> the RxBufAddr (the l

[Qemu-devel] [RFC] spapr: Fix default NUMA node allocation for threads

2015-08-31 Thread David Gibson
At present, if guest numa nodes are requested, but the cpus in each node are not specified, spapr just uses the default behaviour or assigning each vcpu round-robin to nodes. If smp_threads != 1, that will assign adjacent threads in a core to different NUMA nodes. As well as being just weird, tha

Re: [Qemu-devel] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-08-31 Thread Wen Congyang
On 09/01/2015 01:40 AM, Eric Blake wrote: > On 08/11/2015 01:51 AM, Wen Congyang wrote: >> In some cases, we want to take a quorum child offline, and take >> another child online. >> >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> Reviewed-by: Alberto

[Qemu-devel] [PATCH 2/2] sheepdog: refine discard support

2015-08-31 Thread Hitoshi Mitake
This patch refines discard support of the sheepdog driver. The existing discard mechanism was implemented on SD_OP_DISCARD_OBJ, which was introduced before fine grained reference counting on newer sheepdog. It doesn't care about relations of snapshots and clones and discards objects unconditionally

[Qemu-devel] [PATCH 0/2] sheepdog driver update

2015-08-31 Thread Hitoshi Mitake
This patchset has two patches. The first one is a defensive purpose for rare cases. It is an improvement of the previous commit 96b14ff85acf. The second one is refining discard operation caused by fstrim command, etc. Current sheepdog driver corrupts VDIs when the discard operation is issued. This

Re: [Qemu-devel] rfc: vhost user enhancements for vm2vm communication

2015-08-31 Thread Varun Sethi
Hi Michael, When you talk about VFIO in guest, is it with a purely emulated IOMMU in Qemu? Also, I am not clear on the following points: 1. How transient memory would be mapped using BAR in the backend VM 2. How would the backend VM update the dirty page bitmap for the frontend VM Regards Varun >

[Qemu-devel] [PATCH 1/2] sheepdog: use per AIOCB dirty indexes for non overlapping requests

2015-08-31 Thread Hitoshi Mitake
In the commit 96b14ff85acf, requests for overlapping areas are serialized. However, it cannot handle a case of non overlapping requests. In such a case, min_dirty_data_idx and max_dirty_data_idx can be overwritten by the requests and invalid inode update can happen e.g. a case like create(1, 2) and

Re: [Qemu-devel] [PATCH COLO-Frame v8 16/34] COLO failover: Introduce a new command to trigger a failover

2015-08-31 Thread zhanghailiang
On 2015/8/29 6:06, Eric Blake wrote: On 07/29/2015 02:45 AM, zhanghailiang wrote: We leave users to use whatever heartbeat solution they want, if the heartbeat is lost, or other errors they detect, they can use command 'colo_lost_heartbeat' to tell COLO to do failover, COLO will do operations ac

[Qemu-devel] [Bug 1307225] Re: Running a virtual machine on a Haswell system produces machine check events

2015-08-31 Thread zoolook
I'm seeing these MCE messages too. My hardware is i7 4790K on a Gigabyte Z97X Gaming GT motherboard. I run a mixture of Linux and Windows (client and server editions) guests. Hipervisor is kvm. I'm seeing these MCE messages since I virtualized a Windows Server 2008 R2 SP1. Neither Windows XP nor

Re: [Qemu-devel] [PATCH v14 16/33] target-tilegx: Handle most bit manipulation instructions

2015-08-31 Thread Richard Henderson
On 08/29/2015 08:26 AM, Peter Maydell wrote: Incidentally I deduce that we're not planning to support bigendian mode? *shrug* I hadn't thought about it. Little-endian seems to be the default for the toolchain. The pre-built userland available for download only contains little-endian code.

Re: [Qemu-devel] [PATCH v14 14/33] target-tilegx: Handle simple logical operations

2015-08-31 Thread Richard Henderson
On 08/29/2015 07:58 AM, Peter Maydell wrote: On 24 August 2015 at 17:17, Richard Henderson wrote: Signed-off-by: Richard Henderson --- target-tilegx/translate.c | 99 +-- 1 file changed, 96 insertions(+), 3 deletions(-) diff --git a/target-tilegx

Re: [Qemu-devel] [PATCH] sheepdog: discard the payload if the header is invalid

2015-08-31 Thread Liu Yuan
On Mon, Aug 31, 2015 at 09:51:00PM -0400, Jeff Cody wrote: > On Tue, Sep 01, 2015 at 09:29:31AM +0800, Liu Yuan wrote: > > From: Liu Yuan > > > > We need to discard the payload if we get a invalid header due to whatever > > reason > > to avoid data stream curruption. > > If the header is invali

Re: [Qemu-devel] [PATCH v14 11/33] target-tilegx: Framework for decoding bundles

2015-08-31 Thread Richard Henderson
On 08/29/2015 02:08 PM, Peter Maydell wrote: On 24 August 2015 at 17:17, Richard Henderson wrote: Signed-off-by: Richard Henderson +if (dc->jmp.cond != TCG_COND_NEVER) { +if (dc->jmp.cond == TCG_COND_ALWAYS) { +tcg_gen_mov_i64(cpu_pc, dc->jmp.dest); +} else { +

Re: [Qemu-devel] [PATCH] sheepdog: discard the payload if the header is invalid

2015-08-31 Thread Jeff Cody
On Tue, Sep 01, 2015 at 09:29:31AM +0800, Liu Yuan wrote: > From: Liu Yuan > > We need to discard the payload if we get a invalid header due to whatever > reason > to avoid data stream curruption. If the header is invalid / corrupted, how can rsp.data_length be trusted? Out of curiosity, is th

Re: [Qemu-devel] [PATCH v3] sheepdog: add reopen support

2015-08-31 Thread Jeff Cody
On Tue, Sep 01, 2015 at 09:02:13AM +0800, Liu Yuan wrote: > On Fri, Aug 28, 2015 at 10:53:58AM +0800, Liu Yuan wrote: > > From: Liu Yuan > > > > With reopen supported, block-commit (and offline commit) is now supported > > for > > image files whose base image uses the Sheepdog protocol driver. >

[Qemu-devel] [PATCH] sheepdog: discard the payload if the header is invalid

2015-08-31 Thread Liu Yuan
From: Liu Yuan We need to discard the payload if we get a invalid header due to whatever reason to avoid data stream curruption. For e.g., the response consists of header plus data payload. If we simply read the header then the data payload is left in the socket buffer and the next time we would

Re: [Qemu-devel] [PATCH v8 03/11] netfilter: add netfilter_{add|del} commands

2015-08-31 Thread Yang Hongyang
On 08/31/2015 10:53 PM, Eric Blake wrote: On 08/31/2015 03:01 AM, Yang Hongyang wrote: Sorry that I don't know much about the QAPI part, I have a question, in previous reply, Eric suggested: > > Then this becomes something like: > > { 'command': 'netfilter-add', 'data': 'NetFil

Re: [Qemu-devel] [PATCH v7 7/8] sPAPR: Support RTAS call ibm, {open, close}-errinjct

2015-08-31 Thread David Gibson
On Fri, Aug 28, 2015 at 05:15:19PM +1000, Gavin Shan wrote: > This supports RTAS calls "ibm,{open,close}-errinjct" to manupliate > the token, which is passed to RTAS call "ibm,errinjct" to indicate > the valid context for error injection. Each VM is permitted to have > only one token at once and we

Re: [Qemu-devel] [PATCH v7 6/8] sPAPR: Introduce rtas_ldq()

2015-08-31 Thread David Gibson
On Fri, Aug 28, 2015 at 05:15:18PM +1000, Gavin Shan wrote: > This introduces rtas_ldq() to load 64-bits parameter from continuous > two 4-bytes memory chunk of RTAS parameter buffer, to simplify the > code. > > Signed-off-by: Gavin Shan > Reviewed-by: Thomas Huth Looks good. Since this doesn'

Re: [Qemu-devel] [PATCH v7 5/8] Obsolete PCI_MSIX_FLAGS_BIRMASK

2015-08-31 Thread David Gibson
On Fri, Aug 28, 2015 at 05:15:17PM +1000, Gavin Shan wrote: > This replaces PCI_MSIX_FLAGS_BIRMASK with PCI_MSIX_TABLE_BIR. Also, > 3 more macros regarding MSIx table offset, MSIx PBA BAR index and > MSIx PBA offset and this uses them. Besides, PCI_ERR_UNC_TRAIN is > replaced with PCI_ERR_UNC_UND.

Re: [Qemu-devel] [PATCH v7 2/8] scripts: Include arch/powerpc/include/uapi/asm/eeh.h

2015-08-31 Thread David Gibson
On Fri, Aug 28, 2015 at 05:15:14PM +1000, Gavin Shan wrote: > This includes linux/arch/powerpc/include/uapi/asm/eeh.h while > updating linux header files. The specific header file, introduced > by the following Linux upstream commits for EEH on sPAPR platform: > > ed3e81f ("powerpc/eeh: Move PE

Re: [Qemu-devel] [PATCH v7 3/8] scripts: Submit changes while updating linux headers

2015-08-31 Thread David Gibson
On Fri, Aug 28, 2015 at 05:15:15PM +1000, Gavin Shan wrote: > This submits changes with formatted commit log while updating Linux > headers using scripts/update-linux-headers.sh. > > Signed-off-by: Gavin Shan > --- > scripts/update-linux-headers.sh | 24 > 1 file changed

Re: [Qemu-devel] [PATCH v7 1/8] scripts: Allow include "stdint.h" in virtio headers

2015-08-31 Thread David Gibson
On Fri, Aug 28, 2015 at 05:15:13PM +1000, Gavin Shan wrote: > This allows to include "stdint.h" in virtio header files. Otherwise, > scripts/update-linux-headers.sh fails when updating headers from > Linux 4.2.rc8 kernel. include/uapi/linux/virtio_ring.h starts to > include "stdint.h" from commit d

Re: [Qemu-devel] [PATCH COLO-Frame v8 19/34] qmp event: Add event notification for COLO error

2015-08-31 Thread zhanghailiang
On 2015/8/31 23:07, Eric Blake wrote: On 08/31/2015 03:27 AM, zhanghailiang wrote: +Data: None. + + - "mode": COLO mode, 'primary' or 'secondary' + - "error": Error message (json-string, optional) The "Data: None" designation is inconsistent with the fact that you do provide data. Will fix

Re: [Qemu-devel] [PATCH v10 1/4] apic: map APIC's MMIO region at each CPU's address space

2015-08-31 Thread Zhu Guihua
On 08/31/2015 09:21 PM, Igor Mammedov wrote: On Mon, 31 Aug 2015 17:47:44 +0800 Zhu Guihua wrote: From: Chen Fan After ICC bus/bridge have been removed, APIC MMIO area could not be mapped into sysbus MMIO any more. So replace mapping APIC at global system address space with mapping it at pe

Re: [Qemu-devel] [PATCH v3] sheepdog: add reopen support

2015-08-31 Thread Liu Yuan
On Fri, Aug 28, 2015 at 10:53:58AM +0800, Liu Yuan wrote: > From: Liu Yuan > > With reopen supported, block-commit (and offline commit) is now supported for > image files whose base image uses the Sheepdog protocol driver. > > Cc: qemu-devel@nongnu.org > Cc: Jeff Cody > Cc: Kevin Wolf > Cc: St

Re: [Qemu-devel] [PATCH v6 2/4] ahci.c: Don't assume AHCIState's parent is AHCIPCIState

2015-08-31 Thread Alistair Francis
On Mon, Aug 31, 2015 at 3:38 PM, John Snow wrote: > > > On 08/28/2015 08:04 PM, Alistair Francis wrote: >> The AHCIState struct can either have AHCIPCIState or SysbusAHCIState >> as a parent. The ahci_irq_lower() and ahci_irq_raise() functions >> assume that it is always AHCIPCIState, which is not

Re: [Qemu-devel] [Patch for-2.5 v2 5/6] qmp: add monitor command to add/remove a child

2015-08-31 Thread Wen Congyang
On 09/01/2015 03:04 AM, Eric Blake wrote: > On 08/11/2015 01:51 AM, Wen Congyang wrote: >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> --- >> blockdev.c | 79 >> >> qapi/block-core.json

Re: [Qemu-devel] [Patch for-2.5 v2 4/6] quorum: implement bdrv_add_child() and bdrv_del_child()

2015-08-31 Thread Wen Congyang
On 09/01/2015 02:53 AM, Eric Blake wrote: > On 08/11/2015 01:51 AM, Wen Congyang wrote: >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> Reviewed-by: Alberto Garcia >> --- >> block/quorum.c | 75 >>

Re: [Qemu-devel] [PATCH v2 1/2] spapr: Add support for hwrng when available

2015-08-31 Thread David Gibson
On Mon, Aug 31, 2015 at 08:46:01PM +0200, Thomas Huth wrote: > From: Michael Ellerman > > Some powerpc systems have support for a hardware random number generator > (hwrng). If such a hwrng is present the host kernel can provide access > to it via the H_RANDOM hcall. > > The kernel advertises th

Re: [Qemu-devel] [FIX v1 PATCH] spapr_rtas: Prevent QEMU crash during hotplug without a prior device_add

2015-08-31 Thread David Gibson
On Mon, Aug 31, 2015 at 11:08:13AM +0530, Bharata B Rao wrote: > If drmgr is used in the guest to hotplug a device before a device_add > has been issued via the QEMU monitor, QEMU segfaults in configure_connector > call. This occurs due to accessing of NULL FDT which otherwise would have > been cre

Re: [Qemu-devel] [PATCH v2 2/2] ppc/spapr_hcall: Implement H_RANDOM hypercall in QEMU

2015-08-31 Thread David Gibson
On Mon, Aug 31, 2015 at 08:46:02PM +0200, Thomas Huth wrote: > The PAPR interface provides a hypercall to pass high-quality > hardware generated random numbers to guests. So let's provide > this call in QEMU, too, so that guests that do not support > virtio-rnd yet can get good random numbers, too.

Re: [Qemu-devel] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-08-31 Thread Wen Congyang
On 09/01/2015 01:40 AM, Eric Blake wrote: > On 08/11/2015 01:51 AM, Wen Congyang wrote: >> In some cases, we want to take a quorum child offline, and take >> another child online. >> >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> Reviewed-by: Alberto

Re: [Qemu-devel] [PATCH v4 13/13] qga: start a man page

2015-08-31 Thread Michael Roth
Quoting Eric Blake (2015-08-28 16:44:49) > On 08/26/2015 05:34 PM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Add a simple man page for the qemu agent. > > > > Signed-off-by: Marc-André Lureau > > Reviewed-by: Michael Roth > > --- > > Makefile | 14 +- > >

[Qemu-devel] function to execute qmp commands

2015-08-31 Thread Programmingkid
Is there a function that can execute a qmp command in QEMU?

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 3/8] scripts: Submit changes while updating linux headers

2015-08-31 Thread Gavin Shan
On Mon, Aug 31, 2015 at 02:37:43PM +0200, Laurent Vivier wrote: >On 28/08/2015 14:30, Gavin Shan wrote: >> On Fri, Aug 28, 2015 at 01:50:47PM +0200, Laurent Vivier wrote: >>> On 28/08/2015 09:15, Gavin Shan wrote: This submits changes with formatted commit log while updating Linux headers

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] iotests: Do not suppress segfaults in bash tests

2015-08-31 Thread Jeff Cody
On Mon, Aug 31, 2015 at 09:05:12PM +0200, Max Reitz wrote: > Currently, if a qemu/qemu-io/qemu-img/qemu-nbd invocation receives a > segmentation fault, that message is invisible in most cases since the > output is generally filtered and bash suppresses the segmentation fault > notice for any but th

Re: [Qemu-devel] [PATCH 6/8] qcow2: add autoclear bit for dirty bitmaps

2015-08-31 Thread Eric Blake
On 08/31/2015 04:39 PM, Eric Blake wrote: +++ b/block/qcow2.c @@ -182,6 +182,14 @@ static int qcow2_read_extensions(BlockDriverState *bs, uint64_t start_offset, return ret; } +if (!(s->autoclear_features & QCOW2_AUTOC

Re: [Qemu-devel] [PATCH 6/8] qcow2: add autoclear bit for dirty bitmaps

2015-08-31 Thread Eric Blake
On 08/27/2015 01:45 AM, Vladimir Sementsov-Ogievskiy wrote: > On 09.06.2015 18:50, Stefan Hajnoczi wrote: >> On Mon, Jun 08, 2015 at 06:21:24PM +0300, Vladimir Sementsov-Ogievskiy >> wrote: >>> diff --git a/block/qcow2.c b/block/qcow2.c >>> index 406e55d..f85a55a 100644 >>> --- a/block/qcow2.c >>>

Re: [Qemu-devel] [PATCH v6 2/4] ahci.c: Don't assume AHCIState's parent is AHCIPCIState

2015-08-31 Thread John Snow
On 08/28/2015 08:04 PM, Alistair Francis wrote: > The AHCIState struct can either have AHCIPCIState or SysbusAHCIState > as a parent. The ahci_irq_lower() and ahci_irq_raise() functions > assume that it is always AHCIPCIState, which is not always the > case, which causes a seg fault. Verify what

Re: [Qemu-devel] [PATCH 1/8] spec: add qcow2-dirty-bitmaps specification

2015-08-31 Thread John Snow
On 08/31/2015 06:21 PM, Eric Blake wrote: > On 06/08/2015 09:21 AM, Vladimir Sementsov-Ogievskiy wrote: >> From: Vladimir Sementsov-Ogievskiy >> >> Persistent dirty bitmaps will be saved into qcow2 files. It may be used >> as 'internal' bitmaps (for qcow2 drives) or as 'external' bitmaps for >>

Re: [Qemu-devel] [PATCH 1/8] spec: add qcow2-dirty-bitmaps specification

2015-08-31 Thread Eric Blake
On 06/08/2015 09:21 AM, Vladimir Sementsov-Ogievskiy wrote: > From: Vladimir Sementsov-Ogievskiy > > Persistent dirty bitmaps will be saved into qcow2 files. It may be used > as 'internal' bitmaps (for qcow2 drives) or as 'external' bitmaps for > other drives (there may be qcow2 file with zero di

[Qemu-devel] [PATCH v15 4/8] i.MX: Add FEC Ethernet Emulator

2015-08-31 Thread Jean-Christophe Dubois
This is based on mcf_fec.c FEC implementation for Coldfire * A generic PHY was added (borrowwed from LAN9118) * The buffer management is also modified as buffers are slightly different between Coldfire and i.MX Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite --- Ch

[Qemu-devel] [PATCH v15 6/8] i.MX: Add the i.MX25 PDK platform

2015-08-31 Thread Jean-Christophe Dubois
Tested by booting a minimal Linux system on the emulated platform Tested by booting the Xvisor hypervisor on the emulated platform Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite --- Changes since v1: * Added a ds1338 I2C device for qtest purpose. Changes since v2

[Qemu-devel] [PATCH v15 8/8] i.MX: Add i2C devices to i.MX31 SOC

2015-08-31 Thread Jean-Christophe Dubois
Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite --- Changes since v1: * not present on v1 Changes since v2: * not present on v2 Changes since v3: * not present on v3 Changes since v4: * not present on v4 Changes since v5: * not present

[Qemu-devel] [PATCH v15 5/8] i.MX: Add SOC support for i.MX25

2015-08-31 Thread Jean-Christophe Dubois
For now we support the following devices: * CPU: ARM926 * Interrupt Controller: AVIC * CCM * UART x 5 * EPIT x 2 * GPT x 4 * FEC * I2C x 3 Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite --- Changes since v1: * not pre

[Qemu-devel] [PATCH v15 3/8] i.MX: Add I2C controller emulator

2015-08-31 Thread Jean-Christophe Dubois
The slave mode is not implemented. Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite --- Changes since v1: * none Changes since v2: * use QOM cast * reworked debug printf * use CamelCase for state type * warn with qemu_log_mask(LOG_GUEST_ERROR) or qem

[Qemu-devel] [PATCH v15 7/8] i.MX: Add qtest support for I2C device emulator.

2015-08-31 Thread Jean-Christophe Dubois
This is using a ds1338 RTC chip on the I2C bus. This RTC chip is not present on the real 3DS PDK board. Signed-off-by: Jean-Christophe Dubois Acked-by: Peter Crosthwaite --- Changes since v1: * not present on v1 Changes since v2: * use a common header file for I2C regs definition

[Qemu-devel] [PATCH v15 2/8] i.MX: KZM: use standalone i.MX31 SOC support

2015-08-31 Thread Jean-Christophe Dubois
Convert the KZM board to use the i.MX31 SoC defintition instead of redefining the entire SoC on the machine level. Major rewrite of the machine init code. While touching the memory map comment de-indent to the correct level of indentation. This obsoletes the legacy i.MX device device creation hel

[Qemu-devel] [PATCH v15 1/8] i.MX: Add SOC support for i.MX31

2015-08-31 Thread Jean-Christophe Dubois
For now we support the following devices: * CPU: ARM1136 * Interrupt Controller: AVIC * CCM * UART x 2 * EPIT x 2 * GPT Signed-off-by: Jean-Christophe Dubois Reviewed-by: Peter Crosthwaite --- Changes since v1: * not present on v1 Changes since v2: * not present on v2

[Qemu-devel] [PATCH v15 0/8] i.MX: Add i.MX25 support through the PDK evaluation board

2015-08-31 Thread Jean-Christophe Dubois
This series of patches is generated against Peter Maydell GIT tree: https://git.linaro.org/people/peter.maydell/qemu-arm.git branch target-arm-post-2.4 This series of patches add the support for the i.MX25 processor through the Freescale PDK evaluation board. For now a limited set of devices is

Re: [Qemu-devel] [PATCH v4 6/6] iotests: Test changed Quorum filename

2015-08-31 Thread Eric Blake
On 08/18/2015 05:10 PM, Max Reitz wrote: > After drive-mirror replacing a Quorum child, the filename of the Quorum > BDS should reflect the change. This patch replaces the existing test for > whether the operation did actually exchange the BDS (which simply tested > whether the new BDS existed) by

Re: [Qemu-devel] [PATCH v4 5/6] block: Drop BlockDriverState.filename

2015-08-31 Thread Eric Blake
On 08/18/2015 05:10 PM, Max Reitz wrote: > That field is now only used during initialization of BlockDriverStates > (opening images) and for error or warning messages. Performance is not > that much of an issue here, so we can drop the field and replace its use > by a call to bdrv_filename() or bdr

Re: [Qemu-devel] [PATCH v6 4/4] xlnx-zynqmp: Connect the sysbus AHCI to ZynqMP

2015-08-31 Thread Alistair Francis
On Mon, Aug 31, 2015 at 1:54 PM, John Snow wrote: > > > On 08/28/2015 08:04 PM, Alistair Francis wrote: >> Connect the Sysbus AHCI device to ZynqMP. >> >> Signed-off-by: Alistair Francis >> Reviewed-by: Sai Pavan Boddu >> --- >> V6: >> - Fix up Macros >> V2: >> - Marcoify the number of SATA pr

Re: [Qemu-devel] [PATCH v4 4/6] qemu-img: Use bdrv_filename_alloc() for map

2015-08-31 Thread Eric Blake
On 08/18/2015 05:10 PM, Max Reitz wrote: > Replaces bs->filename by the result of bdrv_filename_alloc() in the > qemu-img map subcommand. Since that value is queried relatively often, > however, it should be cached. > > Signed-off-by: Max Reitz > --- > qemu-img.c | 14 +- > 1 file ch

Re: [Qemu-devel] rfc: vhost user enhancements for vm2vm communication

2015-08-31 Thread Nakajima, Jun
On Mon, Aug 31, 2015 at 7:11 AM, Michael S. Tsirkin wrote: > Hello! > During the KVM forum, we discussed supporting virtio on top > of ivshmem. I have considered it, and came up with an alternative > that has several advantages over that - please see below. > Comments welcome. Hi Michael, I like

Re: [Qemu-devel] [PATCH v4 3/6] block: Add bdrv_filename()

2015-08-31 Thread Eric Blake
On 08/18/2015 05:10 PM, Max Reitz wrote: > Split the part which actually refreshes the BlockDriverState.filename > field off of bdrv_refresh_filename() into a more generic function > bdrv_filename(), which first calls bdrv_refresh_filename() and then > stores a qemu-usable filename into the given b

Re: [Qemu-devel] [PATCH v6 4/4] xlnx-zynqmp: Connect the sysbus AHCI to ZynqMP

2015-08-31 Thread John Snow
On 08/28/2015 08:04 PM, Alistair Francis wrote: > Connect the Sysbus AHCI device to ZynqMP. > > Signed-off-by: Alistair Francis > Reviewed-by: Sai Pavan Boddu > --- > V6: > - Fix up Macros > V2: > - Marcoify the number of SATA prts > - Change the error for setting num-ports to error_abort >

Re: [Qemu-devel] [PATCH v4 2/6] block: Avoid BlockDriverState.filename

2015-08-31 Thread Eric Blake
On 08/18/2015 05:10 PM, Max Reitz wrote: > In places which directly pass a filename to the OS, we should not use > the filename field at all but exact_filename instead (although the > former currently equals the latter if that is set). > > In raw_open_common(), we do not need to access BDS.filenam

Re: [Qemu-devel] [PATCH v4 1/6] block: Change bdrv_get_encrypted_filename()

2015-08-31 Thread Eric Blake
On 08/18/2015 05:10 PM, Max Reitz wrote: > Instead of returning a pointer to the filename, copy it into a buffer > specified by the caller. > > Signed-off-by: Max Reitz > --- > block.c | 25 ++--- > include/block/block.h | 2 +- > monitor.c | 6 +++

Re: [Qemu-devel] [PATCH V3] block/nfs: cache allocated filesize for read-only files

2015-08-31 Thread Jeff Cody
On Thu, Aug 27, 2015 at 12:30:41PM +0200, Peter Lieven wrote: > If the file is readonly its not expected to grow so > save the blocking call to nfs_fstat_async and use > the value saved at connection time. Also important > the monitor (and thus the main loop) will not hang > if block device info is

Re: [Qemu-devel] Mount image file feature

2015-08-31 Thread Programmingkid
On Aug 31, 2015, at 4:26 PM, Max Reitz wrote: > On 31.08.2015 22:13, Programmingkid wrote: >> >> On Aug 29, 2015, at 12:39 PM, Max Reitz wrote: >> >>> On 29.08.2015 17:57, Programmingkid wrote: On Aug 29, 2015, at 11:40 AM, Max Reitz wrote: > On 27.08.2015 03:05, G 3 wrote:

Re: [Qemu-devel] Mount image file feature

2015-08-31 Thread Max Reitz
On 31.08.2015 22:13, Programmingkid wrote: > > On Aug 29, 2015, at 12:39 PM, Max Reitz wrote: > >> On 29.08.2015 17:57, Programmingkid wrote: >>> >>> On Aug 29, 2015, at 11:40 AM, Max Reitz wrote: >>> On 27.08.2015 03:05, G 3 wrote: > I want to share files between my host and guest compu

Re: [Qemu-devel] [PATCH][RESEND] qemu/kvm_stat: Fix I/O error from kvm_stat

2015-08-31 Thread Wei Huang
On 08/30/2015 10:42 PM, Hemant Kumar wrote: > Running kvm_stat on a powerpc macine where the kernel is compiled with > KVM_BOOK3S_HV_EXIT_TIMING config option, generates the following error : > > # kvm_stat > > Traceback (most recent call last): > File "/usr/bin/kvm_stat", line 644, in >

Re: [Qemu-devel] Mount image file feature

2015-08-31 Thread Programmingkid
On Aug 29, 2015, at 12:39 PM, Max Reitz wrote: > On 29.08.2015 17:57, Programmingkid wrote: >> >> On Aug 29, 2015, at 11:40 AM, Max Reitz wrote: >> >>> On 27.08.2015 03:05, G 3 wrote: I want to share files between my host and guest computer. A feature I want to add would be a new menu

Re: [Qemu-devel] [PATCH 1/1] block: Allow passing BlockdevOptions to blockdev-snapshot-sync

2015-08-31 Thread Max Reitz
On 31.08.2015 22:05, Eric Blake wrote: > On 08/31/2015 01:53 PM, Max Reitz wrote: > >> Design question: Would it make sense to instead add a "reference" mode >> to blockdev-snapshot-sync where you can specify a BDS's node-name >> instead of snapshot-file to use an existing BDS as the new top layer

Re: [Qemu-devel] [PATCH 1/1] block: Allow passing BlockdevOptions to blockdev-snapshot-sync

2015-08-31 Thread Eric Blake
On 08/31/2015 01:53 PM, Max Reitz wrote: > Design question: Would it make sense to instead add a "reference" mode > to blockdev-snapshot-sync where you can specify a BDS's node-name > instead of snapshot-file to use an existing BDS as the new top layer, > ideally an empty one? Indeed - then block

Re: [Qemu-devel] [PATCH 1/1] block: Allow passing BlockdevOptions to blockdev-snapshot-sync

2015-08-31 Thread Max Reitz
On 31.08.2015 12:00, Alberto Garcia wrote: > Snapshots created using blockdev-snapshot-sync are currently opened > using their default options, not even inheriting those from the images > they are based on. > > This patch extends the command by adding an 'options' parameter that > takes a Blockdev

[Qemu-devel] [PATCH] linux-user: fix cmsg conversion in case of multiple headers

2015-08-31 Thread Jonathan Neuschäfer
Currently, __target_cmsg_nxthdr compares a pointer derived from target_cmsg against the msg_control field of target_msgh (through subtraction). This failed for me when emulating i386 code under x86_64, because pointers in the host address space and pointers in the guest address space were not the

Re: [Qemu-devel] hd-geo-test creates 4GB files on FSes that don't support sparse images, doesn't delete them on error

2015-08-31 Thread Peter Maydell
On 31 August 2015 at 19:54, John Snow wrote: > Oh, taking a look at it, it needs to writethat MBR data to the file > before it opens it. We don't have an existing qemu-io dependency here to > use. > > I could add it, but the line between iotest and qtest starts to get > pretty fuzzy. I don't care

[Qemu-devel] [PATCH 2/2] iotests: Warn if python subprocess is killed

2015-08-31 Thread Max Reitz
Currently, if a subprocess of a python test (i.e. qemu-io, qemu-img, or qemu) receives a signal and is subsequently aborted, this is not logged. This patch makes python tests always check the exit code of these subprocesses, and emit a message if they have been killed. Signed-off-by: Max Reitz -

[Qemu-devel] [PATCH 1/2] iotests: Do not suppress segfaults in bash tests

2015-08-31 Thread Max Reitz
Currently, if a qemu/qemu-io/qemu-img/qemu-nbd invocation receives a segmentation fault, that message is invisible in most cases since the output is generally filtered and bash suppresses the segmentation fault notice for any but the last element of a pipe. Most of the time, the test will then fai

[Qemu-devel] [PATCH 0/2] iotests: Emit signal-kill messages

2015-08-31 Thread Max Reitz
Currently, if a qemu-related command (qemu, qemu-io, qemu-img, qemu-nbd) is invoked in an iotest, receives a signal and is subsequently killed (e.g. a segmentation fault), this is not logged in the test output. The first patch in this series makes the bash tests no longer suppress that line, and th

Re: [Qemu-devel] [Patch for-2.5 v2 5/6] qmp: add monitor command to add/remove a child

2015-08-31 Thread Eric Blake
On 08/11/2015 01:51 AM, Wen Congyang wrote: > Signed-off-by: Wen Congyang > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei > --- > blockdev.c | 79 > > qapi/block-core.json | 40 ++ > qmp-commands.hx

Re: [Qemu-devel] [PATCH v3 5/8] s390x: Dump-skeys hmp support

2015-08-31 Thread Jason J. Herne
On 08/31/2015 12:30 PM, Eric Blake wrote: On 08/31/2015 05:00 AM, Cornelia Huck wrote: From: "Jason J. Herne" Add dump-skeys command to the human monitor. Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand Signed-off-by: Jason J. Herne Signed-off-by: Cornelia Huck --- hmp-commands.

Re: [Qemu-devel] hd-geo-test creates 4GB files on FSes that don't support sparse images, doesn't delete them on error

2015-08-31 Thread John Snow
On 08/28/2015 09:06 AM, Markus Armbruster wrote: > John Snow writes: > >> On 08/27/2015 11:29 AM, Eric Blake wrote: >>> On 08/27/2015 09:17 AM, Peter Maydell wrote: I've noticed recently that tests/hd-geo-test.c creates test disk images which are 4GB in size, which is a problem if the

Re: [Qemu-devel] [Patch for-2.5 v2 4/6] quorum: implement bdrv_add_child() and bdrv_del_child()

2015-08-31 Thread Eric Blake
On 08/11/2015 01:51 AM, Wen Congyang wrote: > Signed-off-by: Wen Congyang > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei > Reviewed-by: Alberto Garcia > --- > block/quorum.c | 75 > -- > 1 file changed, 73 insertions(+), 2 delet

[Qemu-devel] [PATCH v2 2/2] ppc/spapr_hcall: Implement H_RANDOM hypercall in QEMU

2015-08-31 Thread Thomas Huth
The PAPR interface provides a hypercall to pass high-quality hardware generated random numbers to guests. So let's provide this call in QEMU, too, so that guests that do not support virtio-rnd yet can get good random numbers, too. Please note that this hypercall should provide "good" random data in

[Qemu-devel] [PATCH v2 1/2] spapr: Add support for hwrng when available

2015-08-31 Thread Thomas Huth
From: Michael Ellerman Some powerpc systems have support for a hardware random number generator (hwrng). If such a hwrng is present the host kernel can provide access to it via the H_RANDOM hcall. The kernel advertises the presence of a hwrng with the KVM_CAP_PPC_HWRNG capability. If this is det

[Qemu-devel] [PATCH v2 0/2] ppc/spapr_hcall: Implement H_RANDOM hypercall

2015-08-31 Thread Thomas Huth
The H_RANDOM sPAPR hypercall is used to pass high-quality random numbers to guests (similar to virtio-rnd). Since the Linux guest kernels already support this hypercall, we should provide this interface in QEMU, too, in case virtio-rnd is not available in the guest yet. First patch is an older pat

Re: [Qemu-devel] Mount image file feature

2015-08-31 Thread Programmingkid
On Aug 31, 2015, at 12:26 PM, Markus Armbruster wrote: > Programmingkid writes: > >> On Aug 31, 2015, at 3:52 AM, Markus Armbruster wrote: >> >>> Programmingkid writes: >>> On Aug 29, 2015, at 12:39 PM, Max Reitz wrote: > On 29.08.2015 17:57, Programmingkid wrote: >>

Re: [Qemu-devel] [PATCH RFC v3 02/32] qapi: New QAPISchema intermediate reperesentation

2015-08-31 Thread Markus Armbruster
Markus Armbruster writes: > Eric Blake writes: > >> On 08/05/2015 12:23 AM, Markus Armbruster wrote: >>> Eric Blake writes: >>> On 08/04/2015 09:57 AM, Markus Armbruster wrote: > The QAPI code generators work with a syntax tree (nested dictionaries) > plus a few symbol tables (als

Re: [Qemu-devel] QEMU q35 about Linux booting problem

2015-08-31 Thread John Snow
On 08/31/2015 02:31 AM, Yu-Cheng Liu wrote: > Dear all: > I can boot in Linux with default machine use : > qemu-system-x86_64 -bios [ Path to coreboot with FILO ] -hda [ Path to > Linux image ] -nographic > > when I use Q35 machine : > qemu-system-x86_64 *-M q35* -bios [ Path to coreboot with FI

Re: [Qemu-devel] qemu-system-s390x command line

2015-08-31 Thread Richard W.M. Jones
On Mon, Aug 31, 2015 at 07:09:34PM +0200, Thomas Huth wrote: > On 30/08/15 23:27, Richard W.M. Jones wrote: > > On Sun, Aug 30, 2015 at 11:02:17PM +0200, Alexander Graf wrote: > >> > >> > >>> Am 30.08.2015 um 22:11 schrieb Richard W.M. Jones : > >>> > >>> Hi Alex, > >>> > >>> Do you or anyone have

Re: [Qemu-devel] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-08-31 Thread Eric Blake
On 08/11/2015 01:51 AM, Wen Congyang wrote: > In some cases, we want to take a quorum child offline, and take > another child online. > > Signed-off-by: Wen Congyang > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei > Reviewed-by: Alberto Garcia > --- > block.c | 43 ++

[Qemu-devel] [Bug 1490611] [NEW] Using qemu >=2.2.1 to convert raw->VHD (fixed) adds extra padding to the result file, which Microsoft Azure rejects as invalid

2015-08-31 Thread Stephen Kent
Public bug reported: Starting with a raw disk image, using "qemu-img convert" to convert from raw to VHD results in the output VHD file's virtual size being aligned to the nearest 516096 bytes (16 heads x 63 sectors per head x 512 bytes per sector), instead of preserving the input file's size as t

Re: [Qemu-devel] [Patch for-2.5 v2 2/6] support nbd driver in blockdev-add

2015-08-31 Thread Eric Blake
On 08/11/2015 01:51 AM, Wen Congyang wrote: > Signed-off-by: Wen Congyang > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei > Reviewed-by: Alberto Garcia > --- > qapi/block-core.json | 17 +++-- > 1 file changed, 15 insertions(+), 2 deletions(-) > > diff --git a/qapi/block-c

  1   2   3   >