Re: [Qemu-devel] [PATCH 12/17] rtc: add a QOM property for accessing device state

2012-06-05 Thread Michael Roth
On Tue, Jun 05, 2012 at 04:14:44PM +0200, Paolo Bonzini wrote: Il 05/06/2012 03:00, Michael Roth ha scritto: This will eventually be used to serialize device state for the purposes of migration/savevm, and is also useful for introspection/testing. Signed-off-by: Michael Roth

[Qemu-devel] [PATCH 28/29] qapi: convert netdev_del

2012-06-05 Thread Luiz Capitulino
Signed-off-by: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Reviewed-By: Laszlo Ersek ler...@redhat.com --- hmp-commands.hx | 3 +-- hmp.c| 9 + hmp.h| 1 + net.c| 11 +-- net.h| 1 -

[Qemu-devel] [PATCH 27/29] qapi: convert netdev_add

2012-06-05 Thread Luiz Capitulino
This is not a full QAPI conversion, but an intermediate step. In essence, do_netdev_add() is split into three functions: 1. netdev_add(): performs the actual work. This function is fully converted to Error (thus, it's qapi-friendly) 2. qmp_netdev_add(): the QMP front-end for netdev_add().

[Qemu-devel] [PATCH 22/29] qerror: introduce QERR_INVALID_OPTION_GROUP

2012-06-05 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Reviewed-By: Laszlo Ersek ler...@redhat.com --- qerror.c | 4 qerror.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/qerror.c b/qerror.c index 5092fe7..92c4eff 100644 --- a/qerror.c +++ b/qerror.c @@ -156,6 +156,10 @@ static

[Qemu-devel] [PATCH 15/29] qemu-option: parse_option_bool(): use error_set()

2012-06-05 Thread Luiz Capitulino
Note that set_option_parameter() callers still expect automatic error reporting with QError, so set_option_parameter() calls qerror_report_err() to keep the same semantics. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Reviewed-By: Laszlo Ersek ler...@redhat.com --- qemu-option.c | 24

[Qemu-devel] [PATCH] KVM: Fix compiles when KVM_CAP_IRQ_ROUTING is not defined

2012-06-05 Thread Ben Collins
Things like kroute and direct_msi were not protected by ifdef's for when this feature is not enabled. Also, virtio-pci was referencing kvm_irqchip_release_virq() which was not defined without KVM_CAP_IRQ_ROUTING but when KVM was enabled. Signed-off-by: Ben Collins bcoll...@ubuntu.com Cc: Avi

[Qemu-devel] [PATCH] PPC: mpc8544ds: Fix typo in init of second serial device

2012-06-05 Thread Ben Collins
The reference to serial_hds[0] should be serial_hds[1] when initializing the second serial line. Signed-off-by: Ben Collins bcoll...@ubuntu.com Cc: Alexander Graf ag...@suse.de --- hw/ppce500_mpc8544ds.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH] KVM: Fix compiles when KVM_CAP_IRQ_ROUTING is not defined

2012-06-05 Thread Jan Kiszka
On 2012-06-05 20:08, Ben Collins wrote: Things like kroute and direct_msi were not protected by ifdef's for when this feature is not enabled. Also, virtio-pci was referencing kvm_irqchip_release_virq() which was not defined without KVM_CAP_IRQ_ROUTING but when KVM was enabled. There is [1]

[Qemu-devel] [PATCH 05/29] Add API to get memory mapping

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang we...@cn.fujitsu.com Add API to get all virtual address and physical address mapping. If the guest doesn't use paging, the virtual address is equal to the phyical address. The virtual address and physical address mapping is for gdb's user, and it does not include the memory

[Qemu-devel] [PATCH 23/29] qemu-config: find_list(): use error_set()

2012-06-05 Thread Luiz Capitulino
Note that qemu_find_opts() and qemu_config_parse() need to call error_report() to maintain their semantics on error. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Reviewed-By: Laszlo Ersek ler...@redhat.com --- qemu-config.c | 32 +--- 1 file changed, 25

[Qemu-devel] [PATCH 19/29] qemu-option: opt_set(): use error_set()

2012-06-05 Thread Luiz Capitulino
The functions qemu_opt_set() and opts_do_parse() both call opt_set(), but their callers expect QError semantics. Thus, both functions call qerro_report_err() to keep the expected semantics. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Reviewed-By: Laszlo Ersek ler...@redhat.com ---

[Qemu-devel] [PATCH 07/29] target-i386: Add API to write elf notes to core file

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang we...@cn.fujitsu.com The core file contains register's value. These APIs write registers to core file, and them will be called in the following patch. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- Makefile.target

[Qemu-devel] [PATCH 24/29] qemu-config: introduce qemu_find_opts_err()

2012-06-05 Thread Luiz Capitulino
This is like qemu_find_opts(), except that it takes an Error argument. This new function allows for a incremental conversion of code using qemu_find_opts(). Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Reviewed-By: Laszlo Ersek ler...@redhat.com --- qemu-config.c | 5 +

