Re: [Qemu-devel] [PATCH v3 3/4] pc & q35: Add new object pc-memory-layout.

2014-04-23 Thread Marcel Apfelbaum
On Tue, 2014-04-22 at 20:13 -0400, Don Slutz wrote: > On 04/21/14 08:27, Paolo Bonzini wrote: > > Il 24/03/2014 19:55, Don Slutz ha scritto: > >> This new object has the property max-ram-below-4g. > >> > >> If you add enough PCI devices then all mmio for them will not fit > >> below 4G which may no

Re: [Qemu-devel] [PATCH V3 0/5] remove QEMUMachine indirection from MachineClass

2014-04-23 Thread Marcel Apfelbaum
On Wed, 2014-04-09 at 20:34 +0300, Marcel Apfelbaum wrote: > Cc: Andreas Färber > > V2 -> V3: > - Addressed Andreas's comments: > - Dropped QEMUMachineInitArgs's 'next' obsoleted field > in a separate patch > - Revision the separation into patches: > - Started using MachineC

Re: [Qemu-devel] [PATCH v8 0/4] qemu-img: add preallocation=full

2014-04-23 Thread Hu Tao
ping... On Wed, Apr 09, 2014 at 03:12:33PM +0800, Hu Tao wrote: > The purpose of this series is to use posix_fallocate() when creating > img file to ensure there are disk space for it which is way fast than > acturally writing to disk. But this only works in file system level. > For cases like thi

Re: [Qemu-devel] [PATCH 008/124] vmstate: Reduce code duplication

2014-04-23 Thread Michael S. Tsirkin
On Tue, Apr 22, 2014 at 10:59:33AM +0100, Dr. David Alan Gilbert wrote: > * Juan Quintela (quint...@redhat.com) wrote: > > From: "Michael S. Tsirkin" > > > > Move size offset and number of elements math out > > to functions, to reduce code duplication. > > > In my original review of Michael's p

Re: [Qemu-devel] [PATCH 1/3] virtio: Introduce VirtIODevice.broken

2014-04-23 Thread Michael S. Tsirkin
On Tue, Apr 22, 2014 at 04:55:15PM +0800, Fam Zheng wrote: > If guest driver behaves abnormally, emulation code could mark the device > as "broken". > > Once "broken" is set, device emulation will typically wait for a reset > command and ignore any other operations, but it could also return error

[Qemu-devel] [PATCH] doc: add -drive rerror=, werror= to qemu --help output

2014-04-23 Thread Stefan Hajnoczi
These options are already documented on the man page but missing from qemu --help. Signed-off-by: Stefan Hajnoczi --- qemu-options.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index 2d33815..664ad87 100644 --- a/qemu-options.hx +++ b/

Re: [Qemu-devel] [PATCH v25 02/31] QemuOpts: add def_value_str to QemuOptDesc

2014-04-23 Thread Chun Yan Liu
>>> On 4/22/2014 at 02:22 AM, in message <535561e2.3000...@redhat.com>, Eric >>> Blake wrote: > On 04/10/2014 11:53 AM, Chunyan Liu wrote: > > Add def_value_str (default value) to QemuOptDesc, to replace function of > the > > default value in QEMUOptionParameter. > > > > Improve qemu_op

[Qemu-devel] [PATCH] block/cloop: use PRIu32 format specifier for uint32_t

2014-04-23 Thread Stefan Hajnoczi
PRIu32 is the format string specifier for uint32_t, let's use it. Variables ->block_size, ->n_blocks, and i are all uint32_t. Suggested-by: Max Reitz Signed-off-by: Stefan Hajnoczi --- block/cloop.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/cloop.c b

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Gonglei (Arei)
Hi, Gerd and Juan. Thanks for your guides about the confuse live migration about changing the keyboard buffer size. According your suggestion, I got two solutions to address the issue: - Keep the data array 256 bytes long, change the rptr/wptr/count/data array at post_load(), both Ps/2 keyboa

[Qemu-devel] [PULL v2 0/2] usb: mtp filesharing

2014-04-23 Thread Gerd Hoffmann
Hi, Here comes the usb patch queue, featuring the MTP (media transfer protocol) device usable for file sharing. For now it is supported on linux hosts and read-only. v2: clarify copyright and licensing as suggested by Eric Blake. please pull, Gerd The following changes since commit 2d03b49

[Qemu-devel] [PULL v2 1/2] usb: add CompatibleID support to msos

2014-04-23 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/usb/desc-msos.c | 6 +- hw/usb/desc.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/usb/desc-msos.c b/hw/usb/desc-msos.c index ed8d62c..334d1ae 100644 --- a/hw/usb/desc-msos.c +++ b/hw/usb/desc-msos.c @@ -44,7 +44,7 @@ typedef

[Qemu-devel] [PULL v2 2/2] usb: mtp filesharing

2014-04-23 Thread Gerd Hoffmann
Implementation of a USB Media Transfer Device device for easy filesharing. Read-only. No access control inside qemu, it will happily export any file it is able to open to the guest, i.e. standard unix access rights for the qemu process apply. Signed-off-by: Gerd Hoffmann --- default-configs/us

