[Qemu-devel] Re: Network shutdown under load

2010-02-02 Thread RW
Hi, we're currently having this problem on two production servers that 2-4 times a day one interface shuts down. We've four KVMs running on two hosts (2x2). All VMs have eth0 and eth1 running virtio_net. All eth0's are connected to bridge br0 and all eth1's are connected to br1 on the host. Here a

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

2010-02-02 Thread Zheng, Jiajia
Hi, Any futher comments for this patch so that we can modify? thanks, jiajia Max Asbock wrote: > On Wed, 2010-01-27 at 15:39 -0600, Anthony Liguori wrote: >> On 01/26/2010 09:25 PM, Zheng, Jiajia wrote: >>> Add command p2v to translate Guest physical address to Host virtual >>> address. >>> >

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

2010-02-02 Thread Roy Tam
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 : >> >> >> >> > Hm, I'm puzzled. Is this failing on malloc()? At least qemu_malloc() >> >

Re: [Qemu-devel] usb-host quirks

2010-02-02 Thread David S. Ahern
On 02/02/2010 06:42 AM, Michael Buesch wrote: > Hi, > > I've got a buggy device that needs a special workaround to be usable under > host-usb access. The device really doesn't like being reset via > USBDEVFS_RESET. It > immediatenly locks up the device firmware or whatever. It won't respond > p

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

2010-02-02 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 4/5] scsi: Generate BLOCK_IO_ERROR QMP event

2010-02-02 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 3/5] ide: Generate BLOCK_IO_ERROR QMP event

2010-02-02 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-02 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-02 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. NOTE: Adding a small reference in QMP/qmp-events.txt, but this file is wrong and will be replaced by proper documentation shortly. Signed-off-by: Luiz Capitulino

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

2010-02-02 Thread 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 Kevin's advices wrt NFS, but got only write errors... I'v

[Qemu-devel] Re: [PATCH] Add cpu model configuration support.. (resend)

2010-02-02 Thread john cooper
Andre Przywara wrote: >> +[cpudef] >> + name = "Conroe" >> + level = "2" >> + vendor = "GenuineIntel" >> + family = "6" >> + model = "2" >> + stepping = "3" >> + feature_edx = "sse2 sse fxsr mmx pat cmov pge sep apic cx8 mce pae >> msr tsc pse de fpumtrr clflush mca pse36" >> +

[Qemu-devel] [PATCH 3/3] fix placement of config-host.h inclusion

2010-02-02 Thread Paolo Bonzini
The #ifdef CONFIG_SOLARIS below was useless without this patch. Signed-off-by: Paolo Bonzini --- osdep.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/osdep.c b/osdep.c index cf3a2c6..9059f01 100644 --- a/osdep.c +++ b/osdep.c @@ -28,14 +28,15 @@ #include #inc

[Qemu-devel] [PATCH 2/3] loop write in qemu_event_increment upon EINTR