[Qemu-devel] [PATCH 16/29] qemu-option: parse_option_size(): use error_set()

2012-06-05 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Reviewed-By: Laszlo Ersek ler...@redhat.com --- qemu-option.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index b5da116..42bb685 100644 --- a/qemu-option.c +++

[Qemu-devel] [PATCH 17/29] qemu-option: qemu_opt_parse(): use error_set()

2012-06-05 Thread Luiz Capitulino
The functions opt_set() and qemu_opts_validate() both call qemu_opt_parse(), but their callers expect QError semantics. Thus, both functions call qerro_report_err() to keep the expected semantics. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Reviewed-By: Laszlo Ersek ler...@redhat.com

[Qemu-devel] [PATCH 21/29] qemu-option: qemu_opts_from_qdict(): use error_set()

2012-06-05 Thread Luiz Capitulino
do_device_add() and do_netdev_add() call qerror_report_err() to maintain their QError semantics. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Reviewed-By: Laszlo Ersek ler...@redhat.com --- hw/qdev-monitor.c | 7 +-- net.c | 5 - qemu-option.c | 31

[Qemu-devel] [PATCH 14/29] qemu-option: parse_option_number(): use error_set()

2012-06-05 Thread Luiz Capitulino
Note that qemu_opt_parse() callers still expect automatic error reporting with QError, so qemu_opts_parse() calls qerror_report_err() to keep the same semantics. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Reviewed-By: Laszlo Ersek ler...@redhat.com --- qemu-option.c | 26

Re: [Qemu-devel] [PATCH 1/3] qmp/hmp: Add QMP getfd command that returns fd

2012-06-05 Thread Luiz Capitulino
On Mon, 4 Jun 2012 09:10:08 -0400 Corey Bryant cor...@linux.vnet.ibm.com wrote: This patch adds QMP support for the getfd command using the QAPI framework. Like the HMP getfd command, it is used to pass a file descriptor via SCM_RIGHTS. However, the QMP getfd command also returns the

[Qemu-devel] [PATCH 09/29] target-i386: add API to get dump info

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang we...@cn.fujitsu.com Dump info contains: endian, class and architecture. The next patch will use these information to create vmcore. Note: on x86 box, the class is ELFCLASS64 if the memory is larger than 4G. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Luiz

Re: [Qemu-devel] vio-net driver

2012-06-05 Thread Brian Jackson
On Tuesday, June 05, 2012 12:17:17 AM Charles.Tsai-蔡清海-研究發展部 wrote: We recently ran an Ubuntu 11.10 VM which was installed with VirtIO NIC driver. The VirtIO net driver came from the Ubuntu's default package. The VM we installed was configured as a bridge mode. When we ran the Iperf test

[Qemu-devel] [PATCH 18/29] qemu-option: qemu_opts_validate(): use error_set()

2012-06-05 Thread Luiz Capitulino
net_client_init() propagates the error up by calling qerror_report_err(), because its users expect QError semantics. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Reviewed-By: Laszlo Ersek ler...@redhat.com --- net.c | 6 +- qemu-option.c | 13 + qemu-option.h |

[Qemu-devel] [PATCH 03/29] implement cpu_get_memory_mapping()

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang we...@cn.fujitsu.com Walk cpu's page table and collect all virtual address and physical address mapping. Then, add these mapping into memory mapping list. If the guest does not use paging, it will do nothing. Note: the I/O memory will be skipped. Signed-off-by: Wen Congyang

[Qemu-devel] [PATCH 08/29] target-i386: Add API to write cpu status to core file

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang we...@cn.fujitsu.com The core file has register's value. But it does not include all registers value. Store the cpu status into QEMU note, and the user can get more information from vmcore. If you change QEMUCPUState, please count up QEMUCPUSTATE_VERSION. Signed-off-by: Wen

[Qemu-devel] [PATCH 11/29] make gdb_id() generally avialable and rename it to cpu_index()

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang we...@cn.fujitsu.com The following patch also needs this API, so make it generally avialable. The function gdb_id() will not be used in gdbstub.c now, so its name is not suitable, and rename it to cpu_index() Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Luiz

