Re: [Qemu-devel] [PATCH v3] ps2: set ps/2 output buffer size as the same as kernel

2014-04-25 Thread Gonglei (Arei)
Hi, > On Thu, Apr 24, 2014 at 08:06:19PM +0800, arei.gong...@huawei.com wrote: > > From: Gonglei > > > > According to the PS/2 Mouse/Keyboard Protocol, the keyboard outupt buffer > size > > is 16 bytes. And the PS2_QUEUE_SIZE 256 was introduced in Qemu from the > very > > beginning. > > > > When

Re: [Qemu-devel] [PATCH 4/4] arm: Clean up fragile use of error_is_set() in realize() methods

2014-04-25 Thread Markus Armbruster
Andreas Färber writes: > Am 25.04.2014 14:55, schrieb Markus Armbruster: >> Andreas Färber writes: >>> Am 25.04.2014 12:44, schrieb Markus Armbruster: Using error_is_set(ERRP) to find out whether a function failed is either wrong, fragile, or unnecessarily opaque. It's wrong when ERRP

Re: [Qemu-devel] [PATCH v3] ps2: set ps/2 output buffer size as the same as kernel

2014-04-25 Thread Amos Kong
On Thu, Apr 24, 2014 at 08:06:19PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > According to the PS/2 Mouse/Keyboard Protocol, the keyboard outupt buffer size > is 16 bytes. And the PS2_QUEUE_SIZE 256 was introduced in Qemu from the very > beginning. > > When I started a redhat5.6

Re: [Qemu-devel] [PATCH 3/7] slirp: Add new command-line suboption "[, dhcpvendopt=optstring]" to "-net user"

2014-04-25 Thread Eric Blake
On 04/25/2014 04:10 PM, Fedor Lyakhov wrote: > New command-line suboption "[,dhcpvendopt=optstring]" is defined in the > qapi-schema.json. If supplied, the optstring is passed to SLIRP > initialization. > > Signed-off-by: Fedor Lyakhov > --- > net/slirp.c | 9 + > qapi-schema.json

Re: [Qemu-devel] [PATCH] qga: Add 'mountpoints' argument to guest-fsfreeze-freeze command

2014-04-25 Thread Eric Blake
On 04/25/2014 05:01 PM, Tomoki Sekiyama wrote: > When an array of mount point paths is specified as 'mountpoints' argument > of guest-fsfreeze-freeze, qemu-ga with this patch will only freeze the file > systems mounted on specified paths in Linux. > This would be useful when the host wants to creat

Re: [Qemu-devel] qemu projects

2014-04-25 Thread Peter Crosthwaite
Hi Pradeep, On Thu, Apr 24, 2014 at 11:16 PM, Pradeep Kiruvale wrote: > Hi Stefan, > > Thanks I will follow your suggestion. > > Regards, > Pradeep > > > On 24 April 2014 14:10, Stefan Hajnoczi wrote: >> >> On Wed, Apr 09, 2014 at 07:28:15PM +0200, Pradeep Kiruvale wrote: >> > I am new to qemu

Re: [Qemu-devel] [PATCH v3] ps2: set ps/2 output buffer size as the same as kernel

2014-04-25 Thread Gonglei (Arei)
Hi, > On Do, 2014-04-24 at 20:06 +0800, arei.gong...@huawei.com wrote: > > From: Gonglei > > > > According to the PS/2 Mouse/Keyboard Protocol, the keyboard outupt buffer > size > > is 16 bytes. And the PS2_QUEUE_SIZE 256 was introduced in Qemu from the > very > > beginning. > > Hmm, seems there

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

2014-04-25 Thread Olivier Danet
On 24/04/2014 12:37, Gerd Hoffmann wrote: > Nasty 0xe0 logic is gone. We map through QKeyCode now, giving us a > nice, readable mapping table. > > Quick smoke test in OpenFirmware looks ok. Careful check from arch > maintainers would be very nice, especially on the capslock and numlock > logic.

Re: [Qemu-devel] [PATCH] qmp: Remove unused variable.

2014-04-25 Thread Hani Benhabiles
On Fri, Apr 25, 2014 at 05:51:33PM +0200, Andreas Färber wrote: > Am 25.04.2014 17:40, schrieb Luiz Capitulino: > > On Tue, 22 Apr 2014 22:44:03 +0100 > > Hani Benhabiles wrote: > > > >> Signed-off-by: Hani Benhabiles > >> --- > >> qmp.c | 3 +-- > >> 1 file changed, 1 insertion(+), 2 deletions

Re: [Qemu-devel] [PATCH 0/4] hw: Purge error_is_set()

2014-04-25 Thread Andreas Färber
Am 25.04.2014 12:44, schrieb Markus Armbruster: > I got a private branch getting rid of it entirely. This is the fourth > part, covering devices, except for two places I need to cover together > with QAPI, in a future series. > > Could this one go through Andreas's tree? > > Markus Armbruster (4

Re: [Qemu-devel] [PATCH 0/3] monitor: Improve command completion

