[Qemu-devel] Re: KVM call agenda for Feb 23

2010-02-24 Thread Avi Kivity
On 02/24/2010 06:02 PM, Anthony Liguori wrote: Hi Chris, On 02/22/2010 04:52 PM, Chris Wright wrote: Please send in any agenda items you are interested in covering. I thought it might be easier to use the wiki for collecting agenda items instead of polling the list. It also us do a little b

Re: [Qemu-devel] Incorrect screenshot when text mode under Linux.

2010-02-24 Thread Gleb Natapov
On Wed, Feb 24, 2010 at 09:16:02PM +, Natalia Portillo wrote: > When the guest is in text mode only the first line is shown. > > Tested under KDE4 + NVidia binary drivers + Linux 2.6.31-gentoo-r1 > (x86-64) using QEMU 0.12.2. > Is this with kvm or TCG? If this is with kvm can you run "info cp

[Qemu-devel] Re: [PATCH v3 07/10] qemu-kvm: Cleanup/fix TSC and PV clock writeback

2010-02-24 Thread Marcelo Tosatti
On Thu, Feb 25, 2010 at 12:58:26AM +0100, Jan Kiszka wrote: > Marcelo Tosatti wrote: > > On Thu, Feb 25, 2010 at 12:45:55AM +0100, Jan Kiszka wrote: > >> Marcelo Tosatti wrote: > >>> On Wed, Feb 24, 2010 at 03:17:55PM +0100, Jan Kiszka wrote: > Drop kvm_load_tsc in favor of level-dependent wri

[Qemu-devel] Re: [PATCH v3 04/10] qemu-kvm: Clean up mpstate synchronization

2010-02-24 Thread Jan Kiszka
Marcelo Tosatti wrote: > On Wed, Feb 24, 2010 at 03:17:52PM +0100, Jan Kiszka wrote: >> Push mpstate reading/writing into kvm_arch_load/save_regs and, on x86, >> properly synchronize with halted in the accessor functions. >> >> Signed-off-by: Jan Kiszka > >> @@ -1290,6 +1318,7 @@ int kvm_arch_ini

[Qemu-devel] Re: [PATCH v3 07/10] qemu-kvm: Cleanup/fix TSC and PV clock writeback

2010-02-24 Thread Jan Kiszka
Marcelo Tosatti wrote: > On Thu, Feb 25, 2010 at 12:45:55AM +0100, Jan Kiszka wrote: >> Marcelo Tosatti wrote: >>> On Wed, Feb 24, 2010 at 03:17:55PM +0100, Jan Kiszka wrote: Drop kvm_load_tsc in favor of level-dependent writeback in kvm_arch_load_regs. KVM's PV clock MSRs fall in the sam

Re: [Qemu-devel] [PATCH] pc: madvise(MADV_DONTNEED) memory on reset

2010-02-24 Thread Samuel Thibault
Hello, I just want to note the fact that although Linux got it badly wrong, according to POSIX, MADV_DONTNEED is _not_ supposed to drop the content of the memory, but just to tune the write-back heuristics and such. (see glibc's ./sysdeps/unix/sysv/linux/posix_madvise.c if you're not convinced) q

[Qemu-devel] Re: [PATCH v3 00/10] qemu-kvm: Hook cleanups and yet more use of upstream code

2010-02-24 Thread Jan Kiszka
Marcelo Tosatti wrote: > On Wed, Feb 24, 2010 at 03:17:48PM +0100, Jan Kiszka wrote: >> Let's proceed with cleaning up the VCPU state writeback. The differences >> to v2 are: >> - included guest debugging update patch and rebased on top of it >> - renamed KVM_PUT_ASYNC_STATE->KVM_PUT_RUNTIME_STAT

[Qemu-devel] Re: [PATCH v3 05/10] KVM: x86: Restrict writeback of VCPU state

2010-02-24 Thread Jan Kiszka
Marcelo Tosatti wrote: > On Wed, Feb 24, 2010 at 03:17:53PM +0100, Jan Kiszka wrote: >> Do not write nmi_pending, sipi_vector, and mpstate unless we at least go >> through a reset. And TSC as well as KVM wallclocks should only be >> written on full sync, otherwise we risk to drop some time on durin

[Qemu-devel] Re: [PATCH v3 07/10] qemu-kvm: Cleanup/fix TSC and PV clock writeback

2010-02-24 Thread Marcelo Tosatti
On Thu, Feb 25, 2010 at 12:45:55AM +0100, Jan Kiszka wrote: > Marcelo Tosatti wrote: > > On Wed, Feb 24, 2010 at 03:17:55PM +0100, Jan Kiszka wrote: > >> Drop kvm_load_tsc in favor of level-dependent writeback in > >> kvm_arch_load_regs. KVM's PV clock MSRs fall in the same category and > >> should

[Qemu-devel] Re: [PATCH v3 07/10] qemu-kvm: Cleanup/fix TSC and PV clock writeback