[Qemu-devel] [PATCH 06/29] Add API to get memory mapping without do paging

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang we...@cn.fujitsu.com crash does not need the virtual address and physical address mapping, and the mapping does not include the memory that is not referenced by the page table. crash does not use the virtual address, so we can create the mapping for all physical memory(virtual

[Qemu-devel] [PATCH 26/29] net: net_client_init(): use error_set()

2012-06-05 Thread Luiz Capitulino
Callers are changed to use qerror_report_err() to keep their QError semantics. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Reviewed-By: Laszlo Ersek ler...@redhat.com --- hw/pci-hotplug.c | 8 ++-- hw/usb/dev-network.c | 7 +-- net.c| 54

[Qemu-devel] [PATCH 12/29] introduce a new monitor command 'dump-guest-memory' to dump guest's memory

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang we...@cn.fujitsu.com The command's usage: dump-guest-memory [-p] protocol [begin] [length] The supported protocol can be file or fd: 1. file: the protocol starts with file:, and the following string is the file's path. 2. fd: the protocol starts with fd:, and the

[Qemu-devel] [PATCH 25/29] net: purge the monitor object from all init functions

2012-06-05 Thread Luiz Capitulino
The only backend that really uses it is the socket one, which calls monitor_get_fd(). But it can use 'cur_mon' instead. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com Reviewed-By: Laszlo Ersek ler...@redhat.com --- hw/pci-hotplug.c | 2 +- hw/usb/dev-network.c | 2 +- net.c

[Qemu-devel] [PATCH 13/29] qemu-option: qemu_opts_create(): use error_set()

2012-06-05 Thread Luiz Capitulino
This commit converts qemu_opts_create() from qerror_report() to error_set(). Currently, most calls to qemu_opts_create() can't fail, so most callers don't need any changes. The two cases where code checks for qemu_opts_create() erros are: 1. Initialization code in vl.c. All of them print their

Re: [Qemu-devel] [PATCH] KVM: Fix compiles when KVM_CAP_IRQ_ROUTING is not defined

2012-06-05 Thread Ben Collins
Please just adopt the remaining portion. Perhaps just merge it with your patch for one complete fix. Thanks On Jun 5, 2012, at 2:15 PM, Jan Kiszka wrote: On 2012-06-05 20:08, Ben Collins wrote: Things like kroute and direct_msi were not protected by ifdef's for when this feature is not

[Qemu-devel] [PATCH v2] kvm: Fix build for non-CAP_IRQ_ROUTING targets

2012-06-05 Thread Jan Kiszka
A type definition and a KVMState field initialization escaped the required wrapping with KVM_CAP_IRQ_ROUTING. Also, we need to provide a dummy kvm_irqchip_release_virq as virtio-pci references (but does not use) it. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Changes in v2: - include

[Qemu-devel] [PATCH 10/29] target-i386: Add API to get note's size

2012-06-05 Thread Luiz Capitulino
From: Wen Congyang we...@cn.fujitsu.com We should know where the note and memory is stored before writing them to vmcore. If we know this, we can avoid using lseek() when creating vmcore. Signed-off-by: Wen Congyang we...@cn.fujitsu.com Signed-off-by: Luiz Capitulino lcapitul...@redhat.com ---

Re: [Qemu-devel] Sporadic AHCI boot failures

2012-06-05 Thread Jan Kiszka
On 2012-05-03 14:17, Jan Kiszka wrote: On 2012-05-02 18:26, Alexander Graf wrote: On 02.05.2012, at 20:14, Jan Kiszka jan.kis...@siemens.com wrote: Hi, I'm running a Win7 VM over AHCI, rebooting quite frequently. Depending on host system load, I'm facing a lot of sporadic boot failures

Re: [Qemu-devel] [PATCH v2] kvm: Fix build for non-CAP_IRQ_ROUTING targets

2012-06-05 Thread Ben Collins
Ack: Ben Collins bcoll...@ubuntu.com Confirmed that this patch does indeed fix everything for me. On Jun 5, 2012, at 3:03 PM, Jan Kiszka wrote: A type definition and a KVMState field initialization escaped the required wrapping with KVM_CAP_IRQ_ROUTING. Also, we need to provide a dummy

Re: [Qemu-devel] [PATCH 01/17] qidl: add QEMU IDL processor

2012-06-05 Thread Paolo Bonzini
Il 05/06/2012 18:21, Michael Roth ha scritto: The only way I can think of getting around this is to do nasty things like adding an #include qapi-generated/mc146818rtc-qapi-visit.c; in hw/mc146818rtc.c. It doesn't look that ugly, though perhaps I'm biased because that's again exactly what

Re: [Qemu-devel] [PATCH 02/16] qapi: introduce size type

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: Signed-off-by: Laszlo Ersek ler...@redhat.com --- qapi/qapi-visit-core.h |4 qapi/qapi-visit-core.c |7 +++ scripts/qapi.py|2 +- 3 files changed, 12 insertions(+), 1 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 03/16] expose QemuOpt and QemuOpts struct definitions to interested parties

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: The only clients should be the existent qemu-option.c, and the upcoming qapi/opts-visitor.c. Signed-off-by: Laszlo Ersek ler...@redhat.com --- qemu-option-internal.h | 53 qemu-option.c

Re: [Qemu-devel] [PATCH 05/16] qapi schema: remove trailing whitespace

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: Signed-off-by: Laszlo Ersek ler...@redhat.com --- qapi-schema.json | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index bb1f806..a8b3803 100644 --- a/qapi-schema.json +++

Re: [Qemu-devel] [PATCH 07/16] hw, net: net_client_type - NetClientOptionsKind (qapi-generated)

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: NET_CLIENT_TYPE_ - NET_CLIENT_OPTIONS_KIND_ Signed-off-by: Laszlo Ersek ler...@redhat.com --- net.h | 16 +- hw/cadence_gem.c|2 +- hw/dp8393x.c|2 +- hw/e1000.c |2