2014-04-25 Thread Hani Benhabiles
On Fri, Apr 25, 2014 at 09:48:33AM -0400, Luiz Capitulino wrote: > On Sun, 13 Apr 2014 16:25:04 +0100 > Hani Benhabiles wrote: > > > This patch series adds a new callback to mon_cmd_t which will make adding > > completion support for more commands cleaner. > > > > It moves some existing commands

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

2014-04-25 Thread Fedor Lyakhov
Signed-off-by: Fedor Lyakhov --- qemu-options.hx | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx index 6457034..8be86e1 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -1373,10 +1373,10 @@ DEF("net", HAS_ARG, QEMU_OPTIO

[Qemu-devel] [PATCH 3/7] slirp: Add new command-line suboption "[, dhcpvendopt=optstring]" to "-net user"

2014-04-25 Thread Fedor Lyakhov
New command-line suboption "[,dhcpvendopt=optstring]" is defined in the qapi-schema.json. If supplied, the optstring is passed to SLIRP initialization. Signed-off-by: Fedor Lyakhov --- net/slirp.c | 9 + qapi-schema.json | 3 +++ slirp/libslirp.h | 3 ++- slirp/slirp.c| 2 +- 4

[Qemu-devel] [PATCH 1/7] slirp: Move BOOTP/DHCP protocol defines to a separate header

2014-04-25 Thread Fedor Lyakhov
Current slirp/bootp.h is bloated - it contains both BOOTP/DHCP protocol definitions and implementation-related structs. Protocol definitions are needed in other modules, but the structs are unwanted there as introducing unrelated dependency. To solve this issue, bootp.h is split into two files: -

[Qemu-devel] [PATCH 7/7] slirp: Add unit test for slirp/dhcp_vendopt.c module

2014-04-25 Thread Fedor Lyakhov
Signed-off-by: Fedor Lyakhov --- tests/Makefile| 3 + tests/test-dhcp-vendopt.c | 203 ++ 2 files changed, 206 insertions(+) create mode 100644 tests/test-dhcp-vendopt.c diff --git a/tests/Makefile b/tests/Makefile index 88f7105..e82914e

[Qemu-devel] [PATCH 2/7] slirp: Add header inclusion guard to slirp/debug.h

2014-04-25 Thread Fedor Lyakhov
Signed-off-by: Fedor Lyakhov --- slirp/debug.h | 5 + 1 file changed, 5 insertions(+) diff --git a/slirp/debug.h b/slirp/debug.h index 6cfa61e..84754d4 100644 --- a/slirp/debug.h +++ b/slirp/debug.h @@ -5,6 +5,9 @@ * terms and conditions of the copyright. */ +#ifndef SLIRP_DEBUG_H +#de

[Qemu-devel] [PATCH 5/7] slirp: Add DHCP vendor option to DHCP Offer/Ack packet

2014-04-25 Thread Fedor Lyakhov
Signed-off-by: Fedor Lyakhov --- slirp/bootp.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/slirp/bootp.c b/slirp/bootp.c index b7db9fa..df8d527 100644 --- a/slirp/bootp.c +++ b/slirp/bootp.c @@ -21,7 +21,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE

[Qemu-devel] [PATCH 0/7] slirp: Add support of vendor-specific info option to built-in DHCP server

2014-04-25 Thread Fedor Lyakhov
Hello qemu-devel, This patch series adds support of vendor-specific info option to built-in (slirp) DHCP server. This feature would be useful for those who develop and test DHCP-based systems (e.g. auto-configuration) using QEMU. Vendor-specific information option is defined in RFC2132 - this

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

2014-04-25 Thread Fedor Lyakhov
New module dhcp_vendopt.c provides translate_dhcp_vendopt() function to convert command-line DHCP vendor option string into internal DHCP TLV (tag-length- value) uint8_t buffer. The buffer is stored in global Slirp instance. Signed-off-by: Fedor Lyakhov --- slirp/Makefile.objs | 1 + slirp/dh

Re: [Qemu-devel] [PATCH 2/2] xilinx_timer: Fix writes into TCSR register

2014-04-25 Thread Edgar E. Iglesias
On Fri, Apr 25, 2014 at 08:39:48AM -0700, Guenter Roeck wrote: > The TCSR register has only 11 valid bits. This is now used by the > linux kernel to auto-detect endianness, and causes Linux 3.15-rc1 > and later to hang when run under qemu-microblaze. Mask valid bits > before writing the register to

Re: [Qemu-devel] Cannot boot my VM image after switching to ahci.

2014-04-25 Thread Alex Davis
John Baboval Wrote: >I assume Windows 7 or newer? > >In order to speed boot time, Windows will remove the AHCI driver from the >critical driver database when you boot with no AHCI controller on the bus. If >you later want >to switch to AHCI mode, you have to boot with IDE again, and >re-add the

Re: [Qemu-devel] [PATCH 4/4] arm: Clean up fragile use of error_is_set() in realize() methods

2014-04-25 Thread Andreas Färber
Am 25.04.2014 14:55, schrieb Markus Armbruster: > Andreas Färber writes: >> Am 25.04.2014 12:44, schrieb Markus Armbruster: >>> Using error_is_set(ERRP) to find out whether a function failed is >>> either wrong, fragile, or unnecessarily opaque. It's wrong when ERRP >>> may be null, because error

Re: [Qemu-devel] [PATCH 3/4] qom: Clean up fragile use of error_is_set() in set() methods

2014-04-25 Thread Andreas Färber
Am 25.04.2014 12:44, schrieb Markus Armbruster: > Using error_is_set(ERRP) to find out whether a function failed is > either wrong, fragile, or unnecessarily opaque. It's wrong when ERRP > may be null, because errors go undetected when it is. It's fragile > when proving ERRP non-null involves a n

[Qemu-devel] [PATCH] qga: Add 'mountpoints' argument to guest-fsfreeze-freeze command

2014-04-25 Thread Tomoki Sekiyama
When an array of mount point paths is specified as 'mountpoints' argument of guest-fsfreeze-freeze, qemu-ga with this patch will only freeze the file systems mounted on specified paths in Linux. This would be useful when the host wants to create partial disk snapshots. Signed-off-by: Tomoki Sekiya

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

2014-04-25 Thread Marcelo Tosatti
Check vmsd for unmigratable field, allowing migratibility status to be modified after vmstate_register. Signed-off-by: Marcelo Tosatti diff --git a/savevm.c b/savevm.c index 22123be..61a25c0 100644 --- a/savevm.c +++ b/savevm.c @@ -452,7 +452,7 @@ bool qemu_savevm_state_blocked(Error **errp)

Re: [Qemu-devel] target-i386: block migration and savevm if invariant tsc is exposed (v3)

2014-04-25 Thread Marcelo Tosatti
On Fri, Apr 25, 2014 at 05:38:08PM -0300, Eduardo Habkost wrote: > Have you tested if your patch actually blocks savevm? Yes, with -smp 2. Can you please include the savevm.c patch in your queue? TIA.

Re: [Qemu-devel] [PATCH V3 0/5] remove QEMUMachine indirection from MachineClass

2014-04-25 Thread Andreas Färber
Am 09.04.2014 19:34, schrieb Marcel Apfelbaum: > > This is a continuation of 'QEMU Machine as QOM object' effort. > The scope of this series is to allow machine QOM-ification > of all machines gradually, by removing the need for QEMUMachine registration > through vl.c . > > Now we will have 2 pa

[Qemu-devel] [PATCH 0/2] e1000: fixes for Phar Lap ETS

2014-04-25 Thread Richard Tollerton
The 8254x driver in certain versions of Phar Lap ETS hasn't been initializing the e1000 device properly in qemu. It looks like the driver is relying on two specific pieces of behavior which (anecdotally) exist in hardware, although I can't cite any datasheets on the matter; in any case, these two p

[Qemu-devel] [PATCH 2/2] e1000: decrement RDT if equal to RDH

2014-04-25 Thread Richard Tollerton
Some drivers set RDT=RDH. Oddly, this works on real hardware. To work around this, autodecrement RDT when this happens. Signed-off-by: Richard Tollerton Signed-off-by: Jeff Westfahl --- hw/net/e1000.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/net/e1000.c b/hw/net/e1000.c inde

[Qemu-devel] [PATCH 1/2] e1000: Clear MDIC register when PHY addr is invalid

2014-04-25 Thread Richard Tollerton
Some drivers probe PHY addresses beyond the first one, and also (unfortunately) don't check for MDIC_ERROR on reads. It appears that the driver assumes that the data reads will return zero in this case (invalid PHY address). Anecdotally, hardware is believed to do this; but qemu wasn't, and instead

Re: [Qemu-devel] [RFC PATCH V3 4/7] target-arm: Provide PSCI v0.2 constants to generic QEMU code

2014-04-25 Thread Peter Maydell
On 25 April 2014 20:24, Rob Herring wrote: > I don't see the point of MISMATCH_CHECK with 0.2 PSCI. The values are > fixed and the header is the ABI. Why can't all of QEMU use the psci.h > header? That would depend on where the psci.h header comes from. In general we can't use kernel headers beca

Re: [Qemu-devel] [PATCH 05/16] pci-assign: propagate errors from get_real_id()

2014-04-25 Thread Laszlo Ersek
On 04/25/14 18:05, Eric Blake wrote: > On 04/10/2014 02:24 AM, Laszlo Ersek wrote: >> get_real_id() has two thin wrappers (and no other callers), >> get_real_vendor_id() and get_real_device_id(); it's easiest to convert >> them in one fell swoop. >> >> Signed-off-by: Laszlo Ersek >> --- >> hw/i38

Re: [Qemu-devel] [PATCH v2] block: fix qemu-img --help invocation

2014-04-25 Thread Eric Blake
On 04/25/2014 03:02 PM, Jeff Cody wrote: > 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 > --- > qemu-img.c | 15 +-- > 1 file changed, 13 insertions(+)

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

2014-04-25 Thread Paolo Bonzini
Il 25/04/2014 01:18, Eduardo Habkost ha scritto: On Fri, Apr 25, 2014 at 12:57:48AM +0200, Paolo Bonzini wrote: Il 24/04/2014 22:57, Eduardo Habkost ha scritto: If that didn't break other use cases, I would agree. But "-cpu host" today covers two use cases: 1) enabling everything that can be e

[Qemu-devel] [PATCH v2] block: fix qemu-img --help invocation

2014-04-25 Thread 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 --- qemu-img.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/qemu-img.c b/qemu-img.c in

Re: [Qemu-devel] [PATCH 5/5] gtk: Fix accelerators being triggered twice with gtk3

2014-04-25 Thread Cole Robinson
On 04/25/2014 05:11 AM, Gerd Hoffmann wrote: > On Do, 2014-04-24 at 13:35 -0400, Cole Robinson wrote: >> When keyboard focus is grabbed, current qemu wants to pass every >> keypress to the VM, unless the user is pressing a UI accelerator. >> >> That's exactly how things work without any of the fanc

Re: [Qemu-devel] [PATCH 4/5] gtk: Fix zoom in accelerator

2014-04-25 Thread Cole Robinson
On 04/25/2014 05:09 AM, Gerd Hoffmann wrote: > On Do, 2014-04-24 at 13:35 -0400, Cole Robinson wrote: >> The accelerator was ctrl+shift+'+', but '+' required a shift key already, >> so the accelerator didn't trigger. Switch it to ctrl+shift+'=' > > Hmm? For me the accelerator is ctrl+alt. > > Al

Re: [Qemu-devel] target-i386: block migration and savevm if invariant tsc is exposed (v3)

2014-04-25 Thread Eduardo Habkost
On Thu, Apr 24, 2014 at 06:32:42PM -0300, Marcelo Tosatti wrote: > On Thu, Apr 24, 2014 at 04:21:59PM -0300, Eduardo Habkost wrote: > > On Wed, Apr 23, 2014 at 06:04:45PM -0300, Marcelo Tosatti wrote: > > > > > > Invariant TSC documentation mentions that "invariant TSC will run at a > > > constant

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

2014-04-25 Thread Markus Armbruster
Jeff Cody writes: > On Wed, Apr 23, 2014 at 12:04:49PM +0200, Kevin Wolf wrote: >> From: Fam Zheng >> >> Previously, when there is a user error in argv parsing, qemu-img prints >> help text and exits. >> >> Add an error_exit function to print a helpful error message and a hint >> to run 'qemu-

Re: [Qemu-devel] [PATCH v2] qmp: object-add: Validate class before creating object

2014-04-25 Thread Eduardo Habkost
On Fri, Apr 25, 2014 at 08:42:59PM +0200, Andreas Färber wrote: > Am 25.04.2014 20:02, schrieb Luiz Capitulino: > > On Fri, 25 Apr 2014 17:57:12 +0200 > > Andreas Färber wrote: > >> Am 25.04.2014 17:12, schrieb Luiz Capitulino: > >>> On Wed, 16 Apr 2014 14:39:38 -0300 > >>> Eduardo Habkost wrote:

Re: [Qemu-devel] [PATCH V3 4/5] machine: replace QEMUMachine by MachineClass in accelerator configuration

2014-04-25 Thread Andreas Färber
Am 09.04.2014 19:34, schrieb Marcel Apfelbaum: > This minimizes QEMUMachine usage, as part of machine QOM-ification. > > Signed-off-by: Marcel Apfelbaum > --- > include/hw/xen/xen.h| 2 +- > include/qemu/typedefs.h | 1 + > include/sysemu/kvm.h| 2 +- > include/sysemu/qtest.h | 2 +-

Re: [Qemu-devel] [PATCH] block: fix qemu-img --help invocation

2014-04-25 Thread Jeff Cody
On Fri, Apr 25, 2014 at 12:39:03PM -0600, Eric Blake wrote: > On 04/25/2014 12:27 PM, Jeff Cody wrote: > > 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. > > > > This also restores the previou

Re: [Qemu-devel] [RFC PATCH V3 4/7] target-arm: Provide PSCI v0.2 constants to generic QEMU code

2014-04-25 Thread Rob Herring
On Thu, Apr 10, 2014 at 6:46 AM, Pranavkumar Sawargaonkar wrote: > Provide QEMU PSCI v0.2 constants for non-KVM code; this will > allow us to avoid an #ifdef in boards which set up a PSCI v0.2 > node in the device tree. > > Signed-off-by: Pranavkumar Sawargaonkar > Signed-off-by: Anup Patel > --

[Qemu-devel] [PULL 10/16] monitor: Fix drive_del id argument type completion.

2014-04-25 Thread Luiz Capitulino
From: Hani Benhabiles Signed-off-by: Hani Benhabiles Signed-off-by: Luiz Capitulino --- hmp-commands.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index f3fc514..6bf4797 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -176,7 +176

[Qemu-devel] [PULL 14/16] HMP: fix doc of dump-guest-memory

2014-04-25 Thread Luiz Capitulino
From: Qiao Nuohan Signed-off-by: Qiao Nuohan Reviewed-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- hmp-commands.hx | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 4c4d261..d79cb97 100644 --- a/hmp-com

[Qemu-devel] [PULL 02/16] vnc: Remove default_mon usage

2014-04-25 Thread Luiz Capitulino
From: Cole Robinson These errors don't seem user initiated, so forcibly printing to the monitor doesn't seem right. Just use error_report. Cc: Anthony Liguori Cc: Gerd Hoffmann Signed-off-by: Cole Robinson Reviewed-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- ui/vnc.c | 4 ++-- 1 f

[Qemu-devel] [PULL 16/16] monitor: fix qmp_getfd() fd leak in error case

2014-04-25 Thread Luiz Capitulino
From: Stefan Hajnoczi qemu_chr_fe_get_msgfd() transfers ownership of the file descriptor to the caller. Therefore all code paths in qmp_getfd() should either register the file descriptor somewhere or close it. Signed-off-by: Stefan Hajnoczi Reviewed-by: Markus Armbruster Signed-off-by: Luiz C

[Qemu-devel] [PULL 11/16] monitor: Add command_completion callback to mon_cmd_t.

2014-04-25 Thread Luiz Capitulino
From: Hani Benhabiles Convert object_add and object_del commands to use the new callback. Signed-off-by: Hani Benhabiles Signed-off-by: Luiz Capitulino --- hmp-commands.hx | 2 ++ hmp.h | 3 +++ monitor.c | 19 +-- 3 files changed, 18 insertions(+), 6 deletio

[Qemu-devel] [PULL 12/16] monitor: Add device_add and device_del completion.

2014-04-25 Thread Luiz Capitulino
From: Hani Benhabiles Also fix device_add completion including non-hotpluggable devices. Signed-off-by: Hani Benhabiles Signed-off-by: Luiz Capitulino --- hmp-commands.hx | 2 ++ hmp.h | 2 ++ monitor.c | 38 -- 3 files changed, 28 inserti

[Qemu-devel] [PULL 09/16] error: Remove some unused headers

2014-04-25 Thread Luiz Capitulino
From: Cole Robinson Makes it a bit clear how the interdependencies work. Cc: Luiz Capitulino Cc: Markus Armbruster Signed-off-by: Cole Robinson Reviewed-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- include/qapi/qmp/qerror.h | 1 - util/error.c | 5 + 2 files change

[Qemu-devel] [PULL 05/16] error: Print error_report() to stderr if using qmp

2014-04-25 Thread Luiz Capitulino
From: Cole Robinson monitor_printf will drop the requested output if cur_mon is qmp (for good reason). However these messages are often helpful for debugging issues with via libvirt. If we know the message won't hit the monitor, send it to stderr. Cc: Luiz Capitulino Cc: Markus Armbruster Sig

[Qemu-devel] [PULL 13/16] qmp: object-add: Validate class before creating object

2014-04-25 Thread Luiz Capitulino
From: Eduardo Habkost Currently it is very easy to crash QEMU by issuing an object-add command using an abstract class or a class that doesn't support TYPE_USER_CREATABLE as parameter. Example: with the following QMP command: (QEMU) object-add qom-type=cpu id=foo QEMU aborts at: ERROR

[Qemu-devel] [PULL 08/16] qerror.h: Replace QERR_NOT_SUPPORTED with QERR_UNSUPPORTED

2014-04-25 Thread Luiz Capitulino
From: Cole Robinson The former is only used twice, the latter is used over 30 times, and has a nicer error message. Cc: Luiz Capitulino Cc: Markus Armbruster Signed-off-by: Cole Robinson Reviewed-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- blockjob.c | 2 +- includ

Re: [Qemu-devel] [RFC PATCH V3 5/7] hw/arm/virt: Use PSCI v0.2 function IDs when kernel supports it

2014-04-25 Thread Rob Herring
On Thu, Apr 10, 2014 at 6:46 AM, Pranavkumar Sawargaonkar wrote: > If we have in-kernel emulation of PSCI v0.2 for KVM ARM/ARM64 then > we enable PSCI v0.2 for each VCPU at the time of VCPU init hence we > need to provide PSCI v0.2 function IDs via generated DTB. > > This patch updates generated D

[Qemu-devel] [PULL 15/16] HMP: support specifying dump format for dump-guest-memory

2014-04-25 Thread Luiz Capitulino
From: Qiao Nuohan Dumping guest memory is available to specify the dump format now. This patch adds options '-z|-l|-s' to HMP command dump-guest-memory to specify dumping in kdump-compression format, with zlib/lzo/snappy compression. And without these options ELF format will be used. The discuss

[Qemu-devel] [PULL 06/16] qerror.h: Remove unused error classes

2014-04-25 Thread Luiz Capitulino
From: Cole Robinson Cc: Luiz Capitulino Cc: Markus Armbruster Signed-off-by: Cole Robinson Reviewed-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- include/qapi/qmp/qerror.h | 9 - 1 file changed, 9 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.

[Qemu-devel] [PULL 07/16] qerror.h: Remove QERR defines that are only used once

2014-04-25 Thread Luiz Capitulino
From: Cole Robinson Just hardcode them in the callers Cc: Luiz Capitulino Cc: Markus Armbruster Signed-off-by: Cole Robinson Reviewed-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- block/commit.c| 2 +- blockdev.c| 9 --- hw/9pfs/virtio-9p.c |

Re: [Qemu-devel] [PATCH v2] qmp: object-add: Validate class before creating object

2014-04-25 Thread Andreas Färber
Am 25.04.2014 20:02, schrieb Luiz Capitulino: > On Fri, 25 Apr 2014 17:57:12 +0200 > Andreas Färber wrote: >> Am 25.04.2014 17:12, schrieb Luiz Capitulino: >>> On Wed, 16 Apr 2014 14:39:38 -0300 >>> Eduardo Habkost wrote: >>> Currently it is very easy to crash QEMU by issuing an object-add c

Re: [Qemu-devel] [PATCH] block: fix qemu-img --help invocation

2014-04-25 Thread Eric Blake
On 04/25/2014 12:27 PM, Jeff Cody wrote: > 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. > > This also restores the previous behavior of qemu-img printing the full > help when called with no argu

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

2014-04-25 Thread Eric Blake
On 04/25/2014 09:05 AM, Markus Armbruster wrote: > I got a private branch getting rid of it entirely. This is the fifth > part, covering QMP and the guest agent up to the point where I start > messing with the QAPI code generators. That's left for the final > part. > > Luiz, Mike, do I need to s

[Qemu-devel] [PULL 00/16] QMP queue

2014-04-25 Thread Luiz Capitulino
The following changes since commit 7931b05987564b07ada5a4467d8e78a786a3e7d4: Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2014-04-25 12:22:37 +0100) are available in the git repository at: git://repo.or.cz/qemu/qmp-unstable.git queue/qmp for you to fetch ch