2010-02-02 Thread Paolo Bonzini
Same as what qemu-kvm does. Signed-off-by: Paolo Bonzini --- vl.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 46c1118..f150eca 100644 --- a/vl.c +++ b/vl.c @@ -3198,8 +3198,12 @@ static void qemu_event_increment(void) if (io_thread_fd ==

[Qemu-devel] [PATCH 1/3] do not loop on an incomplete io_thread_fd read

2010-02-02 Thread Paolo Bonzini
No need to loop if less than a full buffer is read, the next read would return EAGAIN. Signed-off-by: Paolo Bonzini --- vl.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 6f1e1ab..46c1118 100644 --- a/vl.c +++ b/vl.c @@ -3210,12 +3210,12 @@ static

[Qemu-devel] [PATCH 0/3] Event signaling tweaks

2010-02-02 Thread Paolo Bonzini
This series of three patches makes two small changes to qemu_event_read and qemu_event_increment. These are preparatory to merging eventfd usage in the iothread from qemu-kvm (which would have conflicts, so it has to be done with some care). Paolo Bonzini (3): do not loop on an incomplete io_th

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

2010-02-02 Thread 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 ? IIUC, that is what happening in the released qemu (0.12). I would expect it not to touch the base image.

[Qemu-devel] KVM developer call minutes (Feb 2)

2010-02-02 Thread Chris Wright
Minutes (please reply w/ corrections or follow-ups): state of in-kernel APIC/IOAPIC/PIT upstream merge - Glauber?... road map to get rid of qemu-kvm's slot management (IMHO: qemu-kvm-0.13) - no real feedback here - any further ongoing/planned upstream merge efforts? - SMP - needs in-kernel

[Qemu-devel] The new qemu.org

2010-02-02 Thread G 3
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.". This is unacceptable.

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

2010-02-02 Thread Markus Armbruster
Luiz Capitulino writes: > On Tue, 02 Feb 2010 09:03:32 +0100 > Markus Armbruster wrote: > >> Luiz Capitulino writes: >> >> > On Mon, 01 Feb 2010 20:37:41 +0100 >> > Markus Armbruster wrote: >> > >> >> Luiz Capitulino writes: >> >> >> >> > On Mon, 01 Feb 2010 18:08:27 +0100 >> >> > Markus Ar

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

2010-02-02 Thread Jan Kiszka
Gleb Natapov wrote: > On Tue, Feb 02, 2010 at 03:20:02PM +0100, Jan Kiszka wrote: >> Gleb Natapov wrote: >>> On Tue, Feb 02, 2010 at 09:19:06AM +0100, Jan Kiszka wrote: Setting the boot CPU ID is arch-specific KVM stuff. So push it where it belongs to. >>> pc_init1 is also arch-speci

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

2010-02-02 Thread Gleb Natapov
On Tue, Feb 02, 2010 at 03:20:02PM +0100, Jan Kiszka wrote: > Gleb Natapov wrote: > > On Tue, Feb 02, 2010 at 09:19:06AM +0100, Jan Kiszka wrote: > >> Setting the boot CPU ID is arch-specific KVM stuff. So push it where it > >> belongs to. > >> > > pc_init1 is also arch-specific, no? TCG should als

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

2010-02-02 Thread Kevin Wolf
Checking for return codes < 0 isn't really going to work with unsigned types. Use signed types instead. Signed-off-by: Kevin Wolf --- block/qcow2-cluster.c | 12 ++-- block/qcow2.h |6 ++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/block/qcow2-cluste

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

2010-02-02 Thread Jan Kiszka
Gleb Natapov wrote: > On Tue, Feb 02, 2010 at 09:19:06AM +0100, Jan Kiszka wrote: >> Setting the boot CPU ID is arch-specific KVM stuff. So push it where it >> belongs to. >> > pc_init1 is also arch-specific, no? TCG should also be able to > have BSP apic_id != 0. But not kvm-specific. I don't un

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

2010-02-02 Thread Gleb Natapov
On Tue, Feb 02, 2010 at 09:19:06AM +0100, Jan Kiszka wrote: > Setting the boot CPU ID is arch-specific KVM stuff. So push it where it > belongs to. > pc_init1 is also arch-specific, no? TCG should also be able to have BSP apic_id != 0. > Signed-off-by: Jan Kiszka > --- > hw/pc.c|3 -

[Qemu-devel] usb-host quirks

2010-02-02 Thread Michael Buesch
Hi, I've got a buggy device that needs a special workaround to be usable under host-usb access. The device really doesn't like being reset via USBDEVFS_RESET. It immediatenly locks up the device firmware or whatever. It won't respond properly anymore. With the following patch it works fine, thou

Re: [Qemu-devel] [ANNOUNCE] New qemu.org website

2010-02-02 Thread Anthony Liguori
On 02/02/2010 12:05 AM, Mulyadi Santosa wrote: On Mon, Feb 1, 2010 at 9:26 PM, Anthony Liguori wrote: Hi, The new qemu.org wiki is now live. I've transferred all of the content from the old website and have now switched www.qemu.org to redirect to wiki.qemu.org. Hi Anthony... Righ

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

2010-02-02 Thread 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 : > >> > >> > Hm, I'm puzzled. Is this failing on malloc()? At least qemu_malloc() > >> > is the last qemu's function I see in

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

2010-02-02 Thread Jan Kiszka
Gleb Natapov wrote: > On Tue, Feb 02, 2010 at 01:31:50PM +0100, Jan Kiszka wrote: >> Gleb Natapov wrote: >>> On Tue, Feb 02, 2010 at 09:19:01AM +0100, Jan Kiszka wrote: Push mpstate reading/writing into kvm_arch_load/save_regs and, on x86, properly synchronize with halted in the accessor

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

2010-02-02 Thread Gleb Natapov
On Tue, Feb 02, 2010 at 01:31:50PM +0100, Jan Kiszka wrote: > Gleb Natapov wrote: > > On Tue, Feb 02, 2010 at 09:19:01AM +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. > >> > >> Si

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

2010-02-02 Thread Jan Kiszka
Gleb Natapov wrote: > On Tue, Feb 02, 2010 at 09:19:01AM +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 >> --- >> hw/apic.c |7 >>

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

2010-02-02 Thread Gleb Natapov
On Tue, Feb 02, 2010 at 09:19:01AM +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 > --- > hw/apic.c |7 > qemu-kvm-ia64.c |

[Qemu-devel] Re: [RFC 0/2]: QMP DISK_ERROR event

2010-02-02 Thread Kevin Wolf
Am 02.02.2010 13:17, schrieb Luiz Capitulino: >>> 3. Is this the right approach at all? :) >> >> Yes and no. As I said above, drive_get_on_error() is not the right place >> to do it. Unfortunately it looks like there isn't a single generic place >> where it can be done, but the call to the event ha