Re: [Qemu-devel] [PATCH 08/16] convert net_client_init() to OptsVisitor

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: (1) since both Netdev::id and NetLegacy::name are mandatory now, getting the name for the init functions is cleaner; But they shouldn't be mandatory, should they? (-net nic -net user should work, and also -net nic,netdev=foo -netdev user,id=foo).

Re: [Qemu-devel] [PATCH 09/16] convert net_init_nic() to NetClientOptions

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: Signed-off-by: Laszlo Ersek ler...@redhat.com --- net.c | 39 ++- 1 files changed, 22 insertions(+), 17 deletions(-) diff --git a/net.c b/net.c index 5ac5cf0..bd2fd23 100644 --- a/net.c +++ b/net.c @@

Re: [Qemu-devel] [PATCH 10/16] convert net_init_dump() to NetClientOptions

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: Signed-off-by: Laszlo Ersek ler...@redhat.com --- net/dump.c | 21 + 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/net/dump.c b/net/dump.c index 27e9528..a1de09e 100644 --- a/net/dump.c +++ b/net/dump.c

Re: [Qemu-devel] [PATCH 11/16] convert net_init_slirp() to NetClientOptions

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: Signed-off-by: Laszlo Ersek ler...@redhat.com --- net/slirp.c | 93 --- 1 files changed, 25 insertions(+), 68 deletions(-) diff --git a/net/slirp.c b/net/slirp.c index