[Qemu-devel] [PATCH] block: fix qemu-img --help invocation

2014-04-25 Thread 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. This also restores the previous behavior of qemu-img printing the full help when called with no arguments. Signed-off-by: Jeff Cody --- qemu-img.c | 5

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

2014-04-25 Thread Luiz Capitulino
On Fri, 25 Apr 2014 12:21:22 -0600 Eric Blake wrote: > On 04/25/2014 12:06 PM, Markus Armbruster wrote: > > Eric Blake writes: > > > >> On 04/25/2014 09:05 AM, Markus Armbruster wrote: > >>> Using error_is_set(errp) to check whether a function call failed is > >>> fragile: it breaks when errp i

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

2014-04-25 Thread Eric Blake
On 04/25/2014 12:06 PM, Markus Armbruster wrote: > Eric Blake writes: > >> On 04/25/2014 09:05 AM, Markus Armbruster wrote: >>> Using error_is_set(errp) to check whether a function call failed is >>> fragile: it breaks when errp is null. I'm not aware of actual >>> breakage, but checking return

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

2014-04-25 Thread Jeff Cody
On Wed, Apr 23, 2014 at 12:04:49PM +0200, Kevin Wolf wrote: > From: Fam Zheng > > Previously, when there is a user error in argv parsing, qemu-img prints > help text and exits. > > Add an error_exit function to print a helpful error message and a hint > to run 'qemu-img --help' for more informat

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

