[Qemu-devel] Re: [PATCH v2 00/21] qemu-kvm: Hook cleanups and extended use of upstream code

2010-02-03 Thread Gleb Natapov
On Wed, Feb 03, 2010 at 02:50:51PM -0200, Marcelo Tosatti wrote: > On Wed, Feb 03, 2010 at 09:53:25AM +0100, Jan Kiszka wrote: > > This version addresses the feedback on v2, namely: > > - assert( || thread>) on low-level > > load/save registers > > - fixed mpstate initialization > > > > Yet unte

[Qemu-devel] "Enable _FORTIFY_SOURCE=2" result in building failure for qemu-img.c

2010-02-03 Thread Sheng Yang
Got this building failure: In file included from qemu-img.c:68: qemu-img-cmds.h:22:1: error: unterminated argument list invoking macro "printf"

RE: [Qemu-devel] [Patch] Support translating Guest physical address to Host virtual address.

2010-02-03 Thread Kleen, Andi
>Yeah, but if we put a feature in qemu, we need to be able to >support it >for anyone who wants to use it. It's useful for anyone who wants to use it for testing purposes. And it's useful to make sure the qemu/kernel/kvm machine check injection code works. >Adding something for a very particul

RE: [Qemu-devel] [Patch] Support translating Guest physical address to Host virtual address.

2010-02-03 Thread Kleen, Andi
>If you want to integrate MCE testing into qemu using the host >to inject >MCEs, you'll need to figure out a way to do it that allows the whole >thing to be done without potentially killing the wrong process or In the test it's very simple. The process is kept running during the injection. W

Re: [PATCH] JSON: add %I64d support (Was: Re: [Qemu-devel] system_reset command cause assert failed)

2010-02-03 Thread Roy Tam
2010/2/4 Roy Tam : > 2010/2/4 Roy Tam : >> 2010/2/3 Luiz Capitulino : > > OK we are fooled by the json lexer and parser. As we use %I64d to > print 'long long' variables in Win32, but lexer and parser only deal > with %lld but not %I64d, this patch add support for %I64d and solve > 'info pci', 'pow

[PATCH] JSON: add %I64d support (Was: Re: [Qemu-devel] system_reset command cause assert failed)

2010-02-03 Thread Roy Tam
2010/2/4 Roy Tam : > 2010/2/3 Luiz Capitulino : OK we are fooled by the json lexer and parser. As we use %I64d to print 'long long' variables in Win32, but lexer and parser only deal with %lld but not %I64d, this patch add support for %I64d and solve 'info pci', 'powser_reset' and 'power_powerdown

Re: [Qemu-devel] system_reset command cause assert failed

2010-02-03 Thread Roy Tam
2010/2/3 Luiz Capitulino : > On Wed, 3 Feb 2010 10:09:07 +0800 > Roy Tam wrote: > >> 2010/2/2 Luiz Capitulino : >> > On Tue, 2 Feb 2010 09:35:16 +0800 >> > Roy Tam wrote: >> > >> >> 2010/2/2 Luiz Capitulino : >> >> > On Tue, 2 Feb 2010 00:26:53 +0800 >> >> > Roy Tam wrote: >> >> > >> >> >> 2010/

[Qemu-devel] Re: [PATCH 4/4] KVM: Rework of guest debug state writing

2010-02-03 Thread Jan Kiszka
Marcelo Tosatti wrote: > On Wed, Feb 03, 2010 at 10:29:45PM +0100, Jan Kiszka wrote: >> So far we synchronized any dirty VCPU state back into the kernel before >> updating the guest debug state. This was a tribute to a deficit in x86 >> kernels before 2.6.33. But as this is an arch-dependent issue,

[Qemu-devel] [PATCH 1/6] kvm: Flush coalesced MMIO buffer periodly

2010-02-03 Thread Marcelo Tosatti
From: Sheng Yang The default action of coalesced MMIO is, cache the writing in buffer, until: 1. The buffer is full. 2. Or the exit to QEmu due to other reasons. But this would result in a very late writing in some condition. 1. The each time write to MMIO content is small. 2. The writing interv

[Qemu-devel] [PATCH 6/6] Fix incoming migration with iothread

2010-02-03 Thread Marcelo Tosatti
Do not allow the vcpus to execute if the vm is stopped. Fixes -incoming with CONFIG_IOTHREAD enabled. Signed-off-by: Marcelo Tosatti --- vl.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 50f133d..57f0ba5 100644 --- a/vl.c +++ b/vl.c @@ -3282,6 +328

[Qemu-devel] [PATCH 3/6] KVM: x86: Fix up misreported CPU features

2010-02-03 Thread Marcelo Tosatti
From: Jan Kiszka >From qemu-kvm: Kernels before 2.6.30 misreported some essential CPU features via KVM_GET_SUPPORTED_CPUID. Fix them up. Signed-off-by: Jan Kiszka --- target-i386/kvm.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/target-i386/kvm.c b/target-i3

