[Qemu-devel] [PATCH] qemu-timer: Add missing 'static' attribute

2014-05-02 Thread Stefan Weil
This fixes a warning from the static code analysis (smatch). Signed-off-by: Stefan Weil --- qemu-timer.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-timer.c b/qemu-timer.c index e15ce47..9be1a41 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -56,7 +56,7 @@ typede

[Qemu-devel] [PATCH] xen: remove unused global, xen_xcg

2014-05-02 Thread Stefan Weil
From: Jim Meyering Reviewed-by: Stefan Weil Signed-off-by: Jim Meyering Acked-by: Stefano Stabellini --- I rebased this rather old trivial patch - it still applies. Stefan hw/xen/xen_backend.c |1 - 1 file changed, 1 deletion(-) diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c

[Qemu-devel] [PULL] target-alpha: Fix RDUSP

2014-05-02 Thread Richard Henderson
Commit 06ef8604e92964cbf30084b7d31091aa7cbbb62f contained a typo. Signed-off-by: Richard Henderson --- target-alpha/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-alpha/translate.c b/target-alpha/translate.c index d0357ff..91c3ed1 100644 --- a/target-alpha

[Qemu-devel] [PULL] target-alpha update

2014-05-02 Thread Richard Henderson
Ouch. Silly typo that wasn't found in the sniff-test kernel boots I was using to test the branch. One must boot all the way to init to see the breakage. Please pull. r~ --- The following changes since commit fdaad4715ae9e998fd0595bedfb16fdaf0c68ccc: Merge remote-tracking branch 'remotes/p

Re: [Qemu-devel] [PATCH 5/6] input: switch sparc32 kbd to new input api

2014-05-02 Thread Olivier Danet
On 29/04/2014 13:16, Gerd Hoffmann wrote: > Hi, > >>> +[Q_KEY_CODE_META_R]= 122, >>> +[Q_KEY_CODE_COMPOSE] = 67, >>> }; >> This mapping does not look good on some details. >> >> COPY, FIND and CUT does not match the standard : >>[Q_KEY_CODE_COPY] = 52 : Shou

[Qemu-devel] [PATCH] ui: Add missing 'static' attribute

2014-05-02 Thread Stefan Weil
There was already a forward declaration using 'static', but the attribute was missing in the implementation. This fixes a warning from the static code analysis (smatch). Signed-off-by: Stefan Weil --- ui/console.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/console

[Qemu-devel] [PATCH] monitor: Add missing 'static' attribute

2014-05-02 Thread Stefan Weil
This fixes a warning from the static code analysis (smatch). Signed-off-by: Stefan Weil --- monitor.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor.c b/monitor.c index 1266ba0..2d3fb3f 100644 --- a/monitor.c +++ b/monitor.c @@ -488,7 +488,7 @@ static const char *

[Qemu-devel] [PATCH] hw/s390x: Add missing 'static' attribute

2014-05-02 Thread Stefan Weil
Signed-off-by: Stefan Weil --- hw/s390x/event-facility.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c index 0777a93..2e9e62f 100644 --- a/hw/s390x/event-facility.c +++ b/hw/s390x/event-facility.c @@ -32,7 +32,7 @@ str

[Qemu-devel] [PATCH] hw: Add missing 'static' attributes

2014-05-02 Thread Stefan Weil
This fixes warnings from the static code analysis (smatch). Signed-off-by: Stefan Weil --- hw/net/cadence_gem.c |2 +- hw/net/vmxnet3.c |6 +++--- hw/net/xgmac.c |2 +- hw/ppc/spapr_iommu.c |2 +- hw/ppc/spapr_rtas.c |2 +- hw/scsi/scsi-bus.c |2 +- 6 files c

[Qemu-devel] [PATCH] hw/mips: Add missing 'static' and 'const' attributes

2014-05-02 Thread Stefan Weil
This fixes a warning from the static code analysis (smatch). Signed-off-by: Stefan Weil --- hw/mips/mips_fulong2e.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index e1551aa..30d9f19 100644 --- a/hw/mips/mips_fulong2e.c

[Qemu-devel] [PATCH] hw/9pfs: Add include file for exported symbol

2014-05-02 Thread Stefan Weil
Signed-off-by: Stefan Weil --- hw/9pfs/virtio-9p-local.c |1 + 1 file changed, 1 insertion(+) diff --git a/hw/9pfs/virtio-9p-local.c b/hw/9pfs/virtio-9p-local.c index 56b302c..3b0b6a9 100644 --- a/hw/9pfs/virtio-9p-local.c +++ b/hw/9pfs/virtio-9p-local.c @@ -14,6 +14,7 @@ #include "hw/virti

[Qemu-devel] [PATCH] hw/9pfs: Add missing 'static' attributes

2014-05-02 Thread Stefan Weil
Signed-off-by: Stefan Weil --- hw/9pfs/virtio-9p-synth.c |2 +- hw/core/qdev.c|4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/9pfs/virtio-9p-synth.c b/hw/9pfs/virtio-9p-synth.c index 840e4eb..71262bc 100644 --- a/hw/9pfs/virtio-9p-synth.c +++ b/hw/9p