2014-04-25 Thread Shehbaz Jaffer
Hi, Are you talking about running KVM(hardware virtualization) enabled support on top of a Linux host running on only QEMU (software virtualization)? I doubt if this is nesting is possible. To be sure, you can check for the following flags on your host: cat /proc/cpuinfo | grep -e svm -e vmx If e

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

2014-04-25 Thread Markus Armbruster
Eric Blake writes: > On 04/25/2014 09:05 AM, Markus Armbruster wrote: >> Using error_is_set(errp) to check whether a function call failed is >> fragile: it breaks when errp is null. I'm not aware of actual >> breakage, but checking return values instead when convenient is more >> robust and more

Re: [Qemu-devel] [PATCH v2] qmp: object-add: Validate class before creating object

2014-04-25 Thread Luiz Capitulino
On Fri, 25 Apr 2014 17:57:12 +0200 Andreas Färber wrote: > Am 25.04.2014 17:12, schrieb Luiz Capitulino: > > On Wed, 16 Apr 2014 14:39:38 -0300 > > Eduardo Habkost wrote: > > > >> Currently it is very easy to crash QEMU by issuing an object-add command > >> using an abstract class or a class th

Re: [Qemu-devel] [GSoC] Wanted: small warmup tasks

2014-04-25 Thread Marc Marí
2014-04-25 14:25 GMT+02:00 Andreas Färber : > > Am 25.04.2014 11:22, schrieb Peter Crosthwaite: > > On Fri, Apr 25, 2014 at 5:55 PM, Marc Marí wrote: > >> I'm now looking at the conditional fprintf's. I'll need a bit of help later > >> in sending the patches :D. > > For starters, please use plain