[Qemu-devel] Re: [RFC 0/2]: QMP DISK_ERROR event

2010-02-02 Thread Luiz Capitulino
On Tue, 02 Feb 2010 10:25:19 +0100 Kevin Wolf wrote: > Hi Luiz, > > Am 01.02.2010 19:07, schrieb Luiz Capitulino: > > Hi there, > > > > I've been requested by libvirt guys to add a QMP event for disk I/O errors, > > this is what this series is about. > > > > It's a RFC because I need feedba

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

2010-02-02 Thread Luiz Capitulino
On Tue, 02 Feb 2010 09:03:32 +0100 Markus Armbruster wrote: > Luiz Capitulino writes: > > > On Mon, 01 Feb 2010 20:37:41 +0100 > > Markus Armbruster wrote: > > > >> Luiz Capitulino writes: > >> > >> > On Mon, 01 Feb 2010 18:08:27 +0100 > >> > Markus Armbruster wrote: > [...] > >> >> I don't

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

2010-02-02 Thread Jan Kiszka
Alexander Graf wrote: > On 02.02.2010, at 09:18, Jan Kiszka wrote: > >> Let's start with the overall stats: >> >> 31 files changed, 274 insertions(+), 822 deletions(-) >> >> So this series drops far more than 500 lines of redundant code, moving >> qemu-kvm yet a bit closer to upstream. >> >> The o

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

2010-02-02 Thread Jan Kiszka
Gleb Natapov wrote: > On Tue, Feb 02, 2010 at 09:18:49AM +0100, Jan Kiszka wrote: >> 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 eit

[Qemu-devel] Re: [PATCH] Add cpu model configuration support.. (resend)

2010-02-02 Thread Andre Przywara
John, just two comments from skimming through the patch: diff --git a/sysconfigs/target/target-x86_64.conf b/sysconfigs/target/target-x86_64.conf new file mode 100644 index 000..43ad282 --- /dev/null +++ b/sysconfigs/target/target-x86_64.conf @@ -0,0 +1,86 @@ +# x86 CPU MODELS + +[cpudef]

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

2010-02-02 Thread Gleb Natapov
On Tue, Feb 02, 2010 at 09:18:49AM +0100, Jan Kiszka wrote: > 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 rel

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

2010-02-02 Thread Alexander Graf
On 02.02.2010, at 09:18, Jan Kiszka wrote: > Let's start with the overall stats: > > 31 files changed, 274 insertions(+), 822 deletions(-) > > So this series drops far more than 500 lines of redundant code, moving > qemu-kvm yet a bit closer to upstream. > > The other highlight is the simplifi

Re: [Qemu-devel] [PATCH 2/5] socket: Add a reconnect option.

2010-02-02 Thread Ian Molton
Anthony Liguori wrote: > I'm all for doing things incrementally but there has to be a big picture > that the incremental bit fits into otherwise you end up with a bunch of > random features that don't work together well. Well, if you just add stuff without ever changing anything that went before,

[Qemu-devel] Re: [PATCH] Add cpu model configuration support.. (resend)

2010-02-02 Thread Andre Przywara
john cooper wrote: [target-x86_64.conf was unintentionally omitted from the earlier patch] This is a reimplementation of prior versions which adds the ability to define cpu models for contemporary processors. The added models are likewise selected via -cpu , and are intended to displace the exi

[Qemu-devel] [PATCH 13/13] cpuid: fix CPUID levels

2010-02-02 Thread Andre Przywara
Bump up the xlevel number for qemu32 to allow parsing of the processor name string for this model. Similiarly the 486 processor should have at least the feature bit leaf enabled. Signed-off-by: Andre Przywara --- target-i386/cpuid.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH 12/13] cpuid: Add kvm32 CPU model