Re: [Qemu-devel] [PATCH 00/26] Merge ppc32/ppc64 tcg backends

2014-05-02 Thread Richard Henderson
On 05/02/2014 09:30 AM, Ulrich Weigand wrote: > Richard Henderson wrote on 01.05.2014 17:44:21: > >> Please review, and if you've got an ELFv2 system (nudge nudge), please >> give it a try and make sure it works. > > I ran into illegal instructions due to this patch: > >> tcg-ppc64: Support m

[Qemu-devel] [PULL 11/14] linux-user/elfload.c: Fix incorrect ARM HWCAP bits

2014-05-02 Thread riku . voipio
From: Peter Maydell The ELF HWCAP bits for ARM features THUMBEE, NEON, VFPv3 and VFPv3D16 are all off by one compared to the kernel definitions. Fix this discrepancy and add in the missing CRUNCH bit which was the cause of the off-by-one error. (We don't emulate any of the CPUs which have that we

[Qemu-devel] [PULL 02/14] linux-user: Assert stack used for auxvec, envp, argv

2014-05-02 Thread riku . voipio
From: James Hogan Assert that the amount of stack space used for auxvec, envp & argv exactly matches the amount allocated. This catches if DLINFO_ITEMS isn't updated when another NEW_AUX_ENT is added. Signed-off-by: James Hogan Cc: Riku Voipio Cc: Peter Maydell Signed-off-by: Riku Voipio ---

[Qemu-devel] [PULL 12/14] linux-user/elfload.c: Update ARM HWCAP bits

2014-05-02 Thread riku . voipio
From: Peter Maydell The kernel has added support for a number of new ARM HWCAP bits; add them to QEMU, including support for setting them where we have a corresponding CPU feature bit. We were also incorrectly setting the VFPv3D16 HWCAP -- this means "only 16 D registers", not "supports 16-bit f

[Qemu-devel] [PULL 13/14] linux-user/elfload.c: Fix A64 code which was incorrectly acting like A32

2014-05-02 Thread riku . voipio
From: Peter Maydell The ARM target-specific code in elfload.c was incorrectly allowing the 64-bit ARM target to use most of the existing 32-bit definitions: most noticably this meant that our HWCAP bits passed to the guest were wrong, and register handling when dumping core was totally broken. Fi

[Qemu-devel] [PULL 00/14] linux-user update

2014-05-02 Thread riku . voipio
From: Riku Voipio The following changes since commit fdaad4715ae9e998fd0595bedfb16fdaf0c68ccc: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140501' into staging (2014-05-02 11:32:00 +0100) are available in the git repository at: http://git.linaro.org/git/people/ri

[Qemu-devel] [PULL 09/14] linux-user: move uname functions to uname.c

2014-05-02 Thread riku . voipio
From: Riku Voipio Make syscall.c slightly smaller by moving uname-related functions to uname.c. Signed-off-by: Riku Voipio --- linux-user/syscall.c | 102 --- linux-user/uname.c | 101 ++ linux-us

[Qemu-devel] [PULL 04/14] linux-user: Add support for SCM_CREDENTIALS.

2014-05-02 Thread riku . voipio
From: Huw Davies Signed-off-by: Huw Davies Signed-off-by: Riku Voipio --- linux-user/syscall.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 52bd000..27073b1 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -12

[Qemu-devel] [PULL 10/14] linux-user: remove configure option for setting uname release

2014-05-02 Thread riku . voipio
From: Riku Voipio --enable-uname-release was a rather heavyweight hammer, as it allows providing values less that UNAME_MINIMUM_RELEASE. Also, it affects all built linux-user targets, which in most cases is not what user wants. Now that we have UNAME_MINIMUM_RELEASE for all linux-user platforms,

[Qemu-devel] [PULL 07/14] linux-user/signal.c: Set fault address in AArch64 signal info

2014-05-02 Thread riku . voipio
From: Peter Maydell Set the fault address correctly in the signal information passed to a signal handler for AArch64 guests. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/signal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-user/signal.

[Qemu-devel] [PULL 05/14] linux-user: Handle arches with llseek instead of _llseek

2014-05-02 Thread riku . voipio
From: James Hogan Recently merged kernel ports (such as OpenRISC and Meta) have an llseek system call instead of _llseek. This is handled for the host architecture by defining __NR__llseek as __NR_llseek, but not for the target architecture. Handle it in the same way for these architectures, def

[Qemu-devel] [PULL 08/14] linux-user: rename cpu-uname -> uname

2014-05-02 Thread riku . voipio
From: Riku Voipio To move more uname related functions out of syscall.c, rename cpu-uname.{c,h} to uname.{c.h} Signed-off-by: Riku Voipio --- linux-user/Makefile.objs | 2 +- linux-user/cpu-uname.c | 72 linux-user/cpu-uname.h | 1 - linux

[Qemu-devel] [PULL 14/14] linux-user/elfload.c: Support ARM HWCAP2 flags

2014-05-02 Thread riku . voipio
From: Peter Maydell The ARM kernel has chosen to spill into the HWCAP2 ELF feature bit flags early, even though it hasn't yet exhausted all 32 bits of the HWCAP word. Add support for setting this in the same way we do for HWCAP. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio --- incl

[Qemu-devel] [PULL 03/14] linux-user: Move if-elses to a switch statement.

2014-05-02 Thread riku . voipio
From: Huw Davies This makes adding more message types cleaner. Signed-off-by: Huw Davies Signed-off-by: Riku Voipio --- linux-user/syscall.c | 51 +-- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/linux-user/syscall.c b/linux-u

[Qemu-devel] [PULL 01/14] linux-user: Add /proc/self/exe open forwarding

2014-05-02 Thread riku . voipio
From: Maxim Ostapenko QEMU already supports /proc/self/{maps,stat,auxv} so addition of /proc/self/exe is rather trivial. Fixes https://bugs.launchpad.net/qemu/+bug/1299190 Signed-off-by: Maxim Ostapenko Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- linux-user/syscall.c | 5 +

[Qemu-devel] [PULL 06/14] linux-user: avoid using glibc internals in _syscall5 and in definition of target_sigevent struct

2014-05-02 Thread riku . voipio
From: Natanael Copa Use the public sigset_t instead of the glibc specific internal __sigset_t in _syscall. Calculate the sigevent pad size is calculated in similar way as kernel does it instead of using glibc internal field _pad. This is needed for building with musl libc. Signed-off-by: Natan

Re: [Qemu-devel] [PATCH] bswap.h: Rename ldl_p, stl_p, etc to ldl_he_p, stl_he_p, etc

2014-05-02 Thread Richard Henderson
On 05/02/2014 10:32 AM, Peter Maydell wrote: > We have an unfortunate naming clash between the functions > ldl_p, stl_p, etc defined in bswap.h (which have semantics > "load/store in host endianness") and the #defines of the same > name in cpu-all.h (which have the semantics "load/store in > target

Re: [Qemu-devel] [v4 PATCH 0/2] apic: bump emulated lapic version to 0x14

2014-05-02 Thread Gabriel L. Somlo
On Fri, May 02, 2014 at 02:02:11PM -0400, Gabriel L. Somlo wrote: > I decided to split the patch into the boilerplate compat_props for v2.0 > and older (1/2) and the actual lapic-version "payload" (2/2). BTW, I plan on using uint8_t instead of uint32_t for "version" in a future (v5) revision, sinc

[Qemu-devel] [v4 PATCH 1/2] pc: add compat_props placeholder for 2.0 machine type

2014-05-02 Thread Gabriel L. Somlo
Add the "boilerplate" necessary for subsequent patches to simply drop in compat_props for pc machines 2.0 and older. This patch contains no functional changes. Signed-off-by: Gabriel Somlo --- hw/i386/pc_piix.c| 4 hw/i386/pc_q35.c | 4 include/hw/i386/pc.h | 9 + 3 fi

[Qemu-devel] [v4 PATCH 2/2] apic: use emulated lapic version 0x14 on pc machines >= 2.1

2014-05-02 Thread Gabriel L. Somlo
Add "version" property to local apic, and have it default to 0x14 for pc machines starting at 2.1. For compatibility with previous releases, pc machines up to 2.0 will have their local apic version set to 0x11. Signed-off-by: Gabriel L. Somlo --- hw/intc/apic.c | 2 +- hw/intc/a

[Qemu-devel] [v4 PATCH 0/2] apic: bump emulated lapic version to 0x14

2014-05-02 Thread Gabriel L. Somlo
I decided to split the patch into the boilerplate compat_props for v2.0 and older (1/2) and the actual lapic-version "payload" (2/2). The first (boilerplate) patch depends on another patch for which a pull request is already pending: http://lists.nongnu.org/archive/html/qemu-devel/2014-04/msg0472

[Qemu-devel] [PATCH] bswap.h: Rename ldl_p, stl_p, etc to ldl_he_p, stl_he_p, etc

2014-05-02 Thread Peter Maydell
We have an unfortunate naming clash between the functions ldl_p, stl_p, etc defined in bswap.h (which have semantics "load/store in host endianness") and the #defines of the same name in cpu-all.h (which have the semantics "load/store in target endianness"). Fortunately it turns out that the only

Re: [Qemu-devel] [PATCH v3] apic: bump emulated lapic version to 0x14 on pc machines >= 2.1

2014-05-02 Thread Gabriel L. Somlo
On Fri, May 02, 2014 at 04:26:41PM +0200, Paolo Bonzini wrote: > Il 02/05/2014 16:23, Gabriel L. Somlo ha scritto: > > > >Did I miss anything ? Is there a way to override the default for all > >apics, which I set in DEFINE_PROP_UINT32, *before* anything gets > >initialized/realized/constructed/what

Re: [Qemu-devel] [RFC 0/5] Allow object-add on X86CPU subclasses, for CPU model probing

2014-05-02 Thread Eduardo Habkost
On Fri, May 02, 2014 at 04:54:00PM +0200, Paolo Bonzini wrote: > Il 02/05/2014 16:43, Eduardo Habkost ha scritto: > >The first thing I considered was making icc-bus user-creatable. Then I > >noticed it wouldn't work because object-add always add objects to > >/objects, not inside the qdev hierarchy

Re: [Qemu-devel] [PATCH 00/26] Merge ppc32/ppc64 tcg backends

2014-05-02 Thread Ulrich Weigand
Richard Henderson wrote on 01.05.2014 17:44:21: > Please review, and if you've got an ELFv2 system (nudge nudge), please > give it a try and make sure it works. I ran into illegal instructions due to this patch: > tcg-ppc64: Support mulsh_i32 [snip] > case INDEX_op_muluh_i32: > tc

[Qemu-devel] [Bug 1312561] Re: libstdc++-6.dll is missing from your computer

2014-05-02 Thread Peter Maydell
That DLL is the mingw C++ runtime library. We should probably make our Windows executables build with a static libstdc++. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1312561 Title: libstdc++-6.dl

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

2014-05-02 Thread Richard Henderson
On 05/02/2014 08:19 AM, Peter Maydell wrote: > This change also confused me but we're again relying on movi32 > generating correct-but-inefficient code now, right? Yes. IMO if we want to do a constant pool, let's do a proper one, not just in a few places. r~

Re: [Qemu-devel] [PATCH] disas/libvixl: Update to libvixl 1.4

2014-05-02 Thread Michael Tokarev
02.05.2014 18:20, Peter Maydell wrote: > Update our copy of libvixl to upstream's 1.4 release. > Note that we no longer need any local fixes for compilation > on 32 bit hosts -- they have all been integrated upstream. Yay. I was about to suggest to wait for the next release instead of updating to

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

2014-05-02 Thread Peter Maydell
On 28 April 2014 20:28, Richard Henderson wrote: > And use tcg pointer differencing functions as appropriate. > > Cc: Peter Maydell > Signed-off-by: Richard Henderson > --- > @@ -1670,51 +1651,28 @@ static inline void tcg_out_op(TCGContext *s, > TCGOpcode opc, > > switch (opc) { > cas

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

2014-05-02 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 v2 7/8] pc: port 92 reset requires a low->high transition

2014-05-02 Thread Paolo Bonzini
The PIIX datasheet says that "before another INIT pulse can be generated via [port 92h], [bit 0] must be written back to a zero. This bug is masked right now because a full reset will clear the value of port 92h. But once we implement soft reset correctly, the next attempt to enable the A20 line

Re: [Qemu-devel] [PATCH] disas/libvixl: Update to libvixl 1.4

2014-05-02 Thread Richard Henderson
On 05/02/2014 07:20 AM, Peter Maydell wrote: > Update our copy of libvixl to upstream's 1.4 release. > Note that we no longer need any local fixes for compilation > on 32 bit hosts -- they have all been integrated upstream. > > Signed-off-by: Peter Maydell > --- > This supersedes the earlier seri

[Qemu-devel] [PATCH v2 5/8] apic: do not accept SIPI on the bootstrap processor

2014-05-02 Thread Paolo Bonzini
SIPI interrupts are ignored on the bootstrap. Never accept one. Cc: Andreas Färber Cc: Michael S. Tsirkin Signed-off-by: Paolo Bonzini --- hw/intc/apic_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index 7ecce2d..05c

Re: [Qemu-devel] [PATCH 00/26] Merge ppc32/ppc64 tcg backends

2014-05-02 Thread Tom Musta
On 5/1/2014 10:44 AM, Richard Henderson wrote: > Please review, and if you've got an ELFv2 system (nudge nudge), please > give it a try and make sure it works. Richard: I will give this a try ... I've already been doing some work using Uli's previous version of this change.

[Qemu-devel] [Bug 1312561] Re: libstdc++-6.dll is missing from your computer

2014-05-02 Thread Newton Kitonga
Also getting same error when running the following command on Windows 7 64 bit. qemu-system-arm -cpu? I also reinstalled qemu without any luck. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1312561

Re: [Qemu-devel] [RFC 0/5] Allow object-add on X86CPU subclasses, for CPU model probing

2014-05-02 Thread Paolo Bonzini
Il 02/05/2014 16:43, Eduardo Habkost ha scritto: The first thing I considered was making icc-bus user-creatable. Then I noticed it wouldn't work because object-add always add objects to /objects, not inside the qdev hierarchy (that's where device_add looks for the bus). So, allowing device_add c

Re: [Qemu-devel] [PATCH v3] linux-user: avoid using glibc internals in _syscall5 and in definition of target_sigevent struct

2014-05-02 Thread Peter Maydell
On 29 April 2014 12:11, Natanael Copa wrote: > Use the public sigset_t instead of the glibc specific internal > __sigset_t in _syscall. > > Calculate the sigevent pad size is calculated in similar way as kernel > does it instead of using glibc internal field _pad. > > This is needed for building w

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

2014-05-02 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 v2 7/7] libcacard: actually use symbols file