[Qemu-devel] [PATCH 6/6] block: Fix open_flags in bdrv_reopen()

2014-04-25 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 --- block.c | 5 - 1 file changed, 4 insertions(+), 1 de

[Qemu-devel] [PATCH 4/6] block: Unlink temporary files in raw-posix/win32

2014-04-25 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] [PATCH 5/6] Revert "block: another bdrv_append fix"

2014-04-25 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] [PATCH 3/6] block: Remove BDRV_O_COPY_ON_READ for bs->file

2014-04-25 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] [PATCH 2/6] block: Create bdrv_backing_flags()

2014-04-25 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 --- block.c | 23 +-- 1 file changed, 1

[Qemu-devel] [PATCH 0/6] block: bdrv_open() fixes and cleanups

2014-04-25 Thread Kevin Wolf
Kevin Wolf (6): block: Create bdrv_inherited_flags() block: Create bdrv_backing_flags() block: Remove BDRV_O_COPY_ON_READ for bs->file block: Unlink temporary files in raw-posix/win32 Revert "block: another bdrv_append fix" block: Fix open_flags in bdrv_reopen() block.c

[Qemu-devel] [PATCH 1/6] block: Create bdrv_inherited_flags()

2014-04-25 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 --- block.c | 28 ++-- 1 f