Re: [Qemu-devel] [PATCH 12/16] convert net_init_socket() to NetClientOptions

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: +if (sock-has_fd + sock-has_listen + sock-has_connect + sock-has_mcast + +sock-has_udp != 1) { Please add a cast, this doesn't work with C99 bool. Paolo +error_report(exactly one of fd=, listen=, connect=, mcast= or udp= +

Re: [Qemu-devel] [PATCH 13/16] convert net_init_vde() to NetClientOptions

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: Signed-off-by: Laszlo Ersek ler...@redhat.com --- net/vde.c | 37 + 1 files changed, 29 insertions(+), 8 deletions(-) diff --git a/net/vde.c b/net/vde.c index 8e60f68..35e8113 100644 --- a/net/vde.c +++

Re: [Qemu-devel] [PATCH 15/16] convert net_init_bridge() to NetClientOptions

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: Signed-off-by: Laszlo Ersek ler...@redhat.com --- net/tap.c | 23 --- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/net/tap.c b/net/tap.c index 7501eba..fdaab2b 100644 --- a/net/tap.c +++ b/net/tap.c

Re: [Qemu-devel] [PATCH 16/16] remove unused QemuOpts parameter from net init functions

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: Signed-off-by: Laszlo Ersek ler...@redhat.com --- net/dump.h |5 ++--- net/slirp.h |5 ++--- net/socket.h|5 ++--- net/tap.h |9 - net/vde.h |5 ++--- net.c | 14 ++

Re: [Qemu-devel] [PATCH 08/16] convert net_client_init() to OptsVisitor

2012-06-05 Thread Paolo Bonzini
Il 05/06/2012 22:46, Paolo Bonzini ha scritto: (1) since both Netdev::id and NetLegacy::name are mandatory now, getting the name for the init functions is cleaner; But they shouldn't be mandatory, should they? (-net nic -net user should work, and also -net nic,netdev=foo -netdev

Re: [Qemu-devel] [PATCH 06/16] qapi schema: add Netdev types

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: NetdevTapOptions::sndbuf and NetdevDumpOptions::len use the new size type. Signed-off-by: Laszlo Ersek ler...@redhat.com --- qapi-schema.json | 275 ++ 1 files changed, 275 insertions(+),

Re: [Qemu-devel] [PATCH 01/17] qidl: add QEMU IDL processor

2012-06-05 Thread Michael Roth
On Tue, Jun 05, 2012 at 01:06:10PM +0300, Avi Kivity wrote: On 06/05/2012 04:00 AM, Michael Roth wrote: This is an import of Anthony's qidl compiler, with some changes squashed in to add support for doing the visitor generation via QEMU's qapi code generators rather than directly.

Re: [Qemu-devel] [PATCH 04/16] qapi: introduce OptsVisitor

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: This visitor supports parsing -option [type=]discriminator[,optarg1=val1][,optarg2=val2][,...] style QemuOpts objects into native C structures. After defining the type tree in the qapi schema (see below), a root type traversal with this

Re: [Qemu-devel] [PATCH 00/16] introduce OptsVisitor, rebase -net/-netdev parsing

2012-06-05 Thread Paolo Bonzini
Il 22/05/2012 12:45, Laszlo Ersek ha scritto: Inspired by [1], the first half of this series attempts to implement a new visitor that should clean up defining and processing command line options. For a more detailed description, please see [PATCH 04/16] qapi: introduce OptsVisitor. The

Re: [Qemu-devel] [PATCH 12/16] convert net_init_socket() to NetClientOptions

2012-06-05 Thread Eric Blake
On 06/05/2012 03:02 PM, Paolo Bonzini wrote: Il 22/05/2012 12:45, Laszlo Ersek ha scritto: +if (sock-has_fd + sock-has_listen + sock-has_connect + sock-has_mcast + +sock-has_udp != 1) { Please add a cast, this doesn't work with C99 bool. Huh? Where does C99 state that?

Re: [Qemu-devel] [PATCH 12/16] convert net_init_socket() to NetClientOptions

2012-06-05 Thread Paolo Bonzini
Il 05/06/2012 23:14, Eric Blake ha scritto: On 06/05/2012 03:02 PM, Paolo Bonzini wrote: Il 22/05/2012 12:45, Laszlo Ersek ha scritto: +if (sock-has_fd + sock-has_listen + sock-has_connect + sock-has_mcast + +sock-has_udp != 1) { Please add a cast, this doesn't work with C99

Re: [Qemu-devel] [PATCH 0/2] scsi: Clean up BlockDriverState use

2012-06-05 Thread Paolo Bonzini
Il 05/06/2012 16:49, Markus Armbruster ha scritto: With this and the related fix for xen applied, block_int.h is finally gone from hw/. Markus Armbruster (2): block: New bdrv_get_flags() scsi-disk: Don't peek behind the BlockDriverState abstraction block.c|5 +

Re: [Qemu-devel] [RFC PATCH 0/5] asynchronous migration state change handlers

2012-06-05 Thread Anthony Liguori
On 06/05/2012 09:38 PM, Eric Blake wrote: On 06/05/2012 07:15 AM, Gerd Hoffmann wrote: Hi, Absolutely not. This is hideously ugly and affects a bunch of code. Spice is *not* getting a hook in migration where it gets to add arbitrary amounts of downtime to the migration traffic. That's a

Re: [Qemu-devel] [PATCH 02/17] qidl: add qc definitions

2012-06-05 Thread Michael Roth
On Tue, Jun 05, 2012 at 04:08:55PM +0200, Paolo Bonzini wrote: Il 05/06/2012 03:00, Michael Roth ha scritto: Signed-off-by: Michael Roth mdr...@linux.vnet.ibm.com --- qapi/qc.h | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) create mode 100644 qapi/qc.h diff

Re: [Qemu-devel] [PATCH v2] vnc: disable VNC password authentication (security type 2) when in FIPS mode

2012-06-05 Thread Paul Moore
On Tuesday, June 05, 2012 03:08:26 AM Alexander Graf wrote: Which gets me to a new idea. Why not exit(1) when we detect FIPS and a password is set? I agree with the assessment that we should never silently drop features. So the best way to make sure that the user knows he did something stupid

Re: [Qemu-devel] [PATCH v2] vnc: disable VNC password authentication (security type 2) when in FIPS mode

2012-06-05 Thread Alexander Graf
On 05.06.2012, at 23:45, Paul Moore wrote: On Tuesday, June 05, 2012 03:08:26 AM Alexander Graf wrote: Which gets me to a new idea. Why not exit(1) when we detect FIPS and a password is set? I agree with the assessment that we should never silently drop features. So the best way to make sure

[Qemu-devel] [PATCH v3 1/7] block: flush in writethrough mode after writes

2012-06-05 Thread Paolo Bonzini
We want to make the formats handle their own flushes autonomously, while keeping for guests the ability to use a writethrough cache. Since formats will write metadata via bs-file, bdrv_co_do_writev is the only place where we need to add a flush. Signed-off-by: Paolo Bonzini pbonz...@redhat.com

[Qemu-devel] [PATCH v3 2/7] savevm: flush after saving vm state

2012-06-05 Thread Paolo Bonzini
Writing vm state uses bdrv_pwrite, so it will automatically get flushes in writethrough mode. But doing a flush at the end in writeback mode is probably a good idea anyway. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- savevm.c |2 +- 1 file

Re: [Qemu-devel] [PATCH v2] vnc: disable VNC password authentication (security type 2) when in FIPS mode

2012-06-05 Thread Paul Moore
On Tuesday, June 05, 2012 11:51:40 PM Alexander Graf wrote: On 05.06.2012, at 23:45, Paul Moore wrote: On Tuesday, June 05, 2012 03:08:26 AM Alexander Graf wrote: Which gets me to a new idea. Why not exit(1) when we detect FIPS and a password is set? I agree with the assessment that we

Re: [Qemu-devel] [PATCH 09/17] rtc: add qc annotations

2012-06-05 Thread Michael Roth
On Tue, Jun 05, 2012 at 03:42:30PM +0300, Avi Kivity wrote: On 06/05/2012 01:40 PM, Jan Kiszka wrote: On 2012-06-05 12:25, Avi Kivity wrote: On 06/05/2012 04:00 AM, Michael Roth wrote: Add our annotations according to QIDL documentation. +qc_declaration typedef struct RTCState { +

Re: [Qemu-devel] [PATCH 19/25] PPC: e500: dt: create pci node dynamically

2012-06-05 Thread Alexander Graf
On 01.06.2012, at 00:12, Scott Wood wrote: On 05/30/2012 06:00 AM, Alexander Graf wrote: Signed-off-by: Alexander Graf ag...@suse.de --- hw/ppce500_mpc8544ds.c | 50 pc-bios/mpc8544ds.dtb | Bin 1810 - 72 bytes pc-bios/mpc8544ds.dts |

[Qemu-devel] [PATCH v3 7/7] qcow2: always operate caches in writeback mode

2012-06-05 Thread Paolo Bonzini
Writethrough does not need special-casing anymore in the qcow2 caches. The block layer adds flushes after every guest-initiated data write, and these will also flush the qcow2 caches to the OS. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- block/qcow2-cache.c| 25

[Qemu-devel] [PATCH v3 3/7] block: copy enable_write_cache in bdrv_append

2012-06-05 Thread Paolo Bonzini
Because the guest will be able to flip enable_write_cache, the actual state may not match what is used to open the new snapshot. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c |2 ++ 1 file changed, 2 insertions(+) diff --git

[Qemu-devel] [PATCH v3 4/7] block: add bdrv_set_enable_write_cache

2012-06-05 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- block.c |5 + block.h |1 + 2 files changed, 6 insertions(+) diff --git a/block.c b/block.c index 9bff401..e4396a6 100644 --- a/block.c +++ b/block.c @@ -2380,6 +2380,11 @@ int

[Qemu-devel] [PATCH v3 0/7] Manual writethrough cache and cache mode toggle

2012-06-05 Thread Paolo Bonzini
This is v3 of the alternative implementation of writethrough caching for QEMU 1.2. By always opening drivers in writethrough mode and doing flushes manually after every write, it achieves three objectives: 1) it makes flipping the cache mode extremely easy; 2) it lets formats control flushes

[Qemu-devel] [PATCH v3 5/7] block: always open drivers in writeback mode

2012-06-05 Thread Paolo Bonzini
Formats are entirely in charge of flushes for metadata writes. For guest-initiated writes, a writethrough cache is faked in the block layer. So we can always open in writeback mode. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- block.c |3 ++- 1 file changed, 2 insertions(+), 1

[Qemu-devel] [PATCH v3 6/7] ide: support enable/disable write cache

2012-06-05 Thread Paolo Bonzini
Enabling or disabling the write cache is done with the SET FEATURES command. The command can be issued with sg_sat_set_features from sg3-utils. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/ide/core.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff

Re: [Qemu-devel] [RFC PATCH 1/2] ivring: Add a ring-buffer driver on IVShmem

2012-06-05 Thread Anthony Liguori
On 06/05/2012 09:10 PM, Borislav Petkov wrote: On Tue, Jun 05, 2012 at 10:01:17PM +0900, Yoshihiro YUNOMAE wrote: This patch adds a ring-buffer driver for IVShmem device, a virtual RAM device in QEMU. This driver can be used as a ring-buffer for kernel logging or tracing of a guest OS by

Re: [Qemu-devel] [PATCH v2] vnc: disable VNC password authentication (security type 2) when in FIPS mode

2012-06-05 Thread Anthony Liguori
On 06/06/2012 06:06 AM, Paul Moore wrote: On Tuesday, June 05, 2012 11:51:40 PM Alexander Graf wrote: On 05.06.2012, at 23:45, Paul Moore wrote: On Tuesday, June 05, 2012 03:08:26 AM Alexander Graf wrote: Which gets me to a new idea. Why not exit(1) when we detect FIPS and a password is set?

Re: [Qemu-devel] [RFC PATCH 1/2] ivring: Add a ring-buffer driver on IVShmem

2012-06-05 Thread Greg Kroah-Hartman
On Wed, Jun 06, 2012 at 07:03:06AM +0800, Anthony Liguori wrote: On 06/05/2012 09:10 PM, Borislav Petkov wrote: On Tue, Jun 05, 2012 at 10:01:17PM +0900, Yoshihiro YUNOMAE wrote: This patch adds a ring-buffer driver for IVShmem device, a virtual RAM device in QEMU. This driver can be used as

Re: [Qemu-devel] [PATCH 02/17] qidl: add qc definitions

2012-06-05 Thread Anthony Liguori
On 06/06/2012 05:44 AM, Michael Roth wrote: On Tue, Jun 05, 2012 at 04:08:55PM +0200, Paolo Bonzini wrote: Il 05/06/2012 03:00, Michael Roth ha scritto: Signed-off-by: Michael Rothmdr...@linux.vnet.ibm.com --- qapi/qc.h | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-)

