Re: [PATCH RFC v2 1/4] Introduce kvm_vcpu_is_bsp() function.

2009-05-26 Thread Gleb Natapov
On Mon, May 25, 2009 at 05:46:22PM -0300, Marcelo Tosatti wrote: On Mon, May 25, 2009 at 06:50:33PM +0300, Gleb Natapov wrote: Use it instead of open code vcpu_id zero is BSP assumption. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/ia64/kvm/kvm-ia64.c |2 +-

Re: [Qemu-devel] [PATCH 04/11] qemu: helper routines for pci access.

2009-05-26 Thread Michael S. Tsirkin
On Tue, May 26, 2009 at 11:33:37AM +0900, Isaku Yamahata wrote: On Mon, May 25, 2009 at 03:25:33PM +0300, Michael S. Tsirkin wrote: Add inline routines for convenient access to pci devices with correct (little) endianness. Will be used by MSI-X support. Just a minor comment. How about to

Re: [PATCH] kvm-kmod: Various compat fixes for older kernels

2009-05-26 Thread Avi Kivity
Jan Kiszka wrote: Various fixes that were required to build against a 2.6.18 kernel, but some affect newer kernels, too: - replacements for uaccess.h and relay.h - flush_work compat wrapper - fix msi_enabled hack - hack eventfd.c for INIT_WORK Please split into separate patches.

Re: [PATCH 3/3] kvm-s390: streamline memslot handling