Re: [Qemu-devel] [PATCH V3 2/5] vl.c: copy QEMUMachine's fields to MachineClass

2014-04-25 Thread Andreas Färber
Am 09.04.2014 19:34, schrieb Marcel Apfelbaum: > In order to eliminate the QEMUMachine indirection, > add its fields directly to MachineClass. > Do not remove yet qemu_machine field because it is Either "not yet" or "field yet" - I went for the former. > still in use by sparpr. sPAPR - fixed. >

Re: [Qemu-devel] [PATCH] target-arm: Implement XScale cache lockdown operations as NOPs

2014-04-25 Thread Peter Maydell
On 19 March 2014 21:13, Peter Maydell wrote: > XScale defines some implementation-specific coprocessor registers > for doing cache lockdown operations. Since QEMU doesn't model a > cache no proper implementation is possible, but NOP out the > registers so that guest code like u-boot that tries to

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

2014-04-25 Thread Eric Blake
On 04/24/2014 02:35 AM, poletaev wrote: > There is a set of test, that checks QEMU CPU for similar behavior with real > hardware (http://roberto.greyhats.it/projects/pills.html). Test > reg/pill2579.c can detect, that program is execute in emulated environment. > It is related with behavior of rcl

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

2014-04-25 Thread Peter Maydell
On 25 April 2014 09:13, Dmitry Poletaev wrote: > There is a set of test, that checks QEMU CPU for similar behavior with real > hardware (http://roberto.greyhats.it/projects/pills.html). Test > reg/pill2579.c can detect, that program is execute in emulated environment. > It is related with behav

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

2014-04-25 Thread Kevin O'Connor
The current SMI interrupt handler is being run with the same CPL as the code it interrupts. If the existing code is running with CPL=3, then the SMI handler can cause spurious exceptions. The System Management Mode (SMM) should always run at the highest protection level. Signed-off-by: Kevin O'C

[Qemu-devel] [PATCH] improve emulation correctness

2014-04-25 Thread poletaev
There is a set of test, that checks QEMU CPU for similar behavior with real hardware (http://roberto.greyhats.it/projects/pills.html). Test reg/pill2579.c can detect, that program is execute in emulated environment. It is related with behavior of rcl instruction. If the number of shifted bits more

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

2014-04-25 Thread Richard Henderson
On 04/25/2014 01:13 AM, Dmitry Poletaev wrote: > There is a set of test, that checks QEMU CPU for similar behavior with real > hardware (http://roberto.greyhats.it/projects/pills.html). Test > reg/pill2579.c can detect, that program is execute in emulated environment. > It is related with behavi

Re: [Qemu-devel] [PATCH 0/3] disas/libvixl: update to upstream 1.3

2014-04-25 Thread Richard Henderson
On 04/25/2014 12:15 AM, Christoffer Dall wrote: >> > Possible options: >> > (a) apply these patches, and live with the bisection >> > break on 32 bit hosts >> > (b) squash all these patches together into a single >> > commit, avoiding the bisection break but losing the >> > ability

[Qemu-devel] [Bug 1312668] [NEW] x86 cpu nx feature: guest reboots after migrate exec

2014-04-25 Thread svkh
Public bug reported: Using instruction on http://www.linux-kvm.org/page/Migration I save VM state to external file and try load it, but VM starts, shows saved screen and reboots immediatly. Cmdline for vm state saving: $ sudo ./i386-softmmu/qemu-system-i386 -machine accel=kvm,kernel_irqchip=on

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

2014-04-25 Thread Rupert Russell
Public bug reported: qemu-w64-setup-20140418.exe Windows 7 64 bit PC. qemu-system-armw -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -hda c:\11\rasimg\test.vhd qemu-system-armw.exe - System Error The program

[Qemu-devel] [PULL 09/10] blockdev: Clean up fragile use of error_is_set()

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

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

2014-04-25 Thread Amos Kong
Current hwrng core supports to register multiple hwrng devices, and there is only one device really works in the same time. QEMU alsu supports to have multiple virtio-rng backends. This patch changes virtio-rng driver to support multiple virtio-rng devices. ]# cat /sys/class/misc/hw_random/rng_av

[Qemu-devel] [PULL 10/10] iscsi: Don't use error_is_set() to suppress additional errors

2014-04-25 Thread Stefan Hajnoczi
From: Markus Armbruster Using error_is_set(errp) that way can sweep programming errors under the carpet when we get called incorrectly with an error set. Commit 24d3bd6 added a broken error path to iscsi_do_inquiry(): it first calls error_setg(), then jumps to the preexisting error label, where

[Qemu-devel] [PULL 08/10] nbd: Use return values instead of error_is_set(errp)

2014-04-25 Thread Stefan Hajnoczi
From: Markus Armbruster Using error_is_set(errp) to check whether a function call failed is fragile: it breaks when errp is null. Check perfectly suitable return values instead when possible. errp can't be null there now, but this is more robust and more obviously correct Signed-off-by: Markus

[Qemu-devel] [PULL 06/10] Use error_is_set() only when necessary (again)

2014-04-25 Thread Stefan Hajnoczi
From: Markus Armbruster error_is_set(&var) is the same as var != NULL, but it takes whole-program analysis to figure that out. Unnecessarily hard for optimizers, static checkers, and human readers. Commit 84d18f0 dumbed it down to obvious, but a few more have crept in since, and documentation w

[Qemu-devel] [PULL 07/10] qemu-img: Consistently name Error * objects err, and not errp

2014-04-25 Thread Stefan Hajnoczi
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Stefan Hajnoczi --- qemu-img.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 4dae84a..968b4c8 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -457,12 +457,12 @@

[Qemu-devel] [PULL 05/10] block: Expose host_* drivers in blockdev-add

2014-04-25 Thread Stefan Hajnoczi
From: Kevin Wolf All the functionality to use the host_device, host_cdrom and host_floppy drivers is already there, they just need to be added to the schema. The block driver names containing underscores are preexisting and cannot be changed without breaking command line compatibility. Signed-o

[Qemu-devel] [PULL 04/10] MAINTAINERS: Add qemu-img/io to block subsystem

2014-04-25 Thread Stefan Hajnoczi
From: Kevin Wolf qemu-img and qemu-io were not covered by any MAINTAINERS entry so far. Reported-by: Markus Armbruster Signed-off-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index c66946f..b287e

[Qemu-devel] [PULL 02/10] doc: add -drive rerror=, werror= to qemu --help output

2014-04-25 Thread Stefan Hajnoczi
These options are already documented on the man page but missing from qemu --help. Signed-off-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf --- qemu-options.hx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index 6457034..98b4002 100644 ---

[Qemu-devel] [PULL 03/10] qemu-iotests: Improve and make use of QMPTestCase.wait_until_completed()

2014-04-25 Thread Stefan Hajnoczi
From: Fam Zheng This eliminates code duplication. Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/030| 50 +-- tests/qemu-iotests/056| 9 +--- tests/qemu-iotests/iotests.py | 5 +++-- 3 files changed,

[Qemu-devel] [PULL 01/10] block: Prevent coroutine stack overflow when recursing in bdrv_open_backing_file.

2014-04-25 Thread Stefan Hajnoczi
From: Benoît Canet In 1.7.1 qcow2_create2 reopen the file for flushing without the BDRV_O_NO_BACKING flags. As a consequence the code would recursively open the whole backing chain. These three stack arrays would pile up through the recursion and lead to a coroutine stack overflow. Convert t

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

2014-04-25 Thread Stefan Hajnoczi
The following changes since commit 411f491e0af173cf8f39347574941bd26fbae381: Merge remote-tracking branch 'remotes/rth/tags/tgt-axp-pull-20140424' into staging (2014-04-25 13:25:22 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request fo

Re: [Qemu-devel] [PATCH v2 0/5] block: Purge error_is_set()

2014-04-25 Thread Stefan Hajnoczi
On Fri, Apr 25, 2014 at 04:50:30PM +0200, Markus Armbruster wrote: > I got a private branch getting rid of it entirely. This is the first > part, covering the block subsystem. > > v2: > * Rebased, trivial semantic conflict in 1/5 resolved > * Use local_err rather than err in 2/5 [Kevin] > > Mark

Re: [Qemu-devel] [PATCH 05/16] pci-assign: propagate errors from get_real_id()

2014-04-25 Thread Eric Blake
On 04/10/2014 02:24 AM, Laszlo Ersek wrote: > get_real_id() has two thin wrappers (and no other callers), > get_real_vendor_id() and get_real_device_id(); it's easiest to convert > them in one fell swoop. > > Signed-off-by: Laszlo Ersek > --- > hw/i386/kvm/pci-assign.c | 45 +

  1   2   3   >