[Qemu-devel] [PATCH v1 4/4] target-arm: Correct a comment refering to EL0

2014-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index 57e7d9c..fb90676 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -4

[Qemu-devel] [PATCH v1 3/4] target-arm: A64: Fix a typo when declaring TLBI ops

2014-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Harmless typo as opc1 defaults to zero and opc2 gets re-declared to its correct value. Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/target-arm/helper.c b/target-

[Qemu-devel] [PATCH v1 2/4] target-arm: A64: Handle blr lr

2014-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" For linked branches, updates to the link register happen conceptually after the read of the branch target register. Signed-off-by: Edgar E. Iglesias --- target-arm/translate-a64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-arm/transla

[Qemu-devel] [PATCH v1 0/4] Mixed ARM A64 fixes

2014-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Hi Peter, This series fixes a few things I've noticed when running and looking at the aarch64 port. Cheers, Edgar Edgar E. Iglesias (4): target-arm: Make vbar_write 64bit friendly on 32bit hosts target-arm: A64: Handle blr lr target-arm: A64: Fix a typo when dec

[Qemu-devel] [PATCH v1 1/4] target-arm: Make vbar_write 64bit friendly on 32bit hosts

2014-04-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- target-arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 43c1b4f..330bfc7 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -657,7 +657,7 @@

[Qemu-devel] [PATCH V5 05/28] qapi: define events in qapi schema

2014-04-30 Thread Wenchao Xia
Some old type defines for spice and vnc are changed to let new event defines use them instead of redefine. Note that define of BlockErrorAction is moved from block.h to qapi schema, and it is not merged with BlockdevOnError. In schema NIC_RX_FILTER_CHANGED's param 'name' is changed as optional one,

