[Qemu-devel] [PULL v2 for-2.0 16/24] qcow2: Keep option in qcow2_invalidate_cache()

2014-03-13 Thread Stefan Hajnoczi
From: Kevin Wolf kw...@redhat.com Instead of manually building a list of all options from BDRVQcowState values just reuse the options that were used to open the image. qcow2_open() won't fully use all of the options in the QDict, but that's okay. This fixes all of the driver-specific options in

Re: [Qemu-devel] [PULL for-2.0-rc0 0/6] PowerPC patch queue 2014-03-13

2014-03-13 Thread Peter Maydell
On 13 March 2014 02:53, Andreas Färber afaer...@suse.de wrote: Hello Peter, Please pull the PowerPC queue into qemu.git master. Regards, Andreas Cc: Peter Maydell peter.mayd...@linaro.org Cc: qemu-...@nongnu.org Cc: Alexander Graf ag...@suse.de Cc: Alexey Kardashevskiy a...@ozlabs.ru

[Qemu-devel] Building QMP in qemu-nbd

2014-03-13 Thread Benoît Canet
Hi, I want to make qemu-nbd QMP aware so the cloud stack my customer work on could start lxc containers with qcow2 KVM images and still benefit from the quorum and snapshot goodness. Stefan mentioned the nice idea of splitting qapi-schema.json in small files in a subdirectory so qemu-nbd could

Re: [Qemu-devel] SMBIOS vs. NUMA (was: Build full type 19 tables)

2014-03-13 Thread Gabriel L. Somlo
On Thu, Mar 13, 2014 at 09:04:52AM +0100, Gerd Hoffmann wrote: Should we just assert((ram_size 10) 0x8000), and officially limit guests to 2T ? No. Not fully sure what reasonable behavier would be in case more than 2T are present. I guess either not generating type16 entries at all or

[Qemu-devel] [PULL v2 for-2.0 10/24] iothread: add I/O thread object

2014-03-13 Thread Stefan Hajnoczi
This is a stand-in for Michael Roth's QContext. I expect this to be replaced once QContext is completed. The IOThread object is an AioContext event loop thread. This patch adds the concept of multiple event loop threads, allowing users to define them. When SMP guests run on SMP hosts it makes

[Qemu-devel] [PULL for-2.0-rc0 03/58] target-arm: Clean up ENV_GET_CPU() usage

2014-03-13 Thread Andreas Färber
Commits ab1da85791340e504d10487e1add81b9988afa98, fdfba1a298ae26dd44bcfdb0429314139a0bc55a, 2c17449b3022ca9623c4a7e2a504a4150ac4ad30 added usages of ENV_GET_CPU() macro to target-specific code. Use arm_env_get_cpu() instead and enforce separating variable declarations. Cc: Edgar E. Iglesias

[Qemu-devel] [PULL for-2.0-rc0 01/58] cpu: Don't clear cpu-exit_request on reset

2014-03-13 Thread Andreas Färber
From: Edgar E. Iglesias edgar.igles...@xilinx.com cpu-exit_request is part of the execution environment and should not be cleared when a CPU resets. Otherwise, we might deadlock QEMU if a CPU resets while there is I/O going on. Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com

[Qemu-devel] [PULL for-2.0-rc0 07/58] target-sparc: Clean up ENV_GET_CPU() usage

2014-03-13 Thread Andreas Färber
Commits fdfba1a298ae26dd44bcfdb0429314139a0bc55a, 2c17449b3022ca9623c4a7e2a504a4150ac4ad30 and f606604f1c10b60ef294f1b9b229426521a365e3 added usages of ENV_GET_CPU() macro in target-specific code. Use sparc_env_get_cpu() instead and reuse the variables. Cc: Edgar E. Iglesias

[Qemu-devel] [PULL v2 for-2.0 17/24] qcow2: Don't write with BDRV_O_INCOMING

2014-03-13 Thread Stefan Hajnoczi
From: Kevin Wolf kw...@redhat.com qcow2_open() causes writes when repairing an image with the dirty flag set and when clearing autoclear flags. It shouldn't do this when another qemu instance is still actively working on this image file. One effect of the bug is that images may have a cleared

[Qemu-devel] [PULL for-2.0-rc0 05/58] target-ppc: Clean up ENV_GET_CPU() usage

2014-03-13 Thread Andreas Färber
Commits fdfba1a298ae26dd44bcfdb0429314139a0bc55a, ab1da85791340e504d10487e1add81b9988afa98, f606604f1c10b60ef294f1b9b229426521a365e3 and 2c17449b3022ca9623c4a7e2a504a4150ac4ad30 added usages of ENV_GET_CPU() macro in target-specific code. Use ppc_env_get_cpu() instead. Cc: Edgar E. Iglesias

[Qemu-devel] [PULL v2 for-2.0 21/24] block/raw-posix: bdrv_parse_filename() for floppy

2014-03-13 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com The host_floppy protocol driver should strip the host_floppy: prefix from filenames if present. Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Benoit Canet ben...@irqsave.net Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- block/raw-posix.c | 10

[Qemu-devel] [PULL for-2.0-rc0 13/58] target-i386: Rename x86_def_t to X86CPUDefinition

2014-03-13 Thread Andreas Färber
From: Eduardo Habkost ehabk...@redhat.com As the new X86CPU subclass code is going to change lots of the code invoving x86_def_t, let's rename the struct to match coding style first. Signed-off-by: Eduardo Habkost ehabk...@redhat.com Reviewed-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by:

[Qemu-devel] [PULL for-2.0-rc0 02/58] target-alpha: Clean up ENV_GET_CPU() usage

2014-03-13 Thread Andreas Färber
Commits 2c17449b3022ca9623c4a7e2a504a4150ac4ad30, fdfba1a298ae26dd44bcfdb0429314139a0bc55a, ab1da85791340e504d10487e1add81b9988afa98 and f606604f1c10b60ef294f1b9b229426521a365e3 added usages of ENV_GET_CPU() macro in target-specific code. Use alpha_env_get_cpu() instead. Cc: Edgar E. Iglesias

[Qemu-devel] [PULL for-2.0-rc0 15/58] target-i386: Make kvm_default_features an array

2014-03-13 Thread Andreas Färber
From: Eduardo Habkost ehabk...@redhat.com We will later make the KVM-specific code affect other feature words, too. Signed-off-by: Eduardo Habkost ehabk...@redhat.com Acked-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Andreas Färber afaer...@suse.de --- target-i386/cpu.c | 17

[Qemu-devel] [PULL for-2.0-rc0 11/58] target-i386: Rename cpu_x86_register() to x86_cpu_load_def()

2014-03-13 Thread Andreas Färber
From: Eduardo Habkost ehabk...@redhat.com There isn't any kind of registration involved in cpu_x86_register() anymore: it is simply looking up a CPU model name and loading the model definition data into the X86CPU object. Rename it to x86_cpu_load_def() to reflect what it does. Signed-off-by:

[Qemu-devel] [PULL for-2.0-rc0 16/58] target-i386: Introduce x86_cpu_compat_disable_kvm_features()

2014-03-13 Thread Andreas Färber
From: Eduardo Habkost ehabk...@redhat.com Instead of the feature-specific disable_kvm_pv_eoi() function, create a more general function that can be used to disable other feature bits in machine-type compat code. Signed-off-by: Eduardo Habkost ehabk...@redhat.com Acked-by: Michael S. Tsirkin

[Qemu-devel] [PULL for-2.0-rc0 29/58] cpu: Move can_do_io field from CPU_COMMON to CPUState

2014-03-13 Thread Andreas Färber
Rename can_do_io() to cpu_can_do_io() and change argument to CPUState. Signed-off-by: Andreas Färber afaer...@suse.de --- cpus.c | 2 +- include/exec/cpu-defs.h | 1 - include/exec/exec-all.h | 21 + include/exec/gen-icount.h |

[Qemu-devel] [PULL for-2.0-rc0 27/58] cpu: Turn cpu_handle_mmu_fault() into a CPUClass hook

2014-03-13 Thread Andreas Färber
Note that while such functions may exist both for *-user and softmmu, only *-user uses the CPUState hook, while softmmu reuses the prototype for calling it directly. Signed-off-by: Andreas Färber afaer...@suse.de --- include/qom/cpu.h | 3 +++ target-alpha/cpu.c| 4 +++-

[Qemu-devel] [PULL for-2.0-rc0 17/58] target-i386: Enable x2apic by default on KVM

2014-03-13 Thread Andreas Färber
From: Eduardo Habkost ehabk...@redhat.com When on KVM mode, enable x2apic by default on all CPU models. Normally we try to keep the CPU model definitions as close as the real CPUs as possible, but x2apic can be emulated by KVM without host CPU support for x2apic, and it improves performance by

[Qemu-devel] [PULL for-2.0-rc0 23/58] target-sparc: Defer SPARCCPU feature inference to QOM realize

2014-03-13 Thread Andreas Färber
Gets it out of cpu_sparc_register() and aligns with target-arm. Tested-by: Mark Cave-Ayland mark.cave-ayl...@ilande.co.uk Signed-off-by: Andreas Färber afaer...@suse.de --- target-sparc/cpu.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/target-sparc/cpu.c

[Qemu-devel] [PULL for-2.0-rc0 10/58] cpu: Turn cpu_has_work() into a CPUClass hook

2014-03-13 Thread Andreas Färber
Default to false. Tidy variable naming and inline cast uses while at it. Tested-by: Jia Liu pro...@gmail.com (or32) Signed-off-by: Andreas Färber afaer...@suse.de --- cpu-exec.c | 5 - cpus.c | 2 +- include/qom/cpu.h | 12 ++--

[Qemu-devel] [PULL for-2.0-rc0 35/58] cpu: Move opaque field from CPU_COMMON to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- bsd-user/main.c | 2 +- gdbstub.c| 3 +-- include/exec/cpu-defs.h | 3 --- include/qom/cpu.h| 3 +++ linux-user/elfload.c | 10 ++ linux-user/linuxload.c | 3 +--

[Qemu-devel] [PULL for-2.0-rc0 25/58] cpu: Factor out cpu_generic_init()

2014-03-13 Thread Andreas Färber
All targets using it gain the ability to set -cpu name,key=value,... options via the default TYPE_CPU CPUClass::parse_features() implementation. Signed-off-by: Andreas Färber afaer...@suse.de --- include/qom/cpu.h | 11 +++ qom/cpu.c | 41

[Qemu-devel] [PULL for-2.0-rc0 14/58] target-i386: Don't declare variables in the middle of blocks

2014-03-13 Thread Andreas Färber
From: Eduardo Habkost ehabk...@redhat.com Some of my recent changes introduced variable declarations in the middle of code blocks. Fix the code so that it compiles without warnings when using -Wdeclaration-after-statement. Signed-off-by: Eduardo Habkost ehabk...@redhat.com Signed-off-by:

[Qemu-devel] [PULL for-2.0-rc0 43/58] translate-all: Change cpu_io_recompile() argument to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- include/exec/exec-all.h | 2 +- include/exec/softmmu_template.h | 4 ++-- translate-all.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index

[Qemu-devel] [PULL for-2.0-rc0 21/58] target-sparc: Use error_report() for CPU error reporting

2014-03-13 Thread Andreas Färber
Replace non-debug fprintf() with error_report(). Tested-by: Mark Cave-Ayland mark.cave-ayl...@ilande.co.uk Signed-off-by: Andreas Färber afaer...@suse.de --- target-sparc/cpu.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/target-sparc/cpu.c

[Qemu-devel] [Bug 1292037] [NEW] Solaris 10 x86 guest crashes qemu with -icount 1 option

2014-03-13 Thread prajeeth
*** This bug is a security vulnerability *** Public security bug reported: Commit: f53f3d0a00b6df39ce8dfca942608e5b6a9a4f71 on qemu.git Solaris image: Solaris 10 x86 (32 bit) command: ./i386-softmmu/qemu-system-i386 -hda image-file -m 2G -icount 1 -monitor stdio Crashes saying: qemu: Fatal:

[Qemu-devel] [PULL for-2.0-rc0 33/58] cpu: Move jmp_env field from CPU_COMMON to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- cpu-exec.c | 8 +--- include/exec/cpu-defs.h | 2 -- include/qom/cpu.h | 2 ++ user-exec.c | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index dd8da53..3e17ff5

[Qemu-devel] [PULL v2 for-2.0 05/24] iotests: Test corruption during COW request

2014-03-13 Thread Stefan Hajnoczi
From: Max Reitz mre...@redhat.com Extend test file 060 by a test case for corruption occuring concurrently to a COW request. QEMU should not crash but rather return an appropriate error message. Signed-off-by: Max Reitz mre...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com ---

[Qemu-devel] [PULL for-2.0-rc0 49/58] cpu-exec: Change cpu_resume_from_signal() argument to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- cpu-exec.c | 4 +--- exec.c | 2 +- hw/i386/kvmvapic.c | 2 +- include/exec/exec-all.h | 2 +- target-i386/helper.c| 2 +- target-lm32/helper.c| 2 +- target-xtensa/helper.c | 2 +- translate-all.c

[Qemu-devel] [PULL for-2.0-rc0 22/58] target-sparc: Implement CPUClass::parse_features() for SPARCCPU

2014-03-13 Thread Andreas Färber
Factor cpu_model parsing out of cpu_sparc_find_by_name() by passing cpu_sparc_find_by_name() the name portion only and calling CPUClass::parse_features() from cpu_sparc_register() afterwards. Tested-by: Mark Cave-Ayland mark.cave-ayl...@ilande.co.uk Signed-off-by: Andreas Färber afaer...@suse.de

[Qemu-devel] [PULL for-2.0-rc0 53/58] target-cris: Replace DisasContext::env field with CRISCPU

2014-03-13 Thread Andreas Färber
This cleans up repeated cris_env_get_cpu() for cpu_abort(). Signed-off-by: Andreas Färber afaer...@suse.de --- target-cris/translate.c | 16 target-cris/translate_v10.c | 16 2 files changed, 16 insertions(+), 16 deletions(-) diff --git

[Qemu-devel] [PULL for-2.0-rc0 18/58] target-i386: Prepare CPUClass::class_by_name for X86CPU

2014-03-13 Thread Andreas Färber
Signed-off-by: Eduardo Habkost ehabk...@redhat.com Reviewed-by: Eduardo Habkost ehabk...@redhat.com Tested-by: Eduardo Habkost ehabk...@redhat.com Signed-off-by: Andreas Färber afaer...@suse.de --- target-i386/cpu.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-)

[Qemu-devel] [PULL for-2.0-rc0 32/58] cpu: Move tb_jmp_cache field from CPU_COMMON to CPUState

2014-03-13 Thread Andreas Färber
Clear it on reset. Signed-off-by: Andreas Färber afaer...@suse.de --- cpu-exec.c | 6 -- cputlb.c| 2 +- include/exec/cpu-defs.h | 4 include/qom/cpu.h | 4 qom/cpu.c | 1 + translate-all.c | 15 ++- 6 files

[Qemu-devel] [PULL for-2.0-rc0 31/58] cpu: Move icount_decr field from CPU_COMMON to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- cpu-exec.c| 4 ++-- cpus.c| 13 ++--- include/exec/cpu-defs.h | 20 include/exec/gen-icount.h | 6 -- include/qom/cpu.h | 19 +++ qom/cpu.c

[Qemu-devel] [PULL for-2.0-rc0 50/58] cputlb: Change tlb_unprotect_code_phys() argument to CPUState

2014-03-13 Thread Andreas Färber
Note that the argument is unused. Signed-off-by: Andreas Färber afaer...@suse.de --- cputlb.c | 2 +- include/exec/cputlb.h | 2 +- translate-all.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cputlb.c b/cputlb.c index 6b2cdb2..343ede2 100644 ---

[Qemu-devel] [PULL for-2.0-rc0 36/58] cpu: Move watchpoint fields from CPU_COMMON to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- cpu-exec.c | 5 +++-- exec.c | 33 - gdbstub.c | 8 include/exec/cpu-defs.h | 10 -- include/qom/cpu.h | 10 ++ linux-user/main.c |