Re: [Qemu-devel] [PATCH] ivshmem: fix potential OOB r/w access

2014-04-23 Thread Stefan Hajnoczi
On Wed, Apr 16, 2014 at 09:33:02AM +0200, Sebastian Krahmer wrote: > > Fix OOB access via malformed incoming_posn parameters > and check that requested memory is actually alloced. > > Signed-off-by: Sebastian Krahmer > > --- Please use scripts/checkpatch.pl to check coding style. QEMU always

Re: [Qemu-devel] [PATCH] Unnecessary comma.

2014-04-23 Thread Stefan Hajnoczi
On Wed, Apr 16, 2014 at 05:43:07PM +0400, Igor Ryzhov wrote: > Signed-off-by: Igor Ryzhov > --- > net/net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) No need to resend, I fixed up the commit message. Thanks, applied to my net-next tree: https://github.com/stefanha/qemu/commits/net

Re: [Qemu-devel] [PATCH v5 02/12] qcow2: Implement bdrv_make_empty()

2014-04-23 Thread Kevin Wolf
Am 22.04.2014 um 18:02 hat Max Reitz geschrieben: > On 22.04.2014 16:23, Kevin Wolf wrote: > >QCOW2_DISCARD_REQUEST is for requests that come from the guest. SNAPSHOT > >would be a nice fit if we reinterpreted it so that it doesn't only refer > >to internal snapshots but also to external ones. I wo

[Qemu-devel] Google Summer of Code and Outreach Program for Women accepted projects