[Qemu-devel] [PATCH 0/6] [GIT PULL] qemu-kvm.git uq/master queue

2010-02-03 Thread Marcelo Tosatti
The following changes since commit 117f8eb81dfdf51a0418fbf6d260cbb72bcd4a9d: Markus Armbruster (1): qdev: Add rudimentary help for property value are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master Jan Kiszka (4): KVM: Request se

[Qemu-devel] [PATCH 5/6] KVM: Move and rename regs_modified

2010-02-03 Thread Marcelo Tosatti
From: Jan Kiszka Touching the user space representation of KVM's VCPU state is - naturally - a per-VCPU thing. So move the dirty flag into KVM_CPU_COMMON and rename it at this chance to reflect its true meaning. Signed-off-by: Jan Kiszka --- cpu-defs.h |3 ++- kvm-all.c | 13 ++-

[Qemu-devel] [PATCH 4/6] KVM: Make vmport KVM-compatible

2010-02-03 Thread Marcelo Tosatti
From: Jan Kiszka The vmport "device" accesses the VCPU registers, so it requires proper cpu_synchronize_state. Add it to vmport_ioport_read, which also synchronizes vmport_ioport_write. Signed-off-by: Jan Kiszka --- hw/vmport.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff

[Qemu-devel] [PATCH 2/6] KVM: Request setting of nmi_pending and sipi_vector

2010-02-03 Thread Marcelo Tosatti
From: Jan Kiszka The final version of VCPU events in 2.6.33 will allow to skip nmi_pending and sipi_vector on KVM_SET_VCPU_EVENTS. For now let's write them unconditionally, which is unproblematic for upstream due to missing SMP support. Future version which enable SMP will write them only on rese

[Qemu-devel] Re: [PATCH 4/4] KVM: Rework of guest debug state writing

2010-02-03 Thread Marcelo Tosatti
On Wed, Feb 03, 2010 at 10:29:45PM +0100, Jan Kiszka wrote: > So far we synchronized any dirty VCPU state back into the kernel before > updating the guest debug state. This was a tribute to a deficit in x86 > kernels before 2.6.33. But as this is an arch-dependent issue, it is > better handle in th

Re: [Qemu-devel] [PATCH 0/4] KVM pull request: Various fixes and cleanups

2010-02-03 Thread Jan Kiszka
Anthony Liguori wrote: > Hi Jan, > > Thanks for sending this out. > > On 02/03/2010 03:29 PM, Jan Kiszka wrote: >> As discussed in http://www.spinics.net/lists/kvm/msg28517.html, this is >> the first part of the KVM upstream patches developed while cleaning up >> qemu-kvm. >> > > I'd prefer

Re: [Qemu-devel] [PATCH 0/4] KVM pull request: Various fixes and cleanups

2010-02-03 Thread Anthony Liguori
Hi Jan, Thanks for sending this out. On 02/03/2010 03:29 PM, Jan Kiszka wrote: As discussed in http://www.spinics.net/lists/kvm/msg28517.html, this is the first part of the KVM upstream patches developed while cleaning up qemu-kvm. I'd prefer if Marcelo/Avi took this first into qemu-kvm.g

[Qemu-devel] [PATCH 3/4] KVM: Move and rename regs_modified

2010-02-03 Thread Jan Kiszka
Touching the user space representation of KVM's VCPU state is - naturally - a per-VCPU thing. So move the dirty flag into KVM_CPU_COMMON and rename it at this chance to reflect its true meaning. Signed-off-by: Jan Kiszka --- cpu-defs.h |3 ++- kvm-all.c | 13 ++--- 2 files changed

[Qemu-devel] [PATCH 2/4] KVM: Make vmport KVM-compatible

2010-02-03 Thread Jan Kiszka
The vmport "device" accesses the VCPU registers, so it requires proper cpu_synchronize_state. Add it to vmport_ioport_read, which also synchronizes vmport_ioport_write. Signed-off-by: Jan Kiszka --- hw/vmport.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/vmport.

[Qemu-devel] [PATCH 1/4] KVM: x86: Fix up misreported CPU features

2010-02-03 Thread Jan Kiszka
>From qemu-kvm: Kernels before 2.6.30 misreported some essential CPU features via KVM_GET_SUPPORTED_CPUID. Fix them up. Signed-off-by: Jan Kiszka --- target-i386/kvm.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 5b09

[Qemu-devel] [PATCH 4/4] KVM: Rework of guest debug state writing

2010-02-03 Thread Jan Kiszka
So far we synchronized any dirty VCPU state back into the kernel before updating the guest debug state. This was a tribute to a deficit in x86 kernels before 2.6.33. But as this is an arch-dependent issue, it is better handle in the x86 part of KVM and remove the writeback point for generic code.

[Qemu-devel] [PATCH 0/4] KVM pull request: Various fixes and cleanups