2009-05-26 Thread Avi Kivity
Christian Ehrhardt wrote: There already exists a loop which does this, see make_all_cpus_request(). It uses an IPI (Marcelo, can't it use the reschedule interrupt?). It has a couple of optimizations -- if the request is already set, it skips the IPI, and it avoids the IPI for vcpus out of

Re: [PATCH 1/3] kvm-s390: infrastructure to kick vcpus out of guest state

2009-05-26 Thread Christian Ehrhardt
Marcelo Tosatti wrote: On Mon, May 25, 2009 at 01:40:49PM +0200, ehrha...@linux.vnet.ibm.com wrote: From: Christian Ehrhardt ehrha...@linux.vnet.ibm.com To ensure vcpu's come out of guest context in certain cases this patch adds a s390 specific way to kick them out of guest context.

Re: 64bit guest thinks it is 32bit in kvm-86 - Intel only

2009-05-26 Thread Avi Kivity
Josh Wilsdon wrote: the kernel refuses to boot with the error message: This kernel requires an x86-64 CPU, but only detected an i686 CPU. Unable to boot - please use a kernel appropriate for your CPU. This should fix it:

Re: [PATCH] kvmtrace_format: read /usr/share/kvm/formats by default

2009-05-26 Thread Avi Kivity
Eduardo Habkost wrote: This will help distributions to package kvmtrace and kvmtrace_format, making kvmtrace_format work out-of-the-box. The directory is defined at the beginning of the script to make it easier for distributions to customize the path at install-time, depending on packaging

Re: [Qemu-devel] [PATCH 04/11] qemu: helper routines for pci access.

2009-05-26 Thread Avi Kivity
Michael S. Tsirkin wrote: On Tue, May 26, 2009 at 11:33:37AM +0900, Isaku Yamahata wrote: On Mon, May 25, 2009 at 03:25:33PM +0300, Michael S. Tsirkin wrote: Add inline routines for convenient access to pci devices with correct (little) endianness. Will be used by MSI-X support.

Re: [PATCH -v3] KVM: MCE: Add MCE support to KVM

2009-05-26 Thread Avi Kivity
Jan Kiszka wrote: Well, if I look at the definition of MCI_STATUS_VAL as (1UL63), something tells me: Hey, only use me on 64-bit hosts! But I have no clue about details of this stuff, and from a second glance at it is seems to include at least some parts that are valid on 32-bit as well.

Re: [PATCH RFC v2 4/4] Use macro to iterate over vcpus.

2009-05-26 Thread Avi Kivity
Gleb Natapov wrote: void kvm_arch_sync_events(struct kvm *kvm) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 0934df3..34634e0 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -170,6 +170,17 @@ struct kvm { #define kvm_printf(kvm, fmt ...)

Re: [PATCH] kvm-kmod: Various compat fixes for older kernels

2009-05-26 Thread Amit Shah
On (Tue) May 26 2009 [10:49:35], Avi Kivity wrote: I had these two already, but not pushed. Maybe I need to have a script push my master branch somewhere, so you don't duplicate my work needlessly. A 'next' branch that's the real bleeding-edge, while the patches get tested and master gets

Re: [PATCH RFC v2 2/4] Use pointer to vcpu instead of vcpu_id in timer code.

2009-05-26 Thread Avi Kivity
Gleb Natapov wrote: Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/i8254.c |2 +- arch/x86/kvm/kvm_timer.h |2 +- arch/x86/kvm/lapic.c |2 +- arch/x86/kvm/timer.c |2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/i8254.c

Re: Need a new plan on adding kvm support to qemu

2009-05-26 Thread Anthony Liguori
Avi Kivity wrote: While I appreciate the efforts to add clean qemu/kvm integration in upstream, it's driving me mad. Every merge I'm faced with regressions (mostly due to changing code, not to upstream breakage) and need to fix things. Work done during merges is very likely to contain

Re: [PATCH 3/3] kvm-s390: streamline memslot handling

2009-05-26 Thread Christian Bornträger
Am Dienstag 26 Mai 2009 09:57:58 schrieb Avi Kivity: I could add that behaviour, but that could make our normal interrupt handling much slower. Therefore I don't want to call that function, but on the other hand I like the skip if the request is already set functionality and think about

context switches and responsiveness

2009-05-26 Thread Antoine Martin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi, I've recently increased the number of guests (+20%) running on one of my hosts and found that the responsiveness suffered. Before that, the context switches were hovering around 10K, now they're close to 30K. Or this could just be because I

Re: [PATCH RFC v2 3/4] Break dependency between vcpu index in vcpus array and vcpu_id.

2009-05-26 Thread Avi Kivity
Gleb Natapov wrote: Archs are free to use vcpu_id as they see fit. For x86 it is used as vcpu's apic id. You need a KVM_CAP to inform userspace that the vcpu id has changed meaning. inline int kvm_is_mmio_pfn(pfn_t pfn) { if (pfn_valid(pfn)) { @@ -1713,15 +1708,12 @@ static int

Re: [PATCH] qemu: virtio save/load bindings

2009-05-26 Thread Anthony Liguori
Michael S. Tsirkin wrote: Implement bindings for virtio save/load. Use them in virtio pci. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Is anyone working to fill in load/save bindings so that saving virtio devices works? Here's a trivial patch to do this (this one is on top of my

Re: [KVM-AUTOTEST PATCH] kvm_utils.py: remote_login(): improve regular expression matching

2009-05-26 Thread sudhir kumar
On Mon, May 25, 2009 at 2:15 PM, Michael Goldish mgold...@redhat.com wrote: - sudhir kumar smalik...@gmail.com wrote: The patch looks sane to me. A very good thing that can be done for remote_login() is to tune the tmeouts. I have seen especialy with windows guests or sometimes when the

Re: [PATCH RFC v2 4/4] Use macro to iterate over vcpus.

2009-05-26 Thread Gleb Natapov
On Tue, May 26, 2009 at 11:18:11AM +0300, Avi Kivity wrote: Gleb Natapov wrote: void kvm_arch_sync_events(struct kvm *kvm) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 0934df3..34634e0 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -170,6

Re: [Qemu-devel] [PATCH 03/11] qemu: add routines to manage PCI capabilities

2009-05-26 Thread Isaku Yamahata
On Mon, May 25, 2009 at 03:25:20PM +0300, Michael S. Tsirkin wrote: Add routines to manage PCI capability list. First user will be MSI-X. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/pci.c | 98 -- hw/pci.h | 18

Re: [PATCH RFC v2 2/4] Use pointer to vcpu instead of vcpu_id in timer code.

2009-05-26 Thread Gleb Natapov
On Tue, May 26, 2009 at 11:30:21AM +0300, Avi Kivity wrote: Gleb Natapov wrote: Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/i8254.c |2 +- arch/x86/kvm/kvm_timer.h |2 +- arch/x86/kvm/lapic.c |2 +- arch/x86/kvm/timer.c |2 +- 4 files changed,

Re: [Qemu-devel] [PATCH 04/11] qemu: helper routines for pci access.

2009-05-26 Thread Michael S. Tsirkin
On Tue, May 26, 2009 at 11:07:33AM +0300, Avi Kivity wrote: Michael S. Tsirkin wrote: On Tue, May 26, 2009 at 11:33:37AM +0900, Isaku Yamahata wrote: On Mon, May 25, 2009 at 03:25:33PM +0300, Michael S. Tsirkin wrote: Add inline routines for convenient access to pci devices with

Re: [PATCH RFC v2 3/4] Break dependency between vcpu index in vcpus array and vcpu_id.

2009-05-26 Thread Gleb Natapov
On Tue, May 26, 2009 at 11:34:01AM +0300, Avi Kivity wrote: Gleb Natapov wrote: Archs are free to use vcpu_id as they see fit. For x86 it is used as vcpu's apic id. You need a KVM_CAP to inform userspace that the vcpu id has changed meaning. Will add. inline int kvm_is_mmio_pfn(pfn_t

Re: [PATCH RFC v2 4/4] Use macro to iterate over vcpus.

2009-05-26 Thread Avi Kivity
Gleb Natapov wrote: + +#define kvm_for_each_vcpu(idx, vcpup, kvm) \ + for (idx = 0, vcpup = kvm_get_vcpu(kvm, idx); \ +idx atomic_read(kvm-online_vcpus) vcpup; \ +vcpup = kvm_get_vcpu(kvm, ++idx)) + This will stop when reaching the first empty

Re: [PATCH RFC v2 3/4] Break dependency between vcpu index in vcpus array and vcpu_id.

2009-05-26 Thread Avi Kivity
Gleb Natapov wrote: Don't the vcpu ioctls need to be updated? They get the vcpu id as a parameter. Are you sure they do? vcpu ioctls are issued on vcpu fd, no need to pass vcpu id as a parameter. You're right, I was confused with an earlier version of the interface, and with

Re: [PATCH] kvm-kmod: Various compat fixes for older kernels

2009-05-26 Thread Jan Kiszka
Avi Kivity wrote: Jan Kiszka wrote: Various fixes that were required to build against a 2.6.18 kernel, but some affect newer kernels, too: - replacements for uaccess.h and relay.h - flush_work compat wrapper - fix msi_enabled hack - hack eventfd.c for INIT_WORK Please split

Re: context switches and responsiveness

2009-05-26 Thread Avi Kivity
Antoine Martin wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi, I've recently increased the number of guests (+20%) running on one of my hosts and found that the responsiveness suffered. How many guests? How many vcpus? Before that, the context switches were hovering around

Re: [PATCH] kvm-kmod: Various compat fixes for older kernels

2009-05-26 Thread Avi Kivity
Jan Kiszka wrote: Maybe I need to have a script push my master branch somewhere, so you don't duplicate my work needlessly. That would be highly appreciated. I'm thinking how to do it. pushing requires an ssh key, and I don't want to leave one around without a passphrase,

Re: [Qemu-devel] [PATCH 03/11] qemu: add routines to manage PCI capabilities

2009-05-26 Thread Michael S. Tsirkin
On Tue, May 26, 2009 at 05:49:26PM +0900, Isaku Yamahata wrote: On Mon, May 25, 2009 at 03:25:20PM +0300, Michael S. Tsirkin wrote: Add routines to manage PCI capability list. First user will be MSI-X. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/pci.c | 98

Re: [PATCH 3/3] kvm-s390: streamline memslot handling

2009-05-26 Thread Avi Kivity
Christian Bornträger wrote: Am Dienstag 26 Mai 2009 09:57:58 schrieb Avi Kivity: I could add that behaviour, but that could make our normal interrupt handling much slower. Therefore I don't want to call that function, but on the other hand I like the skip if the request is already set

Re: [PATCH] kvm-kmod: Various compat fixes for older kernels

2009-05-26 Thread Avi Kivity
Jan Kiszka wrote: I'm thinking how to do it. pushing requires an ssh key, and I don't want to leave one around without a passphrase, which would be required by a cron job. Any ideas? Local commit hook that triggers the push (and ask you for the phrase interactively)? But that also

[PATCH] qemu: fix pci_find_capability for multiple caps

2009-05-26 Thread Michael S. Tsirkin
pci_find_capability_list has a bug so it'd stop at the first capability. This only happens to work as we only support a single capability (MSI-X). Here's a fix. Found-by: Isaku Yamahata yamah...@valinux.co.jp Signed-off-by: Michael S. Tsirkin m...@redhat.com --- This is a fixup for my patch

Re: context switches and responsiveness [SOLVED]

2009-05-26 Thread Antoine Martin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Ah, -usbdevice tablet, interrupt generator from hell. Let it go and you'll see your context switch rate drop. Indeed that solved it! (only kept it for the one windows guest that really needs it) Many many thanks. - total-cpu-usage

Re: context switches and responsiveness [SOLVED]

2009-05-26 Thread Avi Kivity
Antoine Martin wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Ah, -usbdevice tablet, interrupt generator from hell. Let it go and you'll see your context switch rate drop. Indeed that solved it! (only kept it for the one windows guest that really needs it) Many many thanks.

Re: context switches and responsiveness [SOLVED]

2009-05-26 Thread Antoine Martin
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Avi Kivity wrote: Antoine Martin wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Ah, -usbdevice tablet, interrupt generator from hell. Let it go and you'll see your context switch rate drop. Indeed that solved it! (only kept

Re: Add qemu_send_raw() to vlan.

2009-05-26 Thread Avi Kivity
Gleb Natapov wrote: It gets packet without virtio header and adds it if needed. Allows to inject packets to vlan from outside. To send gracious arp for instance. This is for announce_self(), no? If so, upstream has the same problems? -- error compiling committee.c: too many arguments to

Add qemu_send_raw() to vlan.

2009-05-26 Thread Gleb Natapov
It gets packet without virtio header and adds it if needed. Allows to inject packets to vlan from outside. To send gracious arp for instance. diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 8e9178d..3c77b99 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -389,7 +389,7 @@ static int

Re: context switches and responsiveness [SOLVED]

2009-05-26 Thread Avi Kivity
Antoine Martin wrote: Switching to a better vnc client (I use vinagre) may allow you to drop it. I thought I had tried them all in desperation (mouse going out of sync), I'll try again. Vinagre does mouse capture like SDL. It isn't perfect, but much better than the standard vnc

Re: Add qemu_send_raw() to vlan.

2009-05-26 Thread Gleb Natapov
On Tue, May 26, 2009 at 01:05:35PM +0300, Avi Kivity wrote: Gleb Natapov wrote: It gets packet without virtio header and adds it if needed. Allows to inject packets to vlan from outside. To send gracious arp for instance. This is for announce_self(), no? If so, upstream has the same

Re: [PATCH] qemu: virtio save/load bindings

2009-05-26 Thread Paul Brook
-/* FIXME: load/save binding. */ -//pci_device_save(vdev-pci_dev, f); -//msix_save(vdev-pci_dev, f); qdev regressed save/restore? What else is broken right now from the qdev commit? I'm beginning to think committing in the state it was in was a mistake. Paul, can you put

Re: Add qemu_send_raw() to vlan.

2009-05-26 Thread Mark McLoughlin
On Tue, 2009-05-26 at 13:11 +0300, Avi Kivity wrote: Gleb Natapov wrote: On Tue, May 26, 2009 at 01:05:35PM +0300, Avi Kivity wrote: Gleb Natapov wrote: It gets packet without virtio header and adds it if needed. Allows to inject packets to vlan from outside. To send gracious

Re: [PATCH 3/3] kvm-s390: streamline memslot handling

2009-05-26 Thread Christian Ehrhardt
Avi Kivity wrote: Christian Bornträger wrote: Am Dienstag 26 Mai 2009 09:57:58 schrieb Avi Kivity: [...] In our low-level interrupt handler we do check for signal_pending, machine_check_pending and need_resched to leave the sie instruction. For anything else a the host sees a cpu bound

Re: Add qemu_send_raw() to vlan.

2009-05-26 Thread Mark McLoughlin
On Tue, 2009-05-26 at 13:03 +0300, Gleb Natapov wrote: It gets packet without virtio header and adds it if needed. Allows to inject packets to vlan from outside. To send gracious arp for instance. Acked-by: Mark McLoughlin mar...@redhat.com This isn't ideal, but neither is the current

Re: Add qemu_send_raw() to vlan.

2009-05-26 Thread Avi Kivity
Mark McLoughlin wrote: On Tue, 2009-05-26 at 13:03 +0300, Gleb Natapov wrote: It gets packet without virtio header and adds it if needed. Allows to inject packets to vlan from outside. To send gracious arp for instance. Acked-by: Mark McLoughlin mar...@redhat.com This isn't ideal,

Re: [patch 2/4] KVM: move coalesced_mmio locking to its own device

2009-05-26 Thread Avi Kivity
Marcelo Tosatti wrote: === --- kvm-irqlock.orig/virt/kvm/coalesced_mmio.c +++ kvm-irqlock/virt/kvm/coalesced_mmio.c @@ -26,9 +26,12 @@ static int coalesced_mmio_in_range(struc if (!is_write) return 0; -

Re: Userspace MSR handling

2009-05-26 Thread Avi Kivity
Alexander Graf wrote: Does it make sense to implement a generic mechanism for handling MSRs in userspace? I imagine a mechanism analogous to PIO, adding a KVM_EXIT_MSR code and a msr type in the kvm_run struct. I'm happy to take a stab at implementing this if no one else is already working on

Re: [patch 3/4] KVM: introduce irq_lock, use it to protect ioapic

2009-05-26 Thread Avi Kivity
Marcelo Tosatti wrote: On Sun, May 24, 2009 at 05:10:07PM +0300, Avi Kivity wrote: Marcelo Tosatti wrote: Subject says it all. I hate those changelogs. I guess Subject never reviews code. You might put some evidence that we're suffering from contention here (I'm very

Re: [PATCH] KVM: Downsize max support MSI-X entry to 256

2009-05-26 Thread Avi Kivity
Sheng Yang wrote: We only trap one page for MSI-X entry now, so it's 4k/(128/8) = 256 entries at most. Applied, thanks. -#define KVM_MAX_MSIX_PER_DEV 512 +#define KVM_MAX_MSIX_PER_DEV 256 struct kvm_assigned_msix_entry { __u32 assigned_dev_id; __u32 gsi;

Re: strange guest slowness after some time

2009-05-26 Thread Tomasz Chmielewski
Rusty Russell wrote: On Tuesday 07 April 2009 00:49:17 Tomasz Chmielewski wrote: Tomasz Chmielewski schrieb: As I mentioned, it was using virtio net. Guests running with e1000 (and virtio_blk) don't have this problem. Also, virtio_console seem to be affected by this slowness issue. I'm

[PATCH 3/8] kvm-kmod: Include relayfs_fs.h on pre-2.6.17 kernels

2009-05-26 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- external-module-compat-comm.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h index e2342db..dad43ef 100644 --- a/external-module-compat-comm.h +++

[PATCH 1/8] kvm-kmod: Allow to override sync source

2009-05-26 Thread Jan Kiszka
In order to allow sync'ing the kmod dir against arbitrary kernels trees, extend the sync script to accept alternative paths and adjust the Makefile accordingly. Changes in v2: - drop KVM_VERSION override - make use of set_defaults - option help texts Signed-off-by: Jan Kiszka

[PATCH 2/8] kvm-kmod: Include asm/uaccess.h on pre-2.6.18 kernels

2009-05-26 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- external-module-compat-comm.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h index d473ae7..e2342db 100644 --- a/external-module-compat-comm.h +++

[PATCH 6/8] kvm-kmod: Add eventfd.c to patch list

2009-05-26 Thread Jan Kiszka
eventfd.c has to be processed in order to wrap INIT_WORK. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- sync |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sync b/sync index fc4311e..18f0200 100755 --- a/sync +++ b/sync @@ -124,7 +124,7 @@ def hack(T, arch,

[PATCH 4/8] kvm-kmod: Provide flush_work compat wrapper

2009-05-26 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- external-module-compat-comm.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h index dad43ef..131210a 100644 --- a/external-module-compat-comm.h +++

[PATCH 0/8] kvm-kmod: Compat fixes enhancements

2009-05-26 Thread Jan Kiszka
The is a flush of my current queue against kvm-kmod. Some are reposts, some are split-ups, and a few are new (specifically the MCE fixes). I did not include patches that you reported to have already in your queue. Find the patches also at git://git.kiszka.org/kvm-kmod.git queue Jan Kiszka (8):

[PATCH 8/8] kvm-kmod: x86: Add MCE compat defines

2009-05-26 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- x86/external-module-compat.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h index c33eb2e..cc984ab 100644 --- a/x86/external-module-compat.h +++

[PATCH 5/8] kvm-kmod: Fix msi_enabled patching

2009-05-26 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- sync |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sync b/sync index f3f4d6a..fc4311e 100755 --- a/sync +++ b/sync @@ -67,8 +67,8 @@ def __hack(data): if match(r'^}'): kvm_arch_init = False if

[PATCH 7/8] kvm-kmod: x86: Add MSR_IA32_TSC compat define

2009-05-26 Thread Jan Kiszka
Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- x86/external-module-compat.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h index 3e6fc11..c33eb2e 100644 --- a/x86/external-module-compat.h +++

Re: strange guest slowness after some time

2009-05-26 Thread Avi Kivity
Tomasz Chmielewski wrote: I still observe this slowness with kvm-86 after the guest is running for some time (virtio_net and virtio_console seem to be affected; guest restart doesn't fix it). Anything in guest dmesg? -- error compiling committee.c: too many arguments to function -- To

Re: [PATCH 0/8] kvm-kmod: Compat fixes enhancements

2009-05-26 Thread Avi Kivity
Jan Kiszka wrote: The is a flush of my current queue against kvm-kmod. Some are reposts, some are split-ups, and a few are new (specifically the MCE fixes). I did not include patches that you reported to have already in your queue. Find the patches also at git://git.kiszka.org/kvm-kmod.git

Re: Add qemu_send_raw() to vlan.

2009-05-26 Thread Gleb Natapov
On Tue, May 26, 2009 at 02:15:37PM +0300, Avi Kivity wrote: Mark McLoughlin wrote: On Tue, 2009-05-26 at 13:03 +0300, Gleb Natapov wrote: It gets packet without virtio header and adds it if needed. Allows to inject packets to vlan from outside. To send gracious arp for instance.

Re: strange guest slowness after some time

2009-05-26 Thread Tomasz Chmielewski
Avi Kivity wrote: Tomasz Chmielewski wrote: I still observe this slowness with kvm-86 after the guest is running for some time (virtio_net and virtio_console seem to be affected; guest restart doesn't fix it). Anything in guest dmesg? No. No hints in syslog, dmesg... Can it be that

Re: [PATCH 8/8] kvm-kmod: x86: Add MCE compat defines

2009-05-26 Thread Avi Kivity
Jan Kiszka wrote: Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- x86/external-module-compat.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h index c33eb2e..cc984ab 100644 ---

Re: strange guest slowness after some time

2009-05-26 Thread Avi Kivity
Tomasz Chmielewski wrote: Avi Kivity wrote: Tomasz Chmielewski wrote: I still observe this slowness with kvm-86 after the guest is running for some time (virtio_net and virtio_console seem to be affected; guest restart doesn't fix it). Anything in guest dmesg? No. No hints in syslog,

Re: Add qemu_send_raw() to vlan.

2009-05-26 Thread Avi Kivity
Gleb Natapov wrote: On Tue, May 26, 2009 at 02:15:37PM +0300, Avi Kivity wrote: Mark McLoughlin wrote: On Tue, 2009-05-26 at 13:03 +0300, Gleb Natapov wrote: It gets packet without virtio header and adds it if needed. Allows to inject packets to vlan from outside. To send

Re: [PATCH 7/8] kvm-kmod: x86: Add MSR_IA32_TSC compat define

2009-05-26 Thread Jaswinder Singh Rajput
Hello Jan, On Tue, 2009-05-26 at 13:52 +0200, Jan Kiszka wrote: Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- x86/external-module-compat.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h index

Re: [PATCH] qemu-kvm: Flush icache after dma operations for ia64

2009-05-26 Thread Avi Kivity
Jes Sorensen wrote: Ok, Trying once more. After spending a couple of hours trying to follow the QEMU dma codeflow, I have convinced myself Avi is right and those two functions don't need to do the flushing as they all end up calling dma_bdrv_cb() which calls dma_brdv_unmap(). I have added a

Re: [PATCH 7/8] kvm-kmod: x86: Add MSR_IA32_TSC compat define

2009-05-26 Thread Jan Kiszka
Jaswinder Singh Rajput wrote: Hello Jan, On Tue, 2009-05-26 at 13:52 +0200, Jan Kiszka wrote: Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- x86/external-module-compat.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/x86/external-module-compat.h

Re: [PATCH 7/8] kvm-kmod: x86: Add MSR_IA32_TSC compat define

2009-05-26 Thread Avi Kivity
Jan Kiszka wrote: I'm about to loose overview of all those issues I ran into with older kernels (still more to fix, sigh), but I think to remember this was a 2.6.18 x86_32 problem. Wait... yes, 2.6.18 asm-i386 does not include this. I have the same problem. I'll look at setting up

Re: [PATCH 8/8] kvm-kmod: x86: Add MCE compat defines

2009-05-26 Thread Jan Kiszka
Avi Kivity wrote: Jan Kiszka wrote: Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- x86/external-module-compat.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h index c33eb2e..cc984ab 100644

Re: [PATCH 7/8] kvm-kmod: x86: Add MSR_IA32_TSC compat define

2009-05-26 Thread Jaswinder Singh Rajput
On Tue, 2009-05-26 at 14:36 +0200, Jan Kiszka wrote: Jaswinder Singh Rajput wrote: Hello Jan, On Tue, 2009-05-26 at 13:52 +0200, Jan Kiszka wrote: Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- x86/external-module-compat.h |4 1 files changed, 4 insertions(+), 0

[PATCH] kvm-kmod: x86: Add MSR_K8_SYSCFG compat define

2009-05-26 Thread Jan Kiszka
Jan Kiszka wrote: The is a flush of my current queue against kvm-kmod. Some are reposts, some are split-ups, and a few are new (specifically the MCE fixes). I did not include patches that you reported to have already in your queue. Find the patches also at git://git.kiszka.org/kvm-kmod.git

Re: [PATCH 7/8] kvm-kmod: x86: Add MSR_IA32_TSC compat define

2009-05-26 Thread Jan Kiszka
Avi Kivity wrote: Jan Kiszka wrote: I'm about to loose overview of all those issues I ran into with older kernels (still more to fix, sigh), but I think to remember this was a 2.6.18 x86_32 problem. Wait... yes, 2.6.18 asm-i386 does not include this. I have the same problem. I'll look

[PATCH] x86: Make MCE defines 32-bit-safe

2009-05-26 Thread Jan Kiszka
These defines are used by KVM now also on 32-bit hosts. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- arch/x86/include/asm/mce.h | 30 +++--- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h

Re: [PATCH 7/8] kvm-kmod: x86: Add MSR_IA32_TSC compat define

2009-05-26 Thread Avi Kivity
Jan Kiszka wrote: Avi Kivity wrote: Jan Kiszka wrote: I'm about to loose overview of all those issues I ran into with older kernels (still more to fix, sigh), but I think to remember this was a 2.6.18 x86_32 problem. Wait... yes, 2.6.18 asm-i386 does not include this. I have

Re: [patch 2/4] KVM: move coalesced_mmio locking to its own device

2009-05-26 Thread Marcelo Tosatti
On Tue, May 26, 2009 at 02:24:33PM +0300, Avi Kivity wrote: Marcelo Tosatti wrote: === --- kvm-irqlock.orig/virt/kvm/coalesced_mmio.c +++ kvm-irqlock/virt/kvm/coalesced_mmio.c @@ -26,9 +26,12 @@ static int

[PATCH] allow CPUID vendor override

2009-05-26 Thread Andre Przywara
KVM will always report the vendor ID of the physical CPU it is running on. Allow to override this if explicitly requested on the command line. It will not suffice to name a CPU type (like -cpu phenom), but you have to explicitly set the vendor: -cpu phenom,vendor=AuthenticAMD Signed-off-by: Andre

Re: [patch 2/4] KVM: move coalesced_mmio locking to its own device

2009-05-26 Thread Avi Kivity
Marcelo Tosatti wrote: Why not use slots_lock to protect the entire iodevice list (rcu one day), and an internal spinlock for coalesced mmio? Don't like using slots_lock to protect the entire iodevice list, its reverse progress in my opinion. The PIO/MMIO device lists are data

[PATCH v2] kvm-kmod: x86: Add MCE compat defines

2009-05-26 Thread Jan Kiszka
Changes in v2: - added empty mce.h for 32-bit kernels - fixed redefinition issue by pulling in mce.h early Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- include-compat/asm-x86/mce.h |1 + x86/external-module-compat.h | 10 ++ 2 files changed, 11 insertions(+), 0

Re: [PATCH v2] kvm-kmod: x86: Add MCE compat defines

2009-05-26 Thread Avi Kivity
Jan Kiszka wrote: Changes in v2: - added empty mce.h for 32-bit kernels - fixed redefinition issue by pulling in mce.h early Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

[patch 1/2] virtio: fix id_matching for virtio drivers

2009-05-26 Thread Christian Borntraeger
From: Christian Borntraeger borntrae...@de.ibm.com This bug never appeared, since all current virtio drivers use VIRTIO_DEV_ANY_ID for the vendor field. If a real vendor would be used, the check in virtio_id_match is wrong - it returns 0 if id-vendor == dev-id.vendor. Signed-off-by: Christian

[patch 0/2] Fix and enhance virtio device id matching

2009-05-26 Thread Christian Borntraeger
Hello Rusty, here are two patches that change the device matching of the virtio bus. The patches have been refreshed agains linux-next and should apply to your private virtio tree. OK for linux-next? Christian -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

[patch 2/2] virtio: enhance id_matching for virtio drivers

2009-05-26 Thread Christian Borntraeger
From: Christian Borntraeger borntrae...@de.ibm.com This patch allows a virtio driver to use VIRTIO_DEV_ANY_ID for the device id. This will be used by a test module that can be bound to any virtio device. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- drivers/virtio/virtio.c |

Re: [Lguest] [PATCH] lguest: fix on Intel when KVM loaded (unhandled trap 13)

2009-05-26 Thread Avi Kivity
Alan Cox wrote: On Tue, 26 May 2009 20:54:41 +0930 Rusty Russell ru...@rustcorp.com.au wrote: When KVM is loaded, and hence VT set up, the vmcall instruction in an lguest guest causes a #GP, not #UD. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Shouldn't that be fixed in KVM ?

Re: strange guest slowness after some time

2009-05-26 Thread Tomasz Chmielewski
Avi Kivity wrote: Tomasz Chmielewski wrote: Avi Kivity wrote: Tomasz Chmielewski wrote: I still observe this slowness with kvm-86 after the guest is running for some time (virtio_net and virtio_console seem to be affected; guest restart doesn't fix it). Anything in guest dmesg? No.

Re: strange guest slowness after some time

2009-05-26 Thread Avi Kivity
Tomasz Chmielewski wrote: Maybe virtio is racy and a loaded host exposes the race. I see it happening with virtio on 2.6.29.x guests as well. So, what would you do if you saw it on your systems as well? ;) Add some debug routines into virtio_* modules? I'm no virtio expert. Maybe I'd

Re: [KVM PATCH v3 2/4] kvm: add return value to kvm_io_bus_register_dev

2009-05-26 Thread Gregory Haskins
Gregory Haskins wrote: Today this function returns void and will internally BUG_ON if it fails. We want to create dynamic MMIO/PIO entries driven from userspace later in the series, so enhance this API to return an error code on failure. We also fix up all the callsites to check the return

[PATCH][KVM_AUTOTEST] Fix to allow for = in the value of a config parameter.

2009-05-26 Thread David Huff
example: kernel_args = ks=floppy console=ttyS0 noacpi fix modifies kvm_config.split_and_strip so it will only split once per line. --- client/tests/kvm_runtest_2/kvm_config.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/client/tests/kvm_runtest_2/kvm_config.py

Re: [PATCH] [KVM_Autotest] Added functionality to the preprocessor to run scripts

2009-05-26 Thread David Huff
Michael Goldish wrote: Looks good to me. See some comments below. - David Huff dh...@redhat.com wrote: This patch will run pre and post scripts defined in config file with the parameter pre_command and post_command post_command. Also exports all the prameters in preprocess for

Re: [PATCH] [KVM_Autotest] Fix to allow for = in the value of a config parameter.

2009-05-26 Thread David Huff
Avi Kivity wrote: Michael Goldish wrote: This makes sense, thanks. One thing though -- I don't know if it's even worth mentioning -- we always try to put a single space after a comma (I think the Python style guide recommends that but I'm not sure). Generally we try to follow the guide

[KVM_AUTOTEST] patch set to dynamically load tests

2009-05-26 Thread David Huff
resending patch set... first pass at spiting up tests into separate files... These relatively simple changes to kvm_runtest_2 will allow for the addition of new tests without having modifying kvm_runtest code. One would just add a newtest.py file and update the config file. This will

[PATCH] Modified kvm_runtest_2.py to look for tests in kvm_tests/

2009-05-26 Thread David Huff
This will allow for adding of additional tests with out modifying the code. One would just add the testname.py file to the test_dir and edit the comfig file. fixed typo --- client/tests/kvm_runtest_2/kvm_runtest_2.py | 32 +++--- 1 files changed, 23 insertions(+), 9

[PATCH] Added stock or existing test to ./kvm_tests/

2009-05-26 Thread David Huff
autotest.py, boot.py, linux_s3.py, migration.py, yum_update.py --- client/tests/kvm_runtest_2/kvm_tests/autotest.py | 145 client/tests/kvm_runtest_2/kvm_tests/boot.py | 45 ++ client/tests/kvm_runtest_2/kvm_tests/linux_s3.py | 53 +++

Re: [KVM PATCH v10] kvm: add support for irqfd

2009-05-26 Thread Michael S. Tsirkin
On Wed, May 20, 2009 at 10:30:49AM -0400, Gregory Haskins wrote: +static int +irqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key) +{ + struct _irqfd *irqfd = container_of(wait, struct _irqfd, wait); + + /* + * The wake_up is called with interrupts disabled.

Re: [KVM PATCH v10] kvm: add support for irqfd

2009-05-26 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Wed, May 20, 2009 at 10:30:49AM -0400, Gregory Haskins wrote: +static int +irqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key) +{ +struct _irqfd *irqfd = container_of(wait, struct _irqfd, wait); + +/* + * The wake_up is called

[KVM PATCH v4 0/3] iosignalfd

2009-05-26 Thread Gregory Haskins
(Applies to kvm.git/master:74dfca0a) This is v4 of the series. For more details, please see the header to patch 3/3. This series has been tested against the kvm-eventfd unit test, and appears to be functioning properly. You can download this test here:

[KVM PATCH v4 1/3] eventfd: export eventfd interfaces for module use

2009-05-26 Thread Gregory Haskins
We want to use eventfd from KVM which can be compiled as a module, so export the interfaces. Signed-off-by: Gregory Haskins ghask...@novell.com --- fs/eventfd.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fs/eventfd.c b/fs/eventfd.c index 2a701d5..3f0e197 100644

[KVM PATCH v4 2/3] kvm: make io_bus interface more robust

2009-05-26 Thread Gregory Haskins
Today kvm_io_bus_regsiter_dev() returns void and will internally BUG_ON if it fails. We want to create dynamic MMIO/PIO entries driven from userspace later in the series, so we need to enhance the code to be more robust with the following changes: 1) Add a return value to the registration

[KVM PATCH v4 3/3] kvm: add iosignalfd support

2009-05-26 Thread Gregory Haskins
iosignalfd is a mechanism to register PIO/MMIO regions to trigger an eventfd signal when written to by a guest. Host userspace can register any arbitrary IO address with a corresponding eventfd and then pass the eventfd to a specific end-point of interest for handling. Normal IO requires a

Re: [KVM PATCH v10] kvm: add support for irqfd

2009-05-26 Thread Davide Libenzi
On Tue, 26 May 2009, Michael S. Tsirkin wrote: On Wed, May 20, 2009 at 10:30:49AM -0400, Gregory Haskins wrote: +static int +irqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key) +{ + struct _irqfd *irqfd = container_of(wait, struct _irqfd, wait); + + /* +*

  1   2   >