2010-02-24 Thread Jan Kiszka
Marcelo Tosatti wrote: > On Wed, Feb 24, 2010 at 03:17:55PM +0100, Jan Kiszka wrote: >> Drop kvm_load_tsc in favor of level-dependent writeback in >> kvm_arch_load_regs. KVM's PV clock MSRs fall in the same category and >> should therefore only be written back on full sync. >> >> Signed-off-by: Jan

[Qemu-devel] Re: [PATCH v3 07/10] qemu-kvm: Cleanup/fix TSC and PV clock writeback

2010-02-24 Thread Marcelo Tosatti
On Wed, Feb 24, 2010 at 03:17:55PM +0100, Jan Kiszka wrote: > Drop kvm_load_tsc in favor of level-dependent writeback in > kvm_arch_load_regs. KVM's PV clock MSRs fall in the same category and > should therefore only be written back on full sync. > > Signed-off-by: Jan Kiszka > --- > qemu-kvm-x8

[Qemu-devel] Re: [PATCH v3 05/10] KVM: x86: Restrict writeback of VCPU state

2010-02-24 Thread Marcelo Tosatti
On Wed, Feb 24, 2010 at 03:17:53PM +0100, Jan Kiszka wrote: > Do not write nmi_pending, sipi_vector, and mpstate unless we at least go > through a reset. And TSC as well as KVM wallclocks should only be > written on full sync, otherwise we risk to drop some time on during > state read-modify-write.

[Qemu-devel] Re: [PATCH v3 04/10] qemu-kvm: Clean up mpstate synchronization

2010-02-24 Thread Marcelo Tosatti
On Wed, Feb 24, 2010 at 03:17:52PM +0100, Jan Kiszka wrote: > Push mpstate reading/writing into kvm_arch_load/save_regs and, on x86, > properly synchronize with halted in the accessor functions. > > Signed-off-by: Jan Kiszka > @@ -1290,6 +1318,7 @@ int kvm_arch_init_vcpu(CPUState *cenv) > #ifde

[Qemu-devel] Re: [PATCH v3 00/10] qemu-kvm: Hook cleanups and yet more use of upstream code

2010-02-24 Thread Marcelo Tosatti
On Wed, Feb 24, 2010 at 03:17:48PM +0100, Jan Kiszka wrote: > Let's proceed with cleaning up the VCPU state writeback. The differences > to v2 are: > - included guest debugging update patch and rebased on top of it > - renamed KVM_PUT_ASYNC_STATE->KVM_PUT_RUNTIME_STATE and added comments > - fix

Re: [Qemu-devel] [PATCH] pc: madvise(MADV_DONTNEED) memory on reset

2010-02-24 Thread Anthony Liguori
On 02/24/2010 02:59 PM, Blue Swirl wrote: On 2/24/10, Anthony Liguori wrote: If you compare the RSS of a freshly booted guest and the same guest after a reboot, it's very likely the freshly booted guest will have an RSS that is much lower the the rebooted guest because the previous run

[Qemu-devel] Re: Severe data corruption in QEMU under Mac OS X

2010-02-24 Thread Natalia Portillo
What I've found is that the PPMs are still opened while QEMU is not, however the PPM corruption only happens on network shares, while the QCOW2 happens also in local disks. zeus:feo claunia$ ps aux | grep -i qemu claunia 80680 0,7 0,0 2435032472 s002 R+9:16PM 0:00.00 grep -i

[Qemu-devel] [patch uq/master 1/2] Allocate memory below 4GB as one chunk

2010-02-24 Thread Marcelo Tosatti
From: Avi Kivity Instead of allocating a separate chunk for the first 640KB and another for 1MB+, allocate one large chunk. This plays well in terms of alignment and size with large pages. Signed-off-by: Avi Kivity (cherry picked from commit cfe0cef63988a7876a9bbcb098500a3983e63814) Index: qe

[Qemu-devel] [patch uq/master 2/2] Add option to use file backed guest memory

2010-02-24 Thread Marcelo Tosatti
Port qemu-kvm's -mem-path and -mem-prealloc options. These are useful for backing guest memory with huge pages via hugetlbfs. Signed-off-by: Marcelo Tosatti CC: john cooper Index: qemu-kvm/cpu-all.h === --- qemu-kvm.orig/cpu-all.h

[Qemu-devel] [patch uq/master 0/2] port qemu-kvm's -mem-path and -mem-prealloc to qemu

2010-02-24 Thread Marcelo Tosatti
-mem-path option allows file backed guest memory.

[Qemu-devel] Incorrect screenshot when text mode under Linux.

2010-02-24 Thread Natalia Portillo
When the guest is in text mode only the first line is shown. Tested under KDE4 + NVidia binary drivers + Linux 2.6.31-gentoo-r1 (x86-64) using QEMU 0.12.2. Attached example: <> It should be like (took in Mac OS X 10.6.2 using QEMU 0.12.2): <>

Re: [Qemu-devel] [PATCH] pc: madvise(MADV_DONTNEED) memory on reset

