Re: [Qemu-devel] [PATCH v2 2/2] qapi: add a special string in c_type()'s result to each redundant space

2014-04-27 Thread Amos Kong
On Fri, Apr 25, 2014 at 02:52:09PM +0200, Markus Armbruster wrote: > Amos Kong writes: Hi Markus, > > Currently we always add a space after c_type in mcgen(), there is > > some redundant space in generated code. The space isn't needed for > > points by the coding style. > > You mean pointers.

Re: [Qemu-devel] [Qemu-trivial] [PATCH V5 1/1] qmp: add pmemload command

2014-04-27 Thread Markus Armbruster
Michael Tokarev writes: > 09.04.2014 21:49, Baojun Wang wrote: >> I found this could be useful to have qemu-softmmu as a cross debugger (launch >> with -s -S command line option), then if we can have a command to load guest >> physical memory, we can use cross gdb to do some target debug which gd

Re: [Qemu-devel] [PATCH v25 30/31] cleanup QEMUOptionParameter

2014-04-27 Thread Chun Yan Liu
>>> On 4/25/2014 at 08:42 PM, in message <20140425124255.gd3...@stefanha-thinkpad.redhat.com>, Stefan Hajnoczi wrote: > On Fri, Apr 11, 2014 at 01:54:26AM +0800, Chunyan Liu wrote: > > Now that all backend drivers are using QemuOpts, remove all > > QEMUOptionParameter related codes. > > >

Re: [Qemu-devel] [PATCH v25 31/31] QemuOpts: cleanup tmp 'allocated' member from QemuOptsList