2014-04-23 Thread Stefan Hajnoczi
Dear QEMU, Libvirt, and KVM communities, We are participating in Google Summer of Code 2014 (http://google-melange.com/) and Outreach Program for Women (http://opw.gnome.org/). Both programs fund candidates to work on our open source projects for 12 weeks this summer. Accepted projects have now b

Re: [Qemu-devel] [PATCH v5 07/12] qemu-img: Empty images after commit

2014-04-23 Thread Kevin Wolf
Am 22.04.2014 um 18:22 hat Max Reitz geschrieben: > On 22.04.2014 17:19, Eric Blake wrote: > >On 04/17/2014 03:59 PM, Max Reitz wrote: > >>After the top image has been committed into an image in its backing > >>chain, all images above that base image should be emptied to restore the > >>old qemu-im

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Gonglei (Arei)
> > Hi, Gerd and Juan. > > Thanks for your guides about the confuse live migration about changing the > keyboard buffer size. > According your suggestion, I got two solutions to address the issue: > > - Keep the data array 256 bytes long, change the rptr/wptr/count/data array at > post_load(),

Re: [Qemu-devel] [PATCH] block/cloop: use PRIu32 format specifier for uint32_t

2014-04-23 Thread Kevin Wolf
Am 23.04.2014 um 10:05 hat Stefan Hajnoczi geschrieben: > PRIu32 is the format string specifier for uint32_t, let's use it. > Variables ->block_size, ->n_blocks, and i are all uint32_t. > > Suggested-by: Max Reitz > Signed-off-by: Stefan Hajnoczi Thanks, applied to the block branch. Kevin

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Gerd Hoffmann
On Mi, 2014-04-23 at 08:06 +, Gonglei (Arei) wrote: > Hi, Gerd and Juan. > > Thanks for your guides about the confuse live migration about changing the > keyboard buffer size. > According your suggestion, I got two solutions to address the issue: > > - Keep the data array 256 bytes long, ch

Re: [Qemu-devel] [PATCH] doc: add -drive rerror=, werror= to qemu --help output

2014-04-23 Thread Kevin Wolf
Am 23.04.2014 um 09:36 hat Stefan Hajnoczi geschrieben: > These options are already documented on the man page but missing from > qemu --help. > > Signed-off-by: Stefan Hajnoczi > --- > qemu-options.hx | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/qemu-options.hx b/

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Juan Quintela
"Gonglei (Arei)" wrote: >> >> Hi, Gerd and Juan. >> >> Thanks for your guides about the confuse live migration about changing the >> keyboard buffer size. >> According your suggestion, I got two solutions to address the issue: >> >> - Keep the data array 256 bytes long, change the rptr/wptr/cou

[Qemu-devel] [PULL 01/16] block: Fix nb_sectors check in bdrv_check_byte_request()

2014-04-23 Thread Kevin Wolf
nb_sectors is signed, check for negative values. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index 990a754..3b7951e 100644 --- a/block.c +++ b/block.c @@ -2601,7 +2601,7 @@ static int bdrv_che

[Qemu-devel] [PULL 12/16] block: Catch duplicate IDs in bdrv_new()

2014-04-23 Thread Kevin Wolf
Since commit f298d071, block devices added with blockdev-add don't have a QemuOpts around in dinfo->opts. Consequently, we can't rely any more on QemuOpts catching duplicate IDs for block devices. This patch adds a new check for duplicate IDs to bdrv_new(), and moves the existing check that the ID

[Qemu-devel] [PULL 05/16] vmdk: Fix %d and %lld to PRI* in format strings

2014-04-23 Thread Kevin Wolf
From: Fam Zheng Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/vmdk.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index b69988d..938a183 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -640,7 +640,7 @@ static int v

[Qemu-devel] [PULL 13/16] qemu-iotests: Check common namespace for id and node-name

2014-04-23 Thread Kevin Wolf
A name that is taken by an ID can't be taken by a node-name at the same time. Check that conflicts are correctly detected. Signed-off-by: Kevin Wolf Reviewed-by: Fam Zheng --- tests/qemu-iotests/087 | 52 ++ tests/qemu-iotests/087.out | 5 +

[Qemu-devel] [PULL 02/16] block: Limit size to INT_MAX in bdrv_check_byte_request()

2014-04-23 Thread Kevin Wolf
Commit 8f4754ed intended to protect against integer overflow bugs in block drivers by making sure that a single request that is passed to drivers is no longer than INT_MAX bytes. However, meanwhile there are some callers that don't use that code path any more but call bdrv_check_byte_request() dir

[Qemu-devel] [PULL 14/16] qemu-img: Improve error messages

2014-04-23 Thread Kevin Wolf
From: Fam Zheng Previously, when there is a user error in argv parsing, qemu-img prints help text and exits. Add an error_exit function to print a helpful error message and a hint to run 'qemu-img --help' for more information. As a bonus, "qemu-img --help" now has a more reasonable exit code 0

[Qemu-devel] [PULL 07/16] curl: Replaced old error handling with error reporting API.

2014-04-23 Thread Kevin Wolf
From: Maria Kustova Signed-off-by: Maria Kustova Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/curl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/curl.c b/block/curl.c index 1b9b1f6..6731d28 100644 --- a/block/curl.c +++ b/block/curl.c @@ -543,

[Qemu-devel] [PULL 08/16] block: Remove -errno return value from bdrv_assign_node_name

2014-04-23 Thread Kevin Wolf
It takes an errp argument. That's enough for error handling. Signed-off-by: Kevin Wolf --- block.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/block.c b/block.c index 0c81747..0ff5764 100644 --- a/block.c +++ b/block.c @@ -788,38 +788,36 @@ stati

[Qemu-devel] [PULL 15/16] vmdk: Fix "%x" to PRIx32 in format strings for cid

2014-04-23 Thread Kevin Wolf
From: Fam Zheng Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/vmdk.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 938a183..06a1f9f 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -262,7 +262,7 @@ static uint32_t

[Qemu-devel] [PULL 10/16] block: Add errp to bdrv_new()

2014-04-23 Thread Kevin Wolf
This patch adds an errp parameter to bdrv_new() and updates all its callers. The next patches will make use of this in order to check for duplicate IDs. Most of the callers know that their ID is fine, so they can simply assert that there is no error. Behaviour doesn't change with this patch yet as

[Qemu-devel] [PULL 16/16] block/cloop: use PRIu32 format specifier for uint32_t

2014-04-23 Thread Kevin Wolf
From: Stefan Hajnoczi PRIu32 is the format string specifier for uint32_t, let's use it. Variables ->block_size, ->n_blocks, and i are all uint32_t. Suggested-by: Max Reitz Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/cloop.c | 12 ++-- 1 file changed, 6 insertio

Re: [Qemu-devel] [QEMU v7 PATCH 0/7] SMBIOS: build full tables in QEMU

2014-04-23 Thread Gerd Hoffmann
Hi, > Thanks again for any feedback and comments (or for just applying the patch) ! Series looks good to me. /me wonders though how you've tested the final revision and the compat stuff. Patch #6 doesn't actually add a new machine type where the non-legacy mode is active ... Incremental patc

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Gerd Hoffmann
On Mi, 2014-04-23 at 09:32 +, Gonglei (Arei) wrote: > > > > Hi, Gerd and Juan. > > > > Thanks for your guides about the confuse live migration about changing the > > keyboard buffer size. > > According your suggestion, I got two solutions to address the issue: > > > > - Keep the data array 2

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Gerd Hoffmann
On Mi, 2014-04-23 at 11:45 +0200, Juan Quintela wrote: > "Gonglei (Arei)" wrote: > >> > >> Hi, Gerd and Juan. > >> > >> Thanks for your guides about the confuse live migration about changing the > >> keyboard buffer size. > >> According your suggestion, I got two solutions to address the issue:

[Qemu-devel] [PULL 00/16] Block patches

2014-04-23 Thread Kevin Wolf
The following changes since commit 2d03b49c3f225994c4b0b46146437d8c887d6774: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140417-1' into staging (2014-04-17 21:37:26 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream

[Qemu-devel] [PULL 06/16] block: Handle error of bdrv_getlength in bdrv_create_dirty_bitmap

2014-04-23 Thread Kevin Wolf
From: Fam Zheng bdrv_getlength could fail, check the return value before using it. Return NULL and set errno if it fails. Callers are updated to handle the error case. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- block-migration.c | 30 +++

Re: [Qemu-devel] [PATCH v2 0/2] HMP: support specifying dump format for dump-guest-memory

2014-04-23 Thread Christian Borntraeger
On 17/04/14 10:15, Qiao Nuohan wrote: > The last version is here: > > http://lists.nongnu.org/archive/html/qemu-devel/2014-04/msg00018.html > > ChangLog: > Changes from v7 to v8: > 1. add a patch to fix doc of dump-guest-memory > > Qiao Nuohan (2): > HMP: fix doc of dump-guest-memory > HMP:

[Qemu-devel] [PULL 04/16] block: Check bdrv_getlength() return value in bdrv_make_zero()

2014-04-23 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index ec3fa50..da55877 100644 --- a/block.c +++ b/block.c @@ -2749,10 +2749,16 @@ int bdrv_write_zeroes(BlockDriverState *bs, int64_t sector_

[Qemu-devel] [PULL 11/16] qemu-img: Avoid duplicate block device IDs

2014-04-23 Thread Kevin Wolf
qemu-img used to use "image" as ID for all block devices. This means that e.g. img_convert() ended up with potentially multiple source images and one target image, all with the same ID. The next patch will catch this and fail to open the block device. This patch makes sure that qemu-img uses meani

Re: [Qemu-devel] [PATCH] armv7m_nvic: fix CPUID Base Register

2014-04-23 Thread Peter Maydell
On 21 April 2014 00:25, Rabin Vincent wrote: > cp15.c0_cpuid is never initialized for ARMv7-M; take the value directly > from cpu->midr instead. > > Signed-off-by: Rabin Vincent Hmm, I wonder how long that's been broken for... Reviewed-by: Peter Maydell thanks -- PMM

[Qemu-devel] [PULL 09/16] convert fprintf() calls to error_setg() in block/qed.c:bdrv_qed_create()

2014-04-23 Thread Kevin Wolf
From: Aakriti Gupta This patch converts fprintf() calls to error_setg() in block/qed.c:bdrv_qed_create() (error_setg() is part of error reporting API in include/qapi/error.h) Signed-off-by: Aakriti Gupta Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/qed.c | 16 +--

[Qemu-devel] [PULL 03/16] block: Catch integer overflow in bdrv_rw_co()

2014-04-23 Thread Kevin Wolf
Insanely large requests could cause an integer overflow in bdrv_rw_co() while converting sectors to bytes. This patch catches the problem and returns an error (if we hadn't overflown the integer here, bdrv_check_byte_request() would have rejected the request, so we're not breaking anything that was

[Qemu-devel] [Bug 1311614] [NEW] qemu-arm segfaults with gcc 4.9.0

2014-04-23 Thread Alexander
Public bug reported: I have an ARM chroot that working with qemu-arm emulation [root@filzbach fedya]# cat /proc/sys/fs/binfmt_misc/arm enabled interpreter /usr/bin/qemu-arm-binfmt flags: P offset 0 magic 7f454c460101010002002800 mask ff00feff In c

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Juan Quintela
Gerd Hoffmann wrote: > On Mi, 2014-04-23 at 09:32 +, Gonglei (Arei) wrote: >> > >> > Hi, Gerd and Juan. >> > >> > Thanks for your guides about the confuse live migration about changing the >> > keyboard buffer size. >> > According your suggestion, I got two solutions to address the issue: >>

[Qemu-devel] [Bug 1311614] Re: qemu-arm segfaults with gcc 4.9.0

2014-04-23 Thread Alexander
And of course i rebuilt rpm package with latest gcc 4.9.0 Btw all working fine on a real hardware. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1311614 Title: qemu-arm segfaults with gcc 4.9.0 St

[Qemu-devel] [PATCH v2] doc: add -drive rerror=, werror= to qemu --help output

2014-04-23 Thread Stefan Hajnoczi
These options are already documented on the man page but missing from qemu --help. Signed-off-by: Stefan Hajnoczi --- qemu-options.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index 2d33815..a1333c2 100644 --- a/qemu-options.hx +++ b/

Re: [Qemu-devel] Who signed gemu-1.7.1.tar.bz2?

2014-04-23 Thread Stefan Hajnoczi
On Tue, Apr 22, 2014 at 09:35:07AM -0500, Michael Roth wrote: > Quoting Stefan Hajnoczi (2014-04-22 08:31:08) > > On Wed, Apr 02, 2014 at 05:40:23PM -0700, Alex Davis wrote: > > > and where is their gpg key? > > > > Michael Roth is doing releases: > > > > http://pgp.mit.edu/pks/lookup?op=vindex&

Re: [Qemu-devel] networking stalls in the guest -- backlog in the host

2014-04-23 Thread Stefan Hajnoczi
On Tue, Apr 01, 2014 at 09:43:42AM -0600, David Ahern wrote: > On 4/1/14, 9:09 AM, Stefan Hajnoczi wrote: > >On Thu, Mar 27, 2014 at 04:13:15PM -0600, David Ahern wrote: > >> > >>We are hitting a networking problem and hoping someone has an idea > >>-- perhaps a known bug. > >> > >>After a couple o

Re: [Qemu-devel] Guest bandwidth setting

2014-04-23 Thread Stefan Hajnoczi
On Sun, Mar 30, 2014 at 02:35:01PM +0200, Pradeep Kiruvale wrote: > I am implementing some functionality where in I need to set the bandwidth > control for my guest vms.Please let me know how can I do it. > > I am looking into net/net.c file,I dint find any leads.I tried two ways. > > I am try

Re: [Qemu-devel] [PATCH v2] doc: add -drive rerror=, werror= to qemu --help output

2014-04-23 Thread Kevin Wolf
Am 23.04.2014 um 13:55 hat Stefan Hajnoczi geschrieben: > These options are already documented on the man page but missing from > qemu --help. > > Signed-off-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf

[Qemu-devel] where can I find the latest memory hot plugging patch for Qemu?

2014-04-23 Thread Kolk, G. van der
Dear Qemu developers, I'm doing a masters thesis project which involves Qemu. Especially cpu and memory hot plugging. But I have a hard time finding the right git repository which contains the latest memory hot plugging work. Can anyone please point me in the right direction? Regards, Gerrit

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Gonglei (Arei)
> On Mi, 2014-04-23 at 08:06 +, Gonglei (Arei) wrote: > > Hi, Gerd and Juan. > > > > Thanks for your guides about the confuse live migration about changing the > keyboard buffer size. > > According your suggestion, I got two solutions to address the issue: > > > > - Keep the data array 256 byte

Re: [Qemu-devel] [PATCH v8 2/4] raw, qcow2: don't convert file size to sector size

2014-04-23 Thread Eric Blake
On 04/09/2014 01:12 AM, Hu Tao wrote: > and avoid converting it back later. > > Signed-off-by: Hu Tao > --- > block/qcow2.c | 8 > block/raw-posix.c | 4 ++-- > block/raw-win32.c | 4 ++-- > 3 files changed, 8 insertions(+), 8 deletions(-) > > @@ -1777,7 +1777,7 @@ static int qcow

Re: [Qemu-devel] [PATCH] Patch for shrinking qcow2 disk image

2014-04-23 Thread Stefan Hajnoczi
On Tue, Apr 01, 2014 at 02:06:10PM +0800, Jun Li wrote: > Signed-off-by: Jun Li > > This patch can make sure the data still existing after shrinking. And only > discard the unused (guest) clusters. If shrinking to the size which stored > data, It will return an error and will not do any change.

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

2014-04-23 Thread Eric Blake
On 04/09/2014 01:12 AM, Hu Tao wrote: > This patch adds a new option preallocation for raw format, and implements > full preallocation. > > Signed-off-by: Hu Tao > --- > block/raw-posix.c | 61 > --- > 1 file changed, 54 insertions(+), 7 delet

Re: [Qemu-devel] [PATCH v3 2/4] GlobalProperty: Display warning about unused -global

2014-04-23 Thread Don Slutz
On 04/22/14 20:28, Paolo Bonzini wrote: Il 22/04/2014 19:13, Don Slutz ha scritto: Even then, I suspect sooner or later machines other than PC and Q35 will be versioned. At that point we'll probably want QEMU-global compat_props that automatically apply to all machines, even if a type is not

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Gonglei (Arei)
> Gerd Hoffmann wrote: > > On Mi, 2014-04-23 at 09:32 +, Gonglei (Arei) wrote: > >> > > >> > Hi, Gerd and Juan. > >> > > >> > Thanks for your guides about the confuse live migration about changing > the > >> > keyboard buffer size. > >> > According your suggestion, I got two solutions to addre

Re: [Qemu-devel] drive_del vs. device_del: what should come first?

2014-04-23 Thread Stefan Hajnoczi
On Fri, Apr 11, 2014 at 02:47:20PM +0200, Heinz Graalfs wrote: > Hello Markus, > > I finally managed to reproduce the problem, at least once ... > > The scenario was: > dd if=/dev/vdx1 of=partitionone > > followed by a virsh detach... (with the device_del() under the cover) > during active dd pr

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Gerd Hoffmann
Hi, > Anything bigger than 16bytes, no? And that is the whole point that we > are talking about? Or the 16bytes that we are using can be at any place > on the buffer? Yes. It's a ring buffer, with rptr pointing to the first used element and wptr pointing to the first free element. So, what

Re: [Qemu-devel] [Bug 1288620] Re: memory leak with default NIC model

2014-04-23 Thread Stefan Hajnoczi
On Sat, Mar 29, 2014 at 03:02:23AM -, Aidan Gauland wrote: > I have been able to consistently reproduce the bug again, and have run > QEMU with Valgrind until OOM. It is unrelated to networking; it is > caused by loading a config file. > > I ran QEMU from Git commit 7f6613cedc59fa849105668ae9

[Qemu-devel] [PATCH 12/13] remove __get_user return check from PPC do_setcontext

2014-04-23 Thread riku . voipio
From: Riku Voipio The last remaining check for return value of __get_user. Signed-off-by: Riku Voipio Cc: Alexander Graf --- linux-user/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 487fa2f..424b5d8 100644 --- a/

[Qemu-devel] [PATCH 02/13] signal.c setup_frame/x86: __put_user cleanup

2014-04-23 Thread riku . voipio
From: Riku Voipio Remove the remaining check for __put_user return value, and all the checks for err variable which is no longer set anywhere. Now we can only end up in give_sigsegv due to failed lock_user_struct - thus we remove the unlock_user_struct to avoid unlocking a region never locked.

[Qemu-devel] [PATCH 03/13] signal.c: remove return value from copy_siginfo_to_user

2014-04-23 Thread riku . voipio
From: Riku Voipio Since copy_siginfo_to_user always returns 0, make it void and remove any checks for return value from calling functions. Signed-off-by: Riku Voipio --- linux-user/signal.c | 28 +--- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/linux-

[Qemu-devel] [PATCH 06/13] RFC comment out restore_fpu_state (sparc)

2014-04-23 Thread riku . voipio
From: Riku Voipio A function never called from anywhere, half-complete code never finished. ifdef completly out. Alternatively we could just kick it out as the half-ready code could be digged from git if needed. Signed-off-by: Riku Voipio --- linux-user/signal.c | 9 ++--- 1 file changed,

[Qemu-devel] [PATCH 07/13] do_sigaltstack: remove __get_user value check

2014-04-23 Thread riku . voipio
From: Riku Voipio Access is already checked in the lock_user_struct call before. Signed-off-by: Riku Voipio --- linux-user/signal.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 2fb7fd1..9118597 100644 --- a/linux-u

[Qemu-devel] [PATCH 09/13] signal.c: setup_frame remove __put_user checks

2014-04-23 Thread riku . voipio
From: Riku Voipio Remove "if(__put_user" checks and their related error paths for all architecture's setup_frame, setup_rt_frame and similar. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. Remove err variable if there are no users for it in the

[Qemu-devel] [PATCH 00/13] __{get,put}_user return value cleanup

2014-04-23 Thread riku . voipio
From: Riku Voipio This series is primarily motivated to have a gcc-4.9 buildfix: linux-user/syscall.c: In function ‘host_to_target_stat64’: linux-user/qemu.h:301:19: error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((hptr), (x)), 0) removing the unused 0

[Qemu-devel] [PATCH 04/13] signal.c: remove return value from setup_sigcontext

2014-04-23 Thread riku . voipio
From: Riku Voipio Make all implementations of setup_sigcontext void and remove checking it's return value from functions calling setup_sigcontext. Signed-off-by: Riku Voipio --- linux-user/signal.c | 65 + 1 file changed, 21 insertions(+), 44

[Qemu-devel] [PATCH 01/13] signal.c: remove __get/__put_user return value reading

2014-04-23 Thread riku . voipio
From: Riku Voipio Remove all the simple cases or reading the return value of __get_user and __put_user. We set err = 0 in sparc versions of do_sigreturn and sparc64_set_context to avoid compile error, but else this patch is just the removal of err |= __get_user ... idiom. Signed-off-by: Riku Vo

[Qemu-devel] [PATCH 05/13] signal.c: remove return value from restore_sigcontext

2014-04-23 Thread riku . voipio
From: Riku Voipio make most implementations of restore_sigcontext void and remove checking it's return value from functions calling restore_sigcontext. The exception is the X86 version of the function that is too different from others to deal in this way. Signed-off-by: Riku Voipio --- linux-

[Qemu-devel] [PATCH 08/13] do_sigreturn - remove __get_user checks

2014-04-23 Thread riku . voipio
From: Riku Voipio Remove "if(__get_user" checks and their related error paths for all architecture's do_sigreturn. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. Signed-off-by: Riku Voipio --- linux-user/signal.c | 62 +-

[Qemu-devel] [PATCH 13/13] fix gcc-4.9 compiler error on __{get, put]}_user

2014-04-23 Thread riku . voipio
From: Riku Voipio gcc-4.9 finds unused operand: linux-user/syscall.c: In function ‘host_to_target_stat64’: linux-user/qemu.h:301:19: error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((hptr), (x)), 0) Just removing the rh operand is no good, it will error