Re: [Qemu-devel] [PATCH 16/17] qidl: add qidl-generated vmstate fields for rtc

2012-06-05 Thread Anthony Liguori
On 06/05/2012 06:26 PM, Avi Kivity wrote: On 06/05/2012 04:00 AM, Michael Roth wrote: Initial check-in of the qidl-generated vmstate fields for rtc. Don't, please. As Mike said in another note, we want to keep the device schema in the tree so we can determine when it changes in 'make

Re: [Qemu-devel] [PATCH 01/17] qidl: add QEMU IDL processor

2012-06-05 Thread Anthony Liguori
On 06/05/2012 08:19 PM, Gerd Hoffmann wrote: Hi, snip Suggestion: add a _guest marker for ordinary state. Fail the build on unmarked fields. This ensures that some thought is given to each field, instead of having a default that may be correct most of the time, but not always.

Re: [Qemu-devel] [PATCH 01/17] qidl: add QEMU IDL processor

2012-06-05 Thread Anthony Liguori
On 06/06/2012 03:56 AM, Paolo Bonzini wrote: Il 05/06/2012 18:21, Michael Roth ha scritto: The only way I can think of getting around this is to do nasty things like adding an #include qapi-generated/mc146818rtc-qapi-visit.c; in hw/mc146818rtc.c. It doesn't look that ugly, though perhaps