[Qemu-devel] [PATCH V5 12/28] qapi event: convert SUSPEND

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 3679588..3ee2494 100644 --- a/vl.c +++ b/vl.c @@ -1907,7 +1907,7 @@ static void qemu_system_suspend(void) pause_all_vcpus(); notifier_list_notify(&suspend_noti

[Qemu-devel] [PATCH V5 11/28] qapi event: convert RESUME

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 717bfc1..3679588 100644 --- a/vl.c +++ b/vl.c @@ -1734,7 +1734,7 @@ void vm_start(void) runstate_set(RUN_STATE_RUNNING); vm_state_notify(1, RUN_STATE_R

[Qemu-devel] [PATCH V5 22/28] qapi event: convert NIC_RX_FILTER_CHANGED

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- hw/net/virtio-net.c | 13 +++-- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 33bd233..216d4e1 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -22,7 +22,7 @@ #include "net/vho

[Qemu-devel] [PATCH V5 16/28] qapi event: convert WATCHDOG

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- hw/watchdog/watchdog.c | 23 +++ 1 files changed, 7 insertions(+), 16 deletions(-) diff --git a/hw/watchdog/watchdog.c b/hw/watchdog/watchdog.c index f28161b..9284d3f 100644 --- a/hw/watchdog/watchdog.c +++ b/hw/watchdog/watchdog.c @@ -24,9 +2

[Qemu-devel] [PATCH V5 13/28] qapi event: convert SUSPEND_DISK

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- hw/acpi/core.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 79414b4..ace6438 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -22,11 +22,11 @@ #include "hw/hw.h" #include "hw/i386/pc.h" #incl

[Qemu-devel] [PATCH V5 15/28] qapi event: convert RTC_CHANGE

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- hw/ppc/spapr_rtas.c |3 ++- hw/timer/mc146818rtc.c |3 ++- include/sysemu/sysemu.h |2 -- vl.c|9 - 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 73860

[Qemu-devel] [PATCH V5 17/28] qapi event: convert DEVICE_DELETED

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- hw/core/qdev.c | 12 ++-- 1 files changed, 2 insertions(+), 10 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 60f9df1..ac85eaf 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -32,8 +32,8 @@ #include "qapi/qmp/qerror.h" #include "qap

[Qemu-devel] [PATCH V5 18/28] qapi event: convert DEVICE_TRAY_MOVED

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- block.c | 21 +++-- 1 files changed, 7 insertions(+), 14 deletions(-) diff --git a/block.c b/block.c index e9a55bb..dae5d25 100644 --- a/block.c +++ b/block.c @@ -35,6 +35,7 @@ #include "block/qapi.h" #include "qmp-commands.h" #include "qemu/ti

[Qemu-devel] [PATCH V5 25/28] qapi event: convert BALLOON_CHANGE

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- balloon.c | 13 - hw/virtio/virtio-balloon.c |6 -- include/sysemu/balloon.h |2 -- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/balloon.c b/balloon.c index e321f2c..b70da4f 100644 --- a/balloon.c +++ b

[Qemu-devel] [PATCH V5 21/28] qapi event: convert other BLOCK_JOB events

2014-04-30 Thread Wenchao Xia
BLOCK_JOB_COMPLETED, BLOCK_JOB_CANCELLED, BLOCK_JOB_READY are converted. Signed-off-by: Wenchao Xia --- block/mirror.c |2 +- blockdev.c | 12 +--- blockjob.c | 36 include/block/blockjob.h | 17

[Qemu-devel] [PATCH V5 28/28] qapi event: clean up

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- include/monitor/monitor.h | 40 - monitor.c | 81 stubs/Makefile.objs|1 - stubs/mon-protocol-event.c |6 --- 4 files changed, 0 insertions(+), 128 deletions(-) d

[Qemu-devel] [PATCH V5 20/28] qapi event: convert BLOCK_IMAGE_CORRUPTED

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- block/qcow2-refcount.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index a37ee45..3ab6b4e 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -27,6 +27,7 @@ #i

[Qemu-devel] [PATCH V5 26/28] qapi event: convert GUEST_PANICKED

2014-04-30 Thread Wenchao Xia
monitor.h is still included in target-s390x/kvm.c, since no good way to verify whether other code need it on my x86 host. Signed-off-by: Wenchao Xia --- hw/misc/pvpanic.c | 13 ++--- target-s390x/kvm.c |8 +++- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH V5 19/28] qapi event: convert BLOCK_IO_ERROR and BLOCK_JOB_ERROR

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- block.c | 36 blockjob.c|6 +- include/block/block_int.h |3 --- 3 files changed, 9 insertions(+), 36 deletions(-) diff --git a/block.c b/block.c index dae5d25..c6c4e4b 100644 ---

[Qemu-devel] [PATCH V5 23/28] qapi event: convert VNC events

2014-04-30 Thread Wenchao Xia
VNC_CONNECTED, VNC_DISCONNECTED, VNC_INITIALIZED are converted. Signed-off-by: Wenchao Xia --- ui/vnc.c | 111 -- ui/vnc.h |4 +- 2 files changed, 59 insertions(+), 56 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index b03b3b8..a

[Qemu-devel] [PATCH V5 27/28] qapi event: convert QUORUM events

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- block/quorum.c | 25 - 1 files changed, 8 insertions(+), 17 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index ecec3a5..5d1c3dc 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -17,6 +17,7 @@ #include #include "block/blo

[Qemu-devel] [PATCH V5 24/28] qapi event: convert SPICE events

2014-04-30 Thread Wenchao Xia
SPICE_INITIALIZED, SPICE_CONNECTED, SPICE_DISCONNECTED and SPICE_MIGRATE_COMPLETED are converted. inet_strfamily is removed since no more caller exist now. Signed-off-by: Wenchao Xia --- include/qemu/sockets.h |1 - ui/spice-core.c| 70 --

[Qemu-devel] [PATCH V5 08/28] qapi event: convert POWERDOWN

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 9f78bd7..5dd30c9 100644 --- a/vl.c +++ b/vl.c @@ -1970,7 +1970,7 @@ void qemu_system_shutdown_request(void) static void qemu_system_powerdown(void) { -monitor_pr

[Qemu-devel] [PATCH V5 14/28] qapi event: convert WAKEUP

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 3ee2494..73b4725 100644 --- a/vl.c +++ b/vl.c @@ -2031,7 +2031,7 @@ static bool main_loop_should_exit(void) notifier_list_notify(&wakeup_notifiers, &wakeup_reas

[Qemu-devel] [PATCH V5 10/28] qapi event: convert STOP

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- cpus.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index 7bbe153..95a0228 100644 --- a/cpus.c +++ b/cpus.c @@ -25,7 +25,7 @@ /* Needed early for CONFIG_BSD etc. */ #include "config-host.h" -#include "monitor/monit

[Qemu-devel] [PATCH V5 06/28] monitor: change event functions as an implemention of new emit method

2014-04-30 Thread Wenchao Xia
Now monitor has been hooked on the new event mechanism, so the patches later can convert event callers one by one. qmp_query_events() is also switched to use new generated event defines. Note that old function monitor_protocol_event() is kept for existing caller to avoid code break, but rate limiti

[Qemu-devel] [PATCH V5 09/28] qapi event: convert RESET

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 5dd30c9..717bfc1 100644 --- a/vl.c +++ b/vl.c @@ -1886,7 +1886,7 @@ void qemu_system_reset(bool report) qemu_devices_reset(); } if (report) { -

[Qemu-devel] [PATCH V5 02/28] qapi: add event helper functions

2014-04-30 Thread Wenchao Xia
This file holds some functions that do not need to be generated. Signed-off-by: Wenchao Xia --- include/qapi/qmp-event.h | 27 + qapi/Makefile.objs |1 + qapi/qmp-event.c | 74 ++ 3 files changed, 102 insertions(+)

[Qemu-devel] [PATCH V5 04/28] test: add test cases for qapi event

2014-04-30 Thread Wenchao Xia
These cases will verify whether the expected qdict is built. Signed-off-by: Wenchao Xia --- tests/Makefile | 14 ++- tests/qapi-schema/qapi-schema-test.json | 12 ++ tests/qapi-schema/qapi-schema-test.out | 10 +- tests/test-qmp-event.c | 265 +++

[Qemu-devel] [PATCH V5 07/28] qapi event: convert SHUTDOWN

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- vl.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 236f95e..9f78bd7 100644 --- a/vl.c +++ b/vl.c @@ -117,6 +117,7 @@ int main(int argc, char **argv) #include "ui/qemu-spice.h" #include "qapi/string-input-visitor.h" #

[Qemu-devel] [PATCH V5 03/28] qapi script: add event support

2014-04-30 Thread Wenchao Xia
qapi-event.py will parse the schema and generate qapi-event.c, then the API in qapi-event.c can be used to handle event in qemu code. All API have prefix "qapi_event". The script mainly includes two parts: generate API for each event define, generate an enum type for all defined events. Since in

[Qemu-devel] [PATCH V5 01/28] os-posix: include sys/time.h

2014-04-30 Thread Wenchao Xia
Since gettimeofday() is used in this header file as a macro define, include the function's define header file, to avoid compile warning when other file include os-posix.h. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- include/sysemu/os-posix.h |2 ++ 1 files changed, 2 insertions(+

[Qemu-devel] [PATCH V5 00/28] add direct support of event in qapi schema

2014-04-30 Thread Wenchao Xia
This series add support for tag/keyword 'event' in qapi-schema. A new file was created to store some helper functions in patch 2, patch 4 is the test case, patch 5 is a convert example. The implemention is done by generate API and a batch of parameters for each event define, it doesn't generate a

[Qemu-devel] [PATCH] gtk: Add handling for the xfree86 keycodes

2014-04-30 Thread Bruce Rogers
Currently only evdev keycodes are handled by the gtk-ui. SDL has code to handle both. This patch adds similar processing so that both keycode types will be handled via the gtk-ui. Signed-off-by: Bruce Rogers --- ui/gtk.c | 36 +++- 1 file changed, 35 insertions(+)

[Qemu-devel] [Bug 1314857] [NEW] seg fault in ivshmem when using ioeventfd=on

2014-04-30 Thread Gene Snider
Public bug reported: When launching qemu with the ivshmem device and the nahanni guest server there is segmentation fault in the setup_ioeventfds function of ivshmem.c. If the ioeventfd=on flag is set the pci_ivshmem_init will call setup_ioeventfds at line 668. This function relies on the 'peers'

Re: [Qemu-devel] [PATCH 2/4] Set eflags and cr0 prior to calling cpu_x86_load_seg_cache() in smm_helper.c.

2014-04-30 Thread Richard Henderson
On 04/30/2014 10:07 AM, Paolo Bonzini wrote: > Il 30/04/2014 18:54, Richard Henderson ha scritto: >> On 04/29/2014 01:38 PM, Kevin O'Connor wrote: >>> cpu_load_eflags(env, 0, ~(CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C | >>>DF_MASK)); >>> env->eip = 0x800

[Qemu-devel] [PATCHv3 2/4] Set eflags and cr0 prior to calling cpu_x86_load_seg_cache() in smm_helper.c.

2014-04-30 Thread Kevin O'Connor
On Wed, Apr 30, 2014 at 09:54:10AM -0700, Richard Henderson wrote: > On 04/29/2014 01:38 PM, Kevin O'Connor wrote: > > cpu_load_eflags(env, 0, ~(CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C | > >DF_MASK)); > > env->eip = 0x8000; > > +cpu_x86_update_cr0(e

[Qemu-devel] [PATCHv3 4/4] The x86 CPL is stored in CS.selector - auto update hflags accordingly.

2014-04-30 Thread Kevin O'Connor
On Wed, Apr 30, 2014 at 09:57:21AM -0700, Richard Henderson wrote: > On 04/29/2014 01:38 PM, Kevin O'Connor wrote: > > +if (!(env->cr[0] & CR0_PE_MASK)) > > +cpl = 0; > > +else if (env->eflags & VM_MASK) > > +cpl = 3; > > CODI

[Qemu-devel] [RFC 3/5] pc: Don't crash on apic_accept_pic_intr() if CPU has no apic_state

2014-04-30 Thread Eduardo Habkost
apic_accept_pic_intr() returns -1 if gets NULL as argument. So, instead of checking if apic_accept_pic_intr() returns non-zero, check for return value > 0. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/p

[Qemu-devel] [RFC 2/5] cpu: Don't try to pause CPUs if they are already stopped

2014-04-30 Thread Eduardo Habkost
This will make the pause_all_cpus() code not crash in case qemu_init_vcpu() was not called yet for a CPU (so it doesn't have cpu->thread set yet). Signed-off-by: Eduardo Habkost --- cpus.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index 69b

[Qemu-devel] [RFC 1/5] cpu: Initialize cpu->stopped=true earlier

2014-04-30 Thread Eduardo Habkost
In case something happens and prevents qemu_init_vcpu() from running after cpu_exec_init() was already called, this will let the rest of the VCPU handling code know that the CPU is not running yet. Signed-off-by: Eduardo Habkost --- cpus.c | 1 - exec.c | 1 + 2 files changed, 1 insertion(+), 1

[Qemu-devel] [RFC 5/5] target-i386: Report QOM class name for CPU definitions

2014-04-30 Thread Eduardo Habkost
The new qom-type attributed will be used to indicate that the object-add QMP command can be used to create CPU objects. This will let management code to create multiple CPU objects from different classes and CPU models and query for their information using QOM properties (like the "feature-words" p

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

2014-04-30 Thread Eduardo Habkost
This series allows management code to use object-add on X86CPU subclasses, so it can use it to probe for CPU model information without re-running QEMU. The main use case for this is to allow management code to create CPU objects and query the "feature-words" and "filtered-features" properties on th

[Qemu-devel] [RFC 4/5] target-i386: Make CPU objects user-creatable

2014-04-30 Thread Eduardo Habkost
Creating X86CPU objects using object-add will allow management code to probe for details on each CPU model when using "-machine none", and without having to restart QEMU. Note that object-add will _not_ create a running VCPU. It is not CPU hotplug, which will use device_add instead of object-add.

Re: [Qemu-devel] [Bug 1314667] Re: PMPrebUSB - appcrash of qemu in Win-7-64bit

2014-04-30 Thread Ohlerth Hans
Hello, thank you for answering very fast. But in Google is advertised /"//RMPrepUSB/ www.rmprepusb.com/‎Diese Seite übersetzen

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

2014-04-30 Thread Alexander Graf
On 30.04.14 21:41, Gabriel L. Somlo wrote: Some guests (e.g. 0S X) more or less arbitrarily insist on a minimum lapic version of 0x14 in order to successfully boot. This patch bumps the emulated apic version on piix and q35 machine types >= 2.1. Signed-off-by: Gabriel L. Somlo --- On Wed, Apr

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

2014-04-30 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 v10: * Various argument/variable name changes (Markus Armbruster). * Fix path replacement command in error fil

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

2014-04-30 Thread Gabriel L. Somlo
Some guests (e.g. 0S X) more or less arbitrarily insist on a minimum lapic version of 0x14 in order to successfully boot. This patch bumps the emulated apic version on piix and q35 machine types >= 2.1. Signed-off-by: Gabriel L. Somlo --- On Wed, Apr 30, 2014 at 09:20:18PM +0200, Paolo Bonzini w

[Qemu-devel] [PULL 08/31] block: qemu-iotests: make test 019 and 086 work with spaced pathnames

2014-04-30 Thread Kevin Wolf
From: Jeff Cody Both tests 019 and 086 need proper quotations to work with pathnames that contain spaces. Reviewed-by: Benoit Canet Reviewed-by: Fam Zheng Signed-off-by: Jeff Cody Signed-off-by: Kevin Wolf --- tests/qemu-iotests/019 | 2 +- tests/qemu-iotests/086 | 8 2 files chang

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

2014-04-30 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 v10 1/4] qapi: [trivial] Break long command lines

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

[Qemu-devel] [PULL 28/31] curl: Remove unnecessary explicit calls to internal event handler

2014-04-30 Thread Kevin Wolf
From: Matthew Booth Remove calls to curl_multi_do where the relevant handles are already registered to the event loop. Ensure that we kick off socket handling with CURL_SOCKET_TIMEOUT after adding a new handle. Signed-off-by: Matthew Booth Tested-by: Richard W.M. Jones Signed-off-by: Kevin Wo

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

2014-04-30 Thread Paolo Bonzini
Il 30/04/2014 21:18, Gabriel L. Somlo ha scritto: Some guests (e.g. 0S X) more or less arbitrarily insist on a minimum lapic version of 0x14 in order to successfully boot. This patch bumps the emulated apic version on piix and q35 machine types >= 2.1. Signed-off-by: Gabriel L. Somlo --- On Th

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

2014-04-30 Thread Gabriel L. Somlo
Some guests (e.g. 0S X) more or less arbitrarily insist on a minimum lapic version of 0x14 in order to successfully boot. This patch bumps the emulated apic version on piix and q35 machine types >= 2.1. Signed-off-by: Gabriel L. Somlo --- On Thu, Mar 06, 2014 at 09:50:48AM +0200, Michael S. Tsir

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

2014-04-30 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 v10 3/4] qapi: Use an explicit input file

2014-04-30 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] [PULL 03/31] block: Add '--version' option to qemu-img

2014-04-30 Thread Kevin Wolf
From: 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

[Qemu-devel] [Bug 1314667] Re: PMPrebUSB - appcrash of qemu in Win-7-64bit

2014-04-30 Thread Steve Si
The QEMU used in RMPrepUSB is 32-bit only - it won't run 64-bit programs. Normally, Windows will just display an error message saying it needs a 64-bit system. Use Virtual Box for 64-bit OS testing and DavidB's Virtual Machine USB Boot application - see www.rmprepusb.com Tutorial #4 -- You receiv

[Qemu-devel] [PULL 16/31] block: Fix open_flags in bdrv_reopen()

2014-04-30 Thread Kevin Wolf
Use the same function as bdrv_open() for determining what the right flags for bs->file are. Without doing this, a reopen means that bs->file loses BDRV_O_CACHE_WB or BDRV_O_UNMAP if bs doesn't have it as well. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block.c | 5 - 1 file change

[Qemu-devel] [PULL 04/31] block: Ignore duplicate or NULL format_name in bdrv_iterate_format

2014-04-30 Thread Kevin Wolf
From: 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

[Qemu-devel] [PULL 25/31] curl: Remove unnecessary use of goto

2014-04-30 Thread Kevin Wolf
From: Matthew Booth This isn't any of the usually acceptable uses of goto. Signed-off-by: Matthew Booth Tested-by: Richard W.M. Jones Signed-off-by: Kevin Wolf --- block/curl.c | 55 +++ 1 file changed, 27 insertions(+), 28 deletions(-) di

[Qemu-devel] [PULL 12/31] block: Create bdrv_backing_flags()

2014-04-30 Thread Kevin Wolf
Instead of manipulation flags inline, move the derivation of the flags of a backing file into a new function next to the existing functions that derive flags for bs->file and for the block driver open function. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block.c | 23 +-

[Qemu-devel] [PULL 29/31] curl: Eliminate unnecessary use of curl_multi_socket_all

2014-04-30 Thread Kevin Wolf
From: Matthew Booth curl_multi_socket_all is a deprecated catch-all which checks for activities on all open curl sockets. We have enough information from the event loop to check only the sockets with activity. This change removes use of curl_multi_socket_all in favour of curl_multi_socket_action

[Qemu-devel] [PULL 24/31] curl: Fix long line

2014-04-30 Thread Kevin Wolf
From: Matthew Booth Signed-off-by: Matthew Booth Tested-by: Richard W.M. Jones Signed-off-by: Kevin Wolf --- block/curl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/curl.c b/block/curl.c index 6731d28..0404dbd 100644 --- a/block/curl.c +++ b/block/curl.c @@ -2

[Qemu-devel] [PULL 23/31] block/vdi: Error out immediately in vdi_create()

2014-04-30 Thread Kevin Wolf
From: Max Reitz Currently, if an error occurs during the part of vdi_create() which actually writes the image, the function stores -errno, but continues anyway. Instead of trying to write data which (if it can be written at all) does not make any sense without the operations before succeeding (e

[Qemu-devel] [PULL 17/31] block: Use error_abort in bdrv_image_info_specific_dump()

2014-04-30 Thread Kevin Wolf
From: Max Reitz Currently, bdrv_image_info_specific_dump() uses an error variable for visit_type_ImageInfoSpecific, but ignores the result. As this function is used here with an output visitor to transform the ImageInfoSpecific object to a generic QDict, an error should actually be impossible. It

[Qemu-devel] [PULL 15/31] Revert "block: another bdrv_append fix"

2014-04-30 Thread Kevin Wolf
This reverts commit 3a389e7926750cba5c83f662b1941888b2bebc04. The commit was wrong and what it tried to fix just works today without any change. What the commit tried to fix: When creating live snapshots, the new image file is opened with BDRV_O_NO_BACKING because the whole backing chain

[Qemu-devel] [PULL 14/31] block: Unlink temporary files in raw-posix/win32

2014-04-30 Thread Kevin Wolf
Instead of having unlink() calls in the generic block layer, where we aren't even guarateed to have a file name, move them to those block drivers that are actually used and that always have a filename. Gets us rid of some #ifdefs as well. The patch also converts bs->is_temporary to a new BDRV_O_TE

[Qemu-devel] [PULL 13/31] block: Remove BDRV_O_COPY_ON_READ for bs->file

2014-04-30 Thread Kevin Wolf
Copy on Read makes sense on the format level where backing files are implemented, but it's not required on the protocol level. While it shouldn't actively break anything to have COR enabled on both layers, needless serialisation and allocation checks may impact performance. Signed-off-by: Kevin Wo

[Qemu-devel] [PULL 09/31] qcow2: Fix discard

2014-04-30 Thread Kevin Wolf
From: Max Reitz discard_single_l2() should not implement its own version of qcow2_get_cluster_type(), but rather rely on this already existing function. By doing so, it will work for compressed clusters as well (which it did not so far). Also, rename "old_offset" to "old_l2_entry", as both are q

[Qemu-devel] [PULL 05/31] mirror: Fix resource leak when bdrv_getlength fails

2014-04-30 Thread Kevin Wolf
From: Fam Zheng The direct return will skip releasing of all the resouces at immediate_exit, don't miss that. Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/mirror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 953

[Qemu-devel] [PULL 31/31] curl: Fix hang reading from slow connections

2014-04-30 Thread Kevin Wolf
From: Matthew Booth When receiving a new aio read request, we first look for an existing transaction whose range will cover the read request by the time it completes. However, we weren't checking that the existing transaction was still active. If it had timed out, we were adding the request to a

[Qemu-devel] [PULL 30/31] curl: Ensure all informationals are checked for completion

2014-04-30 Thread Kevin Wolf
From: Matthew Booth According to the documentation, the correct way to ensure all informationals have been returned by curl_multi_info_read is to loop until it returns NULL. Signed-off-by: Matthew Booth Tested-by: Richard W.M. Jones Signed-off-by: Kevin Wolf --- block/curl.c | 53 +++

[Qemu-devel] [PULL 06/31] mirror: Check for bdrv_get_info result

2014-04-30 Thread Kevin Wolf
From: Fam Zheng bdrv_get_info could fail. Add check before using the returned value. Signed-off-by: Fam Zheng Signed-off-by: Kevin Wolf --- block/mirror.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index 403714c..1c38aa8 100644 ---

[Qemu-devel] [PULL 07/31] block: qemu-iotests - fix image cleanup when using spaced pathnames

2014-04-30 Thread Kevin Wolf
From: Jeff Cody The _rm_test_img() function in common.rc did not quote the image file, which left droppings in the scratch directory (and performed a potentially unsafe rm -f). This adds the necessary quotes. Reviewed-by: Benoit Canet Signed-off-by: Jeff Cody Signed-off-by: Kevin Wolf --- t

[Qemu-devel] [PULL 26/31] curl: Fix return from curl_read_cb with invalid state

2014-04-30 Thread Kevin Wolf
From: Matthew Booth A curl write callback is supposed to return the number of bytes it handled. curl_read_cb would have erroneously reported it had handled all bytes in the event that the internal curl state was invalid. Signed-off-by: Matthew Booth Tested-by: Richard W.M. Jones Signed-off-by

[Qemu-devel] [PULL 27/31] curl: Remove erroneous sleep waiting for curl completion

2014-04-30 Thread Kevin Wolf
From: Matthew Booth The driver will not start more than a fixed number of curl sessions. If it needs more, it must wait for the completion of an existing one. The driver was sleeping, which will prevent the main loop from running, and therefore the event it's waiting on. It was also directly call

[Qemu-devel] [PULL 21/31] qcow2: Check min_size in qcow2_grow_l1_table()

2014-04-30 Thread Kevin Wolf
From: Max Reitz First, new_l1_size is an int64_t, whereas min_size is a uint64_t. Therefore, during the loop which adjusts new_l1_size until it equals or exceeds min_size, new_l1_size might overflow and become negative. The comparison in the loop condition however will take it as an unsigned valu

[Qemu-devel] [PULL 19/31] block: Use correct width in format strings

2014-04-30 Thread Kevin Wolf
From: Max Reitz Instead of blindly relying on a normal integer having a width of 32 bits (which is a pretty good assumption, but we should not rely on it if there is no need), use the correct format string macros. This does not touch DEBUG output. Signed-off-by: Max Reitz Signed-off-by: Kevin

[Qemu-devel] [PULL 18/31] qcow2: Avoid overflow in alloc_clusters_noref()

2014-04-30 Thread Kevin Wolf
From: Max Reitz alloc_clusters_noref() stores the cluster index in a uint64_t. However, offsets are often represented as int64_t (as for example the return value of alloc_clusters_noref() itself demonstrates). Therefore, we should make sure all offsets in the allocated range of clusters are repre

[Qemu-devel] [PULL 02/31] mirror: Use DIV_ROUND_UP

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

[Qemu-devel] [PULL 22/31] block/bochs: Fix error handling for seek_to_sector()

2014-04-30 Thread Kevin Wolf
From: Max Reitz Currently, seek_to_sector() returns -1 both for errors and unallocated sectors, resulting in silent errors. As 0 is an invalid offset of data clusters (bitmap_offset is greater than 0 because s->data_offset is greater than 0), just return 0 for unallocated sectors and -errno in ca

[Qemu-devel] [PULL 01/31] block: fix qemu-img --help invocation

2014-04-30 Thread Kevin Wolf
From: Jeff Cody This fixes a bug introduced in commit ac1307ab, that caused the '--help' option to not be recognized as a valid command, and not print any help. Signed-off-by: Jeff Cody Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- qemu-img.c | 15 +-- 1 file changed, 13

[Qemu-devel] [PULL 20/31] qcow2: Catch bdrv_getlength() error

2014-04-30 Thread Kevin Wolf
From: Max Reitz The call to bdrv_getlength() from qcow2_check_refcounts() may result in an error. Check this and abort if necessary. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c | 5 + 1 file changed, 5 insertions(+) diff --git a/block/qcow2-refcount.c b/

[Qemu-devel] [PULL 11/31] block: Create bdrv_inherited_flags()

2014-04-30 Thread Kevin Wolf
Instead of having bdrv_open_flags() as a function that creates flags for several unrelated places and then adding open-coded flags on top, create a new function that derives the flags for bs->file from the flags for bs. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block.c | 28 +

[Qemu-devel] [PULL 10/31] iotests: Discarding compressed clusters on qcow2

2014-04-30 Thread Kevin Wolf
From: Max Reitz Add a test which discards a compressed cluster on qcow2. This should work without any problems. Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/090 | 61 ++ tests/qemu-iotests/090.out | 12 + tes

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

2014-04-30 Thread Kevin Wolf
The following changes since commit e2da502c003b9a91b4aea7684959192bd07c1f1d: Merge remote-tracking branch 'remotes/otubo/seccomp' into staging (2014-04-28 14:14:35 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to fetch changes up

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

2014-04-30 Thread Baojun Wang
Sorry for reply late Michael (my gmail priority inbox didn't sort this email into my inbox), I thought the change is trivial compare to the huge patch set in the mailing list :) I'm OK with the change not one in the -trivial tree. Best Regards Baojun On Sun, Apr 27, 2014 at 2:18 AM, Michael Toka

[Qemu-devel] [Bug 1314667] [NEW] PMPrebUSB - appcrash of qemu in Win-7-64bit

2014-04-30 Thread Ohlerth Hans
Public bug reported: I am not sure if this issue is a bug of qemu or by Win-7. I want to test in advance with QEMU the ability if my USB-Rescue-Drive is booting correctly. I have Win-7-64 and run qemu v.o.15.1.0 out of the installed RMPrepUSB v.2.1.719 program. The settings for the preparation

Re: [Qemu-devel] [PATCH v2 0/4] little-endian dump for ppc64

2014-04-30 Thread Alexander Graf
On 30.04.14 16:13, Greg Kurz wrote: Hi, Second take: it addresses Alex's remarks (see changelog in each patch). Patches 2-4 are Reviewed-by: Alexander Graf Alex

Re: [Qemu-devel] [PATCH v2 1/4] dump: Make DumpState and endian conversion routines available for arch-specific dump code

2014-04-30 Thread Alexander Graf
On 30.04.14 16:14, Greg Kurz wrote: From: Bharata B Rao Make DumpState and endian conversion routines available for arch-specific dump code by moving into dump.h. DumpState will be needed by arch-specific dump code to access target endian information from DumpState->ArchDumpInfo. Also break th

[Qemu-devel] [PATCH v4 01/18] target-i386: kvm: Don't enable MONITOR by default on any CPU model

2014-04-30 Thread Eduardo Habkost
KVM never supported the MONITOR flag so it doesn't make sense to have it enabled by default when KVM is enabled. The rationale here is similar to the cases where it makes sense to have a feature enabled by default on all CPU models when on KVM mode (e.g. x2apic). In this case we are having a featu

[Qemu-devel] [PATCH v4 15/18] target-i386: Set migratable=yes by default

2014-04-30 Thread Eduardo Habkost
Having only migratable flags reported by default on the "host" CPU model is safer for the following reasons: * Existing users may expect "-cpu host" to be migration-safe, if they take care of always using compatible host CPUs, host kernels, and QEMU versions. * Users who don't care aboug m

Re: [Qemu-devel] [PATCH] target-i386: kvm: Don't enable MONITOR by default on any CPU model

2014-04-30 Thread Eduardo Habkost
On Wed, Apr 30, 2014 at 02:14:00PM -0300, Marcelo Tosatti wrote: > On Wed, Apr 30, 2014 at 10:44:33AM +0200, Paolo Bonzini wrote: > > Il 30/04/2014 03:11, Marcelo Tosatti ha scritto: > > > On Tue, Apr 29, 2014 at 06:17:17PM -0300, Eduardo Habkost wrote: > > >> KVM never supported the MONITOR flag s

Re: [Qemu-devel] [PATCH] target-i386: kvm: Don't enable MONITOR by default on any CPU model

2014-04-30 Thread Marcelo Tosatti
On Wed, Apr 30, 2014 at 10:44:33AM +0200, Paolo Bonzini wrote: > Il 30/04/2014 03:11, Marcelo Tosatti ha scritto: > > On Tue, Apr 29, 2014 at 06:17:17PM -0300, Eduardo Habkost wrote: > >> KVM never supported the MONITOR flag so it doesn't make sense to have it > >> enabled by default when KVM is en

Re: [Qemu-devel] [PATCH 2/4] Set eflags and cr0 prior to calling cpu_x86_load_seg_cache() in smm_helper.c.

2014-04-30 Thread Paolo Bonzini
Il 30/04/2014 18:54, Richard Henderson ha scritto: On 04/29/2014 01:38 PM, Kevin O'Connor wrote: cpu_load_eflags(env, 0, ~(CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C | DF_MASK)); env->eip = 0x8000; +cpu_x86_update_cr0(env, + env

[Qemu-devel] [PATCH v4 18/18] target-i386: support "invariant tsc" flag

2014-04-30 Thread Eduardo Habkost
From: Marcelo Tosatti Expose "Invariant TSC" flag, if KVM is enabled. From Intel documentation: 17.13.1 Invariant TSC The time stamp counter in newer processors may support an enhancement, referred to as invariant TSC. Processor’s support for invariant TSC is indicated by CPUID.8007H:EDX[8].

[Qemu-devel] [PATCH v4 07/18] target-i386: Filter FEAT_7_0_EBX TCG features too

2014-04-30 Thread Eduardo Habkost
The TCG_7_0_EBX_FEATURES macro was defined but never used (it even had a typo that was never noticed). Make the existing TCG feature filtering code use it. Change the TCG feature flag filtering code to use it. Reviewed-by: Richard Henderson Signed-off-by: Eduardo Habkost --- Changes v1 -> v2:

[Qemu-devel] [PATCH v4 04/18] target-i386: Pass FeatureWord argument to report_unavailable_features()

2014-04-30 Thread Eduardo Habkost
This will help us simplify the code that calls report_unavailable_features() later. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Rebase to latest qom-cpu (commit 90c5d39c) Changes v2 -> v3: * Trivial rebase after QEMU 2.0 (onto commit 2d03b49) --- target-i386/cpu.c | 5 +++-- 1 file

  1   2   >