2010-02-03 Thread Jan Kiszka
As discussed in http://www.spinics.net/lists/kvm/msg28517.html, this is the first part of the KVM upstream patches developed while cleaning up qemu-kvm. Please pull from git://git.kiszka.org/qemu.git queues/kvm Jan Kiszka (4): KVM: x86: Fix up misreported CPU features KVM: Make vmpor

Re: [Qemu-devel] The new qemu.org

2010-02-03 Thread Natalia Portillo
I think the wiki should contain different articles for configuration, command line options, compilation, network configuration (tun/tap needs different articles for every host) so on, and the "how to install X guest" should be in the os support list. That's a clean way to do it IMHO. El 03

Re: [Qemu-devel] [PATCH 3/4] Block: readonly changes

2010-02-03 Thread Jamie Lokier
Naphtali Sprei wrote: > Open backing file for read-only > During commit upgrade to read-write and back at end to read-only > +if (ro) { /* re-open as RO */ > +bs_ro = bdrv_new(""); > +ret = bdrv_open2(bs_ro, bs->backing_hd->filename, > bs->backing_hd->open_flags & ~BDRV_O_RDW

Re: [Qemu-devel] The new qemu.org

2010-02-03 Thread Anthony Liguori
On 02/03/2010 01:20 PM, Andreas Färber wrote: Am 03.02.2010 um 15:15 schrieb Anthony Liguori: On 02/03/2010 08:11 AM, Natalia Portillo wrote: Indeed that section is just a static HTML so all the wiki advantages get lost with it. It's derived from qemu-doc.texi in the git tree so patches can

Re: [Qemu-devel] [Please discard the previous mail] System call from a Guest Linux

2010-02-03 Thread Mulyadi Santosa
Hi Jong (Sorry, I am not sure how to politely call a Korean name...so apologize if it turns out to be rude...) On Thu, Feb 4, 2010 at 1:08 AM, Jong Chun Park wrote: > after compilation in the guest OS: > int main() { >    int fd; >    if (access("hello.txt", R_OK) != 0) { >      exit(0); >    }

Re: [Qemu-devel] The new qemu.org

2010-02-03 Thread Andreas Färber
Am 03.02.2010 um 15:15 schrieb Anthony Liguori: On 02/03/2010 08:11 AM, Natalia Portillo wrote: Indeed that section is just a static HTML so all the wiki advantages get lost with it. It's derived from qemu-doc.texi in the git tree so patches can be submitted against it. I'd like to conv

Re: [Qemu-devel] [PATCH 2/4] block: add block topology options

2010-02-03 Thread Anthony Liguori
On 01/29/2010 01:04 PM, Christoph Hellwig wrote: Add three new suboptions for the drive option to export block topology information to the guest. This is needed to get optimal I/O alignment for RAID arrays or SSDs. The options are: - physical_block_size to specify the physical block size of

Re: [Qemu-devel] The new qemu.org

2010-02-03 Thread Andreas Färber
Am 03.02.2010 um 18:00 schrieb G 3: So all I have to do is submit a patch against qemu-doc.texi, and that will update the Mac OS X section. Didn't you or someone else already post a patch for this some weeks ago? Also iiuc the current page is taken from the stable branch, not master. Afte

Re: [Qemu-devel] [PATCH 1/7] qemu-option: Make qemu_opts_foreach() accumulate return values

2010-02-03 Thread Anthony Liguori
On 01/29/2010 12:48 PM, Markus Armbruster wrote: Return the bitwise inclusive or of all return values instead of the last call's value. This lets you find out whether any of the calls returned a non-zero value. No functional change, as existing users either don't care for the value, or pass non

Re: [Qemu-devel] [PATCH 1/2] monitor: Use QERR_INVALID_PARAMETER instead of QERR_INVALID_CPU_INDEX

2010-02-03 Thread Anthony Liguori
On 01/29/2010 03:34 AM, Markus Armbruster wrote: This changes the error message from "Invalid CPU index" to "Invalid parameter index" in the human monitor. Signed-off-by: Markus Armbruster Applied both. Thanks. Regards, Anthony Liguori --- monitor.c |2 +- 1 files changed, 1 in

[Qemu-devel] Re: [PATCH v2 00/21] qemu-kvm: Hook cleanups and extended use of upstream code

2010-02-03 Thread Marcelo Tosatti
On Wed, Feb 03, 2010 at 07:02:58PM +0100, Jan Kiszka wrote: > Marcelo Tosatti wrote: > > On Wed, Feb 03, 2010 at 09:53:25AM +0100, Jan Kiszka wrote: > >> This version addresses the feedback on v2, namely: > >> - assert( || thread>) on low-level > >> load/save registers > >> - fixed mpstate initia

Re: [Qemu-devel] [PATCH v3 1/8] monitor: Document argument type 'M'

2010-02-03 Thread Anthony Liguori
On 01/25/2010 07:23 AM, Markus Armbruster wrote: Was forgotten in commit b6e098d7. Signed-off-by: Markus Armbruster Applied all (including v4 of 2/8). Thanks. Regards, Anthony Liguori --- monitor.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/monitor.c

Re: [Qemu-devel] [PATCH 0/8]: QMP feature negotiation support

2010-02-03 Thread Anthony Liguori
On 02/01/2010 01:50 PM, Luiz Capitulino wrote: Capability selection could be done as an object where the name/value pairs are capability/argument. If you need multiple arguments for a capability, make the capability's value an object. That's exactly what seems complicated to me, because

[Qemu-devel] [PATCH 4/4] Open backing file read-only also for snapshot mode

2010-02-03 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- block.c | 10 +- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/block.c b/block.c index 527b146..1db9961 100644 --- a/block.c +++ b/block.c @@ -483,19 +483,11 @@ int bdrv_open2(BlockDriverState *bs, const char *filename, int flags,

[Qemu-devel] [PATCH 3/4] Block: readonly changes

2010-02-03 Thread Naphtali Sprei
Open backing file for read-only During commit upgrade to read-write and back at end to read-only Signed-off-by: Naphtali Sprei --- block.c | 64 +++--- block_int.h |1 + 2 files changed, 57 insertions(+), 8 deletions(-) diff --git a/

[Qemu-devel] [PATCH 2/4] qemu-img: Fix qemu-img can't create qcow image based on read-only image

2010-02-03 Thread Naphtali Sprei
Open image file read-only where possible Patch originally written by Sheng Yang Signed-off-by: Naphtali Sprei --- qemu-img.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index cbba4fc..b0ac9eb 100644 --- a/qemu-img.c +++ b/qemu-

[Qemu-devel] [PATCH 1/4] Add open_flags to BlockDriverState Will be used later

2010-02-03 Thread Naphtali Sprei
Signed-off-by: Naphtali Sprei --- block.c |1 + block_int.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index 1919d19..66564de 100644 --- a/block.c +++ b/block.c @@ -363,6 +363,7 @@ int bdrv_open2(BlockDriverState *bs, const char *filename,

[Qemu-devel] [PATCH 0/4] block: more read-only changes, related to backing files

2010-02-03 Thread Naphtali Sprei
The read-only changes broke qemu-img create with read-only base image These changes fix it. It also make things a little safer, opening the backing file for read-only, upgrading to read-write only for commit, and back to read-only when done. Naphtali Sprei (4): Add open_flags to BlockDriverState

[Qemu-devel] [Please discard the previous mail] System call from a Guest Linux

2010-02-03 Thread Jong Chun Park
Hi, all? First of all, I apologize you for the previous incomplete mail and this spam. I'm working with QEMU v0.12.1 with i386 Linux guest on x86-64 Linux host. I'm trying to find a point in the source code where a system call from the guest OS is handled. If I'm not mistaken, QEMU disassembles a

[Qemu-devel] System call from a Guest Linux

2010-02-03 Thread Jong Chun Park
Hi, all? First of all, I apologize you for this spam. I'm working with QEMU v0.12.1 with i386 Linux guest on x86-64 Linux host. I'm trying to find a point in the source code where a system call from the guest OS is handled. If I'm not mistaken, QEMU disassembles an instruction of INT # in a switch

[Qemu-devel] Re: [PATCH v2 00/21] qemu-kvm: Hook cleanups and extended use of upstream code

2010-02-03 Thread Jan Kiszka
Marcelo Tosatti wrote: > On Wed, Feb 03, 2010 at 09:53:25AM +0100, Jan Kiszka wrote: >> This version addresses the feedback on v2, namely: >> - assert( || thread>) on low-level >> load/save registers >> - fixed mpstate initialization >> >> Yet untested is -no-kvm-irqchip with smp due to some bug

Re: [Qemu-devel] [PATCH] qcow2: Fix signedness bugs

2010-02-03 Thread Markus Armbruster
Kevin Wolf writes: > Checking for return codes < 0 isn't really going to work with unsigned > types. Use signed types instead. Makes sense to me.

Re: [Qemu-devel] The new qemu.org

2010-02-03 Thread Anthony Liguori
On 02/03/2010 11:00 AM, G 3 wrote: So all I have to do is submit a patch against qemu-doc.texi, and that will update the Mac OS X section. Is there a way to edit the .texi file without having to learn it's format. Yes, but not until the next release. Perhaps a word processor for this format?

Re: [Qemu-devel] The new qemu.org

2010-02-03 Thread G 3
So all I have to do is submit a patch against qemu-doc.texi, and that will update the Mac OS X section. Is there a way to edit the .texi file without having to learn it's format. Perhaps a word processor for this format? On Feb 3, 2010, at 10:30 AM, qemu-devel-requ...@nongnu.org wrote: On 0

Re: [Qemu-devel] Adding support for MIPS64 as host

2010-02-03 Thread Laurent Desnogues
On Wed, Feb 3, 2010 at 5:53 PM, Utkarsh Sopan wrote: > I am trying to add support for MIPS 64 as Host machine as my academic > project. Note that some work has already been done for MIPS host support. > I am new to QEMU. > > Problem is I dont have a MIPS 64 machine to test on. > Please suggest w

[Qemu-devel] Adding support for MIPS64 as host

2010-02-03 Thread Utkarsh Sopan
Hi, I am trying to add support for MIPS 64 as Host machine as my academic project. I am new to QEMU. Problem is I dont have a MIPS 64 machine to test on. Please suggest whether or not I can use a nested QEMU emulator to test the same. i.e. running my version on top of a simulated MIPS64 machine.

[Qemu-devel] Re: [PATCH v2 00/21] qemu-kvm: Hook cleanups and extended use of upstream code

2010-02-03 Thread Marcelo Tosatti
On Wed, Feb 03, 2010 at 09:53:25AM +0100, Jan Kiszka wrote: > This version addresses the feedback on v2, namely: > - assert( || thread>) on low-level > load/save registers > - fixed mpstate initialization > > Yet untested is -no-kvm-irqchip with smp due to some bug in unpatched > qemu-kvm or the

[Qemu-devel] [PATCH] add close callback for tty-based char device

2010-02-03 Thread David S. Ahern
Add a tty close callback. Right now if a guest device that is connected to a tty-based chardev in the host is removed, the tty is not closed. With this patch it is closed. Example use case is connecting an emulated USB serial cable in the guest to tty0 of the host using the monitor command: usb_a

Re: [Qemu-devel] [Patch] Support translating Guest physical address to Host virtual address.

2010-02-03 Thread Anthony Liguori
On 02/03/2010 09:49 AM, Kleen, Andi wrote: Yeah, but if we put a feature in qemu, we need to be able to support it for anyone who wants to use it. It's useful for anyone who wants to use it for testing purposes. And it's useful to make sure the qemu/kernel/kvm machine check injection c

[Qemu-devel] [PATCH] segfault due to buffer overrun in usb-serial

2010-02-03 Thread David S. Ahern
This fixes a segfault due to buffer overrun in the usb-serial device. The memcpy was incrementing the start location by recv_used yet, the computation of first_size (how much to write at the end of the buffer before wrapping to the front) was not accounting for it. This causes the next element afte

[Qemu-devel] [PATCH] audio streaming from usb devices

2010-02-03 Thread David S. Ahern
I have streaming audio devices working within qemu-kvm. This is a port of the changes to qemu. Streaming audio generates a series of isochronous requests that are repetitive and time sensitive. The URBs need to be submitted in consecutive USB frames and responses need to be handled in a timely ma

Re: [Qemu-devel] [Patch] Support translating Guest physical address to Host virtual address.

2010-02-03 Thread Lucas Meneghel Rodrigues
On Wed, 2010-02-03 at 08:23 -0600, Anthony Liguori wrote: > On 02/03/2010 08:11 AM, Kleen, Andi wrote: > > > >> If you want to integrate MCE testing into qemu using the host > >> to inject > >> MCEs, you'll need to figure out a way to do it that allows the whole > >> thing to be done without po

[Qemu-devel] [PATCH 4/5] scsi: Generate BLOCK_IO_ERROR QMP event

2010-02-03 Thread Luiz Capitulino
Just call bdrv_mon_event() in the right place. Signed-off-by: Luiz Capitulino --- hw/scsi-disk.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index b34fbaa..1285122 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -182,16 +182,2

[Qemu-devel] [PATCH 5/5] virtio-blk: Generate BLOCK_IO_ERROR QMP event

2010-02-03 Thread Luiz Capitulino
Just call bdrv_mon_event() in the right place. Signed-off-by: Luiz Capitulino --- hw/virtio-blk.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 037a79c..75adbec 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @@ -105,16 +

[Qemu-devel] [PATCH 3/5] ide: Generate BLOCK_IO_ERROR QMP event

2010-02-03 Thread Luiz Capitulino
Just call bdrv_mon_event() in the right place. Signed-off-by: Luiz Capitulino --- hw/ide/core.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index b6643e8..603e537 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -480,14 +480,17 @@

[Qemu-devel] [PATCH 2/5] block: BLOCK_IO_ERROR QMP event

2010-02-03 Thread Luiz Capitulino
This commit introduces the bdrv_mon_event() function, which should be called by block subsystems (eg. IDE) when a I/O error occurs, so that an QMP event is emitted. The following information is currently provided in the event: - device name - operation (ie. "read" or "write") - action taken (eg.

[Qemu-devel] [PATCH 1/5] QMP: BLOCK_IO_ERROR event handling

2010-02-03 Thread Luiz Capitulino
This commit adds the basic definitions for the BLOCK_IO_ERROR event, but actual event emission will be introduced by the next commits. Signed-off-by: Luiz Capitulino --- QMP/qmp-events.txt | 21 + monitor.c |3 +++ monitor.h |1 + 3 files changed,

[Qemu-devel] [PATCH v1 0/5]: BLOCK_IO_ERROR QMP event

2010-02-03 Thread Luiz Capitulino
Hi, This series adds the BLOCK_IO_ERROR event libvirt guys have requested. changelog - v0 -> v1 - Improve event documentation

Re: [Qemu-devel] [Patch] Support translating Guest physical address to Host virtual address.

2010-02-03 Thread Anthony Liguori
On 02/03/2010 08:11 AM, Kleen, Andi wrote: If you want to integrate MCE testing into qemu using the host to inject MCEs, you'll need to figure out a way to do it that allows the whole thing to be done without potentially killing the wrong process or In the test it's very simple. The pr

Re: [Qemu-devel] The new qemu.org

2010-02-03 Thread Anthony Liguori
On 02/03/2010 08:11 AM, Natalia Portillo wrote: Indeed that section is just a static HTML so all the wiki advantages get lost with it. It's derived from qemu-doc.texi in the git tree so patches can be submitted against it. I'd like to convert it to just a wiki page but there was quite a bit

Re: [Qemu-devel] The new qemu.org

2010-02-03 Thread Natalia Portillo
Indeed that section is just a static HTML so all the wiki advantages get lost with it. El 03/02/2010, a las 08:07, Jes Sorensen escribió: On 02/02/10 17:22, G 3 wrote: The new site looks nice. When is the Mac OS X section under "Compilation from the sources" going to be updated from the la

Re: [Qemu-devel] [Patch] Support translating Guest physical address to Host virtual address.

2010-02-03 Thread Anthony Liguori
On 02/02/2010 10:04 PM, Zheng, Jiajia wrote: Hi, Any futher comments for this patch so that we can modify? Unfortunately, I see no way to modify this feature so that it would be acceptable to upstream. I think you're going to have to carry this patch for your own debugging. The problem

Re: [Qemu-devel] system_reset command cause assert failed

2010-02-03 Thread Luiz Capitulino
On Wed, 3 Feb 2010 10:09:07 +0800 Roy Tam wrote: > 2010/2/2 Luiz Capitulino : > > On Tue, 2 Feb 2010 09:35:16 +0800 > > Roy Tam wrote: > > > >> 2010/2/2 Luiz Capitulino : > >> > On Tue, 2 Feb 2010 00:26:53 +0800 > >> > Roy Tam wrote: > >> > > >> >> 2010/2/2 Luiz Capitulino : > >> >> > >> >> >

Re: [Qemu-devel] [PATCH 3/5] ide: Generate BLOCK_IO_ERROR QMP event

2010-02-03 Thread Luiz Capitulino
On Wed, 03 Feb 2010 10:10:59 +0100 Kevin Wolf wrote: > Am 03.02.2010 09:31, schrieb Christoph Hellwig: > > On Tue, Feb 02, 2010 at 07:10:11PM -0200, Luiz Capitulino wrote: > >> Just call bdrv_mon_event() in the right place. > >> > >> Signed-off-by: Luiz Capitulino > >> --- > >> hw/ide/core.c |

[Qemu-devel] Re: [PATCH 1/5] QMP: BLOCK_IO_ERROR event handling

2010-02-03 Thread Luiz Capitulino
On Wed, 03 Feb 2010 10:18:37 +0100 Kevin Wolf wrote: > Am 02.02.2010 22:10, schrieb Luiz Capitulino: > > This commit adds the basic definitions for the BLOCK_IO_ERROR > > event, but actual event emission will be introduced by the > > next commits. > > > > NOTE: Adding a small reference in QMP/qm

Re: [Qemu-devel] Need help to run application on QEMU

2010-02-03 Thread Laurent Desnogues
On Wed, Feb 3, 2010 at 11:10 AM, Taimoor Mirza wrote: > Hi all, > > I have been trying to use VGA card and LCD for integrator 926. I've built my > kernel PLUS with graphics support. I used following command to run my PLUS > application on qemu: > > qemu-system-arm -M integratorcp -cpu arm926 -kern

[Qemu-devel] Re: [PATCH v0 0/5]: BLOCK_IO_ERROR QMP event

2010-02-03 Thread Kevin Wolf
Am 02.02.2010 22:10, schrieb Luiz Capitulino: > Hi, > > This series adds the BLOCK_IO_ERROR event libvirt guys have requested, > I have made some improvements after Kevin's feedback and hope it's in better > shape now. > > The only small issue is that I couldn't get a read error. I've followed

[Qemu-devel] Need help to run application on QEMU

2010-02-03 Thread Taimoor Mirza
Hi all, I have been trying to use VGA card and LCD for integrator 926. I've built my kernel PLUS with graphics support. I used following command to run my PLUS application on qemu: qemu-system-arm -M integratorcp -cpu arm926 -kernel ./graphics_demo.out I am getting following error: qemu: fa

[Qemu-devel] [PATCH v2 14/21] qemu-kvm: Rework VCPU state writeback API

2010-02-03 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 v2 13/21] qemu-kvm: Use upstream guest debug code

2010-02-03 Thread Jan Kiszka
Code was absolute identical except for previous cleanup in upstream. Signed-off-by: Jan Kiszka --- kvm-all.c |7 +- kvm.h |4 - qemu-kvm-x86.c| 178 ++-- qemu-kvm.c| 44 - qemu-kvm.h|

[Qemu-devel] [PATCH v2 19/21] qemu-kvm: Clean up KVM's APIC hooks

2010-02-03 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 v2 12/21] qemu-kvm: Use upstream kvm_vcpu_dirty

2010-02-03 Thread Jan Kiszka
Drop regs_modified in favor of upstream's equivalent and clean up kvm_cpu_synchronize_state at this chance. Signed-off-by: Jan Kiszka --- cpu-defs.h |1 - hw/pc.c|2 +- qemu-kvm.c | 18 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/cpu-defs.h b

[Qemu-devel] [PATCH v2 15/21] qemu-kvm: Clean up mpstate synchronization

2010-02-03 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 v2 17/21] qemu-kvm: Use VCPU event state for reset and vmsave/load

2010-02-03 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 v2 21/21] qemu-kvm: Bring qemu_init_vcpu back home

2010-02-03 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] Re: [PATCH 1/5] QMP: BLOCK_IO_ERROR event handling

2010-02-03 Thread Kevin Wolf
Am 02.02.2010 22:10, schrieb Luiz Capitulino: > This commit adds the basic definitions for the BLOCK_IO_ERROR > event, but actual event emission will be introduced by the > next commits. > > NOTE: Adding a small reference in QMP/qmp-events.txt, but this > file is wrong and will be replaced by prop

[Qemu-devel] Re: Question on qcow2 image with base image

2010-02-03 Thread Kevin Wolf
Am 02.02.2010 18:47, schrieb Naphtali Sprei: > Hi, > when I use a qcow2 image based on a base image, what should happen when I > invoke the commit command from the qemu monitor ? > Is it expected/intended to "flush" the data into the base image ? Yes, this is what it's meant to do. > IIUC, that

Re: [Qemu-devel] [PATCH 3/5] ide: Generate BLOCK_IO_ERROR QMP event

2010-02-03 Thread Kevin Wolf
Am 03.02.2010 09:31, schrieb Christoph Hellwig: > On Tue, Feb 02, 2010 at 07:10:11PM -0200, Luiz Capitulino wrote: >> Just call bdrv_mon_event() in the right place. >> >> Signed-off-by: Luiz Capitulino >> --- >> hw/ide/core.c |6 +- >> 1 files changed, 5 insertions(+), 1 deletions(-) >> >

[Qemu-devel] [PATCH v2 20/21] qemu-kvm: Move kvm_set_boot_cpu_id

2010-02-03 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 6c15a9f..3df6195 100644 --- a/hw/pc.c +++

[Qemu-devel] [PATCH v2 05/21] qemu-kvm: Use upstream kvm_enabled and cpu_synchronize_state

2010-02-03 Thread Jan Kiszka
They are identical, no need for private copies. This requires replacing qemu-kvm.h includes with kvm.h, a good thing anyway, and reveals that there is no need for QEMU_KVM_NO_CPU protection. Signed-off-by: Jan Kiszka --- hw/i8254.c|2 +- hw/i8259.c|2 +- hw/ioapic.c |2 +-

[Qemu-devel] [PATCH v2 16/21] KVM: x86: Restrict writeback of VCPU state

2010-02-03 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 v2 11/21] KVM: Rework of guest debug state writing