Re: [Qemu-devel] [PATCH] Fix build of kvm-all.c when no KVM_CAP_IRQ_ROUTING

2012-06-05 Thread Andreas Färber
Am 05.06.2012 09:16, schrieb Jens Freimann: In kvm-all.c an #ifdef KVM_CAP_IRQ_ROUTING was missing in two places which broke the build when this capability is not enabled. Found when building the s390-softmmu target. Signed-off-by: Jens Freimann jf...@linux.vnet.ibm.com A patch by Jan moves

Re: [Qemu-devel] [PATCH 01/17] qidl: add QEMU IDL processor

2012-06-05 Thread Anthony Liguori
On 06/05/2012 06:06 PM, Avi Kivity wrote: On 06/05/2012 04:00 AM, Michael Roth wrote: In addition, QC can decide at run time whether to +suppress a field by assigning it a **default** value. + +## Immutable Fields + +If a field is only set during device construction, based on parameters passed

[Qemu-devel] [PATCH 29/31] PPC: e500: Extend address/size of / to 64bit

2012-06-05 Thread Alexander Graf
We want to be able to support = 4GB of RAM. To do so, we need to be able to tell the guest OS how much RAM it has. However, that information today is capped to 32bit. So let's extend the offset and size fields to 64bit, so we can fit in big addresses and even one day - if we wish to do so - map

[Qemu-devel] [PATCH 02/31] dt: add helpers for 2, 3 and 4 cell adds

2012-06-05 Thread Alexander Graf
We have device tree helpers that allow us to create single cell (u32) wide properties. However, when creating properties that contain an array of cells, we need to jump through hoops, manually passing in an array with converted endianness. To ease the pain of this a bit, create helpers for the

[Qemu-devel] [PATCH 18/31] PPC: e500: dt: create global-utils node dynamically

2012-06-05 Thread Alexander Graf
Signed-off-by: Alexander Graf ag...@suse.de --- hw/ppce500_mpc8544ds.c |9 + pc-bios/mpc8544ds.dts |6 -- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 3d073dd..3f6c6e3 100644 --- a/hw/ppce500_mpc8544ds.c

[Qemu-devel] [PATCH 0/2] Two small fixes to the streaming test case.

2012-06-05 Thread Paolo Bonzini
Hi Kevin, please take a look at the attached simple patches. Paolo Paolo Bonzini (2): qemu-iotests: fill streaming test image with data qemu-iotests: start vms in qtest mode tests/qemu-iotests/030| 15 +-- tests/qemu-iotests/iotests.py |4 +++- 2 files changed, 16

[Qemu-devel] [PATCH 08/31] dt: add helper for 64bit cell adds

2012-06-05 Thread Alexander Graf
Some times in the device tree, we find an array of 2 u32 cells that really are a single u64 value. This patch adds a helper to make the creation of these easy. Signed-off-by: Alexander Graf ag...@suse.de --- v1 - v2: - rename cell64 - u64 --- device_tree.c |7 +++ device_tree.h |

[Qemu-devel] [PATCH 26/31] PPC: e500: Use new MPIC dt format

2012-06-05 Thread Alexander Graf
Due to popular demand, we're updating the way we generate the MPIC node and interrupt lines based on what the current state of art is. Requested-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- hw/ppce500_mpc8544ds.c | 33 ++---

Re: [Qemu-devel] [PATCH] seabios: correct setting of datalow_base for large rom images

2012-06-05 Thread Kevin O'Connor
On Tue, Jun 05, 2012 at 12:09:18PM -0400, Jason Baron wrote: I've been creating 256kb rom images with larger acpi tables for second level buses. After a recent re-base, my rom images no longer built. Bisected to: commit 46b82624c95b951e8825fab117d9352faeae0ec8 Author: Kevin O'Connor

[Qemu-devel] [PATCH 07/31] dt: add helper for phandle allocation

2012-06-05 Thread Alexander Graf
Phandle references work by having 2 pieces: - a phandle 1-cell property in the device tree node - a reference to the same value in a property we want to point to the other node To generate the 1-cell property, we need an allocation mechanism that gives us a unique number space. This

Re: [Qemu-devel] [PATCH v2] kvm: Fix build for non-CAP_IRQ_ROUTING targets