[Qemu-devel] [PATCH 10/13] remove __put/get error checks from ppc {save, restore}_user_regs

2014-04-23 Thread riku . voipio
From: Riku Voipio As __get_user and __put_user do not return errors, remove the if checks from around them. This allows making the save/restore functions void. Signed-off-by: Riku Voipio Cc: Alexander Graf --- linux-user/signal.c | 126 +--- 1 f

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Gonglei (Arei)
> Hi, > > > Anything bigger than 16bytes, no? And that is the whole point that we > > are talking about? Or the 16bytes that we are using can be at any place > > on the buffer? > > Yes. It's a ring buffer, with rptr pointing to the first used element > and wptr pointing to the first free ele

Re: [Qemu-devel] [PATCH] block: Prevent coroutine stack overflow when recursing in bdrv_open_backing_file.

2014-04-23 Thread Kevin Wolf
[ Cc: qemu-devel ] Patches should never be sent to qemu-stable only. Am 23.04.2014 um 13:45 hat Stefan Hajnoczi geschrieben: > On Tue, Apr 22, 2014 at 05:05:27PM +0200, Benoît Canet wrote: > > In 1.7.1 qcow2_create2 reopen the file for flushing without the > > BDRV_O_NO_BACKING > > flags. > > >

Re: [Qemu-devel] [PATCH 00/13] __{get, put}_user return value cleanup