[Qemu-devel] [PULL for-2.0-rc0 58/58] user-exec: Change exception_action() argument to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- user-exec.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/user-exec.c b/user-exec.c index 3b795c1..bc58056 100644 --- a/user-exec.c +++ b/user-exec.c @@ -38,11 +38,12 @@ //#define DEBUG_SIGNAL -static void

[Qemu-devel] [RFC 06/12] target-ppc: Eliminate Unused Variable in decSetSubnormal

2014-03-13 Thread Tom Musta
This patch eliminates an unused variable in the decSetSubnormal routine. The variable dnexp is declared and eventually set but never used. This triggers a unused-but-set-variable warning, which can fail QEMU compilation. Signed-off-by: Tom Musta tommu...@gmail.com --- libdecnumber/decNumber.c

[Qemu-devel] [RFC 07/12] target-ppc: Enable Building of libdecnumber

2014-03-13 Thread Tom Musta
This patch enables compilation of the newly added libdecnumber library code. Object file targets are added to Makefile.target using the newly added flag CONFIG_LIBDECNUMBER. The flag is added to the PowerPC targets (ppc[64]-linux-user, ppc[64]-softmmu). Signed-off-by: Tom Musta

[Qemu-devel] [RFC 10/12] target-ppc: Introduce DFP Helper Utilities

2014-03-13 Thread Tom Musta
This patch adds a new helper file to the PowerPC implementation (dfp_helper.c). This first version of the file declares a structure that will be used by various Decimal Floating Point (DFP) instructions. It also implements utilities that will initialize such a structure for either a long, 64-bit

[Qemu-devel] [PULL for-2.0-rc0 47/58] exec: Change cpu_watchpoint_{insert, remove{, _by_ref, _all}} argument

2014-03-13 Thread Andreas Färber
Use CPUState. This lets us drop a few local env usages. Signed-off-by: Andreas Färber afaer...@suse.de --- exec.c| 34 +- gdbstub.c | 17 + include/exec/cpu-all.h| 6 -- include/qom/cpu.h | 7

Re: [Qemu-devel] [PATCH] blockdev: Refuse to open encrypted image unless paused