2010-02-03 Thread Jan Kiszka
So far we synchronized any dirty VCPU state back into the kernel before updating the guest debug state. This was a tribute to a deficite in x86 kernels before 2.6.33. But as this is an arch-dependent issue, it is better handle in the x86 part of KVM and remove the writeback point for generic code.

[Qemu-devel] [PATCH v2 07/21] qemu-kvm: Use some more upstream prototypes

2010-02-03 Thread Jan Kiszka
Drop our private typedef of KVMState and use more identical upstream prototypes. Signed-off-by: Jan Kiszka --- kvm.h | 10 +++--- qemu-kvm.c |4 +++- qemu-kvm.h | 24 +++- 3 files changed, 13 insertions(+), 25 deletions(-) diff --git a/kvm.h b/kvm.h index 05

[Qemu-devel] [PATCH v2 10/21] KVM: Move and rename regs_modified

2010-02-03 Thread Jan Kiszka
Touching the user space representation of KVM's VCPU state is - naturally - a per-VCPU thing. So move the dirty flag into KVM_CPU_COMMON and rename it at this chance to reflect its true meaning. Signed-off-by: Jan Kiszka --- cpu-defs.h |1 + kvm-all.c | 12 ++-- 2 files changed, 7

[Qemu-devel] [PATCH v2 18/21] qemu-kvm: Cleanup/fix TSC and PV clock writeback

