Re: [Qemu-devel] KVM call agenda for 2014-04-28

2014-04-28 Thread Michael S. Tsirkin
On Mon, Apr 28, 2014 at 05:34:34PM +0200, Markus Armbruster wrote: > Juan Quintela writes: > > > Hi > > > > Please, send any topic that you are interested in covering. > > [...] > > I'd like to have these things settled sooner than five minutes before > the scheduled hour, so here goes: call or

[Qemu-devel] E1000 emulation in QEMU (address range)

2014-04-28 Thread Ayaz Akram
Hi !! Can anyone tell me, what IO and mem address range is used by e1000 emulation in QEMU ??

Re: [Qemu-devel] [PATCH] configure: Enable dead code (lzo, snappy, quorum)

2014-04-28 Thread qiaonuohan
On 04/29/2014 02:21 PM, Stefan Weil wrote: Those options were not enabled by default, even when the build environment would have supported them, so the corresponding code was not compiled in normal test builds like on build bots. Signed-off-by: Stefan Weil Reviewed-by: Qiao Nuohan --- I'm

Re: [Qemu-devel] [PATCH] MAINTAINERS: addresses for responsible disclosure

2014-04-28 Thread Michael S. Tsirkin
On Mon, Apr 28, 2014 at 09:00:40PM +, Liguori, Anthony wrote: > I think this is a bit overkill. Hmm to clarify, this forces people to send info about 0 day exploits over the internet in cleartext. What do we get in return for sacrificing the privacy? A small convenience of not typing in 3 add

Re: [Qemu-devel] [PATCH 4/3] qemu-socket: Clean up inet_connect_opts()

2014-04-28 Thread Markus Armbruster
In-Reply-To missing, sorry! Markus Armbruster writes: > Separate the search for a working addrinfo from the code that does > something with it. Makes for a clearer search loop. > > Use a local Error * to simplify resetting the error in the search > loop. > > Signed-off-by: Markus Armbruster >

Re: [Qemu-devel] [PATCH] Makefile: Fix per-object variables for Makefile.target

2014-04-28 Thread Paolo Bonzini
Il 29/04/2014 05:29, Fam Zheng ha scritto: > The compiling is done in a subdir, so the extraction of per-object libs > and cflags are referencing objects with ../ prefixed. So prefix the > per-object variables "foo.o-cflags" and "foo.o-libs" to > "../foo.o-cflags" and "../foo.o-libs". > > Signed-o

[Qemu-devel] [PATCH 4/3] qemu-socket: Clean up inet_connect_opts()

2014-04-28 Thread Markus Armbruster
Separate the search for a working addrinfo from the code that does something with it. Makes for a clearer search loop. Use a local Error * to simplify resetting the error in the search loop. Signed-off-by: Markus Armbruster --- Forgot to include this one. inet_connect_opts() admittedly isn't i

[Qemu-devel] [PATCH] qga: Fix typo (plural) in comment