2014-05-02 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 v2 5/7] libcacard: replace pstrcpy() with memcpy()

2014-05-02 Thread Michael Tokarev
Commit 2e679780ae86c6ca8 replaced strncpy() with pstrcpy() in one place in libcacard. This is a qemu-specific function, while libcacard is a stand-alone library (or tries to be). But since we know the exact length of the string to copy, and know that it definitely will fit in the destination buffe

Re: [Qemu-devel] [PATCH] disas/libvixl: Update to libvixl 1.4

2014-05-02 Thread Peter Maydell
On 2 May 2014 15:38, Michael Tokarev wrote: > BTW, do we still care about 32bit hosts? The amount of bitrot it > gives becomes troublesome, while its usefulness decreases, both > from lack of real-life systems where 32bit is needed and due to > the fact that more and more types are replaced with

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

2014-05-02 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

Re: [Qemu-devel] [RFC 0/5] Allow object-add on X86CPU subclasses, for CPU model probing

2014-05-02 Thread Eduardo Habkost
On Fri, May 02, 2014 at 03:45:03PM +0200, Igor Mammedov wrote: > On Wed, 30 Apr 2014 17:29:28 -0300 > Eduardo Habkost wrote: > > > This series allows management code to use object-add on X86CPU subclasses, > > so it > Is there any reason why "device-add" couldn't be used? It needs to work with