2010-02-03 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

[Qemu-devel] [PATCH v2 09/21] qemu-kvm: Use upstream kvm_pit_in_kernel

2010-02-03 Thread Jan Kiszka
Drop private version in favor of recently added upstream service and track it state directly in KVMState. Signed-off-by: Jan Kiszka --- hw/i8254.c |4 ++-- hw/pc.c|2 +- hw/pcspk.c |4 ++-- kvm-all.c |2 +- kvm.h |2 +- qemu-kvm-x86.c | 12

[Qemu-devel] [PATCH v2 04/21] KVM: x86: Fix up misreported CPU features

2010-02-03 Thread Jan Kiszka
>From qemu-kvm: Kernels before 2.6.30 misreported some essential CPU features via KVM_GET_SUPPORTED_CPUID. Fix them up. Signed-off-by: Jan Kiszka --- target-i386/kvm.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 504f

[Qemu-devel] [PATCH v2 08/21] qemu-kvm: Use upstream kvm_arch_get_supported_cpuid

2010-02-03 Thread Jan Kiszka
It is idential to our version now, so drop the copy. Signed-off-by: Jan Kiszka --- kvm.h |3 - qemu-kvm-x86.c| 106 - qemu-kvm.h|5 -- target-i386/kvm.c |4 +- 4 files changed, 2 insertions(+), 116 deletions