2014-04-23 Thread Peter Maydell
On 23 April 2014 14:11, wrote: > From: Riku Voipio > > This series is primarily motivated to have a gcc-4.9 buildfix: > > linux-user/syscall.c: In function ‘host_to_target_stat64’: > linux-user/qemu.h:301:19: error: right-hand operand of comma expression has > no effect [-Werror=unused-value] >

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Juan Quintela
"Gonglei (Arei)" wrote: >> Hi, >> >> > Anything bigger than 16bytes, no? And that is the whole point that we >> > are talking about? Or the 16bytes that we are using can be at any place >> > on the buffer? >> >> Yes. It's a ring buffer, with rptr pointing to the first used element >> and wp

Re: [Qemu-devel] [PATCH v3 2/4] GlobalProperty: Display warning about unused -global

2014-04-23 Thread Don Slutz
On 04/22/14 20:28, Paolo Bonzini wrote: Il 22/04/2014 16:23, Don Slutz ha scritto: Currently I have issues running tests: dcs-xen-50:~/qemu/out>make test Use "make check", not "make test". make test is old and suffered some bitrot. Paolo Thanks, "make check" is working. -Don Slutz

[Qemu-devel] [PATCH 11/13] sparc64_set_context: remove __get_user checks

2014-04-23 Thread riku . voipio
From: Riku Voipio Remove checks of __get_user and the err variable used to control flow with it. Signed-off-by: Riku Voipio --- linux-user/signal.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index efb3562..487fa2f