[Qemu-devel] [PATCH v2 4/7] vscclient: use glib thread primitives not qemu

2014-05-02 Thread Michael Tokarev
Use glib-provided thread primitives in vscclient instead of qemu ones, and do not use qemu sockets in there (open-code call to WSAStartup() for windows to initialize things). This way, vscclient becomes more stand-alone, independent on qemu internals. Signed-off-by: Michael Tokarev --- libcacar

[Qemu-devel] [PATCH v2 6/7] libcacard: replace qemu thread primitives with glib ones

2014-05-02 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 v2 2/7] glib: move g_poll() replacement into glib-compat.h

2014-05-02 Thread Michael Tokarev
From: Stefan Hajnoczi We have a dedicated header file for wrappers to smooth over glib version differences. Move the g_poll() definition into glib-compat.h for consistency. Signed-off-by: Stefan Hajnoczi Signed-off-by: Michael Tokarev Cc: qemu-triv...@nongnu.org --- include/glib-compat.h |

[Qemu-devel] [PATCH v2 8/8] x86: correctly implement soft reset

2014-05-02 Thread Paolo Bonzini
Do not do a hard reset for port 92h, keyboard controller, or cf9h soft reset. These only reset the CPU. Reviewed-by: Anthony Liguori Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 3 ++- hw/input/pckbd.c | 5 +++-- hw/isa/lpc_ich9.c | 12 ++-- hw/pci-host/piix.c | 8 ++-