2010-02-02 Thread Andre Przywara
Create a kvm32 CPU model that describes a least common denominator for KVM capable guest CPUs. Useful for migration purposes. Signed-off-by: Andre Przywara --- target-i386/cpuid.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/target-i386/cpuid.c b/target-

[Qemu-devel] [PATCH 06/13] cpuid: list all known x86 CPUID feature flags

2010-02-02 Thread Andre Przywara
-cpu ? currently gives us a list of known CPU models. Add "host" if using KVM and a list of known CPUID feature flags to the output. Signed-off-by: Andre Przywara --- target-i386/cpuid.c | 22 +- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/target-i386/cp

[Qemu-devel] [PATCH 07/13] cpuid: remove unnecessary kvm_trim function

2010-02-02 Thread Andre Przywara
Correct me if I am wrong, but kvm_trim looks like a really bloated implementation of a bitwise AND. So remove this function and replace it with the real stuff(TM). Signed-off-by: Andre Przywara --- target-i386/kvm.c | 27 ++- 1 files changed, 6 insertions(+), 21 deletio

[Qemu-devel] [PATCH 04/13] cpuid: Replace strtok with get_opt_name

2010-02-02 Thread Andre Przywara
To avoid the non-reentrant capable strtok() use the QEMU defined get_opt_name() to parse the -cpu parameter list. Since there is a name clash between linux-user/mmap.c:qemu_malloc() and qemu-malloc.c:qemu_malloc() I copied the small function from qemu-option.c into cpuid.c. Not the best solution, b

[Qemu-devel] [PATCH 09/13] cpuid: propagate further CPUID leafs when -cpu host

2010-02-02 Thread Andre Przywara
-cpu host currently only propagates the CPU's family/model/stepping, the brand name and the feature bits. Add a whitelist of safe CPUID leafs to let the guest see the actual CPU's cache details and other things. Signed-off-by: Andre Przywara --- target-i386/cpu.h |5 - target-i386/cpui

[Qemu-devel] [PATCH 03/13] cpuid: moved host_cpuid function and remove prototype

2010-02-02 Thread Andre Przywara
the host_cpuid function was located at the end of the file and had a prototype before it's first use. Move it up and remove the prototype. Signed-off-by: Andre Przywara --- target-i386/cpuid.c | 70 -- 1 files changed, 34 insertions(+), 36 deleti

[Qemu-devel] [PATCH 10/13] cpuid: add TCG feature bit trimming

2010-02-02 Thread Andre Przywara
In KVM we trim the user provided CPUID bits to match the host CPU's one. Introduce a similar feature to QEMU/TCG. Create a mask of TCG's capabilities and apply it to the user bits. This allows to let the CPU models reflect their native archetypes. Signed-off-by: Andre Przywara --- target-i386/cp

[Qemu-devel] [PATCH 11/13] cpuid: Always expose 32 and 64-bit CPUs

2010-02-02 Thread Andre Przywara
Since 64-bit capability is just another CPUID bit we now properly mask, there is no reason anymore to hide the 64-bit capable CPU models from a 32-bit only QEMU. All 64-bit CPUs can be used perfectly in 32-bit legacy mode anyway, so these models also make sense for 32-bit. Signed-off-by: Andre Prz

[Qemu-devel] [PATCH 08/13] cpuid: simplify CPUID flag search function

2010-02-02 Thread Andre Przywara
avoid code duplication and handle the CPUID flag name search in a loop. Signed-off-by: Andre Przywara --- target-i386/cpuid.c | 38 +- 1 files changed, 13 insertions(+), 25 deletions(-) diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index 3f56c50..6

[Qemu-devel] [PATCH 05/13] cpuid: add missing CPUID feature flag names

2010-02-02 Thread Andre Przywara
Some CPUID feature flags had no string value, so they could not be switched on or off from the command line. Add names for the missing ones mentioned in the current public CPUID specification from both Intel and AMD. Those only mentioned in the Linux kernel source I put as comments. Signed-off-by:

[Qemu-devel] [PATCH 02/13] cpuid: replace magic number with named constant

2010-02-02 Thread Andre Przywara
CPUID leaf Fn8000_0001.EDX contains a copy of many Fn_0001.EDX bits. Define a name for the mask to improve readability and avoid typos. Signed-off-by: Andre Przywara --- target-i386/cpuid.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/target-i386/cpuid.c

[Qemu-devel] [PATCH 00/13] i386 cpuid: cleanup and fixes