Re: [Qemu-devel] [PATCH v2 0/2] HMP: support specifying dump format for dump-guest-memory

2014-04-23 Thread Luiz Capitulino
On Wed, 23 Apr 2014 12:38:12 +0200 Christian Borntraeger wrote: > On 17/04/14 10:15, Qiao Nuohan wrote: > > The last version is here: > > > > http://lists.nongnu.org/archive/html/qemu-devel/2014-04/msg00018.html > > > > ChangLog: > > Changes from v7 to v8: > > 1. add a patch to fix doc of dump-

[Qemu-devel] [PATCH] ivshmem: fix potential OOB r/w access (#2)

2014-04-23 Thread Sebastian Krahmer
Fix OOB access via malformed incoming_posn parameters and check that requested memory is actually alloced. tmp_fd does not leak on error; see following dup() call. According to docu g_realloc() may return NULL so we need to check that. Passes checkpatch.pl, after also fixing wrong ivshmem.c style

Re: [Qemu-devel] vm disk blockio and fileio

2014-04-23 Thread Stefan Hajnoczi
On Mon, Mar 31, 2014 at 10:09:13PM +0800, longguang.yue wrote: > from the aspect of qemu, there are file and block disk type, > what is the final difference between the two types ? > if its type is block and source is volume or physical disk, who finally > read/write the disk? > i thought block i

Re: [Qemu-devel] [PATCH v3 2/4] GlobalProperty: Display warning about unused -global

2014-04-23 Thread Andreas Färber
Am 23.04.2014 01:13, schrieb Don Slutz: > And that Andreas Färber would like me to extend qom-test to check > that at least 1 instance of each machine does use each .compat_props > so that a typo there gets "checked". No, the machines are already being checked. I was saying, if we are going to che

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Gonglei (Arei)
> > "Gonglei (Arei)" wrote: > >> Hi, > >> > >> > Anything bigger than 16bytes, no? And that is the whole point that we > >> > are talking about? Or the 16bytes that we are using can be at any place > >> > on the buffer? > >> > >> Yes. It's a ring buffer, with rptr pointing to the first used

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Gerd Hoffmann
Hi, > /* the new version id for this patch */ > if (version_id == 4) { > return 0; > } I don't think we need a new version. > /* set the useful data buffer queue size, < PS2_QUEUE_SIZE */ > size = MIN(q->count, PS2_QUEUE_SIZE); I'd rather do "size = q->count > PS2_

[Qemu-devel] [QEMU v8 PATCH 0/7] SMBIOS: build full tables in QEMU

2014-04-23 Thread Gabriel L. Somlo
On Wed, Apr 23, 2014 at 12:13:48PM +0200, Gerd Hoffmann wrote: > Series looks good to me. Awesome, thanks! Here's one more iteration, rearranging things to start with the most benign and uncontroversial patches, and progressing toward the "payload" at the end :) > /me wonders though how you've t

[Qemu-devel] [QEMU v8 PATCH 1/7] E820: Add interface for accessing e820 table

2014-04-23 Thread Gabriel L. Somlo
Add the following two functions: - e820_get_num_entries() - query the size of the e820 table - e820_get_entry() - grab an entry matching a given set of criteria This interface is currently necessary for creating type 19 (memory array mapped address) structures in smbios. Signed-off-by: Gabri

[Qemu-devel] [QEMU v8 PATCH 7/7] SMBIOS: Build aggregate smbios tables and entry point

2014-04-23 Thread Gabriel L. Somlo
Build an aggregate set of smbios tables and an entry point structure. Insert tables and entry point into fw_cfg respectively under "etc/smbios/smbios-tables" and "etc/smbios/smbios-anchor". Machine types <= 2.0 will for now continue using field-by-field overrides to SeaBIOS defaults, but for mach

[Qemu-devel] [QEMU v8 PATCH 5/7] SMBIOS: Use macro to set smbios defaults

2014-04-23 Thread Gabriel L. Somlo
The function smbios_set_defaults() uses a repeating code pattern for each field. This patch replaces that pattern with a macro. This patch contains no functional changes. Signed-off-by: Gabriel Somlo --- hw/i386/smbios.c | 27 +-- 1 file changed, 13 insertions(+), 14 del

[Qemu-devel] [QEMU v8 PATCH 3/7] SMBIOS: Rename symbols to better reflect future use

2014-04-23 Thread Gabriel L. Somlo
Rename the following symbols: - smbios_set_type1_defaults() to the more general smbios_set_defaults(); - bool smbios_type1_defaults to the more general smbios_defaults; - smbios_get_table() to smbios_get_table_legacy(); This patch contains no functional changes. Signed-off-by: Gabriel Soml

[Qemu-devel] [QEMU v8 PATCH 6/7] SMBIOS: Use bitmaps to prevent incompatible comand line options

2014-04-23 Thread Gabriel L. Somlo
Replace existing smbios_check_collision() functionality with a pair of bitmaps: have_binfile_bitmap and have_fields_bitmap. Bits corresponding to each smbios type are set by smbios_entry_add(), which also uses the bitmaps to ensure that binary blobs and field values are never accepted for the same

[Qemu-devel] [QEMU v8 PATCH 4/7] SMBIOS: Update header file definitions

2014-04-23 Thread Gabriel L. Somlo
Add definitions for smbios entry point (anchor), and for type 2 (base board) structure which is required by some versions of OS X. Remove definition for type 20 (memory device mapped address) structure, which is no longer required as of smbios spec v2.5. Update all other structure definitions to

[Qemu-devel] [QEMU v8 PATCH 2/7] PC: Add machine version 2.1 for piix and q35

2014-04-23 Thread Gabriel L. Somlo
Add v2.1 machine types and (empty) compat functions for v2.0, to both piix and q35. For now, the new machines will behave identically to their 2.0 counterparts. Signed-off-by: Gabriel Somlo --- hw/i386/pc_piix.c | 27 --- hw/i386/pc_q35.c | 25 +++--

Re: [Qemu-devel] [PATCH 00/13] __{get, put}_user return value cleanup

2014-04-23 Thread Riku Voipio
On Wed, Apr 23, 2014 at 02:22:32PM +0100, Peter Maydell wrote: > On 23 April 2014 14:11, wrote: > > From: Riku Voipio > > > > This series is primarily motivated to have a gcc-4.9 buildfix: > > > > linux-user/syscall.c: In function ‘host_to_target_stat64’: > > linux-user/qemu.h:301:19: error: rig

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Gonglei (Arei)
> > Hi, > > > /* the new version id for this patch */ > > if (version_id == 4) { > > return 0; > > } > > I don't think we need a new version. > OK. > > /* set the useful data buffer queue size, < PS2_QUEUE_SIZE */ > > size = MIN(q->count, PS2_QUEUE_SIZE); > > I'd

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Gerd Hoffmann
Hi, > > Completely separate question: Have you figured what the root cause for > > the bug is? > > > While wading through the code I've figured the queue size > > isn't (directly) exposed to the guest. > The process correspond with the above linux kernel code, i8042_flush(void). So linux

Re: [Qemu-devel] [PULL v2 2/2] usb: mtp filesharing

2014-04-23 Thread Laszlo Ersek
On 04/23/14 10:31, Gerd Hoffmann wrote: > Implementation of a USB Media Transfer Device device for easy > filesharing. Read-only. No access control inside qemu, it will > happily export any file it is able to open to the guest, i.e. > standard unix access rights for the qemu process apply. > > S

Re: [Qemu-devel] [PATCH RFC] ps2: set the keybord output buffer size as the same as kernel

2014-04-23 Thread Gerd Hoffmann
Hi, > > > if (++q->rptr == 256) { > > > q->rptr = 0; > > > } > > > } > > > > That fails for the wraparound (rptr > wptr) case. > > > Yep, it should use a temporary data array to transfer, which I have written > in the previous email. Saw it. And this wraparoun

  1   2   >