[Qemu-devel] [PATCH v2 03/21] qemu-kvm: Clean up register access API

2010-02-03 Thread Jan Kiszka
qemu-kvm's functios for accessing the VCPU registers are kvm_arch_load/save_regs. Use them directly instead of going through various wrappers. Specifically, we do not need on_vcpu wrapping as all users either already run in the related thread or call while the vm is stopped. This is now also valida

[Qemu-devel] [PATCH v2 00/21] qemu-kvm: Hook cleanups and extended use of upstream code

2010-02-03 Thread Jan Kiszka
This version addresses the feedback on v2, namely: - assert( || thread>) on low-level load/save registers - fixed mpstate initialization Yet untested is -no-kvm-irqchip with smp due to some bug in unpatched qemu-kvm or the kernel modules. Still investigating. Pull URL is still git://gi

[Qemu-devel] [PATCH v2 06/21] qemu-kvm: Use upstream kvm_setup_guest_memory

2010-02-03 Thread Jan Kiszka
Nothing missing in upstream kvm_setup_guest_memory, it is even more careful about error handling. Signed-off-by: Jan Kiszka --- kvm-all.c |3 --- kvm.h |3 +-- qemu-kvm.c | 15 --- qemu-kvm.h |1 - 4 files changed, 1 insertions(+), 21 deletions(-) diff --git a/kv

