Re: [Qemu-devel] [SeaBIOS PATCH 2/2] allow CPUs to have non-contiguous Local APIC IDs (v2)

2012-07-25 Thread Gleb Natapov
On Wed, Jul 25, 2012 at 03:42:21PM -0300, Eduardo Habkost wrote: > On Mon, Jul 23, 2012 at 03:20:14PM +0300, Gleb Natapov wrote: > > On Fri, Jul 20, 2012 at 02:04:50PM -0300, Eduardo Habkost wrote: > > > Extract Local APIC IDs directly from the CPUs, and instead of check for > > > "i < CountCPUs",

Re: [Qemu-devel] [PATCH v2] qxl: add QXL_IO_MONITORS_CONFIG_ASYNC

2012-07-25 Thread Yonit Halperin
Hi, On 07/25/2012 08:29 PM, Alon Levy wrote: On Wed, Jul 25, 2012 at 12:00:21PM +0300, Yonit Halperin wrote: Hi, I think you should save the monitor configuration as part of the vmstate, and recall spice_qxl_monitors_config_async in qxl_post_load. Good point, will do. Would be nice if I could

[Qemu-devel] [PATCH v5 2/6] monitor: rename keyname '<' to 'less'

2012-07-25 Thread Amos Kong
There are many maps of keycode 0x56 in pc-bios/keymaps/* pc-bios/keymaps/common:less 0x56 pc-bios/keymaps/common:greater 0x56 shift pc-bios/keymaps/common:bar 0x56 altgr pc-bios/keymaps/common:brokenbar 0x56 shift altgr This patch just renames '<' to 'less', QAPI would add new variable by

[Qemu-devel] [PATCH v5 4/6] qapi: generate list struct and visit_list for enum

2012-07-25 Thread Amos Kong
Currently, if define an 'enum' and use it in one command's data, List struct for enum could not be generated, but it's used in qmp function. For example: KeyCodesList could not be generated. >>> qapi-schema.json: { 'enum': 'KeyCodes', 'data': [ 'shift', 'alt' ... ] } { 'command': 'sendkey', 'd

[Qemu-devel] [PATCH v5 3/6] hmp: rename arguments

2012-07-25 Thread Amos Kong
Rename 'string' to 'keys', rename 'hold_time' to 'hold-time'. Signed-off-by: Amos Kong --- hmp-commands.hx |2 +- monitor.c | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 4041a9b..2891d48 100644 --- a/hmp-co

Re: [Qemu-devel] [PATCH 11/11] Restart optimization on stage3 update version

2012-07-25 Thread Orit Wasserman
On 07/25/2012 06:41 PM, Vinod, Chegu wrote: > > > > > -Original Message- > From: Orit Wasserman [mailto:owass...@redhat.com] > > > > From: Juan Quintela mailto:quint...@redhat.com>> > > > > Signed-off-by: Juan Quintela > > > --- > > arch_init.c |

[Qemu-devel] [PATCH v5 1/6] fix doc of using raw values with sendkey

2012-07-25 Thread Amos Kong
(qemu) sendkey a (qemu) sendkey 0x1e (qemu) sendkey #0x1e unknown key: '#0x1e' The last command doesn't work, '#' is not requested before raw values. And the raw value in decimal format is also not supported. Signed-off-by: Amos Kong --- hmp-commands.hx |6 +++--- 1 files changed, 3 insert

[Qemu-devel] [PATCH v5 5/6] ps2: output warning when event queue full

2012-07-25 Thread Amos Kong
Event would be ignored if ps2 queue is full, this patch added a warning in ignore path. Signed-off-by: Amos Kong --- hw/ps2.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/ps2.c b/hw/ps2.c index f93cd24..799c36b 100644 --- a/hw/ps2.c +++ b/hw/ps2.c @@ -137,8 +137

[Qemu-devel] [PATCH v5 6/6] qapi: convert sendkey

2012-07-25 Thread Amos Kong
Convert 'sendkey' to use QAPI. Keys' indexes in the enmu are same as keycodes' indexes in the key_defs[], index_from_code() and index_from_key() will return Q_KEY_CODE_MAX if the code/key is invalid. For qmp, QAPI would check invalid key and raise error. For hmp, invalid key is checked in hmp_sen

[Qemu-devel] [PATCH v5 0/6] convert sendkey to qapi

2012-07-25 Thread Amos Kong
This series converted 'sendkey' command to qapi. The raw value in hexadecimal format is not supported by 'send-key' of qmp. Amos Kong (6): fix doc of using raw values with sendkey monitor: rename keyname '<' to 'less' hmp: rename arguments qapi: generate list struct and visit_list for enum

[Qemu-devel] [PATCH] unicore32-softmmu: Add a minimal curses screen support

2012-07-25 Thread gxt
From: Guan Xuetao This patch adds a minimal curses screen support for unicore32-softmmu. We assume 80*30 screen size to minimize the implementation. Two problems are not solved, but they are innocuous. 1. curses windows will be blank when switching to monitor screen and back 2. backspace is not h

[Qemu-devel] [PATCHv2 1/2] unicore32: Split UniCore-F64 instruction helpers from helper.c

2012-07-25 Thread gxt
From: Guan Xuetao This patch just splits ucf64 instruction simulation helpers from helper.c. Also, two checkpatch warnings are solved. v1->v2: adjust copyright information for new ucf64_helper.c Signed-off-by: Guan Xuetao --- target-unicore32/Makefile.objs |2 + target-unicore32/helper.c

[Qemu-devel] [PATCHv2 2/2] unicore32: Disintegrate cpu_dump_state_ucf64 function

2012-07-25 Thread gxt
From: Guan Xuetao This patch disintegrates cpu_dump_state_ucf64 function from cpu_dump_state. Since of tedious output, we close this dump in its default state. Signed-off-by: Guan Xuetao --- target-unicore32/translate.c | 41 + 1 files changed, 25 inse

[Qemu-devel] [PATCH] eventfd: making it thread safe

2012-07-25 Thread Alexey Kardashevskiy
QEMU uses IO handlers to run select() in the main loop. The handlers list is managed by qemu_set_fd_handler() helper which works fine when called from the main thread as it is called when select() is not waiting. However IO handlers list can be changed in the thread other than the main one doing o

Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets

2012-07-25 Thread Corey Bryant
On 07/25/2012 03:43 PM, Eric Blake wrote: On 07/23/2012 07:08 AM, Corey Bryant wrote: When qemu_open is passed a filename of the "/dev/fdset/nnn" format (where nnn is the fdset ID), an fd with matching access mode flags will be searched for within the specified monitor fd set. If the fd is fo

[Qemu-devel] [PATCH V5] VMWare PVSCSI paravirtual device implementation

2012-07-25 Thread Deep Debroy
[Please ignore previous v5 submissions - I forgot to update the subject on the previous ones resulting them in getting threaded with v4] Below is v5 of VMWare PVSCSI device implementation patches (earlier submitted by Dmitry Fleytman) so that it gets applied to the qemu master. Note that below pat

[Qemu-devel] [PATCH V5] VMWare PVSCSI paravirtual device implementation

2012-07-25 Thread Deep Debroy
Below is V5 of VMWare PVSCSI device implementation patches (earlier submitted by Dmitry Fleytman) so that it gets applied to the qemu master. Note that below patch is against scsi-next branch of git://github.com/bonzini/qemu.git. Details from Dmitry's earlier submission can be found at: http://list

[Qemu-devel] [PATCH V5] VMWare PVSCSI paravirtual device implementation

2012-07-25 Thread Deep Debroy
Below is V5 of VMWare PVSCSI device implementation patches (earlier submitted by Dmitry Fleytman) so that it gets applied to the qemu master. Note that below patch is against scsi-next branch of git://github.com/bonzini/qemu.git. Details from Dmitry's earlier submission can be found at: http://list

Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets

2012-07-25 Thread Corey Bryant
On 07/25/2012 03:25 PM, Eric Blake wrote: On 07/25/2012 02:22 AM, Kevin Wolf wrote: Hm, not a nice interface where qemu_close() needs the filename and (worse) could be given a wrong filename. Maybe it would be better to maintain a list of fd -> fdset mappings in qemu_open/close? I agree, I

Re: [Qemu-devel] [PATCH v5 4/6] block: Convert open calls to qemu_open

2012-07-25 Thread Corey Bryant
On 07/25/2012 03:22 PM, Eric Blake wrote: On 07/23/2012 07:08 AM, Corey Bryant wrote: This patch converts all block layer open calls to qemu_open. Note that this adds the O_CLOEXEC flag to the changed open paths when the O_CLOEXEC macro is defined. Is it actually adding O_CLOEXEC, or just t

Re: [Qemu-devel] [PATCH v5 2/6] qapi: Introduce add-fd, remove-fd, query-fdsets

2012-07-25 Thread Corey Bryant
On 07/25/2012 02:16 PM, Eric Blake wrote: On 07/23/2012 07:08 AM, Corey Bryant wrote: This patch adds support that enables passing of file descriptors to the QEMU monitor where they will be stored in specified file descriptor sets. +## +# @add-fd: +# +# Add a file descriptor, that was passed

[Qemu-devel] How to share disk image between two kvm guests

2012-07-25 Thread Bing Bu Cao
Hi,all I want to use qemu-nbd to share disk between two kvm guests. I. # qemu-nbd -p 1024 -e 2 -n my-disk.qcow2 # nbd-client localhost 1024 /dev/nbd0 # nbd-client localhost 1024 /dev/nbd1 II. guest1: # /usr/local/bin/qemu -enable-kvm -m 1024 -drive file=ubuntu.img -drive file=/dev/nbd0,cache=n

Re: [Qemu-devel] [RFC 00/14]: add printf-like human msg to error_set()

2012-07-25 Thread Anthony Liguori
Luiz Capitulino writes: > Basically, this series changes a call like: > > error_set(errp, QERR_DEVICE_NOT_FOUND, device); > > to: > > error_set(errp, QERR_DEVICE_NOT_FOUND, >"Device 'device=%s' not found", device); > > In the first call, QERR_DEVICE_NOT_FOUND is a string containing

Re: [Qemu-devel] [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Nicholas A. Bellinger
On Wed, 2012-07-25 at 23:35 +0100, Stefan Hajnoczi wrote: > On Wed, Jul 25, 2012 at 02:14:50PM -0700, Nicholas A. Bellinger wrote: > > On Wed, 2012-07-25 at 12:55 +0100, Stefan Hajnoczi wrote: > > > On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: > > > > On Mon, 2012-07-23 at

Re: [Qemu-devel] vga-pci and MMIO BAR

2012-07-25 Thread Benjamin Herrenschmidt
On Wed, 2012-07-25 at 20:08 -0500, Anthony Liguori wrote: > > For the benefit of the list, Ben didn't know that we could just add a > qdev property to control whether the MMIO BAR was visible making it > just > a tiny bit of global magic in the old PC machine models. > > PPC still doesn't do vers

Re: [Qemu-devel] vga-pci and MMIO BAR

2012-07-25 Thread Anthony Liguori
Benjamin Herrenschmidt writes: > On Thu, 2012-07-26 at 08:01 +1000, Benjamin Herrenschmidt wrote: >> On Wed, 2012-07-25 at 16:59 +0300, Avi Kivity wrote: >> > > Why ? Who cares ? Especially with vga -std which nobody uses in >> > practice >> > > on x86... >> > >> > We'll find out who cares when

[Qemu-devel] [PATCH 2/2] exec.c: Use subpages for large unaligned mappings

2012-07-25 Thread Tyler Hall
Registering a multi-page memory region that is non-page-aligned results in a subpage from the start to the page boundary, some number of full pages, and possibly another subpage from the last page boundary to the end. The full pages will have a value for offset_within_region that is not a multiple

[Qemu-devel] [PATCH 1/2] exec.c: Fix off-by-one error in register_subpage

2012-07-25 Thread Tyler Hall
subpage_register() expects "end" to be the last byte in the mapping. Registering a non-page-aligned memory region that extends up to or beyond a page boundary causes subpage_register() to silently fail through the (end >= PAGE_SIZE) check. This bug does not cause noticeable problems for mappings t

Re: [Qemu-devel] vga-pci and MMIO BAR

2012-07-25 Thread Benjamin Herrenschmidt
On Thu, 2012-07-26 at 08:01 +1000, Benjamin Herrenschmidt wrote: > On Wed, 2012-07-25 at 16:59 +0300, Avi Kivity wrote: > > > Why ? Who cares ? Especially with vga -std which nobody uses in > > practice > > > on x86... > > > > We'll find out who cares when we break it. > > Chances are pretty much

Re: [Qemu-devel] [QEMU PATCH 0/3] versioned CPU models / per-machine-type aliases

2012-07-25 Thread Anthony Liguori
Eduardo Habkost writes: > Hi, > > This is the first try at a simple system to make the CPU model definitions > versioned (to allow them to get bug fixes while allowing migration from older > versions and keeping command-line compatibility), and per- machine-type > aliases > for compatibility. >

Re: [Qemu-devel] [PATCH v2 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test

2012-07-25 Thread Eric Blake
On 07/25/2012 04:45 PM, Stefan Hajnoczi wrote: >> Since you are assuming bash (and even if you were to assume POSIX >> /bin/sh)... >> >>> + >>> +seq=`basename $0` >> >> I prefer $() over ``. >> >>> +echo "QA output created by $seq" >>> + >>> +here=`pwd` >> >> POSIX (and therefore bash) guarantees

Re: [Qemu-devel] [PATCH 04/27] add a version number to ram_list

2012-07-25 Thread Michael Roth
On Tue, Jul 24, 2012 at 08:36:29PM +0200, Juan Quintela wrote: > From: Umesh Deshpande > > This will be used to detect if last_block might have become invalid > across different calls to ram_save_live. > > Signed-off-by: Paolo Bonzini > Signed-off-by: Umesh Deshpande > Signed-off-by: Juan Quin

Re: [Qemu-devel] [PATCH] vl: add -libvirt-caps option for libvirt to stop parsing help output

2012-07-25 Thread Anthony Liguori
Eric Blake writes: > [adding libvirt] > > On 07/25/2012 01:47 PM, Anthony Liguori wrote: >> The help output is going to change dramatically for 0.13. We've spent too >> long > > 0.13? How long have you been sitting on this commit? :) Yeah, I meant 1.3 :-) It's been a long day... >> waiting

[Qemu-devel] [PATCH 04/10] linux-user: Sync fcntl.h bits with the kernel

2012-07-25 Thread Richard Henderson
For each target, only define the bits that appear in arch/target/include/asm/fcntl.h. Mirror the kernel's asm-generic layout by handling anything undefined afterward. Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 195 +--- 1 files chan

Re: [Qemu-devel] [PATCH 27/47] block: introduce mirror job

2012-07-25 Thread Eric Blake
On 07/24/2012 05:04 AM, Paolo Bonzini wrote: > This patch adds the implementation of a new job that mirrors a disk to > a new image while letting the guest continue using the old image. > The target is treated as a "black box" and data is copied from the > source to the target in the background. T

[Qemu-devel] [PATCH 10/10] alpha-linux-user: Fix the getpriority syscall

2012-07-25 Thread Richard Henderson
Alpha uses unbiased priority values in the syscall, with the a3 return value signaling error conditions. Therefore, properly interpret the libc getpriority as needed for the guest rather than passing the host value through unchanged. Signed-off-by: Richard Henderson --- linux-user/syscall.c |

[Qemu-devel] [PATCH 06/10] linux-user: Allocate the right amount of space for non-fixed file maps

2012-07-25 Thread Richard Henderson
If we let the kernel handle the implementation of mmap_find_vma, via an anon mmap, we must use the size as indicated by the user and not the size truncated to the filesize. This happens often in ld.so, where we initially mmap the file to the size of the text+data+bss to reserve an area, then mmap+

Re: [Qemu-devel] [QEMU PATCH 3/3] x86: pc: versioned CPU model names & compatibility aliases

2012-07-25 Thread Andreas Färber
Am 25.07.2012 20:18, schrieb Eduardo Habkost: > This adds version number to CPU model names on the "pc-" > machine-types, so we can create new models with bug fixes while keeping > compatibility when using older machine-types. > > When naming the existing models, I used the last QEMU version where

Re: [Qemu-devel] [QEMU PATCH 2/3] per-machine-type CPU model alias system

2012-07-25 Thread Andreas Färber
Am 25.07.2012 20:18, schrieb Eduardo Habkost: > This allow QEMUMachine structs to contain a list of CPU model aliases, > used to keep command-line compatibility with older machine types, while > making CPU model fixes available on newer machine types. > > Signed-off-by: Eduardo Habkost > --- > h

Re: [Qemu-devel] [PATCH v2 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test

2012-07-25 Thread Stefan Hajnoczi
On Wed, Jul 25, 2012 at 11:54:50AM -0600, Eric Blake wrote: > On 07/25/2012 06:21 AM, Stefan Hajnoczi wrote: > > This tests establishes the basic post-conditions of the qcow2 lazy > > refcounts features: > > > > 1. If the image was closed normally, it is marked clean. > > > > 2. If an allocat

[Qemu-devel] [PATCH 02/10] alpha-linux-user: Work around hosted mmap allocation problems

2012-07-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-alpha/cpu.h | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/target-alpha/cpu.h b/target-alpha/cpu.h index 99f9ee1..0d87fa7 100644 --- a/target-alpha/cpu.h +++ b/target-alpha/cpu.h @@ -40,9 +40,20 @@ #define TARGET_

[Qemu-devel] [PATCH 08/10] alpha-linux-user: Fix a3 error return with v0 error bypass.

2012-07-25 Thread Richard Henderson
We were failing to initialize a3 for syscalls that bypass the negative return value error check. Signed-off-by: Richard Henderson --- linux-user/main.c | 12 +--- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/linux-user/main.c b/linux-user/main.c index 5787432..343b85c

[Qemu-devel] [PATCH 03/10] alpha-linux-user: Handle TARGET_SSI_IEEE_RAISE_EXCEPTION properly

2012-07-25 Thread Richard Henderson
We weren't aggregating the exceptions, nor raising signals properly. Signed-off-by: Richard Henderson --- linux-user/syscall.c | 61 + 1 files changed, 51 insertions(+), 10 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c in

Re: [Qemu-devel] [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Stefan Hajnoczi
On Wed, Jul 25, 2012 at 02:14:50PM -0700, Nicholas A. Bellinger wrote: > On Wed, 2012-07-25 at 12:55 +0100, Stefan Hajnoczi wrote: > > On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: > > > On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: > > > > On Tue, Jul 24, 20

Re: [Qemu-devel] [PATCH 1/2] linux-user: Factor out guest space probing into a function

2012-07-25 Thread Meador Inge
On 07/10/2012 11:12 AM, Peter Maydell wrote: > On 10 July 2012 16:57, Meador Inge wrote: >> Signed-off-by: Meador Inge >> --- >> linux-user/elfload.c | 111 >> +++--- >> linux-user/qemu.h| 11 + >> 2 files changed, 89 insertions(+), 33 del

Re: [Qemu-devel] [libvirt] [QEMU PATCH 1/3] vl.c: extract qemu_machine_init() function

2012-07-25 Thread Eric Blake
On 07/25/2012 12:18 PM, Eduardo Habkost wrote: > Other code directly related to the board init function may be moved > there. > > Signed-off-by: Eduardo Habkost > --- > hw/boards.h |7 +++ > vl.c| 14 +- > 2 files changed, 20 insertions(+), 1 deletion(-) > > > -

Re: [Qemu-devel] [PATCH] vl: add -libvirt-caps option for libvirt to stop parsing help output

2012-07-25 Thread Eric Blake
[adding libvirt] On 07/25/2012 01:47 PM, Anthony Liguori wrote: > The help output is going to change dramatically for 0.13. We've spent too > long 0.13? How long have you been sitting on this commit? :) > waiting for a perfect solution to capabilities handling and the end loser is > the direc

[Qemu-devel] [PATCH 09/10] alpha-linux-user: Properly handle the non-rt sigprocmask syscall.

2012-07-25 Thread Richard Henderson
Name the syscall properly for QEMU, kernel source notwithstanding. Fix syntax errors in the code thus enabled within do_syscall. Signed-off-by: Richard Henderson --- linux-user/alpha/syscall_nr.h |2 +- linux-user/syscall.c |3 +-- 2 files changed, 2 insertions(+), 3 deletions(-

[Qemu-devel] [PATCH 05/10] linux-user: Handle O_SYNC, O_NOATIME, O_CLOEXEC, O_PATH

2012-07-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/strace.c | 12 +++- linux-user/syscall.c | 15 ++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 05a0d3e..6ec90e8 100644 --- a/linux-user/strace.c +++ b/linux

[Qemu-devel] [PATCH 07/10] linux-user: Translate pipe2 flags; add to strace

2012-07-25 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/strace.list |3 +++ linux-user/syscall.c |3 ++- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/linux-user/strace.list b/linux-user/strace.list index a7eeaef..af3c6a0 100644 --- a/linux-user/strace.list +++ b/linux-user/str

[Qemu-devel] [PATCH 01/10] alpha-linux-user: Fix signal handling

2012-07-25 Thread Richard Henderson
Proper signal numbers were not defined, and EXCP_INTERRUPT was unhandled, leading to all sorts of subtle confusion. Signed-off-by: Richard Henderson --- linux-user/main.c |3 +++ linux-user/syscall_defs.h | 41 - 2 files changed, 43 insertion

[Qemu-devel] [PATCH v4 00/10] {alpha-}linux user improvements

2012-07-25 Thread Richard Henderson
Changes v3-v4: Split patch 4 as per PMM feedback Fix patch 9 is_error usage as per PPM feedback. Changes v2-v3: Fix fcntl translation table in O_CLOEXEC patch. The O_LARGEFILE entry could result in an end-of-table {0,0,0,0} marker. Handle sigprocmask and getpriority properly for alpha.

Re: [Qemu-devel] vga-pci and MMIO BAR

2012-07-25 Thread Benjamin Herrenschmidt
On Wed, 2012-07-25 at 16:59 +0300, Avi Kivity wrote: > > Why ? Who cares ? Especially with vga -std which nobody uses in > practice > > on x86... > > We'll find out who cares when we break it. Chances are pretty much close to 0, especially adding a BAR ... do we even use vga "std" on anything ?

[Qemu-devel] [PATCH 07/14] error: don't delay error message construction

2012-07-25 Thread Luiz Capitulino
Today, the error message is only constructed when it's used. This commit changes that to construct the error message when the error object is built (ie. when the error is reported). This simplifies the Error object. Signed-off-by: Luiz Capitulino --- error.c | 8 +--- qerror.c | 4 +--- 2

[Qemu-devel] [PATCH 08/14] qerror: add build_error_dict() and error_object_table[]

2012-07-25 Thread Luiz Capitulino
In the near future, the QERR_ macros (which are json strings today) will be turned into an enumeration. When we get there, build_error_dict() will be used to (guess what) build an error dict by: 1. Using the error class as an index to error_object_table[], which contains all QMP errors as jso

[Qemu-devel] [PATCH 12/14] error: turn QERR_ macros into an enumeration

2012-07-25 Thread Luiz Capitulino
The enum is called ErrClass, and is autogenerated. FIXME: also converts error_is_type() and probably breaks other error functions used to query the error object. Signed-off-by: Luiz Capitulino --- error.c| 24 ++-- error.h| 3 ++- scri

[Qemu-devel] [PATCH 06/14] qerror: don't delay error message construction

2012-07-25 Thread Luiz Capitulino
Today, the error message is only constructed when it's used. This commit changes that to construct the error message when the error object is built (ie. when the error is reported). This eliminates the need of storing a pointer to qerror_table[], which will be dropped soon, and also simplifies the

Re: [Qemu-devel] [libvirt] Changing qemu's -help output

2012-07-25 Thread Eric Blake
On 07/25/2012 01:09 PM, Luiz Capitulino wrote: > On Wed, 25 Jul 2012 20:02:53 +0100 > Peter Maydell wrote: > >> On 25 July 2012 20:02, Luiz Capitulino wrote: >>> On Wed, 25 Jul 2012 19:58:02 +0100 >>> Peter Maydell wrote: I think we should simply say "no, parsing -help is broken and wrong

[Qemu-devel] [PATCH 05/14] qerror: qerror_format(): return an allocated string

2012-07-25 Thread Luiz Capitulino
Simplifies current and future users. Signed-off-by: Luiz Capitulino --- error.c | 5 + qerror.c | 10 -- qerror.h | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/error.c b/error.c index a52b771..b630b05 100644 --- a/error.c +++ b/error.c @@ -64,10 +64,7 @@

[Qemu-devel] [PATCH 04/14] qerror: drop qerror_report_internal()

2012-07-25 Thread Luiz Capitulino
It's not needed anymore and conflicts with future error improvements. Also drops related error information, that is, the file where the error ocurred, the line number and function. This has never been fully used. Signed-off-by: Luiz Capitulino --- qerror.c | 20 +++- qerror.h |

Re: [Qemu-devel] [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Nicholas A. Bellinger
On Wed, 2012-07-25 at 12:55 +0100, Stefan Hajnoczi wrote: > On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: > > On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: > > > On Tue, Jul 24, 2012 at 01:26:20AM +, Nicholas A. Bellinger wrote: > > > > From: Nicholas Bel

[Qemu-devel] [PATCH 11/14] qerror: drop qerror_table[] for good

2012-07-25 Thread Luiz Capitulino
Last commit deprecated it. Also drops the code that used it to generate error objects. Signed-off-by: Luiz Capitulino --- qerror.c | 95 -- qerror.h | 6 scripts/qapi-errors.py | 26 -- 3 files changed,

Re: [Qemu-devel] [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Nicholas A. Bellinger
On Wed, 2012-07-25 at 16:10 +0300, Avi Kivity wrote: > On 07/24/2012 11:45 PM, Nicholas A. Bellinger wrote: > > >> > diff --git a/drivers/vhost/tcm_vhost.h b/drivers/vhost/tcm_vhost.h > >> > index e942df9..3d5378f 100644 > >> > --- a/drivers/vhost/tcm_vhost.h > >> > +++ b/drivers/vhost/tcm_vhost.h

[Qemu-devel] [PATCH 03/14] qerror: drop qerror_abort()

2012-07-25 Thread Luiz Capitulino
Previously, developers had to create error dicts manually and also enter the matching desc table entry. Thus, qerro_abort() was added to help catching bad error dicts. Today, all that stuff is generated automatically which makes the chance of a bad generated dict quite low. Also, qerror_abort() w

[Qemu-devel] [PATCH 13/14] qerror: change all qerror_report() calls to use the ErrClass enum

2012-07-25 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- block/cow.c | 2 +- block/qcow.c | 2 +- block/qcow2.c | 2 +- block/qed.c | 2 +- blockdev.c| 10 +- hw/pci.c | 4 ++-- hw/qdev-monitor.c | 22 +++--- hw/usb/bus.c | 2 +- hw/usb/hcd-ehci.

[Qemu-devel] [PATCH 09/14] qerror: qerror_report(): take an index and a human error message

2012-07-25 Thread Luiz Capitulino
This commit does three indivisible changes: 1. qerror_report() is changed to take an index to error_object_table[] and a human error message in printf format. That is, we go from: qerror_report(const char *fmt, ...); where fmt is a json dict in string format and the argume

[Qemu-devel] [PATCH 02/14] qerror: reduce public exposure

2012-07-25 Thread Luiz Capitulino
Make functions only used in qerror.c static. Signed-off-by: Luiz Capitulino --- qerror.c | 10 +- qerror.h | 5 - 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/qerror.c b/qerror.c index ec4ceb8..d428b52 100644 --- a/qerror.c +++ b/qerror.c @@ -28,7 +28,7 @@ static

[Qemu-devel] [PATCH 01/14] monitor: drop unused monitor debug code

2012-07-25 Thread Luiz Capitulino
In the old QMP days, this code was used to find out QMP commands that might be calling monitor_printf() down its call chain. This is almost impossible to happen today, because the qapi converted commands don't even have a monitor object. Besides, it's been more than a year since I used this last t

[Qemu-devel] [RFC 00/14]: add printf-like human msg to error_set()

2012-07-25 Thread Luiz Capitulino
Basically, this series changes a call like: error_set(errp, QERR_DEVICE_NOT_FOUND, device); to: error_set(errp, QERR_DEVICE_NOT_FOUND, "Device 'device=%s' not found", device); In the first call, QERR_DEVICE_NOT_FOUND is a string containing a json dict: "{ 'class': 'DeviceNotFo

[Qemu-devel] [Bug 1021649] Re: qemu 1.1.0 waits for a keypress at boot

2012-07-25 Thread Georg Hopp
I encountered the same thing and created a patch that fixes the problem for me. This is not a real fix. All i have done is the following: - Clone the repo. - Get a reverse diff for the commit in question "git diff 7c7db75..4ffd16f >foo1.patch". - Try to apply this on master "patch remove-7c7db75

Re: [Qemu-devel] [PATCH 02/27] split MRU ram list

2012-07-25 Thread Michael Roth
On Tue, Jul 24, 2012 at 08:36:27PM +0200, Juan Quintela wrote: > From: Paolo Bonzini > > Outside the execution threads the normal, non-MRU-ized order of > the RAM blocks should always be enough. So manage two separate > lists, which will have separate locking rules. One thing I'm noticing is th

[Qemu-devel] [PATCH] vl: add -libvirt-caps option for libvirt to stop parsing help output

2012-07-25 Thread Anthony Liguori
The help output is going to change dramatically for 0.13. We've spent too long waiting for a perfect solution to capabilities handling and the end loser is the direct consumer of QEMU because the help output is awful. I will not apply any patches that change help output until 0.13 development ope

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-25 Thread Alex Williamson
On Wed, 2012-07-25 at 22:30 +0300, Avi Kivity wrote: > On 07/25/2012 08:03 PM, Alex Williamson wrote: > > This adds PCI based device assignment to Qemu using the Linux VFIO > > userspace driver interface. After setting up VFIO device access, > > devices can be added to Qemu guests using the vfio-p

Re: [Qemu-devel] [PATCH 07/11] qapi: qapi.py: allow the "'" character be escaped

2012-07-25 Thread Peter Maydell
On 25 July 2012 20:18, Luiz Capitulino wrote: > Peter Maydell wrote: >> On 25 July 2012 17:54, Luiz Capitulino wrote: >> > --- a/scripts/qapi.py >> > +++ b/scripts/qapi.py >> > @@ -21,7 +21,9 @@ def tokenize(data): >> > elif data[0] == "'": >> > data = data[1:] >> >

Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets

2012-07-25 Thread Eric Blake
On 07/23/2012 07:08 AM, Corey Bryant wrote: > When qemu_open is passed a filename of the "/dev/fdset/nnn" > format (where nnn is the fdset ID), an fd with matching access > mode flags will be searched for within the specified monitor > fd set. If the fd is found, a dup of the fd will be returned >

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO PCI driver for Qemu

2012-07-25 Thread Avi Kivity
On 07/25/2012 08:03 PM, Alex Williamson wrote: > This adds PCI based device assignment to Qemu using the Linux VFIO > userspace driver interface. After setting up VFIO device access, > devices can be added to Qemu guests using the vfio-pci device > option: > > -device vfio-pci,host=1:10.1,id=net0

Re: [Qemu-devel] [PATCH v5 6/6] block: Enable qemu_open/close to work with fd sets

2012-07-25 Thread Eric Blake
On 07/25/2012 02:22 AM, Kevin Wolf wrote: >>> Hm, not a nice interface where qemu_close() needs the filename and >>> (worse) could be given a wrong filename. Maybe it would be better to >>> maintain a list of fd -> fdset mappings in qemu_open/close? >>> >> >> I agree, I don't really like it either.

Re: [Qemu-devel] [PATCH v5 4/6] block: Convert open calls to qemu_open

2012-07-25 Thread Eric Blake
On 07/23/2012 07:08 AM, Corey Bryant wrote: > This patch converts all block layer open calls to qemu_open. > > Note that this adds the O_CLOEXEC flag to the changed open paths > when the O_CLOEXEC macro is defined. Is it actually adding O_CLOEXEC, or just the ability to use O_CLOEXEC? Or is the

Re: [Qemu-devel] [PATCH 1/2] qemu-opts: introduce a function to compare option names

2012-07-25 Thread Anthony Liguori
Peter Maydell writes: > On 25 July 2012 17:25, Anthony Liguori wrote: >> We don't use the standard C functions for conversion because we don't want to >> depend on the user's locale. All option names in QEMU are en_US in plain >> ASCII. >> >> Signed-off-by: Anthony Liguori >> --- >> qemu-opt

Re: [Qemu-devel] [PATCH 07/11] qapi: qapi.py: allow the "'" character be escaped

2012-07-25 Thread Luiz Capitulino
On Wed, 25 Jul 2012 18:45:21 +0100 Peter Maydell wrote: > On 25 July 2012 17:54, Luiz Capitulino wrote: > > (Subject should be "to be", not "be".) > > > A future commit will add a new qapi script which escapes that character. > > > > Signed-off-by: Luiz Capitulino > > --- > > scripts/qapi.py

[Qemu-devel] Changing qemu's -help output

2012-07-25 Thread Luiz Capitulino
On Wed, 25 Jul 2012 20:02:53 +0100 Peter Maydell wrote: > On 25 July 2012 20:02, Luiz Capitulino wrote: > > On Wed, 25 Jul 2012 19:58:02 +0100 > > Peter Maydell wrote: > >> I think we should simply say "no, parsing -help is broken and wrong and it > >> was obviously broken and wrong and we are

Re: [Qemu-devel] [PATCH 2/2] qemu-config: convert all QemuOpts to use dashes instead of underscores

2012-07-25 Thread Peter Maydell
On 25 July 2012 20:02, Luiz Capitulino wrote: > On Wed, 25 Jul 2012 19:58:02 +0100 > Peter Maydell wrote: >> I think we should simply say "no, parsing -help is broken and wrong and it >> was obviously broken and wrong and we are in fact going to change the >> help output for QEMU 1.2, and you wil

Re: [Qemu-devel] [PATCH 2/2] qemu-config: convert all QemuOpts to use dashes instead of underscores

2012-07-25 Thread Luiz Capitulino
On Wed, 25 Jul 2012 19:58:02 +0100 Peter Maydell wrote: > On 25 July 2012 19:20, Anthony Liguori wrote: > > The man page is generated from qemu-options.hx which also generates the > > help output. > > > > Unfortunately, we're still stuck in the "everyone yells at Anthony when > > he tries to cha

Re: [Qemu-devel] [PATCH 2/2] qemu-config: convert all QemuOpts to use dashes instead of underscores

2012-07-25 Thread Peter Maydell
On 25 July 2012 19:20, Anthony Liguori wrote: > The man page is generated from qemu-options.hx which also generates the > help output. > > Unfortunately, we're still stuck in the "everyone yells at Anthony when > he tries to change the help output because of libvirt" state. I think we should simp

[Qemu-devel] [SeaBIOS PATCH 2/2] allow CPUs to have non-contiguous Local APIC IDs (v2)

2012-07-25 Thread Eduardo Habkost
Extract Local APIC IDs directly from the CPUs, and instead of check for "i < CountCPUs", check if the APIC ID was present on boot, when building ACPI tables and the MP-Table. This keeps ACPI Processor ID == APIC ID, but allows the hardware<->SeaBIOS interface be completely APIC-ID based and not de

[Qemu-devel] [SeaBIOS PATCH 1/2] report real I/O APIC ID (0) on MADT and MP-table (v3)

2012-07-25 Thread Eduardo Habkost
When resetting an I/O APIC, its ID is set to 0, and SeaBIOS doesn't change it, so report it correctly on the ACPI MADT table and MP-table. Some hardware may require the BIOS to initialize I/O APIC ID to an unique value, but SeaBIOS doesn't do that. This patch at least makes the tables reflect real

[Qemu-devel] [SeaBIOS PATCH 0/2] Allow non-contiguous APIC IDs (v3)

2012-07-25 Thread Eduardo Habkost
Changes v2 -> v3: - Report I/O APIC ID = 0 on MP-table, too Changes v1 -> v2: - Patch 1/2: cosmetic whitespace change - Patch 2/2: use size suffixes on asm instructions on smp.c - New patch descriptions Eduardo Habkost (2): report real I/O APIC ID (0) on MADT and MP-table (v3) allow CPUs

Re: [Qemu-devel] [SeaBIOS PATCH 2/2] allow CPUs to have non-contiguous Local APIC IDs (v2)

2012-07-25 Thread Eduardo Habkost
On Mon, Jul 23, 2012 at 03:20:14PM +0300, Gleb Natapov wrote: > On Fri, Jul 20, 2012 at 02:04:50PM -0300, Eduardo Habkost wrote: > > Extract Local APIC IDs directly from the CPUs, and instead of check for > > "i < CountCPUs", check if the APIC ID was present on boot, when building > > ACPI tables a

Re: [Qemu-devel] [PATCH 2/2] qemu-config: convert all QemuOpts to use dashes instead of underscores

2012-07-25 Thread Anthony Liguori
Luiz Capitulino writes: > On Wed, 25 Jul 2012 11:25:43 -0500 > Anthony Liguori wrote: > >> Signed-off-by: Anthony Liguori > > What about the man page? Should it be updated or are we going to let it > list options with "_"? The man page is generated from qemu-options.hx which also generates the

Re: [Qemu-devel] [PATCH 1/2] qemu-opts: introduce a function to compare option names

2012-07-25 Thread Peter Maydell
On 25 July 2012 18:33, Anthony Liguori wrote: > Peter Maydell writes: >> This is not in line with the return value that the C library >> strcmp() would return. C99 7.21.4 says "The sign of a nonzero >> value returned by the comparison functions memcmp, strcmp, >> and strncmp is determined by the

Re: [Qemu-devel] [PATCH 1/2] qemu-opts: introduce a function to compare option names

2012-07-25 Thread Anthony Liguori
Eric Blake writes: > On 07/25/2012 10:45 AM, Eric Blake wrote: >> On 07/25/2012 10:25 AM, Anthony Liguori wrote: >>> We don't use the standard C functions for conversion because we don't want >>> to >>> depend on the user's locale. All option names in QEMU are en_US in plain >>> ASCII. >> >>>

[Qemu-devel] [QEMU PATCH 2/3] per-machine-type CPU model alias system

2012-07-25 Thread Eduardo Habkost
This allow QEMUMachine structs to contain a list of CPU model aliases, used to keep command-line compatibility with older machine types, while making CPU model fixes available on newer machine types. Signed-off-by: Eduardo Habkost --- hw/boards.h |6 ++ vl.c| 14 ++

[Qemu-devel] [QEMU PATCH 0/3] versioned CPU models / per-machine-type aliases

2012-07-25 Thread Eduardo Habkost
Hi, This is the first try at a simple system to make the CPU model definitions versioned (to allow them to get bug fixes while allowing migration from older versions and keeping command-line compatibility), and per- machine-type aliases for compatibility. The lack of CPU model versioning is block

[Qemu-devel] [QEMU PATCH 1/3] vl.c: extract qemu_machine_init() function

2012-07-25 Thread Eduardo Habkost
Other code directly related to the board init function may be moved there. Signed-off-by: Eduardo Habkost --- hw/boards.h |7 +++ vl.c| 14 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/hw/boards.h b/hw/boards.h index 59c01d0..f20f5ab 100644 ---

[Qemu-devel] [QEMU PATCH 3/3] x86: pc: versioned CPU model names & compatibility aliases

2012-07-25 Thread Eduardo Habkost
This adds version number to CPU model names on the "pc-" machine-types, so we can create new models with bug fixes while keeping compatibility when using older machine-types. When naming the existing models, I used the last QEMU version where the model was changed (see summary below), but by coinc

Re: [Qemu-devel] [PATCH v5 2/6] qapi: Introduce add-fd, remove-fd, query-fdsets

2012-07-25 Thread Eric Blake
On 07/23/2012 07:08 AM, Corey Bryant wrote: > This patch adds support that enables passing of file descriptors > to the QEMU monitor where they will be stored in specified file > descriptor sets. > > +## > +# @add-fd: > +# > +# Add a file descriptor, that was passed via SCM rights, to an fd set. >

Re: [Qemu-devel] [PATCH v2 7/7] qemu-iotests: add 039 qcow2 lazy refcounts test

2012-07-25 Thread Eric Blake
On 07/25/2012 06:21 AM, Stefan Hajnoczi wrote: > This tests establishes the basic post-conditions of the qcow2 lazy > refcounts features: > > 1. If the image was closed normally, it is marked clean. > > 2. If an allocating write was performed and the image was not close > normally, then

[Qemu-devel] [PATCH 10/11] qerror: switch to qapi generated error macros and table

2012-07-25 Thread Luiz Capitulino
Previous commits added qapi infrastructure to automatically generate qerror macros and the qerror table from qapi-schema-errors.json. This commit drops the current error macros from qerror.h and the error table from qerror.c and use the generated ones instead. Please, note that qapi-error.c is ac

Re: [Qemu-devel] [PATCH 07/11] qapi: qapi.py: allow the "'" character be escaped

2012-07-25 Thread Peter Maydell
On 25 July 2012 17:54, Luiz Capitulino wrote: (Subject should be "to be", not "be".) > A future commit will add a new qapi script which escapes that character. > > Signed-off-by: Luiz Capitulino > --- > scripts/qapi.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a

[Qemu-devel] [PATCH 01/11] qerror: rename QERR_SOCKET_* macros

2012-07-25 Thread Luiz Capitulino
The socket error classes call a socket 'Sock', like in SockConnectFailed, but the error macros call a socket SOCKET, like in QERR_SOCKET_CONNECT_FAILED. This will cause problems when the error macros creation get automated, because the macro name will be derived from the error class name. Avoid t

  1   2   3   >