2010-02-24 Thread Blue Swirl
On 2/24/10, Anthony Liguori wrote: > If you compare the RSS of a freshly booted guest and the same guest after a > reboot, it's very likely the freshly booted guest will have an RSS that is > much lower the the rebooted guest because the previous run of the guest > faulted > in all available m

[Qemu-devel] [PATCH] pc: madvise(MADV_DONTNEED) memory on reset

2010-02-24 Thread Anthony Liguori
If you compare the RSS of a freshly booted guest and the same guest after a reboot, it's very likely the freshly booted guest will have an RSS that is much lower the the rebooted guest because the previous run of the guest faulted in all available memory. This patch addresses this issue by using m

[Qemu-devel] [PATCH RFC 04/48] savevm: Fix -loadvm to report errors to stderr, not the monitor

2010-02-24 Thread Markus Armbruster
A monitor may not even exist. Change load_vmstate() to use qemu_error() instead of monitor_printf(). Parameter mon is now unused, remove it. Signed-off-by: Markus Armbruster --- monitor.c |2 +- savevm.c | 24 +++- sysemu.h |2 +- vl.c |2 +- 4 files cha

[Qemu-devel] [PATCH RFC 39/48] error: New QERR_DEVICE_INIT_FAILED

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 38db6b2..8a38e5d 100644 --- a/qerror.c +++ b/qerror.c @@ -61,6 +61,10 @@ static const QErrorStringTable qerror_table[] = {

Re: [Qemu-devel] [RFC] Don't send local debug output to stdout

2010-02-24 Thread Stefan Weil
Paul Brook schrieb: >> I suggest these steps: >> >> 1. Debug output to stdout is no longer accepted for new / modified code. >> >> 2. New or modified debug messages should go to stderr. > > I don't see this as a real improvement. Arguably these aren't errors, so > stdout is where they should be goi

[Qemu-devel] [PATCH RFC 10/48] error: Simplify error sink setup

2010-02-24 Thread Markus Armbruster
qemu_error_sink can either point to a monitor or a file. In practice, it always points to the current monitor if we have one, else to stderr. Simply route errors to the current monitor or else to stderr, and remove qemu_error_sink along with the functions to control it. Actually, the old code sw

[Qemu-devel] [PATCH RFC 03/48] usb: Remove disabled monitor_printf() in usb_read_file()

2010-02-24 Thread Markus Armbruster
The monitor_printf() reports failure. Printing is wrong, because the caller tries various arguments, and expects the function to fail for some or all. Disabled since commit 26a9e82a. Remove it. Signed-off-by: Markus Armbruster --- usb-linux.c |8 1 files changed, 0 insertions(+),

[Qemu-devel] [PATCH RFC 29/48] qdev: convert setting device properties to QError

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/qdev-properties.c |6 ++ hw/qdev.c|2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 8e96805..a3572b0 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c

[Qemu-devel] [PATCH RFC 27/48] error: New QERR_PROPERTY_NOT_FOUND

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 45df41e..e555c33 100644 --- a/qerror.c +++ b/qerror.c @@ -105,6 +105,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH RFC 31/48] error: New QERR_BUS_NOT_FOUND

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index ea3971e..51b68bc 100644 --- a/qerror.c +++ b/qerror.c @@ -41,6 +41,10 @@ static const QType qerror_type = { */ static const

[Qemu-devel] [PATCH RFC 19/48] error: Track locations in configuration files

2010-02-24 Thread Markus Armbruster
New LOC_FILE. Use it for tracking file name and line number in qemu_config_parse(). We now report errors like qemu:foo.conf:42: Did not find I2C bus for smbus-eeprom In particular, gems like this message: -device: no driver specified become almost nice now: qemu:foo.conf:44: -dev

[Qemu-devel] [PATCH RFC 47/48] monitor: Use argument type 'O' for device_add

2010-02-24 Thread Markus Armbruster
While there, improve the params help text. Signed-off-by: Markus Armbruster --- hw/qdev.c |3 +-- qemu-monitor.hx |4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 80a027a..bcd989c 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -766,8 +7

[Qemu-devel] [PATCH RFC 36/48] error: New error_printf_unless_qmp()

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-error.c | 11 +++ qemu-error.h |2 ++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/qemu-error.c b/qemu-error.c index a726d32..95e87c8 100644 --- a/qemu-error.c +++ b/qemu-error.c @@ -41,6 +41,17 @@ void error_printf(const

[Qemu-devel] [PATCH RFC 23/48] qdev: Factor qdev_create_from_info() out of qdev_create()

2010-02-24 Thread Markus Armbruster
To make it obvious that -device and device_add can't die in hw_error(). Signed-off-by: Markus Armbruster --- hw/qdev.c | 37 ++--- 1 files changed, 22 insertions(+), 15 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 7def97d..e5f6820 100644 --- a/hw/qdev.

[Qemu-devel] [PATCH RFC 37/48] error: New QERR_BAD_BUS_FOR_DEVICE

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 7ebc2bb..4761ae5 100644 --- a/qerror.c +++ b/qerror.c @@ -41,6 +41,10 @@ static const QType qerror_type = { */ static const

[Qemu-devel] [PATCH RFC 45/48] qemu-option: Rename find_list() to qemu_find_opts() & external linkage

2010-02-24 Thread Markus Armbruster
Next commit wants to use it. Signed-off-by: Markus Armbruster --- qemu-config.c |8 qemu-config.h |1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index 72b6279..7346aa0 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -309,7 +3

[Qemu-devel] [PATCH RFC 40/48] error: New QERR_NO_BUS_FOR_DEVICE

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 8a38e5d..2f3b89c 100644 --- a/qerror.c +++ b/qerror.c @@ -125,6 +125,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH RFC 20/48] QemuOpts: Fix qemu_config_parse() to catch file read errors

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-config.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/qemu-config.c b/qemu-config.c index 78e5c67..acd4db7 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -475,6 +475,10 @@ int qemu_config_parse(FILE *fp, const char *fnam

[Qemu-devel] [PATCH RFC 41/48] Revert "qdev: Use QError for 'device not found' error"

2010-02-24 Thread Markus Armbruster
This reverts commit 3ced9f7a36189aed94d8bf86f3f5087a53012455. The next commit will convert all of qdev_device_add() to QError, and it'll be clearer with this partial conversion reverted. Signed-off-by: Markus Armbruster --- hw/qdev.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH RFC 12/48] error: New error_printf() and error_vprintf()

2010-02-24 Thread Markus Armbruster
FIXME They should return int, so callers can calculate width. Signed-off-by: Markus Armbruster --- qemu-error.c | 49 ++--- qemu-error.h | 14 ++ 2 files changed, 56 insertions(+), 7 deletions(-) diff --git a/qemu-error.c b/qemu-error.

[Qemu-devel] [PATCH RFC 14/48] error: Don't abuse qemu_error() for non-error in scsi_hot_add()

2010-02-24 Thread Markus Armbruster
Commit 30d335d6 converted an informational message from monitor_printf() to qemu_error(), probably because the latter doesn't need a mon argument. A later commit will make qemu_error() print additional stuff that is only appropriate for proper errors, and then this will break. Clean it up. Signe

[Qemu-devel] [PATCH RFC 33/48] error: New QERR_DEVICE_NO_BUS

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 56407be..7ebc2bb 100644 --- a/qerror.c +++ b/qerror.c @@ -73,6 +73,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH RFC 00/48] Convert device_add to QObject / QError

2010-02-24 Thread Markus Armbruster
Why this is such a big job? There are two issues with a naive conversion: * Error message degradation The error messages are worded for -device. They aren't so hot to begin with: we typically have many -device options, and to which one a message applies is often not obvious. Now, QMP w

[Qemu-devel] [PATCH RFC 34/48] qdev: Convert qbus_find() to QError

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/qdev.c | 25 ++--- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 6495894..1887dde 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -216,18 +216,21 @@ DeviceState *qdev_device_add(QemuOpts *opts)

[Qemu-devel] [PATCH RFC 32/48] error: New QERR_DEVICE_MULTIPLE_BUSSES

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 51b68bc..56407be 100644 --- a/qerror.c +++ b/qerror.c @@ -57,6 +57,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH RFC 05/48] pc: Fix error reporting for -boot once

2010-02-24 Thread Markus Armbruster
Commit 0ecdffbb created pc_boot_set() for use from monitor command "boot_set", via qemu_boot_set(). pc_boot_set() reports errors to cur_mon, which works fine for monitor code. Commit e0f084bf reused the function int reset handler restore_boot_devices(). Use of cur_mon is problematic in that cont

[Qemu-devel] [PATCH RFC 15/48] error: Don't abuse qemu_error() for non-error in qdev_device_help()

2010-02-24 Thread Markus Armbruster
qdev_device_help() prints device information with qemu_error(). A later commit will make qemu_error() print additional stuff that is only appropriate for proper errors, and then this will break. Use error_printf() instead. While there, simplify: instead of printing a buffer filled by qdev_print_

[Qemu-devel] [PATCH RFC 07/48] tools: Remove unused cur_mon from qemu-tool.c

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-tool.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/qemu-tool.c b/qemu-tool.c index 18b48af..bbce99f 100644 --- a/qemu-tool.c +++ b/qemu-tool.c @@ -33,8 +33,6 @@ void qemu_service_io(void) { } -Monitor *cur_mon; - void m

[Qemu-devel] [PATCH RFC 08/48] monitor: Separate "default monitor" and "current monitor" cleanly

2010-02-24 Thread Markus Armbruster
Commits 376253ec..731b0364 introduced global variable cur_mon, which points to the "default monitor" (if any), except during execution of monitor_read() or monitor_control_read() it points to the monitor from which we're reading instead (the "current monitor"). Monitor command handlers run within

[Qemu-devel] [PATCH RFC 06/48] pc: Factor common code out of pc_boot_set() and cmos_init()

2010-02-24 Thread Markus Armbruster
Code duplicated in commit 0ecdffbb. The two versions are similar, but not identical: * cmos_init() reports errors to stderr, pc_boot_set() via qemu_error(). The latter is fine for both, so pick that for the common code. * cmos_init() obeys fd_bootchk, pc_boot_set() ignores it. Make it a

[Qemu-devel] [PATCH RFC 09/48] block: Simplify usb_msd_initfn() test for "can read bdrv key"

2010-02-24 Thread Markus Armbruster
The old test assumes that "hotplugged" implies "we have a current monitor for reading the key". This is in fact true, but it's not obviously true. Aside: if it were false, we could pass a null pointer to monitor_read_bdrv_key_start(), which would then crash. The previous commit permits us to che

[Qemu-devel] [PATCH RFC 11/48] error: Move qemu_error & friends into their own header

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/scsi-bus.c |2 +- hw/scsi-disk.c|3 +-- hw/scsi-generic.c |1 + hw/usb-serial.c |1 + hw/virtio-net.c |1 + hw/virtio-pci.c |2 +- monitor.h |1 + net/dump.c|1 + net/socket.c |2 +- ne

[Qemu-devel] [PATCH RFC 38/48] error: New QERR_BUS_NO_HOTPLUG

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 4761ae5..38db6b2 100644 --- a/qerror.c +++ b/qerror.c @@ -49,6 +49,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH RFC 35/48] monitor: New in_qmp_mon()

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- monitor.c |5 + monitor.h |2 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index a4263af..5c87a98 100644 --- a/monitor.c +++ b/monitor.c @@ -194,6 +194,11 @@ static inline int monitor_ctrl_mode(const Moni

[Qemu-devel] [PATCH RFC 18/48] error: Include the program name in error messages to stderr

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-error.c | 20 +++- qemu-error.h |1 + vl.c |2 ++ 3 files changed, 22 insertions(+), 1 deletions(-) diff --git a/qemu-error.c b/qemu-error.c index 0778001..b2c0a80 100644 --- a/qemu-error.c +++ b/qemu-error.c @@ -113,13

[Qemu-devel] [PATCH RFC 48/48] monitor: convert do_device_add() to QObject

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hw/qdev.c | 29 + hw/qdev.h |2 +- qemu-monitor.hx |3 ++- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index bcd989c..a631492 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @

[Qemu-devel] [PATCH RFC 42/48] error: Convert do_device_add() to QError

2010-02-24 Thread Markus Armbruster
Conversion to QObject is still missing. Signed-off-by: Markus Armbruster --- hw/qdev.c | 19 +-- 1 files changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 4e348fd..a028e9c 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -200,15 +200,15 @@ DeviceState

[Qemu-devel] [PATCH RFC 26/48] error: Polish human-readable error descriptions

2010-02-24 Thread Markus Armbruster
Also put error definitions in alphabetical order Signed-off-by: Markus Armbruster --- qerror.c | 28 ++-- qerror.h | 14 +++--- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/qerror.c b/qerror.c index 92b05eb..45df41e 100644 --- a/qerror.c ++

[Qemu-devel] [PATCH RFC 13/48] error: Make qemu_error() add a newline, strip it from arguments

2010-02-24 Thread Markus Armbruster
This fixes a few error messages lacking a newline: net_handle_fd_param()'s "No file descriptor named %s found", and tap_open()'s "vnet_hdr=1 requested, but no kernel support for IFF_VNET_HDR available" (all three versions). There's one place that passes arguments without newlines intentionally: lo

[Qemu-devel] [PATCH RFC 30/48] qdev: Relax parsing of bus option

2010-02-24 Thread Markus Armbruster
Treat multiple successive slashes as a one slash. Ignore trailing slashes. This is how POSIX pathnames work. Signed-off-by: Markus Armbruster --- hw/qdev.c | 26 +- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index b170081..64

[Qemu-devel] [PATCH RFC 43/48] qemu-option: Functions to convert to/from QDict.

2010-02-24 Thread Markus Armbruster
FIXME Only string options are implemented. Signed-off-by: Markus Armbruster --- qemu-option.c | 54 ++ qemu-option.h |3 +++ 2 files changed, 57 insertions(+), 0 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index ab488e4..f86a

[Qemu-devel] [PATCH RFC 46/48] monitor: New argument type 'O'

2010-02-24 Thread Markus Armbruster
In the human monitor, it declares a single optional argument to be parsed according to the QemuOptsList given by its name. In QMP, it declares an optional argument for each member of the QemuOptsList. FIXME Only string options are implemented. Signed-off-by: Markus Armbruster --- monitor.c |

[Qemu-devel] [PATCH RFC 25/48] qdev: Hide "ptr" properties from users

2010-02-24 Thread Markus Armbruster
Users can't set them, so qdev_device_help() shouldn't list them. Fix that. Also make qdev_prop_parse() hide them instead of printing a meaningless "has no parser" error message. Their value means nothing to users, so qdev_print_props() shouldn't print it. Fix by removing their print method. Th

[Qemu-devel] [PATCH RFC 44/48] qemu-option: Move the implied first name into QemuOptsList

2010-02-24 Thread Markus Armbruster
We sometimes permit omitting the first option name, for example -device foo is short for -device driver=foo. The name to use ("driver" in the example) is passed as argument to qemu_opts_parse(). For each QemuOptsList, we use at most one such name. Move the name into QemuOptsList, and pass whether

[Qemu-devel] [PATCH RFC 22/48] qdev: Fix -device and device_add to handle unsuitable bus gracefully

2010-02-24 Thread Markus Armbruster
"device_add isa-serial,bus=pci.0" kills QEMU. Not good. Signed-off-by: Markus Armbruster --- hw/qdev.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 38fc4e7..7def97d 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -204,6 +204,11 @@ DeviceStat

[Qemu-devel] [PATCH RFC 24/48] qdev: Hide "no_user" devices from users

2010-02-24 Thread Markus Armbruster
Users can't create them, so qdev_device_help() shouldn't list them. Fix that. Also make qdev_device_add() pretend they don't exist. Before, it rejected them with a "can't be added via command line" message, which wasn't quite right for monitor command device_add. Signed-off-by: Markus Armbruster

[Qemu-devel] [PATCH RFC 01/48] monitor: Factor monitor_set_error() out of qemu_error_internal()

2010-02-24 Thread Markus Armbruster
This separates the monitor part from the QError part. Signed-off-by: Markus Armbruster --- monitor.c | 21 + monitor.h |3 +++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/monitor.c b/monitor.c index b1a6edc..fcd8718 100644 --- a/monitor.c +++ b/monit

[Qemu-devel] [PATCH RFC 28/48] error: New QERR_PROPERTY_VALUE_BAD

2010-02-24 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index e555c33..ea3971e 100644 --- a/qerror.c +++ b/qerror.c @@ -109,6 +109,10 @@ static const QErrorStringTable qerror_table[] = {

[Qemu-devel] [PATCH RFC 21/48] error: Track locations on command line

2010-02-24 Thread Markus Armbruster
New LOC_CMDLINE. Use it for tracking option with argument in lookup_opt(). We now report errors like this qemu: -device smbus-eeprom: Did not find I2C bus for smbus-eeprom Signed-off-by: Markus Armbruster --- qemu-error.c | 20 qemu-error.h |3 ++- vl.c

[Qemu-devel] [PATCH RFC 16/48] error: Don't abuse qemu_error() for non-error in qbus_find()

2010-02-24 Thread Markus Armbruster
qbus_find() adds an informational line to error messages, and prints both lines with one qemu_error(). Use error_printf() for the informational line instead. While there, simplify: instead of printing buffers filled by qbus_list_bus() and qbus_list_dev() in one go, make them print it. Signed-off

[Qemu-devel] [PATCH RFC 17/48] error: Infrastructure to track locations for error reporting

2010-02-24 Thread Markus Armbruster
New struct Location holds a location. So far, the only location is LOC_NONE, so this doesn't do anything useful yet. Passing the current location all over the place would be too cumbersome. Hide it away in static cur_loc instead, and provide accessors. Print it in qemu_error(). Store it in QEr

[Qemu-devel] [PATCH RFC 02/48] error: Move qemu_error() & friends from monitor.c to own file

2010-02-24 Thread Markus Armbruster
They're about reporting errors, not about the monitor. Signed-off-by: Markus Armbruster --- Makefile.target |1 + monitor.c | 89 - qemu-error.c| 92 +++ 3 files changed, 93

[Qemu-devel] ARM: RealView boot problem

2010-02-24 Thread Christoffer Dall
I am trying to emulate ARMv6 on QEMU and cannot get past the early kernel boot process. I wish to emulate the arm1136 cpu on the realview-eb platform. The config file for the kernel and my binaries can be found here: http://www.cs.columbia.edu/~cdall/qemu-realview.tar.gz To configure and compile

[Qemu-devel] Re: KVM call agenda for Feb 23

2010-02-24 Thread Anthony Liguori
Hi Chris, On 02/22/2010 04:52 PM, Chris Wright wrote: Please send in any agenda items you are interested in covering. I thought it might be easier to use the wiki for collecting agenda items instead of polling the list. It also us do a little bit more long term planning. http://www.li

Re: [Qemu-devel] [PATCH] VirtIO Support for Memory Regions

2010-02-24 Thread Anthony Liguori
On 02/24/2010 09:13 AM, Anthony Liguori wrote: to work on that if we can agree on what the underlying device looks like whether it should be VirtIO or just PCI. Agreed, you had suggested uio_pci for my PCI driver and I'd be happy I feel pretty strongly that we shouldn't add shared memory to vir

[Qemu-devel] [PATCH] json-parser: Fix segfault on malformed input

2010-02-24 Thread Kevin Wolf
If the parser fails to parse the key in parse_pair, it will access a NULL pointer. A simple way to trigger this is sending {foo} via QMP. This patch turns the segfault into a syntax error reply. Signed-off-by: Kevin Wolf --- json-parser.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(

Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-02-24 Thread Anthony Liguori
On 02/24/2010 05:46 AM, Michael S. Tsirkin wrote: Ah, you mean telling the guest to switch features on and off: natureally this would require guest driver changes. This might be also non-trivial to implement. Consider a request that has been posted without checksum, suddenly we disable checksum

Re: [Qemu-devel] [PATCH] VirtIO Support for Memory Regions

2010-02-24 Thread Anthony Liguori
On 02/24/2010 12:20 AM, Cam Macdonell wrote: On Tue, Feb 23, 2010 at 2:05 PM, Anthony Liguori wrote: Hi Cam, On 02/23/2010 02:52 PM, Cam Macdonell wrote: Support for passing memory regions via VirtIO to remove need for PCI support in the guest. Adds new vectors to VirtIO config spa

[Qemu-devel] [PATCH v3 07/10] qemu-kvm: Cleanup/fix TSC and PV clock writeback

2010-02-24 Thread Jan Kiszka
Drop kvm_load_tsc in favor of level-dependent writeback in kvm_arch_load_regs. KVM's PV clock MSRs fall in the same category and should therefore only be written back on full sync. Signed-off-by: Jan Kiszka --- qemu-kvm-x86.c| 19 +-- qemu-kvm.h|4

Re: [Qemu-devel] [PATCH] VirtIO Support for Memory Regions

2010-02-24 Thread Anthony Liguori
On 02/24/2010 05:14 AM, Avi Kivity wrote: On 02/24/2010 08:20 AM, Cam Macdonell wrote: Virtio is really a DMA engine. One of the nice things about it's design is that you can do things like transparent bounce buffering if needed. Adding a mechanism like this breaks this abstract and turns v

Re: [Qemu-devel] Re: [RFC][PATCH] performance improvement for windows guests, running on top of virtio block device

2010-02-24 Thread Anthony Liguori
On 02/23/2010 08:58 PM, Paul Brook wrote: Bottom halves are run at the very end of the event loop which means that they're guaranteed to be the last thing run. idle bottom halves can be rescheduled without causing an infinite loop and do not affect the select timeout (which normal bottom halves

Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-02-24 Thread Anthony Liguori
On 02/23/2010 09:14 PM, Paul Brook wrote: vnet_hdr is IMHO a really bad example to copy from. vnet_hdr leaks into the migration state via n->has_vnet_hdr. What this means is that if you want to migrate from -net tap -net nic,model=virtio to -net user -net nic,model=virtio, it will fail. This i

[Qemu-devel] [PATCH v3 04/10] qemu-kvm: Clean up mpstate synchronization

2010-02-24 Thread Jan Kiszka
Push mpstate reading/writing into kvm_arch_load/save_regs and, on x86, properly synchronize with halted in the accessor functions. Signed-off-by: Jan Kiszka --- hw/apic.c |7 --- qemu-kvm-ia64.c |4 +- qemu-kvm-x86.c| 102 ++-

[Qemu-devel] [PATCH v3 05/10] KVM: x86: Restrict writeback of VCPU state

2010-02-24 Thread Jan Kiszka
Do not write nmi_pending, sipi_vector, and mpstate unless we at least go through a reset. And TSC as well as KVM wallclocks should only be written on full sync, otherwise we risk to drop some time on during state read-modify-write. Signed-off-by: Jan Kiszka --- kvm.h |2 +- q

[Qemu-devel] [PATCH v3 06/10] qemu-kvm: Use VCPU event state for reset and vmsave/load

2010-02-24 Thread Jan Kiszka
Push reading/writing of vcpu_events into kvm_arch_load/save_regs to avoid KVM-specific hooks in generic code. Signed-off-by: Jan Kiszka --- kvm.h |2 -- qemu-kvm-x86.c|6 -- target-i386/kvm.c |4 ++-- target-i386/machine.c |6 -- 4 files change

[Qemu-devel] [PATCH v3 08/10] qemu-kvm: Clean up KVM's APIC hooks

2010-02-24 Thread Jan Kiszka
The APIC is part of the VCPU state, so trigger its readout and writeback from kvm_arch_save/load_regs. Thanks to the transparent sync on reset and vmsave/load, we can also drop explicit sync code, reducing the diff to upstream. Signed-off-by: Jan Kiszka --- hw/apic.c | 37 +---

[Qemu-devel] [PATCH v3 10/10] qemu-kvm: Bring qemu_init_vcpu back home

2010-02-24 Thread Jan Kiszka
There is no need for the this hack anymore, initialization is now robust against reordering as it doesn't try to write the VCPU state on its own. Signed-off-by: Jan Kiszka --- hw/pc.c |5 - target-i386/helper.c |2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) dif

[Qemu-devel] [PATCH v3 09/10] qemu-kvm: Move kvm_set_boot_cpu_id

2010-02-24 Thread Jan Kiszka
Setting the boot CPU ID is arch-specific KVM stuff. So push it where it belongs to. Signed-off-by: Jan Kiszka --- hw/pc.c|3 --- qemu-kvm-x86.c |3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 8b5af35..971ae70 100644 --- a/hw/pc.c +++

[Qemu-devel] [PATCH v3 00/10] qemu-kvm: Hook cleanups and yet more use of upstream code

2010-02-24 Thread Jan Kiszka
Let's proceed with cleaning up the VCPU state writeback. The differences to v2 are: - included guest debugging update patch and rebased on top of it - renamed KVM_PUT_ASYNC_STATE->KVM_PUT_RUNTIME_STATE and added comments - fixed mp_state corruption due to early use of cpu_is_bsp Some patches ta

[Qemu-devel] [PATCH v3 02/10] qemu-kvm: Rework VCPU state writeback API

2010-02-24 Thread Jan Kiszka
This grand cleanup drops all reset and vmsave/load related synchronization points in favor of four(!) generic hooks: - cpu_synchronize_all_states in qemu_savevm_state_complete (initial sync from kernel before vmsave) - cpu_synchronize_all_post_init in qemu_loadvm_state (writeback after vmload)

[Qemu-devel] [PATCH v3 03/10] x86: Extend validity of cpu_is_bsp

2010-02-24 Thread Jan Kiszka
As we hard-wire the BSP to CPU 0 anyway and cpuid_apic_id equals cpu_index, cpu_is_bsp can also be based on the latter directly. This will help an early user of it: KVM while initializing mp_state. Signed-off-by: Jan Kiszka --- hw/pc.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)

[Qemu-devel] [PATCH v3 01/10] qemu-kvm: Add KVM_CAP_X86_ROBUST_SINGLESTEP-awareness

2010-02-24 Thread Jan Kiszka
This add-on patch to recent guest debugging refactorings adds the requested awareness for KVM_CAP_X86_ROBUST_SINGLESTEP to both the upstream as well as qemu-kvm's own code. Fortunately, code sharing increased once again. Signed-off-by: Jan Kiszka --- kvm-all.c | 12 ++ kvm.h

Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-02-24 Thread Michael S. Tsirkin
On Wed, Feb 24, 2010 at 12:26:53PM +, Paul Brook wrote: > > > If we do have a software > > > fallback then the feature bit is just for backwards compatibility, and > > > should be enabled unconditionally (on current machine types). > > > > Software fallback might turn out to be slower than disa

Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-02-24 Thread Paul Brook
> > If we do have a software > > fallback then the feature bit is just for backwards compatibility, and > > should be enabled unconditionally (on current machine types). > > Software fallback might turn out to be slower than disabling the feature > in the guest. For example, and extra pass over pac

Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-02-24 Thread Michael S. Tsirkin
On Wed, Feb 24, 2010 at 11:30:18AM +, Paul Brook wrote: > > On Wed, Feb 24, 2010 at 03:14:25AM +, Paul Brook wrote: > > > > vnet_hdr is IMHO a really bad example to copy from. > > > > > > > > vnet_hdr leaks into the migration state via n->has_vnet_hdr. What this > > > > means is that if yo

Re: [Qemu-devel] Re: [PATCH-RFC 13/13] virtio-net: connect to vhost net backend

2010-02-24 Thread Paul Brook
> On Wed, Feb 24, 2010 at 03:14:25AM +, Paul Brook wrote: > > > vnet_hdr is IMHO a really bad example to copy from. > > > > > > vnet_hdr leaks into the migration state via n->has_vnet_hdr. What this > > > means is that if you want to migrate from -net tap -net > > > nic,model=virtio to -net us

Re: [Qemu-devel] [PATCH 0/6] target-alpha: fpu qualifiers, round 2

2010-02-24 Thread Richard Henderson
On 02/23/2010 02:58 PM, Aurelien Jarno wrote: I have totally rewritten the patch to be more along the line that Laurent was suggesting, in that the rounding mode and other qualifiers are totally parsed within the translator. I no longer pass the FN11 field to the helper functions. What's the b

Re: [Qemu-devel] [PATCH] VirtIO Support for Memory Regions

2010-02-24 Thread Avi Kivity
On 02/24/2010 08:20 AM, Cam Macdonell wrote: Virtio is really a DMA engine. One of the nice things about it's design is that you can do things like transparent bounce buffering if needed. Adding a mechanism like this breaks this abstract and turns virtio into something that's more than I thin

[Qemu-devel] Re: Severe data corruption in QEMU under Mac OS X

2010-02-24 Thread Paolo Bonzini
On 02/24/2010 02:36 AM, Natalia Portillo wrote: 10% of saved PPMs are corrupted or empty, This seems easier to bisect, can you do that? Thanks! Paolo