[Qemu-devel] [PATCH v2 2/8] kvm: forward INIT signals coming from the chipset

2014-05-02 Thread Paolo Bonzini
Reviewed-by: Gleb Natapov Signed-off-by: Paolo Bonzini --- target-i386/helper.c | 4 target-i386/kvm.c | 36 +--- target-i386/kvm_i386.h | 1 + 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/target-i386/helper.c b/target-i386/helper

[Qemu-devel] [PATCH v2 0/8] x86: correctly implement soft reset

2014-05-02 Thread Paolo Bonzini
A repost of an old patch series, rebased and retested. Patches 3 to 5 are new, everything else already carries a Reviewed-by. v1->v2: compile-tested on ARM (I also have had a /dev/kvm on my ARM board for two hours now, but still no guest to try this on). Paolo Bonzini (8): kvm: reset s

[Qemu-devel] [PATCH v2 6/8] cpu: make CPU_INTERRUPT_RESET available on all targets

2014-05-02 Thread Paolo Bonzini
On the x86, some devices need access to the CPU reset pin (INIT#). Provide a generic service to do this, using one of the internal cpu_interrupt targets. Generalize the PPC-specific code for CPU_INTERRUPT_RESET to other targets. Since PPC does not support migration across QEMU versions (its machi

[Qemu-devel] [PATCH v2 3/8] target-i386: fix set of registers zeroed on reset

2014-05-02 Thread Paolo Bonzini
BND0-3, BNDCFGU, BNDCFGS, BNDSTATUS were not zeroed on reset, but they should be (Intel Instruction Set Extensions Programming Reference 319433-015, pages 9-4 and 9-6). Same for YMM. XCR0 should be reset to 1. TSC and TSC_RESET were zeroed already by the memset, remove the explicit assignments.

[Qemu-devel] [PATCH v2 1/8] kvm: reset state from the CPU's reset method

2014-05-02 Thread Paolo Bonzini
Now that we have a CPU object with a reset method, it is better to keep the KVM reset close to the CPU reset. Using qemu_register_reset as we do now keeps them far apart. With this patch, PPC no longer calls the kvm_arch_ function, so it can get removed there. Other arches call it from their CPU

[Qemu-devel] [PATCH v2 4/8] target-i386: preserve FPU and MSR state on INIT

2014-05-02 Thread Paolo Bonzini
Most MSRs, plus the FPU, MMX, MXCSR, XMM and YMM registers should not be zeroed on INIT (Table 9-1 in the Intel SDM). Copy them out of CPUX86State and back in, instead of special casing env->pat. The relevant fields are already consecutive except PAT and SMBASE. However: - KVM and Hyper-V MSRs s

Re: [Qemu-devel] [PATCH v3] apic: bump emulated lapic version to 0x14 on pc machines >= 2.1

2014-05-02 Thread Paolo Bonzini
Il 02/05/2014 16:23, Gabriel L. Somlo ha scritto: Did I miss anything ? Is there a way to override the default for all apics, which I set in DEFINE_PROP_UINT32, *before* anything gets initialized/realized/constructed/whatever ? :) Yes, there is. :) It's compat_props. You can set 0x14 in the