2014-03-13 Thread Paolo Bonzini
Il 13/03/2014 16:00, Markus Armbruster ha scritto: Paolo Bonzini pbonz...@redhat.com writes: Il 13/03/2014 14:18, Markus Armbruster ha scritto: Paolo Bonzini pbonz...@redhat.com writes: Il 12/03/2014 18:00, Markus Armbruster ha scritto: +} else if (!runstate_check(RUN_STATE_PRELAUNCH)

[Qemu-devel] [PATCH] main-loop: Suppress I/O thread spun warnings for qtest

2014-03-13 Thread Peter Maydell
When running under qtest we don't actually have any vcpu threads to be starved, so the warning about the I/O thread spinning isn't relevant, and the way qtest manipulates the simulated clock means the warning is produced a lot as a false positive. Suppress it if qtest_enabled(), so 'make check'

[Qemu-devel] [RFC 08/12] target-ppc: Define FPR Pointer Type for Helpers

2014-03-13 Thread Tom Musta
This patch defines a floating pointer register pointer type in the PowerPC helper header. The type will be used to pass FPR register operands to Decimal Floating Point (DFP) helpers. A pointer is used because the quadword forms of PowerPC DFP instructions operate on adjacent pairs of floating

[Qemu-devel] [PULL for-2.0-rc0 51/58] exec: Change memory_region_section_get_iotlb() argument to CPUState

2014-03-13 Thread Andreas Färber
It no longer needs CPUArchState since moving watchpoints to CPUState. Signed-off-by: Andreas Färber afaer...@suse.de --- cputlb.c | 2 +- exec.c| 3 +-- include/exec/cputlb.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cputlb.c b/cputlb.c

[Qemu-devel] [RFC 02/12] target-ppc: Prepare libdecnumber for QEMU include structure

2014-03-13 Thread Tom Musta
This patch modifies the libdecnumber source code so that it fits properly with QEMU's include directory structure. Specifically, directives of the form #include xxx.h are modified to look like: #include libdecnumber/xxx.h Signed-off-by: Tom Musta tommu...@gmail.com ---

[Qemu-devel] [RFC 00/12] target-ppc: Decimal Floating Point

2014-03-13 Thread Tom Musta
This patch series provides a prototype of Decimal Floating Point (DFP) instruction support in QEMU. The topic was briefly discussed here: http://lists.nongnu.org/archive/html/qemu-ppc/2014-02/msg00129.html I. Overview The core of the DFP model is a library named libdecnumber, which is a

Re: [Qemu-devel] different IDTs of the same VCPU

2014-03-13 Thread Paolo Bonzini
Il 13/03/2014 13:59, Alexander Binun ha scritto: Dear Friends, Thanks for your assistance! We would like to ask you a question about the KVM internals. Our module includes a timer which (once in every second) fetches the IDT value of every online VCPU in the system using the

[Qemu-devel] [PULL for-2.0-rc0 55/58] cputlb: Change tlb_flush_page() argument to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- cputlb.c | 4 +-- exec.c | 7 ++ include/exec/exec-all.h | 4 +-- target-alpha/sys_helper.c| 2 +- target-arm/helper.c | 14 --- target-cris/mmu.c| 3 ++-

[Qemu-devel] [Bug 1292037] Re: Solaris 10 x86 guest crashes qemu with -icount 1 option

2014-03-13 Thread prajeeth
** Information type changed from Public Security to Public ** Description changed: ** Information type changed from Public to Public Security ** Information type changed from Public Security to Public -- You received this bug notification because you are a member of qemu- devel-ml, which is

Re: [Qemu-devel] Building QMP in qemu-nbd

2014-03-13 Thread Paolo Bonzini
Il 13/03/2014 15:40, Benoît Canet ha scritto: Hi, I want to make qemu-nbd QMP aware so the cloud stack my customer work on could start lxc containers with qcow2 KVM images and still benefit from the quorum and snapshot goodness. Yes, blockdev can help for this. In the meanwhile, could you

[Qemu-devel] [PULL for-2.0-rc0 37/58] cpu: Move breakpoints field from CPU_COMMON to CPUState

2014-03-13 Thread Andreas Färber
Most targets were using offsetof(CPUFooState, breakpoints) to determine how much of CPUFooState to clear on reset. Use the next field after CPU_COMMON instead, if any, or sizeof(CPUFooState) otherwise. Signed-off-by: Andreas Färber afaer...@suse.de --- exec.c| 21

Re: [Qemu-devel] [PULL for-2.0-rc0 00/58] QOM CPUState patch queue 2014-03-13

2014-03-13 Thread Christian Borntraeger
On 13/03/14 15:54, Andreas Färber wrote: Hello Peter, This is my current QOM CPU patch queue. Please pull. Since this touches on bsd-user code, request to apply the build fix first. NB: I was only able to test x86/ppc/arm KVM this time; s390x KVM was re-reviewed only. A basic start of

Re: [Qemu-devel] Building QMP in qemu-nbd

2014-03-13 Thread Eric Blake
On 03/13/2014 08:40 AM, Benoît Canet wrote: Hi, I want to make qemu-nbd QMP aware so the cloud stack my customer work on could start lxc containers with qcow2 KVM images and still benefit from the quorum and snapshot goodness. Stefan mentioned the nice idea of splitting qapi-schema.json

[Qemu-devel] [V2 PATCH 2/6] util: Add AES ShiftRows and InvShiftRows Tables

2014-03-13 Thread Tom Musta
This patch adds tables that implement the Advanced Encryption Standard (AES) ShiftRows and InvShiftRows transformations. These are commonly used in instruction models. Signed-off-by: Tom Musta tommu...@gmail.com Reviewed-by: Richard Henderson r...@twiddle.net --- include/qemu/aes.h |4

[Qemu-devel] [PULL for-2.0-rc0 08/58] target-unicore32: Clean up ENV_GET_CPU() usage

2014-03-13 Thread Andreas Färber
Commit fdfba1a298ae26dd44bcfdb0429314139a0bc55a added a usage of ENV_GET_CPU() macro in target-specific code. Use uc32_env_get_cpu() instead. Cc: Edgar E. Iglesias edgar.igles...@xilinx.com Cc: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Andreas Färber afaer...@suse.de ---

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

2014-03-13 Thread Benoît Canet
The Tuesday 04 Mar 2014 à 09:02:57 (+0100), Markus Armbruster wrote : Eric Blake ebl...@redhat.com writes: On 03/03/2014 08:27 AM, Markus Armbruster wrote: +The QAPI schema definitions can be modularized using the 'include' directive: + + include(sub-system/qapi.json) And now it

Re: [Qemu-devel] [PATCH buildfix] oslib-posix: Fix build on FreeBSD

2014-03-13 Thread Peter Maydell
On 13 March 2014 13:27, Andreas Färber andreas.faer...@web.de wrote: Commit 10f5bff622cad71645e22c027b77ac31e51008ef (util: Split out exec_dir from os_find_datadir) moved code from os-posix.c to util/oslib-posix.c but forgot to move a FreeBSD #include alongside, needed for CTL_KERN among

[Qemu-devel] [RFC 05/12] target-ppc: Eliminate redundant declarations

2014-03-13 Thread Tom Musta
This patch eliminates redundant declarations of symbols DPD2BIN and BIN2DPD. These will trigger 'redundant redeclaration of ?XXX?' warnings and thus may fail QEMU compilation. Signed-off-by: Tom Musta tommu...@gmail.com --- libdecnumber/dpd/decimal128.c |2 -- libdecnumber/dpd/decimal64.c

Re: [Qemu-devel] SMBIOS vs. NUMA (was: Build full type 19 tables)

2014-03-13 Thread Igor Mammedov
On Thu, 13 Mar 2014 10:37:52 -0400 Gabriel L. Somlo gso...@gmail.com wrote: On Thu, Mar 13, 2014 at 09:04:52AM +0100, Gerd Hoffmann wrote: Should we just assert((ram_size 10) 0x8000), and officially limit guests to 2T ? No. Not fully sure what reasonable behavier would be in case

[Qemu-devel] [RFC 09/12] target-ppc: Introduce Translation Macros for DFP Arithmetic Forms

2014-03-13 Thread Tom Musta
This patch adds macros to the PowerPC translate.c file that will be used by the Decimal Floating Point (DFP) arithmetic instructions. These instruction forms have a target operand (FRT) and two source operands (FRA, FRB). These forms also use the Rc bit to set the CR6 field of the PowerPC

[Qemu-devel] virtio-serial broken in qemu.git (was: Re: [PULL for-2.0-rc0 25/31] virtio-console: QOM cast cleanup for VirtConsole)

2014-03-13 Thread Richard W.M. Jones
git bisect is unsure, but one of these commits seems to have completely broken virtio-serial. There are only 'skip'ped commits left to test. The first bad commit could be any of: 0399a3819b27083ba69b88a9baa9025facab85bd 2ef66625f3a8978dcbbad773e6813f747971381e We cannot bisect more!

[Qemu-devel] [PULL for-2.0-rc0 04/58] target-i386: Clean up ENV_GET_CPU() usage

2014-03-13 Thread Andreas Färber
Commits fdfba1a298ae26dd44bcfdb0429314139a0bc55a, f606604f1c10b60ef294f1b9b229426521a365e3 and 2c17449b3022ca9623c4a7e2a504a4150ac4ad30 added usages of ENV_GET_CPU() macro in target-specific code. Use x86_env_get_cpu() or reuse existing X86CPU variable instead. Cc: Edgar E. Iglesias

Re: [Qemu-devel] virtio-serial broken in qemu.git (was: Re: [PULL for-2.0-rc0 25/31] virtio-console: QOM cast cleanup for VirtConsole)

2014-03-13 Thread Richard W.M. Jones
On Thu, Mar 13, 2014 at 03:32:05PM +, Richard W.M. Jones wrote: Anyhow, the error is: hw/char/virtio-console.c:132:virtconsole_realize: Object 0x7f85482fb8a0 is not an instance of type virtconsole The full log including command line is attached. Sorry, I realize that libvirt hid the

[Qemu-devel] [PATCH qom-next] virtio-console-test: Test virtserialport as well

2014-03-13 Thread Andreas Färber
A test is only as good as its coverage - testing virtserialport in addition to virtconsole shows that commit 0399a3819b27083ba69b88a9baa9025facab85bd (virtio-console: QOM cast cleanup for VirtConsole) broke virtserialport. Reported-by: Richard W.M. Jones rjo...@redhat.com Signed-off-by: Andreas

[Qemu-devel] [PULL for-2.0-rc0 40/58] translate-all: Change cpu_restore_state() argument to CPUState

2014-03-13 Thread Andreas Färber
This lets us drop some local variables in tlb_fill() functions. Signed-off-by: Andreas Färber afaer...@suse.de --- hw/i386/kvmvapic.c| 2 +- include/exec/exec-all.h | 2 +- target-alpha/helper.c | 2 +- target-alpha/mem_helper.c | 7 ++-

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

2014-03-13 Thread Eric Blake
On 03/13/2014 09:33 AM, Benoît Canet wrote: We certainly can't do without comments. JSON is designed for easy data exchange, but we use it as programming language syntax. Its restrictions make sense for easy data exchange, but hurt our use. We're not the first ones experiencing that pain:

[Qemu-devel] [PULL for-2.0-rc0 46/58] target-ppc: Use PowerPCCPU in PowerPCCPUClass::handle_mmu_fault hook

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- target-ppc/cpu-qom.h| 8 +--- target-ppc/mmu-hash32.c | 5 +++-- target-ppc/mmu-hash32.h | 2 +- target-ppc/mmu-hash64.c | 5 +++-- target-ppc/mmu-hash64.h | 2 +- target-ppc/mmu_helper.c | 2 +- 6 files changed, 14 insertions(+), 10

[Qemu-devel] [RFC 11/12] target-ppc: Introduce DFP Post Processor Utilities

2014-03-13 Thread Tom Musta
This patch adds post-processing utilities to the PowerPC Decimal Floating Point (DFP) helper code. Post-processors are small routines that execute after a preliminary DFP result is computed. They are used, among other things, to compute status bits. This patch defines a function type for post

Re: [Qemu-devel] [PATCH qom-next] virtio-console-test: Test virtserialport as well

2014-03-13 Thread Richard W.M. Jones
On Thu, Mar 13, 2014 at 04:51:10PM +0100, Andreas Färber wrote: A test is only as good as its coverage - testing virtserialport in addition to virtconsole shows that commit 0399a3819b27083ba69b88a9baa9025facab85bd (virtio-console: QOM cast cleanup for VirtConsole) broke virtserialport. This

[Qemu-devel] [PULL v2 for-2.0 08/24] rfifolock: add recursive FIFO lock

2014-03-13 Thread Stefan Hajnoczi
QemuMutex does not guarantee fairness and cannot be acquired recursively: Fairness means each locker gets a turn and the scheduler cannot cause starvation. Recursive locking is useful for composition, it allows a sequence of locking operations to be invoked atomically by acquiring the lock

[Qemu-devel] [PULL for-2.0-rc0 00/58] QOM CPUState patch queue 2014-03-13

2014-03-13 Thread Andreas Färber
Hello Peter, This is my current QOM CPU patch queue. Please pull. Since this touches on bsd-user code, request to apply the build fix first. NB: I was only able to test x86/ppc/arm KVM this time; s390x KVM was re-reviewed only. Regards, Andreas Cc: Peter Maydell peter.mayd...@linaro.org Cc:

[Qemu-devel] [PULL for-2.0-rc0 19/58] target-i386: X86CPU model subclasses

2014-03-13 Thread Andreas Färber
From: Eduardo Habkost ehabk...@redhat.com Register separate QOM types for each x86 CPU model. This will allow management code to more easily probe what each CPU model provides, by simply creating objects using the appropriate class name, without having to restart QEMU. This also allows us to

[Qemu-devel] [PATCH qom-next] virtio-console: Fix VIRTIO_CONSOLE() cast macro

2014-03-13 Thread Andreas Färber
Commit 0399a3819b27083ba69b88a9baa9025facab85bd (virtio-console: QOM cast cleanup for VirtConsole) broke virtserialport since it shares functions and state struct with virtconsole. Let virtconsole inherit from virtserialport, and use virtserialport type for casting. Note that virtio-serial-port

[Qemu-devel] [PULL for-2.0-rc0 20/58] cpu: Introduce CPUClass::parse_features() hook

2014-03-13 Thread Andreas Färber
Adapt the X86CPU implementation to suit the generic hook. This involves a cleanup of error handling to cope with NULL errp. Reviewed-by: Igor Mammedov imamm...@redhat.com Signed-off-by: Andreas Färber afaer...@suse.de --- include/qom/cpu.h | 2 ++ target-i386/cpu.c | 36

Re: [Qemu-devel] [PATCH qom-next] virtio-console: Fix VIRTIO_CONSOLE() cast macro

2014-03-13 Thread Richard W.M. Jones
On Thu, Mar 13, 2014 at 05:24:36PM +0100, Andreas Färber wrote: Commit 0399a3819b27083ba69b88a9baa9025facab85bd (virtio-console: QOM cast cleanup for VirtConsole) broke virtserialport since it shares functions and state struct with virtconsole. Let virtconsole inherit from virtserialport, and

[Qemu-devel] [RFC 04/12] target-ppc: Change gstdint.h to stdint.h

2014-03-13 Thread Tom Musta
This patch replaces the inclusion of gstdint.h to the standard stdint.h. Signed-off-by: Tom Musta tommu...@gmail.com --- include/libdecnumber/decContext.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/libdecnumber/decContext.h

[Qemu-devel] [PULL for-2.0-rc0 48/58] exec: Change cpu_breakpoint_{insert, remove{, _by_ref, _all}} argument

2014-03-13 Thread Andreas Färber
Use CPUState. Allows to clean up CPUArchState in gdbstub. Signed-off-by: Andreas Färber afaer...@suse.de --- exec.c | 20 gdbstub.c | 20 include/exec/cpu-all.h | 15 --- include/qom/cpu.h | 15

[Qemu-devel] [PULL for-2.0-rc0 09/58] target-xtensa: Clean up ENV_GET_CPU() usage

2014-03-13 Thread Andreas Färber
Commits a00817cc4c18b7872e92765a4736fb2227cc237b and fdfba1a298ae26dd44bcfdb0429314139a0bc55a added usages of ENV_GET_CPU() macro in target-specific code. Use xtensa_env_get_cpu() instead. Cc: Max Filippov jcmvb...@gmail.com Cc: Edgar E. Iglesias edgar.igles...@xilinx.com Cc: Peter Maydell

[Qemu-devel] [PULL for-2.0-rc0 06/58] target-s390x: Clean up ENV_GET_CPU() usage

2014-03-13 Thread Andreas Färber
Commits f606604f1c10b60ef294f1b9b229426521a365e3, 2c17449b3022ca9623c4a7e2a504a4150ac4ad30 and 5ce5944dc0ffdc43c11b5cad11e526f699aabe4c added usages of ENV_GET_CPU() macro in target-specific code. Use s390_env_get_cpu() instead. Cc: Edgar E. Iglesias edgar.igles...@xilinx.com Cc: Peter Maydell

[Qemu-devel] [PULL for-2.0-rc0 24/58] cpu: Implement CPUClass::parse_features() for the rest of CPUs

2014-03-13 Thread Andreas Färber
CPUs who do not provide their own implementation of feature parsing will treat each option as a QOM property and set it to the supplied value. Signed-off-by: Andreas Färber afaer...@suse.de --- qom/cpu.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff

[Qemu-devel] [PULL for-2.0-rc0 56/58] cputlb: Change tlb_flush() argument to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- cputlb.c | 6 +++--- exec.c | 4 +--- hw/sh4/sh7750.c| 2 +- include/exec/exec-all.h| 4 ++-- target-alpha/cpu.c | 2 +-

[Qemu-devel] [RFC 03/12] target-ppc: Modify dconfig.h to Integrate with QEMU

2014-03-13 Thread Tom Musta
This patch modifies the dconfig.h header file so that libdecnumber code integrates correctly with QEMU. Normally, this file is generated from a configuration script, but it can be replaced with a static file for this usage within QEMU: - the WORDS_BIGENDIAN preprocessor macro is used in

[Qemu-devel] [PULL for-2.0-rc0 12/58] target-i386: Call x86_cpu_load_def() earlier

2014-03-13 Thread Andreas Färber
From: Eduardo Habkost ehabk...@redhat.com As we will initialize the X86CPU fields on instance_init eventually, move the code that initializes the X86CPU data based on the CPU model name closer to the object_new() call. Signed-off-by: Eduardo Habkost ehabk...@redhat.com Signed-off-by: Andreas

Re: [Qemu-devel] [PATCH v3 2/2] Fix return value of vga initlization on ppc

2014-03-13 Thread Andreas Färber
Am 11.03.2014 10:52, schrieb Mark Wu: On 03/10/2014 10:52 PM, Paolo Bonzini wrote: Il 10/03/2014 15:37, Mark Wu ha scritto: Before spapr_vga_init will returned false if the vga is specified by the command '-device VGA' because vga_interface_type was evaluated to VGA_NONE. With the change in

Re: [Qemu-devel] [PULL v2 for-2.0 00/24] Block patches

2014-03-13 Thread Peter Maydell
On 13 March 2014 14:10, Stefan Hajnoczi stefa...@redhat.com wrote: v2: * Fixed merge conflict with qemu_thread_create() naming [Peter] The following changes since commit 750036a848ea913ba6343718ffa70da98f7eef6b: Merge remote-tracking branch 'remotes/afaerber/tags/prep-for-upstream' into

[Qemu-devel] [PULL for-2.0-rc0 38/58] exec: Change tlb_fill() argument to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- include/exec/exec-all.h | 2 +- include/exec/softmmu_template.h | 8 target-alpha/mem_helper.c | 8 +--- target-arm/op_helper.c | 12 +++- target-cris/op_helper.c | 7 ---

[Qemu-devel] [RFC 12/12] target-ppc: Introduce DFP Add

2014-03-13 Thread Tom Musta
This patch provides the implementation for the Decimal Floating Point (DFP) Add instructions (dadd, daddq). Signed-off-by: Tom Musta tommu...@gmail.com --- target-ppc/dfp_helper.c | 35 --- target-ppc/helper.h |3 +++ target-ppc/translate.c |8

Re: [Qemu-devel] [PATCH] blockdev: Refuse to open encrypted image unless paused

2014-03-13 Thread Markus Armbruster
Paolo Bonzini pbonz...@redhat.com writes: Il 13/03/2014 14:18, Markus Armbruster ha scritto: Paolo Bonzini pbonz...@redhat.com writes: Il 12/03/2014 18:00, Markus Armbruster ha scritto: +} else if (!runstate_check(RUN_STATE_PRELAUNCH) + !runstate_check(RUN_STATE_PAUSED)) {

[Qemu-devel] [PULL for-2.0-rc0 54/58] target-microblaze: Replace DisasContext::env field with MicroBlazeCPU

2014-03-13 Thread Andreas Färber
This cleans up some mb_env_get_cpu() needed for cpu_abort(). Signed-off-by: Andreas Färber afaer...@suse.de --- target-microblaze/translate.c | 87 +-- 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/target-microblaze/translate.c

[Qemu-devel] [PULL v2 for-2.0 14/24] iothread: stash thread ID away

2014-03-13 Thread Stefan Hajnoczi
Keep the thread ID around so we can report it via QMP. There's only one problem: qemu_get_thread_id() (gettid() wrapper on Linux) must be called from the thread itself. There is no way to get the thread ID outside the thread. This patch uses a condvar to wait for iothread_run() to populate the

[Qemu-devel] [PULL for-2.0-rc0 42/58] translate-all: Change tb_check_watchpoint() argument to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- exec.c | 2 +- translate-all.c | 4 ++-- translate-all.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exec.c b/exec.c index 5f7c472..7f94581 100644 --- a/exec.c +++ b/exec.c @@ -1605,7 +1605,7 @@ static void

[Qemu-devel] [PULL for-2.0-rc0 39/58] cpu-exec: Change cpu_loop_exit() argument to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- cpu-exec.c| 14 ++ exec.c| 2 +- include/exec/exec-all.h | 2 +- target-alpha/helper.c | 4 ++-- target-alpha/mem_helper.c | 4 ++-- target-arm/op_helper.c| 8

[Qemu-devel] [PULL for-2.0-rc0 41/58] translate-all: Change cpu_restore_state_from_tb() argument to CPUState

2014-03-13 Thread Andreas Färber
And normalize the argument order. Signed-off-by: Andreas Färber afaer...@suse.de --- translate-all.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/translate-all.c b/translate-all.c index 70d8229..adcef83 100644 --- a/translate-all.c +++ b/translate-all.c @@

[Qemu-devel] [PULL for-2.0-rc0 45/58] translate-all: Change tb_flush_jmp_cache() argument to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- cputlb.c | 2 +- include/exec/cputlb.h | 2 +- translate-all.c | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cputlb.c b/cputlb.c index 0eb1801..6b2cdb2 100644 --- a/cputlb.c +++ b/cputlb.c @@ -106,7

[Qemu-devel] [PULL for-2.0-rc0 30/58] cpu: Move icount_extra field from CPU_COMMON to CPUState

2014-03-13 Thread Andreas Färber
Reset it. Signed-off-by: Andreas Färber afaer...@suse.de --- cpu-exec.c | 10 +- cpus.c | 14 +++--- include/exec/cpu-defs.h | 1 - include/qom/cpu.h | 2 ++ qom/cpu.c | 1 + 5 files changed, 15 insertions(+), 13 deletions(-)

Re: [Qemu-devel] [PATCH v3 05/10] raven: set a correct PCI I/O memory region

2014-03-13 Thread Andreas Färber
Am 05.11.2013 00:09, schrieb Hervé Poussineau: PCI I/O region is 0x3f80 bytes starting at 0x8000. Do not use global QEMU I/O region, which is only 64KB. Signed-off-by: Hervé Poussineau hpous...@reactos.org With this patch I get only a blank screen in OHW/Etch. Regards, Andreas

Re: [Qemu-devel] [PULL for-2.0-rc0 00/58] QOM CPUState patch queue 2014-03-13

2014-03-13 Thread Peter Maydell
On 13 March 2014 14:54, Andreas Färber afaer...@suse.de wrote: Hello Peter, This is my current QOM CPU patch queue. Please pull. Since this touches on bsd-user code, request to apply the build fix first. NB: I was only able to test x86/ppc/arm KVM this time; s390x KVM was re-reviewed

[Qemu-devel] [PULL for-2.0-rc0 44/58] translate-all: Change tb_gen_code() argument to CPUState

2014-03-13 Thread Andreas Färber
Signed-off-by: Andreas Färber afaer...@suse.de --- cpu-exec.c | 4 ++-- exec.c | 2 +- hw/i386/kvmvapic.c | 2 +- include/exec/exec-all.h | 2 +- translate-all.c | 9 + 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/cpu-exec.c

<    1   2   3   >