2014-04-27 Thread Chun Yan Liu
>>> On 4/25/2014 at 09:43 PM, in message <20140425134327.gi3...@stefanha-thinkpad.redhat.com>, Stefan Hajnoczi wrote: > On Fri, Apr 11, 2014 at 01:54:27AM +0800, Chunyan Liu wrote: > > /* Realloc dst option list and append options from an option list (list) > > * to it. dst could be NULL o

Re: [Qemu-devel] [PATCH v25 11/31] change block layer to support both QemuOpts and QEMUOptionParamter

2014-04-27 Thread Chun Yan Liu
>>> On 4/23/2014 at 02:44 PM, in message <53576153.6CE : 102 : 21807>, Chun Yan >>> Liu wrote: > On 4/22/2014 at 07:17 AM, in message <5355a71e.2010...@redhat.com>, Eric Blake > wrote: > > On 04/10/2014 11:54 AM, Chunyan Liu wrote: >> > Change block layer to support both Qem

[Qemu-devel] [PATCH v2] qapi: treat all negative return of strtosz_suffix() as error

2014-04-27 Thread Amos Kong
strtosz_suffix() might return negative error, this patch fixes the error handling. This patch also changes to handle error in the if statement rather than handle success specially, this will make this use of strtosz_suffix consistent with all other uses. Signed-off-by: Amos Kong Reviewed-by: Mic

[Qemu-devel] [PULL 17/18] po: add proper Language: tags to .po files

2014-04-27 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- po/de_DE.po |2 +- po/fr_FR.po |2 +- po/hu.po|2 +- po/it.po|2 +- po/tr.po|2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/po/de_DE.po b/po/de_DE.po index fcbde95..dec68c9 100644 --- a/po/de_DE.po +++ b/po/d

[Qemu-devel] [PULL 10/18] xilinx: Fix typo in comment (Marvel -> Marvell)

2014-04-27 Thread Michael Tokarev
From: Stefan Weil Signed-off-by: Stefan Weil Reviewed-by: Peter Crosthwaite Signed-off-by: Michael Tokarev --- hw/net/xilinx_axienet.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c index 839d97c..6dc665f 100644 --- a/h

[Qemu-devel] [PULL 14/18] virtfs-proxy-helper: fix call to accept

2014-04-27 Thread Michael Tokarev
From: Tim Comer The current code calls accept() without initializing the size parameter which means the accept call might write too much to the stack. URL: https://bugs.gentoo.org/486714 Signed-off-by: Tim Comer Signed-off-by: Mike Frysinger Reviewed-by: Paolo Bonzini Signed-off-by: Michael T

Re: [Qemu-devel] Qemu-devel Digest, Vol 133, Issue 739

2014-04-27 Thread Alexey Kardashevskiy
On 04/27/2014 07:13 AM, Muhammad Irshad wrote: > fatal error: boost/algorithm/string.hpp: No such file or directory| Error doing what? Why hpp? This is plain C, not C++. What is your GCC version? Or it is not GCC at all? > Mahwish > > > On Sat, Apr 26, 2014 at 12:00 PM, wrote: > >> Send Qemu

[Qemu-devel] [PULL 11/18] vl: avoid closing stdout with 'writeconfig'

2014-04-27 Thread Michael Tokarev
From: Chen Gang 'writeconfig' supports output to stdout (with '-'); when that happens, we must not close stdout, or further command line options that also use stdout will be impacted. (Although 'writeconfig' was copied from 'readconfig', the latter does not have the problem because it does not su

[Qemu-devel] [PULL 08/18] vl: Remove useless 'continue'

2014-04-27 Thread Michael Tokarev
From: Chen Gang "This if else has no code between it and the end of the enclosing while loop. This makes this continue redundant." Signed-off-by: Chen Gang Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- vl.c |1 - 1 file changed, 1 deletion(-) diff --git a/vl.c b/vl.c

[Qemu-devel] [PULL 15/18] init_paths: fix minor memory leak

2014-04-27 Thread Michael Tokarev
From: Kirill Batuzov Fields "name" (created with strdup in new_entry) and "pathname" (created with g_strdup_printf in new_entry) of pathelem struct should be freed before the whole struct is. Signed-off-by: Kirill Batuzov Signed-off-by: Michael Tokarev --- util/path.c |4 +++- 1 file chan

[Qemu-devel] [PULL 16/18] po/Makefile: fix $SRC_PATH reference

2014-04-27 Thread Michael Tokarev
The rule for messages.po appears to be slightly wrong. Move the `cd' command within parens. Signed-off-by: Michael Tokarev Tested-by: Stefan Weil --- po/Makefile |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/po/Makefile b/po/Makefile index 705166e..669f865 100644 --

Re: [Qemu-devel] [PULL v2 37/39] i386: ACPI table generation code from seabios

2014-04-27 Thread Michael S. Tsirkin
On Mon, Apr 28, 2014 at 01:07:08PM +0800, TeLeMan wrote: > > +build_madt(tables->table_data, tables->linker, &cpu, guest_info); > > +acpi_add_table(table_offsets, tables->table_data); > > +if (misc.has_hpet) { > > +build_hpet(tables->table_data, tables->linker); > > +} > >

[Qemu-devel] [PATCH applied] acpi: fix tables for no-hpet configuration

2014-04-27 Thread Michael S. Tsirkin
acpi build tried to add offset of hpet table to rsdt even when hpet was disabled. If no tables follow hpet, this could lead to a malformed rsdt. Fix it up. To avoid such errors in the future, rearrange code slightly to make it clear that acpi_add_table stores the offset of the following table -

[Qemu-devel] [PULL 06/18] tests/.gitignore: Ignore test-rfifolock

2014-04-27 Thread Michael Tokarev
From: Cole Robinson Signed-off-by: Cole Robinson Signed-off-by: Michael Tokarev --- tests/.gitignore |1 + 1 file changed, 1 insertion(+) diff --git a/tests/.gitignore b/tests/.gitignore index 3aa1e95..c71c110 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -23,6 +23,7 @@ test-qmp

[Qemu-devel] [PULL 09/18] vl: Eliminate a superfluous local variable

2014-04-27 Thread Michael Tokarev
From: Chen Gang CODING_STYLE frowns upon mixing declarations and statements. main() has such a declaration. Clean up by eliminating the variable. Signed-off-by: Chen Gang Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- vl.c | 18 +- 1 file changed, 9 ins

[Qemu-devel] [PULL 18/18] slirp/smb: Move ncalrpc directory to tmp

2014-04-27 Thread Michael Tokarev
From: Michael Buesch The smbd forked by qemu still uses the default ncalrpc directory in /var/run/samba. This may lead to problems, if /var/run/samba does not exist (for example if /var/run is a tmpfs and the host smbd was not started). This leads to the following error message from samba and an

[Qemu-devel] [PULL 12/18] Add QEMU logo (SVG file)

2014-04-27 Thread Michael Tokarev
From: Stefan Weil The "Q" of the logo is already included in pc-bios/qemu_logo_no_text.svg. This file now adds the complete logo as it was designed by Benoît Canet. Benoît licensed it under CC-BY 3.0, see http://lists.gnu.org/archive/html/qemu-devel/2012-02/msg02865.html. Unneeded borders from

[Qemu-devel] [PULL 13/18] net/net.c: remove unnecessary semicolon

2014-04-27 Thread Michael Tokarev
From: Igor Ryzhov Signed-off-by: Igor Ryzhov Reviewed-by: Stefan Weil Signed-off-by: Michael Tokarev --- net/net.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index a4aadff..bc9ed6d 100644 --- a/net/net.c +++ b/net/net.c @@ -473,7 +473,7 @@ ssi

[Qemu-devel] [PULL 04/18] configure: Improve help behavior

2014-04-27 Thread Michael Tokarev
From: Fam Zheng Old: There are two paths to show help and exit 1, one is with "-h" or "--help", one is with invalid options. New: Show help and exit 0 for --help. On invalid option, don't show the long help and bury the early "ERROR:" line, just give a message pointing to --help. Signed-off-by:

[Qemu-devel] [PULL 05/18] move test-* from .gitignore to tests/.gitignore

2014-04-27 Thread Michael Tokarev
From: Laszlo Ersek Also sort the test-* entries in the latter. Signed-off-by: Laszlo Ersek Signed-off-by: Michael Tokarev --- .gitignore |9 - tests/.gitignore | 11 +-- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index d

[Qemu-devel] [PULL 03/18] vl: convert -m to QemuOpts

2014-04-27 Thread Michael Tokarev
From: Igor Mammedov Adds option to -m "size" - startup memory amount For compatibility with legacy CLI if suffix-less number is passed, it assumes amount in Mb. Otherwise user is free to use suffixed number using suffixes b,k/K,M,G Signed-off-by: Igor Mammedov Signed-off-by: Paolo Bonzini R

[Qemu-devel] [PULL 07/18] gitignore: cleanups #2

2014-04-27 Thread Michael Tokarev
A few more cleanups for .gitignore file. The final goal is to have only files in there which are generated during build. Things like .orig or .gdbinit are definitely not generated during build. Also, anchor a few more build-time directories. Signed-off-by: Michael Tokarev --- .gitignore |9

[Qemu-devel] [PULL 02/18] qemu-option: introduce qemu_find_opts_singleton

2014-04-27 Thread Michael Tokarev
From: Paolo Bonzini Reviewed-by: Laszlo Ersek Reviewed-by: Andreas Färber Signed-off-by: Paolo Bonzini Signed-off-by: Igor Mammedov Signed-off-by: Michael Tokarev --- include/qemu/config-file.h |2 ++ util/qemu-config.c | 14 ++ vl.c | 11 +-

[Qemu-devel] [PULL 01/18] misc: Use cpu_physical_memory_read and cpu_physical_memory_write

2014-04-27 Thread Michael Tokarev
From: Stefan Weil These functions don't need type casts (as does cpu_physical_memory_rw) and also make the code better readable. Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- cpus.c |2 +- hw/i386/kvmvapic.c | 31 ++

[Qemu-devel] [PULL 00/18] Trivial patches for 2014-04-28

2014-04-27 Thread Michael Tokarev
Here's another trivial-patches pull request. I removed all questionable or still-being-discussed patchses from there which accumulated recently. What's left are either code cleanups and rearrangements, spelling fixes or --help output improvements, adding Qemu logo file, one feature patch which's

Re: [Qemu-devel] [PATCH] qapi: treat all negative return of strtosz_suffix() as error

2014-04-27 Thread Michael S. Tsirkin
On Mon, Apr 28, 2014 at 12:16:02AM +0800, Amos Kong wrote: > String "-3" will be wrongly converted to -34 by strtosz_suffix(). > strtosz_suffix_unit() only returns integer in success situation. > > Signed-off-by: Amos Kong Looks correct to me. nitpick: while not introduced by this patch, it's

Re: [Qemu-devel] [PATCH] tap-linux: report an error for invalid sndbuf

2014-04-27 Thread Michael S. Tsirkin
On Mon, Apr 28, 2014 at 12:06:49PM +0800, Amos Kong wrote: > On Sun, Apr 27, 2014 at 08:16:58PM +0300, Michael S. Tsirkin wrote: > > On Mon, Apr 28, 2014 at 01:03:04AM +0800, Amos Kong wrote: > > > On Sun, Apr 27, 2014 at 05:20:28PM +0300, Michael S. Tsirkin wrote: > > > > On Sun, Apr 27, 2014 at 1

Re: [Qemu-devel] [PATCH] tap-linux: report an error for invalid sndbuf

2014-04-27 Thread Amos Kong
On Sun, Apr 27, 2014 at 08:16:58PM +0300, Michael S. Tsirkin wrote: > On Mon, Apr 28, 2014 at 01:03:04AM +0800, Amos Kong wrote: > > On Sun, Apr 27, 2014 at 05:20:28PM +0300, Michael S. Tsirkin wrote: > > > On Sun, Apr 27, 2014 at 10:09:10PM +0800, Amos Kong wrote: > > > > We use default sndbuf (IN

Re: [Qemu-devel] [PATCH v2 0/4] Allow sysbus devices to be attached via commandline

2014-04-27 Thread Alistair Francis
On Mon, Apr 14, 2014 at 10:57 AM, Alistair Francis wrote: > On Fri, Apr 11, 2014 at 7:13 PM, Peter Crosthwaite > wrote: >> On Fri, Apr 11, 2014 at 5:55 PM, Peter Maydell >> wrote: >>> On 11 April 2014 07:34, Alistair Francis >>> wrote: This patch allows sysbus devices to be attached via

Re: [Qemu-devel] [PATCH] e1000/rtl8139: forbid dealing with packets when VM is paused

2014-04-27 Thread Zhanghailiang
> On Sat, Apr 26, 2014 at 9:04 PM, Peter Maydell > wrote: > > On 26 April 2014 11:44, Amos Kong wrote: > >> > >> I'm ok with the patch idea. > >> > >> On Sat, Apr 26, 2014 at 06:19:12PM +0800, zhanghailiang wrote: > >>> For e1000/rtl8139, qemu can still send/receive packets when VM is > paused. >

Re: [Qemu-devel] [PATCH] e1000/rtl8139: forbid dealing with packets when VM is paused

2014-04-27 Thread Zhanghailiang
Hi Amos: Thanks for replying. > I'm ok with the patch idea. > > On Sat, Apr 26, 2014 at 06:19:12PM +0800, zhanghailiang wrote: > > For e1000/rtl8139, qemu can still send/receive packets when VM is paused. > > ^ >-> > isn't runni

[Qemu-devel] [PATCH] mirror: Use DIV_ROUND_UP

2014-04-27 Thread Fam Zheng
Although bdrv_getlength() was just called above this, and checked for error, it is better to just use the value we already get, and use DIV_ROUND_UP. Signed-off-by: Fam Zheng --- block/mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c in

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

2014-04-27 Thread Michael S. Tsirkin
On Mon, Apr 28, 2014 at 09:58:53AM +0800, Fam Zheng wrote: > On Sun, 04/27 11:59, Michael S. Tsirkin wrote: > > On Sun, Apr 27, 2014 at 09:34:06AM +0100, Peter Maydell wrote: > > > On 27 April 2014 09:29, Michael S. Tsirkin wrote: > > > > On Tue, Apr 22, 2014 at 04:55:15PM +0800, Fam Zheng wrote:

[Qemu-devel] [PATCH v2] mirror: Check for bdrv_get_info result

2014-04-27 Thread Fam Zheng
bdrv_get_info could fail. Add check before using the returned value. Signed-off-by: Fam Zheng --- V2: Handle error case (Stefan). Signed-off-by: Fam Zheng --- block/mirror.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index 2618c37.

Re: [Qemu-devel] [Crucial bug] Qemu-2.0.0 do not support virtio-net hot plug/unplug exceed two times

2014-04-27 Thread Gonglei (Arei)
Hi, > Il 26/04/2014 10:56, Gonglei (Arei) ha scritto: > > Public bug reported: > > > > I want to repeated hot-plug/unplug the virtio-net in the latest qemu > upstream > > (commit 839a5547574e57cce62f49bfc50fe1f04b00589a), but I am failed at > the > > second time hot plug the virtio-net to guest. >

Re: [Qemu-devel] [PATCH] mirror: Check for bdrv_get_info result

2014-04-27 Thread Fam Zheng
On Fri, 04/25 14:20, Stefan Hajnoczi wrote: > On Fri, Apr 25, 2014 at 02:50:29PM +0800, Fam Zheng wrote: > > bdrv_get_info could fail. Add check before using the returned value. > > > > Signed-off-by: Fam Zheng > > --- > > block/mirror.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions

Re: [Qemu-devel] [PATCH target-arm v1 1/2] char/cadence_uart: Handle qemu_chr_fe_write errors

2014-04-27 Thread Peter Crosthwaite
On Thu, Feb 13, 2014 at 5:22 AM, Peter Maydell wrote: > On 12 February 2014 03:36, Peter Crosthwaite > wrote: >> By just ignoring them and trying again later. This handles the >> EGAIN case properly (the previous implementation was only dealing >> with short returns and not errors). >> >> Signed-

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

2014-04-27 Thread Fam Zheng
On Sun, 04/27 11:59, Michael S. Tsirkin wrote: > On Sun, Apr 27, 2014 at 09:34:06AM +0100, Peter Maydell wrote: > > On 27 April 2014 09:29, Michael S. Tsirkin wrote: > > > On Tue, Apr 22, 2014 at 04:55:15PM +0800, Fam Zheng wrote: > > >> If guest driver behaves abnormally, emulation code could mar

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

2014-04-27 Thread Fam Zheng
On Fri, 04/25 14:18, Jeff Cody wrote: > On Wed, Apr 23, 2014 at 12:04:49PM +0200, Kevin Wolf wrote: > > 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

[Qemu-devel] [PATCH v2 2/2] ssi: Name the CS GPIO.

2014-04-27 Thread Peter Crosthwaite
To get it out of the default GPIO list. This allows child devices to use the un-named GPIO namespace without having to be SSI aware. That is, there is no more need for machines to know about the obscure policy where GPIO 0 is the SSI chip-select and GPIO 1..N are the concrete class GPIOs (defined l

[Qemu-devel] [PATCH v2 1/2] qdev: Implement named GPIOs

2014-04-27 Thread Peter Crosthwaite
Implement named GPIOs on the Device layer. Listifies the existing GPIOs stuff using string keys. Legacy un-named GPIOs are preserved by using a NULL name string - they are just a single matchable element in the name list. Signed-off-by: Peter Crosthwaite --- changed since v1: Use QLIST instead of

[Qemu-devel] [PATCH v2 0/2] Named GPIOs

2014-04-27 Thread Peter Crosthwaite
This series implements Named GPIOs on the qdev level. Patch 1 is the feature presentation. Second patch I give a useful example of the features use (an SSI cleanup). Changed since v1: use QLIST (AF review) Dropped former P1 (too far out of scope) Peter Crosthwaite (2): qdev: Implement named G

[Qemu-devel] [Bug 1310324] Re: Commit 0f842f8a introduces regression when using tcg-interpreter

2014-04-27 Thread Giovanni Mascellani
I can confirm that your change fixes my problem as well. Thank you very much! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1310324 Title: Commit 0f842f8a introduces regression when using tcg-inter

[Qemu-devel] [Bug 1298442] Re: build problem in qemu-2.0.0-rc0 No rule to make target `trace/generated-events.h'

2014-04-27 Thread Stefan Weil
** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1298442 Title: build problem in qemu-2.0.0-rc0 No rule to make target `trace /generated-events.h

[Qemu-devel] [Bug 1276847] Re: Build fails on latest MinGW

2014-04-27 Thread Stefan Weil
** Changed in: qemu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1276847 Title: Build fails on latest MinGW Status in QEMU: Invalid Bug description: I've run ac

[Qemu-devel] [Bug 1310324] Re: Commit 0f842f8a introduces regression when using tcg-interpreter

2014-04-27 Thread Stefan Weil
I can reproduce a similar problem when running the latest ReactOS live CD from http://downloads.sourceforge.net/reactos/ReactOS-0.3.16-REL- live.zip and see the regression caused by the same commit. It can be fixed by a small modification in cputlb.c: replace GETPC by GETRA in these two lines cpu

[Qemu-devel] [Bug 1310324] Re: Commit 0f842f8a introduces regression when using tcg-interpreter

2014-04-27 Thread Stefan Weil
** Changed in: qemu Status: New => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1310324 Title: Commit 0f842f8a introduces regression when using tcg-interpreter Status in QEMU:

Re: [Qemu-devel] [PATCH] SMI handler should set the CPL to zero and save and restore it on rsm.

2014-04-27 Thread Kevin O'Connor
On Sun, Apr 27, 2014 at 01:45:24PM -0400, Kevin O'Connor wrote: > On Sun, Apr 27, 2014 at 08:10:39AM +0200, Paolo Bonzini wrote: > > Il 26/04/2014 21:36, Kevin O'Connor ha scritto: > > >Yes, I was thinking of something like that as well. If QEMU > > >internally observes the formula above, then som

Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms

2014-04-27 Thread Alexander Graf
On 27.04.14 18:16, Paolo Bonzini wrote: Il 11/04/2014 14:27, Eric Blake ha scritto: But with just this patch, you have caused the situation where it is neither introspectible, nor consistent across qemu versions. The only way to code that up in libvirt is to do MULTIPLE version checks and corr

Re: [Qemu-devel] [PATCH] SMI handler should set the CPL to zero and save and restore it on rsm.

2014-04-27 Thread Kevin O'Connor
On Sun, Apr 27, 2014 at 08:10:39AM +0200, Paolo Bonzini wrote: > Il 26/04/2014 21:36, Kevin O'Connor ha scritto: > >Yes, I was thinking of something like that as well. If QEMU > >internally observes the formula above, then something like the patch > >below should work instead of my original patch.

Re: [Qemu-devel] [PATCH] SMI handler should set the CPL to zero and save and restore it on rsm.

2014-04-27 Thread Kevin O'Connor
On Sun, Apr 27, 2014 at 04:29:25PM +0200, Paolo Bonzini wrote: > Il 27/04/2014 14:22, Marcel Apfelbaum ha scritto: > >On Sat, 2014-04-26 at 11:06 +0200, Paolo Bonzini wrote: > >>KVM computes the CPL as follows: > >> > >>if (CR0.PE == 0) > >> return 0; > >> > >>if (!EFER.LMA && EFLAGS.VM) > >> r

Re: [Qemu-devel] [PATCH] tap-linux: report an error for invalid sndbuf

2014-04-27 Thread Michael S. Tsirkin
On Mon, Apr 28, 2014 at 01:03:04AM +0800, Amos Kong wrote: > On Sun, Apr 27, 2014 at 05:20:28PM +0300, Michael S. Tsirkin wrote: > > On Sun, Apr 27, 2014 at 10:09:10PM +0800, Amos Kong wrote: > > > We use default sndbuf (INT_MAX) if user assigns an invalid sndbuf. > > > This patch just added an err

Re: [Qemu-devel] [PATCH] tap-linux: report an error for invalid sndbuf

2014-04-27 Thread Amos Kong
On Sun, Apr 27, 2014 at 05:20:28PM +0300, Michael S. Tsirkin wrote: > On Sun, Apr 27, 2014 at 10:09:10PM +0800, Amos Kong wrote: > > We use default sndbuf (INT_MAX) if user assigns an invalid sndbuf. > > This patch just added an error note. > > > > Signed-off-by: Amos Kong > > --- > > net/tap-li

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-04-27 Thread Peter Maydell
On 27 April 2014 17:46, Michael Tokarev wrote: > 25.04.2014 21:24, Peter Maydell wrote: >> It is always going to be possible to determine that you're >> running on an emulator rather than real hardware, so changing >> QEMU behaviour just for this is uninteresting. If QEMU >> behaves differently fr

Re: [Qemu-devel] [PATCH] SMI handler should set the CPL to zero and save and restore it on rsm.

2014-04-27 Thread Kevin O'Connor
On Sun, Apr 27, 2014 at 08:10:39AM +0200, Paolo Bonzini wrote: > Il 26/04/2014 21:36, Kevin O'Connor ha scritto: > >Yes, I was thinking of something like that as well. If QEMU > >internally observes the formula above, then something like the patch > >below should work instead of my original patch.

Re: [Qemu-devel] [PATCH] improve emulation correctness

2014-04-27 Thread Michael Tokarev
25.04.2014 21:24, Peter Maydell wrote: > On 25 April 2014 09:13, Dmitry Poletaev wrote: > >> Emulated program can execute that test and after that >> can understand environment not real. > > It is always going to be possible to determine that you're > running on an emulator rather than real hard

[Qemu-devel] [PATCH 3/7] monitor: Add chardev-remove command completion.

2014-04-27 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 23 +++ 3 files changed, 25 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index ba13997..8c93e61 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1632,6 +

[Qemu-devel] [PATCH 5/7] monitor: Add set_link arguments completion.

2014-04-27 Thread Hani Benhabiles
Make it possible to query all net clients without specifying an ID when calling qemu_find_net_clients_except(). This also adds the add_completion_option() function which is to be used for other commands completions as well. Signed-off-by: Hani Benhabiles --- hmp-commands.hx | 1 + hmp.h

Re: [Qemu-devel] [PATCH] libcacard: actually use symbols file

2014-04-27 Thread Michael Tokarev
27.04.2014 19:11, Andreas Färber wrote: > Am 27.04.2014 16:37, schrieb Michael Tokarev: >> libtool has an argument for .syms file, which is -export-symbols. >> There's no argument `-export-syms', and it looks like at least on >> linux, -export-syms is just ignored. Use the correct argument, >> -ex

[Qemu-devel] [PATCH 0/7] Miscellaneous command completion patches

2014-04-27 Thread Hani Benhabiles
Compared to the larger series sent before: * Patches 01-03 are already in qmp branch. * Added patches to convert sendkey, help/? to use new completion callback. * Dropped patch 06 (cpu index completion) as deemed not useful enough. * netdev_add now uses the same values array as qapi instead of hard

[Qemu-devel] [PATCH] libcacard: replace qemu thread primitives with glib ones

2014-04-27 Thread Michael Tokarev
Replace QemuMutex with GMutex and QemuCond with GCond (with corresponding function changes), to make libcacard independent of qemu internal functions. After this step, none of libcacard internals use any qemu-provided symbols. Maybe it's a good idea to stop including qemu-common.h internally too.

[Qemu-devel] [PATCH 2/7] monitor: Convert help|? to use command_completion.

2014-04-27 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 24 +--- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index b3f45d6..ba13997 100644 --- a/hmp-commands.hx +++ b/hmp-command

Re: [Qemu-devel] QEMU: PCI bus name on PowerPC platforms

2014-04-27 Thread Paolo Bonzini
Il 11/04/2014 14:27, Eric Blake ha scritto: But with just this patch, you have caused the situation where it is neither introspectible, nor consistent across qemu versions. The only way to code that up in libvirt is to do MULTIPLE version checks and correlate it with architecture checks - and t

[Qemu-devel] [PATCH] qapi: treat all negative return of strtosz_suffix() as error

2014-04-27 Thread Amos Kong
String "-3" will be wrongly converted to -34 by strtosz_suffix(). strtosz_suffix_unit() only returns integer in success situation. Signed-off-by: Amos Kong --- qapi/opts-visitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c index

[Qemu-devel] [PATCH 7/7] monitor: Add netdev_del id argument completion.

2014-04-27 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 26 ++ 3 files changed, 28 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 73fbe54..f10f52f 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1245,

[Qemu-devel] [PATCH 6/7] monitor: Add netdev_add type argument completion.

2014-04-27 Thread Hani Benhabiles
Also update the command's documentation. Signed-off-by: Hani Benhabiles --- hmp-commands.hx | 3 ++- hmp.h | 1 + monitor.c | 15 +++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 353161f..73fbe54 100644 --- a

[Qemu-devel] [PATCH 1/7] monitor: Convert sendkey to use command_completion.

2014-04-27 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 32 +++- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 4c4d261..b3f45d6 100644 --- a/hmp-commands.hx +++ b/hmp

[Qemu-devel] [PATCH 4/7] monitor: Add chardev-add backend argument completion.

2014-04-27 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles --- hmp-commands.hx | 1 + hmp.h | 1 + monitor.c | 23 +++ 3 files changed, 25 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 8c93e61..648400a 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -1616,6 +

Re: [Qemu-devel] [PATCH 0/3] target-arm: support setend instruction

2014-04-27 Thread Peter Maydell
On 27 April 2014 16:28, Paolo Bonzini wrote: > Il 22/04/2014 09:01, Peter Maydell ha scritto: >> Note that SCTLR.EE also sets the endianness for loads done >> for translation table walks and so on. > I guess also v7m_push and v7m_pop. Well, not really. v7M handles endianness differently to A and

[Qemu-devel] [PATCH] vscclient: use glib thread primitives not qemu

2014-04-27 Thread Michael Tokarev
Do not include any qemu headers in vscclient.c, only use system and glib headers. The file becomes quite a bit lager because it now has more #includes and small portability functions, but this way it is much more stand-alone and independent. Signed-off-by: Michael Tokarev --- libcacard/vscclien

Re: [Qemu-devel] [PATCH 0/3] target-arm: support setend instruction

2014-04-27 Thread Paolo Bonzini
Il 22/04/2014 09:01, Peter Maydell ha scritto: On 22 April 2014 03:42, Paolo Bonzini wrote: Il 21/04/2014 18:08, Peter Maydell ha scritto: If we take an exception while the E bit is set we'll now incorrectly start executing the exception handler in big-endian mode. Minimally, we need to force

[Qemu-devel] VFIO / PCI-ASSIGN VGA Issues

2014-04-27 Thread Rafal Kupiec
Hello! I would like to pass through my VGA card to KVM and use to accelerate 3D, however everytime Windows complains about the assigned device showing error 43 in device manager. No matter I try to assign it using q35 and VFIO or pc and legacy pci-assign, the result is the same all the time. The V

Re: [Qemu-devel] [PATCH] libcacard: actually use symbols file

2014-04-27 Thread Andreas Färber
Am 27.04.2014 16:37, schrieb Michael Tokarev: > libtool has an argument for .syms file, which is -export-symbols. > There's no argument `-export-syms', and it looks like at least on > linux, -export-syms is just ignored. Use the correct argument, > -export-symbols, to actually get the right export

Re: [Qemu-devel] [PATCH] libcacard: actually use symbols file

2014-04-27 Thread Michael Tokarev
27.04.2014 18:53, Alon Levy wrote: > On 04/27/2014 05:37 PM, Michael Tokarev wrote: >> libtool has an argument for .syms file, which is -export-symbols. >> There's no argument `-export-syms', and it looks like at least on >> linux, -export-syms is just ignored. Use the correct argument, >> -export

Re: [Qemu-devel] [PATCH] libcacard: actually use symbols file

2014-04-27 Thread Alon Levy
On 04/27/2014 05:37 PM, Michael Tokarev wrote: > libtool has an argument for .syms file, which is -export-symbols. > There's no argument `-export-syms', and it looks like at least on > linux, -export-syms is just ignored. Use the correct argument, > -export-symbols, to actually get the right expor

[Qemu-devel] [PATCH] libcacard: actually use symbols file

2014-04-27 Thread Michael Tokarev
libtool has an argument for .syms file, which is -export-symbols. There's no argument `-export-syms', and it looks like at least on linux, -export-syms is just ignored. Use the correct argument, -export-symbols, to actually get the right export list. But it turns out that vscclient binary, which

Re: [Qemu-devel] [PATCH] libcacard: actually use the symbols file

2014-04-27 Thread Michael Tokarev
27.04.2014 18:14, Paolo Bonzini wrote: > Il 27/04/2014 15:53, Michael Tokarev ha scritto: >> So, what do we do here? Should we actually enable proper exporting? > > Yes, definitely. If you don't want libqemuutil/libqemustub, you can rewrite > things to use GLib instead of the handful of libqemu

Re: [Qemu-devel] [PATCH] SMI handler should set the CPL to zero and save and restore it on rsm.

2014-04-27 Thread Paolo Bonzini
Il 27/04/2014 14:22, Marcel Apfelbaum ha scritto: On Sat, 2014-04-26 at 11:06 +0200, Paolo Bonzini wrote: Il 25/04/2014 19:17, Kevin O'Connor ha scritto: The current SMI interrupt handler is being run with the same CPL as the code it interrupts. If the existing code is running with CPL=3, then

Re: [Qemu-devel] [PATCH] tap-linux: report an error for invalid sndbuf

2014-04-27 Thread Michael S. Tsirkin
On Sun, Apr 27, 2014 at 10:09:10PM +0800, Amos Kong wrote: > We use default sndbuf (INT_MAX) if user assigns an invalid sndbuf. > This patch just added an error note. > > Signed-off-by: Amos Kong > --- > net/tap-linux.c | 13 ++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > >

Re: [Qemu-devel] [PATCH] libcacard: actually use the symbols file

2014-04-27 Thread Paolo Bonzini
Il 27/04/2014 15:53, Michael Tokarev ha scritto: So, what do we do here? Should we actually enable proper exporting? Yes, definitely. If you don't want libqemuutil/libqemustub, you can rewrite things to use GLib instead of the handful of libqemuutil symbols that vscclient actually needs.

[Qemu-devel] [PATCH] tap-linux: report an error for invalid sndbuf

2014-04-27 Thread Amos Kong
We use default sndbuf (INT_MAX) if user assigns an invalid sndbuf. This patch just added an error note. Signed-off-by: Amos Kong --- net/tap-linux.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/net/tap-linux.c b/net/tap-linux.c index 812bf2d..fc0cc0d 100644

Re: [Qemu-devel] [PATCH] libcacard: actually use the symbols file

2014-04-27 Thread Michael Tokarev
27.04.2014 17:35, Paolo Bonzini пишет: > > > - Messaggio originale - >> Da: "Michael Tokarev" >> A: "Paolo Bonzini" , "Alon Levy" >> Cc: qemu-devel@nongnu.org >> Inviato: Domenica, 27 aprile 2014 14:59:45 >> Oggetto: Re: [Qemu-devel] [PATCH] libcacard: actually use the symbols file >> >

Re: [Qemu-devel] Running KVM inside pure Qemu?

2014-04-27 Thread Paolo Bonzini
> >> > >> oh great! do we suppport EPT, VCMS shadow yet? > > > > No nested page tables, and VMCS shadow is only supported by Intel > > processors not AMD. > > Oh, I always think that without EPT, it would not be possible to have > nested VMX. Am I wrong here? No, it's just slower. The nested hyp

Re: [Qemu-devel] [PATCH] libcacard: actually use the symbols file

2014-04-27 Thread Paolo Bonzini
- Messaggio originale - > Da: "Michael Tokarev" > A: "Paolo Bonzini" , "Alon Levy" > Cc: qemu-devel@nongnu.org > Inviato: Domenica, 27 aprile 2014 14:59:45 > Oggetto: Re: [Qemu-devel] [PATCH] libcacard: actually use the symbols file > > 27.04.2014 13:54, Paolo Bonzini wrote: > > Il 27/

Re: [Qemu-devel] [PATCH] libcacard: actually use the symbols file

2014-04-27 Thread Michael Tokarev
27.04.2014 13:54, Paolo Bonzini wrote: > Il 27/04/2014 10:10, Michael Tokarev ha scritto: [] >> Well. vscclient explicitly uses them in the code, but only links with >> libcacard, not with other qemu objects. So adding proper qemu objects >> here should be fine. I can take care of that. >> >> O

Re: [Qemu-devel] Running KVM inside pure Qemu?

2014-04-27 Thread Jun Koi
On Sun, Apr 27, 2014 at 3:05 PM, Paolo Bonzini wrote: > Il 27/04/2014 04:33, Jun Koi ha scritto: > >> >> >> >> On Sat, Apr 26, 2014 at 4:50 PM, Paolo Bonzini > > wrote: >> >> Il 25/04/2014 20:13, Shehbaz Jaffer ha scritto: >> >> Hi, >> >> Are you ta

Re: [Qemu-devel] [PATCH] SMI handler should set the CPL to zero and save and restore it on rsm.

2014-04-27 Thread Marcel Apfelbaum
On Sat, 2014-04-26 at 11:06 +0200, Paolo Bonzini wrote: > Il 25/04/2014 19:17, Kevin O'Connor ha scritto: > > The current SMI interrupt handler is being run with the same CPL as > > the code it interrupts. If the existing code is running with CPL=3, > > then the SMI handler can cause spurious exce

Re: [Qemu-devel] [PATCH 1/2] linux-user: Move if-elses to a switch statement

2014-04-27 Thread Riku Voipio
Hi, On Fri, Apr 25, 2014 at 02:42:14PM +0100, Huw Davies wrote: > > This makes adding more message types cleaner. > > > > Signed-off-by: Huw Davies > > --- > > linux-user/syscall.c | 51 > > +-- > > 1 file changed, 33 insertions(+), 18 deletions(

Re: [Qemu-devel] [PATCH v2 000/124] VMState Simplification (Massive)

2014-04-27 Thread Michael S. Tsirkin
On Sun, Apr 27, 2014 at 10:26:30AM +0200, Paolo Bonzini wrote: > Il 22/04/2014 13:39, Dr. David Alan Gilbert ha scritto: > >>> > >>> I agree. In many cases, _TEST is a huge review warning sign that > >>> subsections should have been used instead. > >I can see how the subsections should be used in

[Qemu-devel] [PATCH] gitignore: cleanups #2

2014-04-27 Thread Michael Tokarev
A few more cleanups for .gitignore file. The final goal is to have only files in there which are generated during build. Things like .orig or .gdbinit are definitely not generated during build. Also, anchor a few more build-time directories. Signed-off-by: Michael Tokarev --- .gitignore |9

Re: [Qemu-devel] [Qemu-trivial] [PATCH] po: Update all *.po files

2014-04-27 Thread Michael Tokarev
18.04.2014 16:15, Stefan Weil wrote: > Most changes were caused by line changes in ui/gtk.c and updated > automatically by running "make -C po update". > > In addition, the header entry "Language" was fixed, see this reference: > http://www.gnu.org/software/gettext/manual/html_node/Header-Entry.ht

[Qemu-devel] [PATCH] monitor: Add info qom-tree subcommand.

2014-04-27 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles --- Not sure whether the qobject stringifying functions could fit or be of some use elsewhere. Thus, I kept them as static near the only place where they are used at the moment. hmp-commands.hx | 2 + hmp.c | 143 +++

Re: [Qemu-devel] [Qemu-trivial] [PATCH] po/Makefile: Fix source path for in-tree builds

2014-04-27 Thread Stefan Weil
Am 27.04.2014 11:37, schrieb Michael Tokarev: > > How about moving it below inclusion of config-host.mak and using something > like > > SRC_PATH ?= $(realpath ..) > > ? I dunno how gnu'ish this construct is... :) > > > However, I think I've a better fix for this: > > Author: Michael Tokare

Re: [Qemu-devel] [PATCH] libcacard: actually use the symbols file

2014-04-27 Thread Paolo Bonzini
Il 27/04/2014 10:10, Michael Tokarev ha scritto: >> qemu_mutex_lock >> qemu_mutex_unlock >> qemu_cond_wait >> qemu_cond_signal >> qemu_thread_create >> socket_init >> qemu_socket >> qemu_mutex_init >> qemu_cond_init >> >> So it looks like a preparation patch is needed before this one, to >> ensur

Re: [Qemu-devel] [Qemu-trivial] [PATCH] po/Makefile: Fix source path for in-tree builds

2014-04-27 Thread Michael Tokarev
18.04.2014 15:55, Stefan Weil wrote: > Use an absolute value for SRC_PATH. This fixes a build problem: > > $ LANG=C make -C po update > make: Entering directory `/qemu/po' > GEN ../po/messages.po > /bin/sh: 1: cannot create ../po/messages.po: Directory nonexistent > make: *** [../po/messages.p

Re: [Qemu-devel] [Qemu-trivial] [PATCH V5 1/1] qmp: add pmemload command

2014-04-27 Thread Michael Tokarev
09.04.2014 21:49, Baojun Wang wrote: > I found this could be useful to have qemu-softmmu as a cross debugger (launch > with -s -S command line option), then if we can have a command to load guest > physical memory, we can use cross gdb to do some target debug which gdb cannot > do directly. > > Ma

Re: [Qemu-devel] [Qemu-trivial] [PATCH trivial] init_paths: fix minor memory leak

2014-04-27 Thread Michael Tokarev
10.04.2014 18:07, Kirill Batuzov wrote: > Fields "name" (created with strdup in new_entry) and "pathname" > (created with g_strdup_printf in new_entry) of pathelem struct should > be freed before the whole struct is. Applied to -trivial, thanks! The fun thing here is that the code _looks_ correct

  1   2   >