Re: [Qemu-devel] [PATCH v3] apic: bump emulated lapic version to 0x14 on pc machines >= 2.1

2014-05-02 Thread Gabriel L. Somlo
On Thu, May 01, 2014 at 05:43:23PM -0400, Don Slutz wrote: > On 05/01/14 14:52, Alexander Graf wrote: > >With qdev we basically had an array of constructor parameters in the qdev > >definition. You could set these from the outside between create and init, > >basically: > > > > dev = dev_create()

[Qemu-devel] [PATCH 4/4] linux-user/elfload.c: Support ARM HWCAP2 flags

2014-05-02 Thread Peter Maydell
The ARM kernel has chosen to spill into the HWCAP2 ELF feature bit flags early, even though it hasn't yet exhausted all 32 bits of the HWCAP word. Add support for setting this in the same way we do for HWCAP. Signed-off-by: Peter Maydell --- include/elf.h| 1 + linux-user/elfload.c | 30

[Qemu-devel] [PATCH 2/4] linux-user/elfload.c: Update ARM HWCAP bits

2014-05-02 Thread Peter Maydell
The kernel has added support for a number of new ARM HWCAP bits; add them to QEMU, including support for setting them where we have a corresponding CPU feature bit. We were also incorrectly setting the VFPv3D16 HWCAP -- this means "only 16 D registers", not "supports 16-bit floating point format";

[Qemu-devel] [PATCH 1/4] linux-user/elfload.c: Fix incorrect ARM HWCAP bits