[Qemu-devel] [PATCH v2 02/21] KVM: Make vmport KVM-compatible

2010-02-03 Thread Jan Kiszka
The vmport "device" accesses the VCPU registers, so it requires proper cpu_synchronize_state. Add it to vmport_ioport_read, which also synchronizes vmport_ioport_write. Signed-off-by: Jan Kiszka --- hw/vmport.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/vmport.

[Qemu-devel] [PATCH v2 01/21] qemu-kvm: Drop vmport changes

2010-02-03 Thread Jan Kiszka
This attempt to make vmport KVM compatible is half-broken and is scheduled to be replaced by proper upstream support. Signed-off-by: Jan Kiszka --- hw/vmport.c | 13 + 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/hw/vmport.c b/hw/vmport.c index 648861b..884af3f 1

Re: [Qemu-devel] [PATCH 3/5] ide: Generate BLOCK_IO_ERROR QMP event

2010-02-03 Thread Christoph Hellwig
On Tue, Feb 02, 2010 at 07:10:11PM -0200, Luiz Capitulino wrote: > Just call bdrv_mon_event() in the right place. > > Signed-off-by: Luiz Capitulino > --- > hw/ide/core.c |6 +- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/hw/ide/core.c b/hw/ide/core.c > index b66

[Qemu-devel] running qemu-system-mipsel with VGA graphic mode based malta board kernel

2010-02-03 Thread daniel tian
Hi, Aurelien Jarno: I just encounter a problem in running kernel on qemu mips malta board, I don't know how to bring up the graphic mode. with the option --nographic, it's ok: the kernel and rootfs run successfully. But I after removing the --nographic, qemu window is black-blank, no single word

Re: [Qemu-devel] The new qemu.org

2010-02-03 Thread Jes Sorensen
On 02/02/10 17:22, G 3 wrote: The new site looks nice. When is the Mac OS X section under "Compilation from the sources" going to be updated from the lame "The Mac OS X patches are not fully merged in QEMU, so you should look at the QEMU mailing list archive to have all the necessary information.