2012-06-05 Thread Andreas Färber
Am 05.06.2012 21:03, schrieb Jan Kiszka: A type definition and a KVMState field initialization escaped the required wrapping with KVM_CAP_IRQ_ROUTING. Also, we need to provide a dummy kvm_irqchip_release_virq as virtio-pci references (but does not use) it. Signed-off-by: Jan Kiszka

[Qemu-devel] [PATCH 27/31] PPC: e500: Use new SOC dt format

2012-06-05 Thread Alexander Graf
Due to popular demand, let's clean up the soc node a bit and use more recent dt notions. Requested-by: Scott Wood scottw...@freescale.com Signed-off-by: Alexander Graf ag...@suse.de --- hw/ppce500_mpc8544ds.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PATCH 09/31] PPC: e500: require libfdt

2012-06-05 Thread Alexander Graf
Now that we're moving all of the device tree generation from an external pre-execution generated blob to runtime generation using libfdt, we absolutely must have libfdt around. This requirement was there before already, as the only way to not require libfdt with e500 was to not use -kernel, which

[Qemu-devel] [PATCH 23/31] PPC: e500: dt: use target_phys_addr_t for ramsize

2012-06-05 Thread Alexander Graf
We're passing the ram size as uint32_t, capping it to 32 bits atm. Change to target_phys_addr_t (uint64_t) to make sure we have all the bits. Signed-off-by: Alexander Graf ag...@suse.de --- hw/ppce500_mpc8544ds.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[Qemu-devel] [PATCH 30/31] dt: Add global option to set phandle start offset

2012-06-05 Thread Alexander Graf
If anyone outside of QEMU wants to mess with a QEMU generated device tree, he needs to know which range phandles are valid in. So let's expose a machine option that an external program can use to set the start allocate id for phandles in QEMU. Signed-off-by: Alexander Graf ag...@suse.de ---

[Qemu-devel] [PATCH 22/31] PPC: e500: dt: use 64bit cell helper

2012-06-05 Thread Alexander Graf
We have a nice 64bit helper to ease the device tree generation and make the code more readable when creating 64bit 2-cell parameters. Use it when generating the device tree. Signed-off-by: Alexander Graf ag...@suse.de --- v1 - v2: - rename cell64 - u64 - don't treat memory as single u64

[Qemu-devel] [PATCH 25/31] Revert dt: temporarily disable subtree creation failure check

2012-06-05 Thread Alexander Graf
This reverts commit dt: temporarily disable subtree creation failure check which was meant as a temporary solution to keep external and dynamic device tree construction intact. Now that we switched to fully dynamic dt construction, it's no longer necessary. Signed-off-by: Alexander Graf

[Qemu-devel] [PATCH 16/31] PPC: e500: dt: create serial nodes dynamically

2012-06-05 Thread Alexander Graf
Signed-off-by: Alexander Graf ag...@suse.de --- hw/ppce500_mpc8544ds.c | 35 +++ pc-bios/mpc8544ds.dts | 26 -- 2 files changed, 35 insertions(+), 26 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index

[Qemu-devel] [PATCH 15/31] PPC: e500: dt: create /soc8544 node dynamically

2012-06-05 Thread Alexander Graf
Signed-off-by: Alexander Graf ag...@suse.de --- hw/ppce500_mpc8544ds.c | 17 + pc-bios/mpc8544ds.dts |9 - 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 63515bb..5ff2d24 100644 ---

[Qemu-devel] [PATCH 20/31] PPC: e500: dt: start with empty device tree

2012-06-05 Thread Alexander Graf
Now that all of the device tree bits are generated during runtime, we can get rid of the device tree blob and instead start from scratch with an empty device tree. Signed-off-by: Alexander Graf ag...@suse.de --- Makefile |1 - hw/ppce500_mpc8544ds.c |8 +---

[Qemu-devel] [PATCH 11/31] PPC: e500: dt: create /cpus node dynamically

2012-06-05 Thread Alexander Graf
Signed-off-by: Alexander Graf ag...@suse.de --- hw/ppce500_mpc8544ds.c |5 + pc-bios/mpc8544ds.dtb | Bin 1972 - 1924 bytes pc-bios/mpc8544ds.dts |5 - 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index

[Qemu-devel] [PATCH 14/31] PPC: e500: dt: create /chosen node dynamically

2012-06-05 Thread Alexander Graf
Signed-off-by: Alexander Graf ag...@suse.de --- hw/ppce500_mpc8544ds.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c index 39b221d..63515bb 100644 --- a/hw/ppce500_mpc8544ds.c +++ b/hw/ppce500_mpc8544ds.c @@ -101,6 +101,7

[Qemu-devel] [PATCH 00/31] PPC: mpc8544ds: Create device tree dynamically

2012-06-05 Thread Alexander Graf
Today we have two separate places where we keep information which device is where: - hw/ppce500_mpc8544ds.c to instantiate all devices - pc-bios/mpc8544ds.dtb as device tree to tell the guest about devices Every time we split crucial information, things can go terribly wrong. If you update

<    1   2   3   >