2014-05-02 Thread Peter Maydell
The ELF HWCAP bits for ARM features THUMBEE, NEON, VFPv3 and VFPv3D16 are all off by one compared to the kernel definitions. Fix this discrepancy and add in the missing CRUNCH bit which was the cause of the off-by-one error. (We don't emulate any of the CPUs which have that weird hardware, so it's

[Qemu-devel] [PATCH 0/4] linux-user: fix ARM hwcaps related issues

2014-05-02 Thread Peter Maydell
This patchset fixes a number of issues in the ARM elfload.c, mostly relating to the AT_HWCAP bits: * off-by-one error for some of the existing ARM bits * update to include bits defined in newer kernels, and fix some bugs in how we were handling existing bits * properly separate out 64-bit fro

[Qemu-devel] [PATCH v12 4/4] qapi: Add a primitive to include other files from a QAPI schema file

2014-05-02 Thread Lluís Vilanova
The primitive uses JSON syntax, and include paths are relative to the file using the directive: { 'include': 'path/to/file.json' } Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- docs/qapi-code-gen.txt | 11 + scripts/qapi.

[Qemu-devel] [PATCH v12 1/4] qapi: [trivial] Break long command lines

2014-05-02 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- Makefile | 24 ++-- tests/Makefile | 18 ++ 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index ec74039..84345ee 100644 -

[Qemu-devel] [PATCH v12 3/4] qapi: Use an explicit input file

2014-05-02 Thread Lluís Vilanova
Use an explicit input file on the command-line instead of reading from standard input. It also outputs the proper file name when there's an error. Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- Makefile | 12

[Qemu-devel] [PATCH v12 2/4] qapi: [trivial] Do not catch unknown exceptions in "test-qapi.py"

2014-05-02 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- tests/qapi-schema/test-qapi.py |3 --- 1 file changed, 3 deletions(-) diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py index b3d1e1d..5a26ef3 100644 --- a/tests/qapi-schema/

[Qemu-devel] [PATCH v12 0/4] qapi: Allow modularization of QAPI schema files

2014-05-02 Thread Lluís Vilanova
Adds an include primitive to the syntax of QAPI schema files, allowing these to be modularized into multiple per-topic files in the future. Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- Changes in v12: * Fix "Reviewed-by" lines. Changes in v11: * R

Re: [Qemu-devel] [PATCH v11 0/4] qapi: Allow modularization of QAPI schema files

2014-05-02 Thread Lluís Vilanova
Please disregard this thread. I forgot to add the reviewed-by lines. Will resend later as v12. Sorry, Lluis Lluís Vilanova writes: > Adds an include primitive to the syntax of QAPI schema files, allowing these > to > be modularized into multiple per-topic files in the future. > Signed-off-b

[Qemu-devel] [PATCH v11 4/4] qapi: Add a primitive to include other files from a QAPI schema file

2014-05-02 Thread Lluís Vilanova
The primitive uses JSON syntax, and include paths are relative to the file using the directive: { 'include': 'path/to/file.json' } Signed-off-by: Lluís Vilanova --- docs/qapi-code-gen.txt | 11 + scripts/qapi.py| 65

[Qemu-devel] [PATCH v11 2/4] qapi: [trivial] Do not catch unknown exceptions in "test-qapi.py"

2014-05-02 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake --- tests/qapi-schema/test-qapi.py |3 --- 1 file changed, 3 deletions(-) diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py index b3d1e1d..5a26ef3 100644 --- a/tests/qapi-schema/test-qapi.py +++ b/tests/qapi-sc

[Qemu-devel] [PATCH v11 3/4] qapi: Use an explicit input file

2014-05-02 Thread Lluís Vilanova
Use an explicit input file on the command-line instead of reading from standard input. It also outputs the proper file name when there's an error. Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake --- Makefile | 12 ++-- docs/qapi-code-ge

[Qemu-devel] [PATCH v11 1/4] qapi: [trivial] Break long command lines

2014-05-02 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova Reviewed-by: Eric Blake --- Makefile | 24 ++-- tests/Makefile | 18 ++ 2 files changed, 32 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index ec74039..84345ee 100644 --- a/Makefile +++ b/Makefile @@

[Qemu-devel] [PATCH v11 0/4] qapi: Allow modularization of QAPI schema files

2014-05-02 Thread Lluís Vilanova
Adds an include primitive to the syntax of QAPI schema files, allowing these to be modularized into multiple per-topic files in the future. Signed-off-by: Lluís Vilanova --- Changes in v11: * Rename "tests/include-after-err*" to "tests/include-before-err*" (Markus Armbruster). * Do not use to

Re: [Qemu-devel] [RFC 0/5] Allow object-add on X86CPU subclasses, for CPU model probing

2014-05-02 Thread Igor Mammedov
On Wed, 30 Apr 2014 17:29:28 -0300 Eduardo Habkost wrote: > This series allows management code to use object-add on X86CPU subclasses, so > it Is there any reason why "device-add" couldn't be used? > can use it to probe for CPU model information without re-running QEMU. The > main > use case

Re: [Qemu-devel] [PATCH v6 03/14] qcow2: Optimize bdrv_make_empty()

2014-05-02 Thread Max Reitz
On 30.04.2014 00:24, Eric Blake wrote: On 04/29/2014 09:07 AM, Max Reitz wrote: bdrv_make_empty() is currently only called if the current image represents an external snapshot that has been committed to its base image; it is therefore unlikely to have internal snapshots. In this case, bdrv_make_

[Qemu-devel] [PATCH 3/4] linux-user/elfload.c: Fix A64 code which was incorrectly acting like A32

2014-05-02 Thread Peter Maydell
The ARM target-specific code in elfload.c was incorrectly allowing the 64-bit ARM target to use most of the existing 32-bit definitions: most noticably this meant that our HWCAP bits passed to the guest were wrong, and register handling when dumping core was totally broken. Fix this by properly sep

Re: [Qemu-devel] [PATCH v10 4/4] qapi: Add a primitive to include other files from a QAPI schema file

2014-05-02 Thread Lluís Vilanova
Eric Blake writes: > On 05/02/2014 06:16 AM, Lluís Vilanova wrote: +++ b/tests/qapi-schema/include-after-err.json @@ -0,0 +1,2 @@ +{ 'include': 'include-simple-sub.json' } +{ 'command' 'missing-colon' } >> >>> In v9, Markus pointed out that 'include-after-err' is the wrong nam

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

2014-05-02 Thread Igor Mammedov
On Fri, 2 May 2014 14:10:35 +0200 Vasilis Liaskovitis wrote: > Hi, > > On Mon, Apr 28, 2014 at 11:58:38AM -0600, Chris Friesen wrote: > > 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 cu

[Qemu-devel] Patchset for memory hot unplugging.

2014-05-02 Thread Anshul Makkar
Please can you share the patchset for memory hot unplugging. Is this the correct commit I am looking at https://github.com/taohu/qemu/commit/55c9540919e189b0ad2e6a759af742080f8f5dc4 Thanks Anshul Makkar

Re: [Qemu-devel] [PATCH v6 12/14] iotests: Add test for backing-chain commits

2014-05-02 Thread Max Reitz
On 30.04.2014 05:10, Eric Blake wrote: On 04/29/2014 09:17 AM, Max Reitz wrote: Add a test for qemu-img commit on backing chains with more than two images. This test also checks whether the images above the base image are emptied and does therefore not work for qed and vmdk which requires it to

[Qemu-devel] [PATCH] qemu-img: sort block formats in help message

2014-05-02 Thread Mike Day
The help message for qemu-img lists the supported block formats, of which there are 27 as of version 2.0.50. The formats are printed in the order of their driver's position in a linked list, which appears random. This patch prints the formats in sorted order, making it easier to read and to find a

[Qemu-devel] [PATCH 09/13] hmp: Call visit_end_struct() after visit_start_struct() succeeds

2014-05-02 Thread Markus Armbruster
When visit_start_struct() succeeds, visit_end_struct() must be called. hmp_object_add() doesn't when a member visit fails. As far as I can tell, the opts visitor copes okay with the misuse. Fix it anyway. Signed-off-by: Markus Armbruster --- hmp.c | 16 1 file changed, 8 inser

Re: [Qemu-devel] [PATCH 0/5] fix building with musl libc

2014-05-02 Thread Paolo Bonzini
Il 29/04/2014 16:17, Natanael Copa ha scritto: In addition to the previoiusly sent "linux-user: avoid using glibc internals in _syscall5 and in definition of target_sigevent struct", those are needed for making qemu build with musl libc on Alpine Linux. There is still 2 missing fcntl.h definitio

[Qemu-devel] [PATCH 10/13] hw: Don't call visit_end_struct() after visit_start_struct() fails

2014-05-02 Thread Markus Armbruster
When visit_start_struct() succeeds, visit_end_struct() must not be called. rtc_get_date() and balloon_stats_all() call it anyway. As far as I can tell, they're only used with the string output visitor, which doesn't care. Fix them anyway. Signed-off-by: Markus Armbruster --- hw/timer/mc146818

[Qemu-devel] [PATCH 12/13] qapi: Replace uncommon use of the error API by the common one

2014-05-02 Thread Markus Armbruster
We commonly use the error API like this: err = NULL; foo(..., &err); if (err) { goto out; } bar(..., &err); Every error source is checked separately. The second function is only called when the first one succeeds. Both functions are free to pass their argument to err

[Qemu-devel] [PATCH 13/13] error: error_is_set() is finally unused; remove

2014-05-02 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qapi/error.h | 6 -- util/error.c | 5 - 2 files changed, 11 deletions(-) diff --git a/include/qapi/error.h b/include/qapi/error.h index 7995801..d712089 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -67,12 +67,6 @@

[Qemu-devel] [PATCH 02/13] qapi: Normalize marshalling's visitor initialization and cleanup

2014-05-02 Thread Markus Armbruster
Input and output marshalling functions do it differently. Change them to work the same: initialize the I/O visitor, use it, clean it up, initialize the dealloc visitor, use it, clean it up. This delays dealloc visitor initialization in output marshalling functions, and input visitor cleanup in in

[Qemu-devel] [PATCH 11/13] tests: Don't call visit_end_struct() after visit_start_struct() fails

2014-05-02 Thread Markus Armbruster
When visit_start_struct() succeeds, visit_end_struct() must not be called. Three out of four visit_type_TestStruct() call it anyway. As far as I can tell, visit_start_struct() doesn't actually fail there. Fix them anyway. Signed-off-by: Markus Armbruster --- tests/test-qmp-input-strict.c

[Qemu-devel] [PATCH 07/13] qapi-visit.py: Clean up a sloppy use of field prefix

2014-05-02 Thread Markus Armbruster
generate_visit_struct_fields() generates the base type's struct member name both with and without the field prefix. Harmless, because the field prefix is always empty there: only unboxed complex members have a prefix, and those can't have a base type. Clean it up anyway. Signed-off-by: Markus Ar

[Qemu-devel] [PATCH 03/13] qapi: Remove unused Visitor callbacks start_handle(), end_handle()

2014-05-02 Thread Markus Armbruster
These have never been called or implemented by anything, and their intended use is undocumented, like all of the visitor API. Signed-off-by: Markus Armbruster --- include/qapi/visitor-impl.h | 3 --- qapi/qapi-visit-core.c | 15 --- 2 files changed, 18 deletions(-) diff --git

[Qemu-devel] [PATCH 05/13] qapi-visit.py: Clean up confusing push_indent() / pop_indent() use

2014-05-02 Thread Markus Armbruster
Changing implicit indentation in the middle of generating a block makes following the code being generated unnecessarily hard. Signed-off-by: Markus Armbruster --- scripts/qapi-visit.py | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/scripts

  1   2   >