2010-02-02 Thread Andre Przywara
Hi, first: I know that this conflicts with John Cooper's latest patch, but I want to send this out for review and to help merging the stuff. This patchset cleans up the CPUID handling code in QEMU. The biggest change is obviously the move of the CPUID function to a separate file (cpuid.c). This h

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

2010-02-02 Thread Jan Kiszka
Chris Wright wrote: > Please send in any agenda items you are interested in covering. [not sure, though, if I'll manage to join do to overlapping meeting] - state of in-kernel APIC/IOAPIC/PIT upstream merge - road map to get rid of qemu-kvm's slot management (IMHO: qemu-kvm-0.13) - any further

[Qemu-devel] Re: [PATCH 2/2] QMP: Introduce DISK_ERROR event

2010-02-02 Thread Kevin Wolf
Am 01.02.2010 19:07, schrieb Luiz Capitulino: > It's emitted when a disk write or read fails, some device information > is provided. We can also provide error details in the future. > > Example: > > { "event": "DISK_ERROR", > "data": { "device": "ide0-hd1", > "operation": "write

[Qemu-devel] Re: [RFC 0/2]: QMP DISK_ERROR event

2010-02-02 Thread Kevin Wolf
Hi Luiz, Am 01.02.2010 19:07, schrieb Luiz Capitulino: > Hi there, > > I've been requested by libvirt guys to add a QMP event for disk I/O errors, > this is what this series is about. > > It's a RFC because I need feedback on the following: > > 1. drive_get_on_error() is called on all disk e

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

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

2010-02-02 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 07/21] qemu-kvm: Use some more upstream prototypes

2010-02-02 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 08/21] qemu-kvm: Use upstream kvm_arch_get_supported_cpuid

2010-02-02 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 19/21] qemu-kvm: Clean up KVM's APIC hooks

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

2010-02-02 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 06/21] qemu-kvm: Use upstream kvm_setup_guest_memory

2010-02-02 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 05/21] qemu-kvm: Use upstream kvm_enabled and cpu_synchronize_state

2010-02-02 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 15/21] qemu-kvm: Clean up mpstate synchronization

2010-02-02 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| 88 +++--

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

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

2010-02-02 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 10/21] KVM: Move and rename regs_modified

2010-02-02 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 09/21] qemu-kvm: Use upstream kvm_pit_in_kernel

2010-02-02 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 16/21] KVM: x86: Restrict writeback of VCPU state

2010-02-02 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 00/21] qemu-kvm: Hook cleanups and extended use of upstream code

2010-02-02 Thread Jan Kiszka
Let's start with the overall stats: 31 files changed, 274 insertions(+), 822 deletions(-) So this series drops far more than 500 lines of redundant code, moving qemu-kvm yet a bit closer to upstream. The other highlight is the simplification of synchronization between in-kernel and user space V

[Qemu-devel] [PATCH 17/21] qemu-kvm: Use VCPU event state for reset and vmsave/load

2010-02-02 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 18/21] qemu-kvm: Cleanup/fix TSC and PV clock writeback

2010-02-02 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 01/21] qemu-kvm: Drop vmport changes

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

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

2010-02-02 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 1/2] powerpc/booke: move fdt loading to rom infrastructure

2010-02-02 Thread Liu Yu
It's convinent to use rom to checking overlap, to reset etc. And uImage and ramdisk loading has already moved to it. Also, after we add fdt to rom, free it. Signed-off-by: Liu Yu --- hw/ppc440_bamboo.c | 15 --- hw/ppce500_mpc8544ds.c | 17 ++--- 2 files changed,

[Qemu-devel] [PATCH 2/2] powerpc/e500: adjust fdt and ramdisk loading addr

2010-02-02 Thread Liu Yu
Since kernel uimage is getting bigger, old fixed loading bases will result in regions overlap. Add pad for fdt and ramdisk, so that they won't overlap with uimage. Signed-off-by: Liu Yu --- hw/ppce500_mpc8544ds.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git

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

2010-02-02 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 03/21] qemu-kvm: Clean up register access API

2010-02-02 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. Signed-off-by: Jan Kis

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

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

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

2010-02-02 Thread Markus Armbruster
Luiz Capitulino writes: > On Mon, 01 Feb 2010 20:37:41 +0100 > Markus Armbruster wrote: > >> Luiz Capitulino writes: >> >> > On Mon, 01 Feb 2010 18:08:27 +0100 >> > Markus Armbruster wrote: [...] >> >> I don't doubt your design does the job. I just think it's overly >> >> general. I had som