2014-04-28 Thread Stefan Weil
Signed-off-by: Stefan Weil --- qga/main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/main.c b/qga/main.c index d838c3e..38219c9 100644 --- a/qga/main.c +++ b/qga/main.c @@ -1110,7 +1110,7 @@ int main(int argc, char **argv) if (ga_is_frozen(s)) { if

Re: [Qemu-devel] [patch 2/2] target-i386: block migration and savevm if invariant tsc is exposed

2014-04-28 Thread Paolo Bonzini
Il 28/04/2014 21:23, Eduardo Habkost ha scritto: > Makes sense. Basically "-cpu host,migratable=yes" is close to > libvirt's host-model and Alex Graf's proposed "-cpu best". Should we > call it "-cpu best" and drop migratability of "-cpu host"? "-cpu best" is different from the modes above. It

[Qemu-devel] [PATCH] configure: Enable dead code (lzo, snappy, quorum)

2014-04-28 Thread Stefan Weil
Those options were not enabled by default, even when the build environment would have supported them, so the corresponding code was not compiled in normal test builds like on build bots. Signed-off-by: Stefan Weil --- I'm not sure whether this patch is trivial enough for qemu-trivial. Are there

Re: [Qemu-devel] [PATCH 1/3] megasas: add MegaRAID SAS 2108 emulation

2014-04-28 Thread Hannes Reinecke
On 04/28/2014 05:20 PM, Andreas Färber wrote: Am 28.04.2014 15:01, schrieb Hannes Reinecke: The 2108 chip supports MSI and MSI-X, so update the emulation to support both chips. Signed-off-by: Hannes Reinecke --- hw/scsi/megasas.c| 138 ++-

[Qemu-devel] [PATCH 2/5] glib-compat.h: add new thread API emulation on top of pre-2.31 API

2014-04-28 Thread Michael Tokarev
Thread API changed in glib-2.31 significantly. Before that version, conditionals and mutexes were only allocated dynamically, using _new()/_free() interface. in 2.31 and up, they're allocated statically as regular variables, and old interface is deprecated. (Note: glib docs says the new interfac

[Qemu-devel] [PATCH 0/5] glib thread interface and libcacard cleanups

2014-04-28 Thread Michael Tokarev
Basically libgthread has been rewritten in glib version 2.31, and old ways to use thread primitives stopped working while new ways appeared. The two interfaces were sufficiently different to warrant large ifdeffery across all code using it. Here's a patchset which tries to clean usage of glib thr

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

2014-04-28 Thread Michael Tokarev
Use glib-provided thread primitives in vscclient, not qemu thread primitives. This way, vscclient becomes more stand-alone. Signed-off-by: Michael Tokarev --- libcacard/vscclient.c | 75 + 1 file changed, 44 insertions(+), 31 deletions(-) diff

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

2014-04-28 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. Signed-off-by: Michael Tokarev Reviewed-by: A

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

2014-04-28 Thread Michael Tokarev
Replace QemuMutex with GMutex and QemuCond with GCond (with corresponding function changes), to make libcacard independent of qemu internal functions. Also replace single instance pstrcpy() in vcard_emul_nss.c to strncpy(). This reverts commit 2e679780ae86c6ca8. After this step, none of libcacar

[Qemu-devel] [PATCH 1/5] do not call g_thread_init() for glib >= 2.31

2014-04-28 Thread Michael Tokarev
glib >= 2.31 always enables thread support and g_thread_supported() is #defined to 1, there's no need to call g_thread_init() anymore, and it definitely does not need to report error which never happens. Keep code for old < 2.31 glibc anyway for now, just #ifdef it differently. Signed-off-by: Mich

[Qemu-devel] [PATCH] tci: Optimize saving of TCG code address

2014-04-28 Thread Stefan Weil
It is needed by the GETRA() macro which is called in helper functions, so it is sufficient to set it before calling any of these helper functions. In current QEMU, all targets use GETRA(). Therefore tci_tb_ptr is now needed unconditionally. Setting its value is time critical because it happens in

Re: [Qemu-devel] [PATCH] MAINTAINERS: addresses for responsible disclosure

2014-04-28 Thread Markus Armbruster
"Liguori, Anthony" writes: > I think this is a bit overkill. Many projects use private mailing > lists for this purpose. I guess you're right on the average level of paranoia among people willing to report security issues, but I'm afraid you might be off on the 90th percentile. Besides, an enc

[Qemu-devel] [Bug 1299190] Re: Access to /proc/self/exe in linux-user mode

2014-04-28 Thread Maxim Ostapenko
Hi, Is this patch deployed in new version of QEMU? Thanks, Maxim -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1299190 Title: Access to /proc/self/exe in linux-user mode Status in QEMU: New B

Re: [Qemu-devel] documenting our unfinished API/style transitions

2014-04-28 Thread Fam Zheng
On Mon, 04/28 11:56, Peter Maydell wrote: > QEMU tends to have rather a lot of half-finished API or coding style > transitions, as an inevitable consequence of our having such a large > code base with wildly varying levels of maintainedness. I thought it > would be useful to at least document them

Re: [Qemu-devel] [RFC PATCH V3 0/7] PSCI v0.2 support for KVM ARM/ARM64

2014-04-28 Thread Pranavkumar Sawargaonkar
Hi Peter, On 28 April 2014 22:44, Peter Maydell wrote: > On 10 April 2014 12:46, Pranavkumar Sawargaonkar > wrote: >> Recentely patches have been posted for in-kernel emulation of PSCI v0.2 >> http://www.spinics.net/lists/arm-kernel/msg305467.html >> This patchset adds the QEMU side changes for

Re: [Qemu-devel] [PATCH] Makefile: Fix per-object variables for Makefile.target

2014-04-28 Thread Michael Tokarev
29.04.2014 07:29, Fam Zheng wrote: > The compiling is done in a subdir, so the extraction of per-object libs > and cflags are referencing objects with ../ prefixed. So prefix the > per-object variables "foo.o-cflags" and "foo.o-libs" to > "../foo.o-cflags" and "../foo.o-libs". > > Signed-off-by: F

Re: [Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-28 Thread Michael Tokarev
[am...@redhat.com bounces, removed from Cc] 29.04.2014 00:07, Mike Day wrote: [] > Suggestions much appreciated, I think its ugly versus intrusive, but > I'm not familiar with this part of qemu. > > There is another case with -monitor where you can configure two > chardevs for stdio and it does t

[Qemu-devel] [PATCH] Makefile: Fix per-object variables for Makefile.target

2014-04-28 Thread Fam Zheng
The compiling is done in a subdir, so the extraction of per-object libs and cflags are referencing objects with ../ prefixed. So prefix the per-object variables "foo.o-cflags" and "foo.o-libs" to "../foo.o-cflags" and "../foo.o-libs". Signed-off-by: Fam Zheng --- Makefile.target | 11 ++-

Re: [Qemu-devel] [Xen-devel] Hvmloader: Modify ACPI to only supply _EJ0 methods for PCIslots that support hotplug by runtime patching

2014-04-28 Thread Gonglei (Arei)
Hi, > >> Subject: Re: [Qemu-devel] [Xen-devel] Hvmloader: Modify ACPI to only > supply > >> _EJ0 methods for PCIslots that support hotplug by runtime patching > >> > >> On Mon, 2014-04-28 at 12:14 +0200, Fabio Fantoni wrote: > >>> Il 22/01/2014 15:32, Fabio Fantoni ha scritto: > Il 28/10/2013

[Qemu-devel] [PATCH] spapr_pci: Fix maximum IRQ number check in ibm, change-msi

2014-04-28 Thread Alexey Kardashevskiy
Recently a check for maximum supported MSIX vectors number has been added. However the check always assumed that MSIX is the only case and failed on devices which have MSI but do not have MSIX such as QEMU's PCI Bridge. This results in assert in xics_alloc_block() as req_num is zero. This adds a c

Re: [Qemu-devel] [PATCH] uhci: Lower uhci timer freq when guest is idle

2014-04-28 Thread Gonglei (Arei)
Hi, > -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Monday, April 28, 2014 9:35 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; Huangweidong (C) > Subject: Re: [PATCH] uhci: Lower uhci timer freq when guest is idle > > On Mo, 2014-04-28 at 12:11 +, G

[Qemu-devel] Guest OS(windows 2012 R2) get poor performance on KVM with HP DL580G7? thanks.

2014-04-28 Thread 蔡志峰
hi all, I'm trying to run windows 2012 R2 datacenter as a virtual domain with qemu-kvm virtualization architecture which running on HP DL580G7 server, but, unfortunately,it seems to get poor performance, with a total score of 90 tested by passmark version 8 which I downloaded from link htt

[Qemu-devel] Guest OS(windows 2012 R2) get poor performance on KVM with HP DL580G7? thanks.

2014-04-28 Thread 蔡志峰
hi all, I'm trying to run windows 2012 R2 datacenter as a virtual domain with qemu-kvm virtualization architecture which running on HP DL580G7 server, but, unfortunately,it seems to get poor performance, with a total score of 90 tested by passmark version 8 which I downloaded from link htt

Re: [Qemu-devel] [PATCH] virtio-rng: support multiple virtio-rng devices

2014-04-28 Thread Rusty Russell
Amos Kong writes: > Current hwrng core supports to register multiple hwrng devices, > and there is only one device really works in the same time. > QEMU alsu supports to have multiple virtio-rng backends. > > This patch changes virtio-rng driver to support multiple > virtio-rng devices. I never t

[Qemu-devel] [PATCH microblaze v1 3/3] microblaze: Support loading of u-boot initrd images

2014-04-28 Thread Peter Crosthwaite
From: "Edgar E. Iglesias" As was done for ARM recently in commit fd76663e3fe59dc7f7d5c439561b74f472727137. Signed-off-by: Edgar E. Iglesias [ PC Changes: * Expanded commit message ] Signed-off-by: Peter Crosthwaite --- hw/microblaze/boot.c | 7 --- 1 file changed, 4 insertions(+), 3 del

[Qemu-devel] [PATCH microblaze v1 2/3] microblaze: boot: Don't hack the elf entry point

2014-04-28 Thread Peter Crosthwaite
There was some modulo logic to ensure that Microblaze always booted into physical RAM regardless of the elf entry. Removed it, as QEMU should fail gracefully when given a bad elf, rather than attempt to run it. Signed-off-by: Peter Crosthwaite --- hw/microblaze/boot.c | 2 +- 1 file changed, 1

[Qemu-devel] [PATCH microblaze v1 1/3] microblaze: Respect the reset vector

2014-04-28 Thread Peter Crosthwaite
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias Signed-off-by: Peter Crosthwaite --- target-microblaze/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target-microblaze/cpu.c b/target-microblaze/cpu.c index 8e04811..0379f2b 100644 --- a/target-microblaze/cpu.c +++ b/tar

[Qemu-devel] [PATCH microblaze v1 0/3] Microblaze Patches

2014-04-28 Thread Peter Crosthwaite
Hi Edgar, Small mixed bag of Microblaze patches that are in my tree. Regards, Peter Edgar E. Iglesias (2): microblaze: Respect the reset vector microblaze: Support loading of u-boot initrd images Peter Crosthwaite (1): microblaze: boot: Don't hack the elf entry point hw/microblaze/boo

Re: [Qemu-devel] [PATCH 4/7] slirp: Add translator of DHCP vendor option string to DHCP TLV representation

2014-04-28 Thread Fedor Lyakhov
Yes, sure. No problem. On Tue, Apr 29, 2014 at 3:56 AM, Eric Blake wrote: > On 04/25/2014 04:11 PM, Fedor Lyakhov wrote: >> New module dhcp_vendopt.c provides translate_dhcp_vendopt() function to >> convert >> command-line DHCP vendor option string into internal DHCP TLV (tag-length- >> value) u

Re: [Qemu-devel] [PATCH 6/7] slirp: Add description of new "dhcpvendopt" suboption to the help and man page

2014-04-28 Thread Eric Blake
On 04/25/2014 04:11 PM, Fedor Lyakhov wrote: > Signed-off-by: Fedor Lyakhov > --- > qemu-options.hx | 16 +--- > 1 file changed, 13 insertions(+), 3 deletions(-) > +" > [,hostname=host][,dhcpstart=addr][,dns=addr][,dhcpvendopt=optstring]\n" > > +@item dhcpvendopt=@var

Re: [Qemu-devel] [PATCH 4/7] slirp: Add translator of DHCP vendor option string to DHCP TLV representation

2014-04-28 Thread Eric Blake
On 04/25/2014 04:11 PM, Fedor Lyakhov wrote: > New module dhcp_vendopt.c provides translate_dhcp_vendopt() function to > convert > command-line DHCP vendor option string into internal DHCP TLV (tag-length- > value) uint8_t buffer. The buffer is stored in global Slirp instance. > > Signed-off-by:

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

2014-04-28 Thread Peter Crosthwaite
On Tue, Apr 29, 2014 at 12:54 AM, Peter Maydell wrote: > On 28 April 2014 01:45, Peter Crosthwaite > wrote: >> 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

[Qemu-devel] [PATCH] qmp: Report path ambiguity error.

2014-04-28 Thread Hani Benhabiles
Signed-off-by: Hani Benhabiles Suggested-by: Andreas Färber --- qmp.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qmp.c b/qmp.c index 74107be..0d49abf 100644 --- a/qmp.c +++ b/qmp.c @@ -199,7 +199,10 @@ ObjectPropertyInfoList *qmp_qom_list(const char *path, Error **e

[Qemu-devel] [PATCH v2] block: Ignore duplicate or NULL format_name in bdrv_iterate_format

2014-04-28 Thread Jeff Cody
Some block drivers have multiple BlockDriver instances with identical format_name fields (e.g. gluster, nbd). Both qemu-img and qemu will use bdrv_iterate_format() to list the supported formats when a help option is invoked. As protocols and formats may register multiple drivers, redundant listin

Re: [Qemu-devel] [PATCH v3] QemuOpt: add unit tests

2014-04-28 Thread Leandro Dorileo
Hi Andreas, On Mon, Apr 28, 2014 at 09:02:12PM +0200, Andreas Färber wrote: > Am 28.04.2014 20:55, schrieb Leandro Dorileo: > > ping? > > > > > > On Tue, Mar 25, 2014 at 10:27:19AM -0300, Leandro Dorileo wrote: > >> Cover basic aspects and API usage for QemuOpt. The current implementation > >> c

[Qemu-devel] [PATCH v3 07/16] tcg-ppc64: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-28 Thread Richard Henderson
And use tcg pointer differencing functions as appropriate. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 164 - tcg/ppc64/tcg-target.h | 1 + 2 files changed, 81 insertions(+), 84 deletions(-) diff --git a/tcg/ppc64/tcg-target.c

[Qemu-devel] [PATCH v2 07/15] hmp: Guard against misuse of hmp_handle_error()

2014-04-28 Thread Markus Armbruster
Null errp argument makes no sense. Assert it's not null, to make this explicit, and guard against misuse. All current callers pass non-null errp. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- hmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hmp.c b/hm

[Qemu-devel] [PATCH v2 01/15] qmp hmp: Consistently name Error * objects err, and not errp

2014-04-28 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- docs/writing-qmp-commands.txt | 28 hmp.c | 138 ++--- include/qapi/qmp/dispatch.h| 2 +- qapi/qmp-dispatch.c| 6 +- tests/test-qmp

Re: [Qemu-devel] [PATCH] tests/tcg: Fix compilation of test_path

2014-04-28 Thread Stefan Weil
Am 28.04.2014 21:35, schrieb Peter Maydell: > The test_path binary is (unlike the other test binaries in tests/tcg) > actually intended to be compiled with the same compiler used to build > the main QEMU executables. It actually #includes a number of the > QEMU source files in an attempt to unit-te

[Qemu-devel] [PATCH v2 04/15] qmp: Consistently name Error ** objects errp, and not err

2014-04-28 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qmp.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qmp.c b/qmp.c index 74107be..ee8357f 100644 --- a/qmp.c +++ b/qmp.c @@ -41,7 +41,7 @@ NameInfo *qmp_query_name(Error **errp) return info;

[Qemu-devel] [PATCH v2 15/15] qmp: Don't use error_is_set() to suppress additional errors

2014-04-28 Thread Markus Armbruster
Using error_is_set(errp) that way can sweep programming errors under the carpet when we get called incorrectly with an error set. encrypted_bdrv_it() does it, because there's no way to make bdrv_iterate() break its loop. Actually safe, because qmp_cont() clears the error before the loop. Clean i

[Qemu-devel] [PATCH v3 15/16] tci: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-28 Thread Richard Henderson
And use tcg pointer differencing functions as appropriate. Cc: Stefan Weil Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c | 19 +-- tcg/tci/tcg-target.h | 1 + 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tcg/tci/tcg-target.c b/tcg/tci/tcg-target.c

[Qemu-devel] [PATCH v2 06/15] qga: Use return values instead of error_is_set(errp)

2014-04-28 Thread Markus Armbruster
Using error_is_set(errp) to check whether a function call failed is fragile: it breaks when errp is null. ga_get_fd_handle() and guest_file_handle_add() don't return a useful value when they fail, but that's just stupid. Fix that, and check them instead. As far as I can tell, errp can't be null

[Qemu-devel] [PATCH v2 09/15] tests/qapi-schema: Drop superfluous error_is_set()

2014-04-28 Thread Markus Armbruster
visit_type_TestStruct() does nothing when called with an error set. Callers shouldn't do that, and no caller does. Drop the superfluous test. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/test-qmp-input-visitor.c | 25 - 1 file changed, 12 insertion

Re: [Qemu-devel] [PATCH] savevm: check vmsd for migratability status

2014-04-28 Thread Eduardo Habkost
On Fri, Apr 25, 2014 at 07:47:09PM -0300, Marcelo Tosatti wrote: > > Check vmsd for unmigratable field, allowing migratibility status > to be modified after vmstate_register. > > Signed-off-by: Marcelo Tosatti > > diff --git a/savevm.c b/savevm.c > index 22123be..61a25c0 100644 > --- a/savevm.c

[Qemu-devel] [PATCH v2 08/15] qapi: Drop redundant, unclean error_is_set()

2014-04-28 Thread Markus Armbruster
do_qmp_dispatch()'s test for qmp_dispatch_check_obj() failure examines both the return value and the error object. The latter part is unclean; it works only when do_qmp_dispatch()'s caller passes a non-null errp argument. That's the case, but it's not locally obvious. Unclean. Cleanup would be

[Qemu-devel] [PATCH v2 12/15] qga: Drop superfluous error_is_set()

2014-04-28 Thread Markus Armbruster
acquire_privilege(), execute_async() and check_suspend_mode() do nothing when called with an error set. Callers shouldn't do that, and no caller does. Drop the superfluous tests. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qga/commands-win32.c | 10 -- 1 file changed,

[Qemu-devel] [PATCH v2 11/15] qga: Clean up fragile use of error_is_set()

2014-04-28 Thread Markus Armbruster
Using error_is_set(ERRP) to find out whether a function failed is either wrong, fragile, or unnecessarily opaque. It's wrong when ERRP may be null, because errors go undetected when it is. It's fragile when proving ERRP non-null involves a non-local argument. Else, it's unnecessarily opaque (see

[Qemu-devel] [PATCH v2 10/15] qapi: Clean up fragile use of error_is_set()

2014-04-28 Thread Markus Armbruster
Using error_is_set(ERRP) to find out whether a function failed is either wrong, fragile, or unnecessarily opaque. It's wrong when ERRP may be null, because errors go undetected when it is. It's fragile when proving ERRP non-null involves a non-local argument. Else, it's unnecessarily opaque (see

[Qemu-devel] [PATCH v2 13/15] qemu-option: Clean up fragile use of error_is_set()

2014-04-28 Thread Markus Armbruster
Using error_is_set(ERRP) to find out whether to bail out due to previous error is either wrong, fragile, or unnecessarily opaque. It's wrong when ERRP may be null, because errors go undetected when it is. It's fragile when proving ERRP non-null involves a non-local argument. Else, it's unnecessar

[Qemu-devel] [PATCH v2 14/15] dump: Drop pointless error_is_set(), DumpState member errp

2014-04-28 Thread Markus Armbruster
In qmp_dump_guest_memory(), the error must be clear on entry, and we always bail out after setting it, directly or via dump_init(). Therefore, both error_is_set() are always false. Drop them. DumpState member errp is now write-only. Drop it, too. Signed-off-by: Markus Armbruster Reviewed-by: E

[Qemu-devel] [PATCH v2 03/15] qga: Consistently name Error ** objects errp, and not err

2014-04-28 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qga/commands-posix.c | 10 +- qga/commands-win32.c | 10 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index e49c7da..f6af7d1 100644 --- a/qga/commands-p

[Qemu-devel] [PATCH v2 02/15] qga: Consistently name Error ** objects errp, and not err

2014-04-28 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qga/commands-posix.c | 209 ++- qga/commands-win32.c | 115 ++-- qga/commands.c | 4 +- qga/vss-win32.c | 4 +- qga/vss-win32.h | 2 +- 5 fil

[Qemu-devel] [PATCH v2 05/15] error: Consistently name Error ** objects errp, and not err

2014-04-28 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- include/qapi/error.h | 27 --- util/error.c | 8 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/include/qapi/error.h b/include/qapi/error.h index c0f0c3b..7995801 100644 --- a

[Qemu-devel] [PATCH v2 00/15] qmp qga: Purge error_is_set()

2014-04-28 Thread Markus Armbruster
I got a private branch getting rid of it entirely. This is the fifth part, covering QMP and the guest agent up to the point where I start messing with the QAPI code generators. That's left for the final part. Luiz agreed to take this through his tree. v2: - Rebased, straightforward conflict in

[Qemu-devel] [PATCH v3 06/16] tcg-i386: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-28 Thread Richard Henderson
And use tcg pointer differencing functions as appropriate. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 48 tcg/i386/tcg-target.h | 2 ++ 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a

[Qemu-devel] [PATCH v3 16/16] tcg: Require TCG_TARGET_INSN_UNIT_SIZE

2014-04-28 Thread Richard Henderson
Now that all backends do define TCG_TARGET_INSN_UNIT_SIZE, remove the fallback definition. Signed-off-by: Richard Henderson --- tcg/tcg.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tcg/tcg.h b/tcg/tcg.h index a3fb88c..4f4b1fa 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @

[Qemu-devel] [PATCH v3 13/16] tcg-ia64: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-28 Thread Richard Henderson
Using a 16-byte aligned structure achieves best results, both for code cleanliness and compiled code size. However, this means that we can't use the trick of encoding the slot number into the low 2 bits. Thankfully, we only ever use slot2, so make that explicit in the names of the relocation func

[Qemu-devel] [PATCH v3 05/16] tcg: Define tcg_insn_unit for code pointers

2014-04-28 Thread Richard Henderson
To be defined by the tcg backend based on the elemental unit of the ISA. During the transition, allow TCG_TARGET_INSN_UNIT_SIZE to be undefined, which allows us to default tcg_insn_unit to the current uint8_t. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/exec-all

[Qemu-devel] [PATCH v3 03/16] tcg: Avoid undefined behaviour patching code at unaligned addresses

2014-04-28 Thread Richard Henderson
From: Peter Maydell To avoid C undefined behaviour when patching generated code, provide wrappers tcg_patch8/16/32/64 which use the usual memcpy trick, and use them in the i386 backend. Reviewed-by: Alex Bennée Signed-off-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/i386/tcg-ta

Re: [Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-28 Thread Mike Day
On Mon, Apr 28, 2014 at 3:53 PM, Michael Tokarev wrote: > Gosh. This is uuugly. > > Maybe, at least, we can add some variable which gets incremented for > each -mon chardev= ? I dunno, that's about the same ugliness. Oh > well... :( Suggestions much appreciated, I think its ugly versus intr

[Qemu-devel] [PATCH v3 09/16] tcg-sparc: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-28 Thread Richard Henderson
And use tcg pointer differencing functions as appropriate. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c | 128 +++-- tcg/sparc/tcg-target.h | 1 + 2 files changed, 60 insertions(+), 69 deletions(-) diff --g

[Qemu-devel] [PATCH v3 14/16] tcg-mips: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-28 Thread Richard Henderson
And use tcg pointer differencing functions as appropriate. Cc: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c | 116 -- tcg/mips/tcg-target.h | 1 + 2 files changed, 37 insertions(+), 80 deletions(-) diff --git a/tcg/

Re: [Qemu-devel] [PATCH] -nographic sometimes adds an extra chardev for stdio

2014-04-28 Thread Michael Tokarev
28.04.2014 19:00, Mike Day wrote: > When the deprecated -nographic option is used with the -mon option in > readline mode, qemu will create a second character device for stdio > and place it over the stdio chardev put into place by the -mon > option. This causes the terminal to stop echoeing charac

Re: [Qemu-devel] [PATCH] tests/tcg: Fix compilation of test_path

2014-04-28 Thread Peter Maydell
On 28 April 2014 20:35, Peter Maydell wrote: > --- a/tests/tcg/Makefile > +++ b/tests/tcg/Makefile > @@ -81,10 +81,10 @@ run-test_path: test_path > # rules to compile tests > > test_path: test_path.o > - $(CC_I386) $(LDFLAGS) -o $@ $^ $(LIBS) > + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) > >

Re: [Qemu-devel] [patch 2/2] target-i386: block migration and savevm if invariant tsc is exposed

2014-04-28 Thread Eduardo Habkost
On Mon, Apr 28, 2014 at 09:06:42PM +0200, Paolo Bonzini wrote: > Il 28/04/2014 17:46, Eduardo Habkost ha scritto: > >>So I couldn't indeed think of uses of "-cpu host" together with > >>migration. But if you're sure there is none, block it in QEMU. > >>There's no reason why this should be specific

Re: [Qemu-devel] [PATCH qom-next] MAINTAINERS: Document QOM

2014-04-28 Thread Paolo Bonzini
Il 28/04/2014 21:29, Andreas Färber ha scritto: Am 28.04.2014 21:11, schrieb Paolo Bonzini: Il 28/04/2014 20:07, Andreas Färber ha scritto: Acked-by: Paolo Bonzini Thanks. Note that I have excluded qom-qobject.[hc] here, which I have never touched or reviewed and carries your authorship. Mayb

Re: [Qemu-devel] [PATCH v3 3/3] qapi: Suppress unwanted space between type and identifier

2014-04-28 Thread Markus Armbruster
Paolo Bonzini writes: > Il 28/04/2014 09:02, Amos Kong ha scritto: >> def mcgen(code, **kwds): >> -return cgen('\n'.join(code.split('\n')[1:-1]), **kwds) >> +raw = cgen('\n'.join(code.split('\n')[1:-1]), **kwds) >> +return re.sub(re.escape(eatspace) + ' +', '', raw) > > I'd feel a li

[Qemu-devel] [PATCH v3 12/16] tcg-s390: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-28 Thread Richard Henderson
And use tcg pointer differencing functions as appropriate. Signed-off-by: Richard Henderson --- tcg/s390/tcg-target.c | 91 --- tcg/s390/tcg-target.h | 2 ++ 2 files changed, 45 insertions(+), 48 deletions(-) diff --git a/tcg/s390/tcg-target.c b/

[Qemu-devel] [PATCH] tests/tcg: Fix compilation of test_path

2014-04-28 Thread Peter Maydell
The test_path binary is (unlike the other test binaries in tests/tcg) actually intended to be compiled with the same compiler used to build the main QEMU executables. It actually #includes a number of the QEMU source files in an attempt to unit-test the util/path.c functions, and so if it is not co

[Qemu-devel] [PATCH v3 11/16] tcg-aarch64: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-28 Thread Richard Henderson
And use tcg pointer differencing functions as appropriate. Cc: Claudio Fontana Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c | 121 --- tcg/aarch64/tcg-target.h | 1 + 2 files changed, 53 insertions(+), 69 deletions(-) diff --git a/

[Qemu-devel] [PATCH v3 02/16] tcg: Avoid stores to unaligned addresses

2014-04-28 Thread Richard Henderson
From: Peter Maydell Avoid stores to unaligned addresses in TCG code generation, by using the usual memcpy() approach. (Using bswap.h would drag a lot of QEMU baggage into TCG, so it's simpler just to do direct memcpy() here.) Reviewed-by: Alex Bennée Signed-off-by: Peter Maydell Signed-off-by:

[Qemu-devel] [PATCH v3 01/16] exec-all.h: Use stl_p to avoid undefined behaviour patching x86 jumps

2014-04-28 Thread Richard Henderson
From: Peter Maydell The code which patches x86 jump instructions assumes it can do an unaligned write of a uint32_t. This is actually safe on x86, but it's still undefined behaviour. We have infrastructure for doing efficient unaligned accesses which doesn't engage in undefined behaviour, so use

Re: [Qemu-devel] [PATCH qom-next] MAINTAINERS: Document QOM

2014-04-28 Thread Andreas Färber
Am 28.04.2014 21:11, schrieb Paolo Bonzini: > Il 28/04/2014 20:07, Andreas Färber ha scritto: >>> > Acked-by: Paolo Bonzini >> Thanks. Note that I have excluded qom-qobject.[hc] here, which I have >> never touched or reviewed and carries your authorship. Maybe add it to >> the QAPI entry? >> >> ob

[Qemu-devel] [PATCH v3 00/16] tcg: tidy the type of code_ptr

2014-04-28 Thread Richard Henderson
Changes v2-v3: * Make more use, where appropriate, of normal pointer arithmetic under the new type. In particular, if the target previously computed (label - code_ptr) >> 2 using byte arithmetic, we can now arrange for this to be just label - code_ptr with

[Qemu-devel] [PATCH v3 10/16] tcg-arm: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-28 Thread Richard Henderson
And use tcg pointer differencing functions as appropriate. Cc: Peter Maydell Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c | 150 +++ tcg/arm/tcg-target.h | 1 + 2 files changed, 55 insertions(+), 96 deletions(-) diff --git a/tcg/ar

[Qemu-devel] [PATCH v3 08/16] tcg-ppc: Define TCG_TARGET_INSN_UNIT_SIZE

2014-04-28 Thread Richard Henderson
And use tcg pointer differencing functions as appropriate. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c | 195 --- tcg/ppc/tcg-target.h | 1 + 2 files changed, 94 insertions(+), 102 deletions(-) diff --gi

[Qemu-devel] [PATCH v3 04/16] tcg: Introduce byte pointer arithmetic helpers

2014-04-28 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/tcg.h | 45 + 1 file changed, 45 insertions(+) diff --git a/tcg/tcg.h b/tcg/tcg.h index a6a2d06..d38c92d 100644 --- a/tcg/tcg.h +++ b/tcg/tcg.h @@ -724,6 +724,51 @@ TCGv_i32 tcg_const

Re: [Qemu-devel] [PATCH qom-next] MAINTAINERS: Document QOM

2014-04-28 Thread Paolo Bonzini
Il 28/04/2014 20:07, Andreas Färber ha scritto: > Acked-by: Paolo Bonzini Thanks. Note that I have excluded qom-qobject.[hc] here, which I have never touched or reviewed and carries your authorship. Maybe add it to the QAPI entry? object_interfaces.c has neither license header nor copyright, w

Re: [Qemu-devel] [patch 2/2] target-i386: block migration and savevm if invariant tsc is exposed

2014-04-28 Thread Paolo Bonzini
Il 28/04/2014 17:46, Eduardo Habkost ha scritto: So I couldn't indeed think of uses of "-cpu host" together with migration. But if you're sure there is none, block it in QEMU. There's no reason why this should be specific to libvirt. It's not that there are no useful use cases, it is that we s

Re: [Qemu-devel] [PATCH] block: Add '--version' option to qemu-img

2014-04-28 Thread Eric Blake
On 04/28/2014 12:37 PM, Jeff Cody wrote: > This allows qemu-img to print out version information, without > needing to print the long help wall of text. > > While there, perform some minor whitespace cleanup, and remove the > unused option_index variable in the call to getopt_long(). > > Reported

Re: [Qemu-devel] [PATCH v3] QemuOpt: add unit tests

2014-04-28 Thread Andreas Färber
Am 28.04.2014 20:55, schrieb Leandro Dorileo: > ping? > > > On Tue, Mar 25, 2014 at 10:27:19AM -0300, Leandro Dorileo wrote: >> Cover basic aspects and API usage for QemuOpt. The current implementation >> covers the API's planned to be changed by Chunyan Liu in his >> QEMUOptionParameter >> repl

Re: [Qemu-devel] [PATCH v3] QemuOpt: add unit tests

2014-04-28 Thread Leandro Dorileo
ping? On Tue, Mar 25, 2014 at 10:27:19AM -0300, Leandro Dorileo wrote: > Cover basic aspects and API usage for QemuOpt. The current implementation > covers the API's planned to be changed by Chunyan Liu in his > QEMUOptionParameter > replacement/cleanup job. > > Other APIs should be covered in

Re: [Qemu-devel] [PATCH] MAINTAINERS: addresses for responsible disclosure

2014-04-28 Thread Michael S. Tsirkin
On Mon, Apr 28, 2014 at 05:35:38PM +0300, Michael S. Tsirkin wrote: > I'll play around once I get the password. > From what I've seen so far, > I'm not sure it's the right server to use for security :( I did some more reseach and savannah does not seem to support any encryption for its lists: neit

Re: [Qemu-devel] [PATCH] QEMU: ARM: boot: Load kernel at an Image friendly address

2014-04-28 Thread Uwe Kleine-König
On Mon, Mar 24, 2014 at 10:34:44PM -0500, Joel Fernandes wrote: > Loading kernel at offset 0x1 works only for zImage, but not for Image, > because the kernel expect the start of decompressed kernel (.head.text) to be > at an address that's a distance that's 16MB aligned from PAGE_OFFSET + > TE

[Qemu-devel] [PULL 00/13] tcg/sparc update

2014-04-28 Thread Richard Henderson
ble in the git repository at: git://github.com/rth7680/qemu.git tags/tcg-sparc-pull-20140428 for you to fetch changes up to ebd0c614d77898741c1ec70b5c5ca3f263253da3: tcg-sparc: Accept stores of zero (2014-04-28 11:06:35 -0700)

[Qemu-devel] [PATCH] block: Add '--version' option to qemu-img

2014-04-28 Thread Jeff Cody
This allows qemu-img to print out version information, without needing to print the long help wall of text. While there, perform some minor whitespace cleanup, and remove the unused option_index variable in the call to getopt_long(). Reported-by: Eric Blake Signed-off-by: Jeff Cody --- qemu-im

Re: [Qemu-devel] [PATCH] cputlb: Fix regression with TCG interpreter (bug 1310324)

2014-04-28 Thread Richard Henderson
On 04/28/2014 11:24 AM, Andreas Färber wrote: > No objections and not too familiar with that part of code myself - > suggest you take it through your tcg tree if no one else objects. Ok, will do. r~

Re: [Qemu-devel] [PATCH v3 3/3] qapi: Suppress unwanted space between type and identifier

2014-04-28 Thread Luiz Capitulino
On Mon, 28 Apr 2014 17:46:41 +0200 Paolo Bonzini wrote: > Il 28/04/2014 09:02, Amos Kong ha scritto: > > def mcgen(code, **kwds): > > -return cgen('\n'.join(code.split('\n')[1:-1]), **kwds) > > +raw = cgen('\n'.join(code.split('\n')[1:-1]), **kwds) > > +return re.sub(re.escape(eatspa

Re: [Qemu-devel] [PATCH] cputlb: Fix regression with TCG interpreter (bug 1310324)

2014-04-28 Thread Andreas Färber
Am 28.04.2014 19:24, schrieb Richard Henderson: > On 04/28/2014 10:20 AM, Stefan Weil wrote: >> Commit 0f842f8a246f2b5b51a11c13f933bf7a90ae8e96 replaced GETPC_EXT() which >> was derived from GETPC() by GETRA_EXT() without fixing cputlb.c. A later >> patch replaced GETRA_EXT() by GETRA() in exec/sof

Re: [Qemu-devel] [PATCH qom-next] MAINTAINERS: Document QOM

2014-04-28 Thread Andreas Färber
Am 28.04.2014 11:04, schrieb Paolo Bonzini: > Il 24/04/2014 15:04, Andreas Färber ha scritto: >> Invented by Anthony. Maintained through my qom-next tree lately. >> >> Cc: Anthony Liguori >> Cc: Paolo Bonzini >> Signed-off-by: Andreas Färber >> --- >> MAINTAINERS | 10 ++ >> 1 file chan

Re: [Qemu-devel] [PATCH 2/4] target-lm32: add semihosting support

2014-04-28 Thread Michael Walle
Am 2014-04-28 19:27, schrieb Peter Maydell: On 22 April 2014 19:18, Michael Walle wrote: Intercept certain system calls if semihosting is enabled. This should behave like the GDB simulator. @@ -608,8 +609,20 @@ static void dec_scall(DisasContext *dc) break; case 7: LOG_DI

[Qemu-devel] status of cpu hotplug work for x86_64?

2014-04-28 Thread Chris Friesen
Hi, I'm trying to figure out what the current status is for cpu hotplug and hot-remove on x86_64. As far as I can tell, it seems like currently there is a QMP "cpu-add" command but no matching remove...is that correct? At "http://wiki.qemu.org/Features/CPUHotplug"; I found mention of "CPU

  1   2   3   4   >