Re: [PATCH QEMU-KVM 6/7] test: Add ipi_halt benchmark

2009-09-22 Thread Avi Kivity
On 09/22/2009 04:54 AM, Marcelo Tosatti wrote: On Mon, Sep 21, 2009 at 11:55:37AM +0300, Avi Kivity wrote: Wait for 2000 cycles after the IPI to allow the host to schedule out. Measures wake-from-idle overhead. Signed-off-by: Avi Kivitya...@redhat.com --- kvm/user/test/x86/vmexit.c |

Re: [PATCH -v4] QEMU-KVM: MCE: Relay UCR MCE to guest

2009-09-22 Thread Avi Kivity
On 09/22/2009 04:12 AM, Huang Ying wrote: On Mon, 2009-09-21 at 18:08 +0800, Avi Kivity wrote: On 09/21/2009 05:43 AM, Huang Ying wrote: UCR (uncorrected recovery) MCE is supported in recent Intel CPUs, where some hardware error such as some memory error can be reported without PCC

Re: [PATCH] virtio-blk: set QUEUE_ORDERED_DRAIN by default

2009-09-22 Thread Rusty Russell
On Fri, 18 Sep 2009 03:01:42 am Christoph Hellwig wrote: Err, I'll take this one back for now pending some more discussion. What we need more urgently is the writeback cache flag, which is now implemented in qemu, patch following ASAP. OK, still catching up on mail. I'll push them out of the

Re: [patch 03/10] KVM: switch dirty_log to mmu_lock protection

2009-09-22 Thread Avi Kivity
On 09/22/2009 02:37 AM, Marcelo Tosatti wrote: get_dirty_log vs mark_page_dirty need to be mutually exclusive. Switch to mmu_lock protection. I'm not sure all archs use mmu_lock. Also, I'm unhappy about introducing more use (especially as it's often unnecessary, if dirty logging is

Re: [patch 04/10] KVM: split kvm_arch_set_memory_region into prepare and commit

2009-09-22 Thread Avi Kivity
On 09/22/2009 02:37 AM, Marcelo Tosatti wrote: Required for SRCU convertion later. My feeling is that prepare/commit can be common code and only some small bits (like allocating x86 rmaps) can be arch specific. That's for another patchset though. -- Do not meddle in the internals of

Re: [patch 07/10] KVM: introduce kvm-srcu and convert kvm_set_memory_region to SRCU update

2009-09-22 Thread Avi Kivity
On 09/22/2009 02:37 AM, Marcelo Tosatti wrote: Use two steps for memslot deletion: mark the slot invalid (which stops instantiation of new shadow pages for that slot, but allows destruction), then instantiate the new empty slot. Also simplifies kvm_handle_hva locking. unsigned int

Re: [patch 08/10] KVM: x86: switch kvm_set_memory_alias to SRCU update

2009-09-22 Thread Avi Kivity
On 09/22/2009 02:37 AM, Marcelo Tosatti wrote: Using a similar two-step procedure as for memslots. - gfn = unalias_gfn(kvm, gfn); + gfn = unalias_gfn(kvm, gfn, false); To improve readability suggest two names, maybe unalias_gfn() and unalias_gfn_instantiation(). boolean

Re: [patch 10/10] KVM: switch vcpu context to use SRCU

2009-09-22 Thread Avi Kivity
On 09/22/2009 02:37 AM, Marcelo Tosatti wrote: Signed-off-by: Marcelo Tosattimtosa...@redhat.com I'd like an eleventh patch that converts slots_lock to a mutex; there should be no readers left, yes? -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.

Re: [patch 00/10] RFC: switch vcpu context to use SRCU

2009-09-22 Thread Avi Kivity
On 09/22/2009 02:37 AM, Marcelo Tosatti wrote: Improves vmexit latency by ~= 13% on UP guest. Still requires decent stress testing and careful review, but posting for early comments. Okay, looks very nice. The only real problem I see is mmu_lock for mark_dirty(), the other comments are

Re: [PATCH] Add GDT, IDT and RFLAGS guest state validity checks

2009-09-22 Thread Avi Kivity
On 09/21/2009 06:33 PM, Mohammed Gamal wrote: With emulate_invalid_guest_state=1 Windows XP exits with an invalid guest state due to rflags not being in a VMX-compliant state. This patch fixes this issue, although Windows XP doesn't boot yet with invalid state emulation on. Also added GDT and

Re: [PATCH] Add GDT, IDT and RFLAGS guest state validity checks

2009-09-22 Thread Mohammed Gamal
On Tue, Sep 22, 2009 at 9:13 AM, Avi Kivity a...@redhat.com wrote: On 09/21/2009 06:33 PM, Mohammed Gamal wrote: With emulate_invalid_guest_state=1 Windows XP exits with an invalid guest state due to rflags not being in a VMX-compliant state. This patch fixes this issue, although Windows XP

Re: [Autotest] [KVM-AUTOTEST PATCH 2/4] KVM test: rss.cpp: send characters to the console window rather than directly to STDIN

2009-09-22 Thread Yolkfull Chow
On Mon, Sep 21, 2009 at 08:30:26AM -0400, Michael Goldish wrote: - Yolkfull Chow yz...@redhat.com wrote: On Sun, Sep 20, 2009 at 06:16:28PM +0300, Michael Goldish wrote: Some Windows programs behave badly when their STDIN is redirected to a pipe (most notably wmic). Therefore,

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Avi Kivity
On 09/19/2009 09:40 AM, Avi Kivity wrote: Add a general per-cpu notifier that is called whenever the kernel is about to return to userspace. The notifier uses a thread_info flag and existing checks, so there is no impact on user return or context switch fast paths. Ingo/Peter? -- error

RE: eepro100.c

2009-09-22 Thread Michal Filka
Hi, I'm unable to build kvm from source on machine, where I run kvm virtualization. I've applied your patch to kvm-88 source. ./configure Error: libpci check failed Disable KVM Device Assignment capability. rm: cannot remove `include/asm': Is a directory rm: cannot remove `include-compat/asm':

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Arjan van de Ven
On Tue, 22 Sep 2009 12:25:33 +0300 Avi Kivity a...@redhat.com wrote: On 09/19/2009 09:40 AM, Avi Kivity wrote: Add a general per-cpu notifier that is called whenever the kernel is about to return to userspace. The notifier uses a thread_info flag and existing checks, so there is no impact

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-22 Thread Avi Kivity
On 09/22/2009 12:43 AM, Ira W. Snyder wrote: Sure, virtio-ira and he is on his own to make a bus-model under that, or virtio-vbus + vbus-ira-connector to use the vbus framework. Either model can work, I agree. Yes, I'm having to create my own bus model, a-la lguest, virtio-pci, and

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Avi Kivity
On 09/22/2009 12:37 PM, Arjan van de Ven wrote: On Tue, 22 Sep 2009 12:25:33 +0300 Avi Kivitya...@redhat.com wrote: On 09/19/2009 09:40 AM, Avi Kivity wrote: Add a general per-cpu notifier that is called whenever the kernel is about to return to userspace. The notifier uses a

Re: [RFC] Virtual Machine Device Queues(VMDq) support on KVM

2009-09-22 Thread Michael S. Tsirkin
On Mon, Sep 21, 2009 at 09:27:18AM -0700, Chris Wright wrote: * Stephen Hemminger (shemmin...@vyatta.com) wrote: On Mon, 21 Sep 2009 16:37:22 +0930 Rusty Russell ru...@rustcorp.com.au wrote: Actually this framework can apply to traditional network adapters which have just

Re: [patch 07/10] KVM: introduce kvm-srcu and convert kvm_set_memory_region to SRCU update

2009-09-22 Thread Fernando Carrijo
Resending with Cc: added On Mon, 2009-09-21 at 20:37 -0300, Marcelo Tosatti wrote: plain text document attachment (introduce-srcu-and-use-for-slots) Use two steps for memslot deletion: mark the slot invalid (which stops instantiation of new shadow pages for that slot, but allows

RE: eepro100.c

2009-09-22 Thread Michal Filka
Hi Earlier post was one big mistake. Everything is compiled now (from kvm-88 sources). I don't want to corrupt present kvm installation, or better to say, I want to modify it as small as possible. Could you suggest me what should I replace or how to run new compilation instead of old one

Re: [RFC] Virtual Machine Device Queues(VMDq) support on KVM

2009-09-22 Thread Arnd Bergmann
On Tuesday 22 September 2009, Michael S. Tsirkin wrote: More importantly, when virtualizations is used with multi-queue NIC's the virtio-net NIC is a single CPU bottleneck. The virtio-net NIC should preserve the parallelism (lock free) using multiple receive/transmit queues. The number

Re: eepro100.c

2009-09-22 Thread Amit Shah
On (Tue) Sep 22 2009 [13:31:11], Michal Filka wrote: I don't want to corrupt present kvm installation, or better to say, I want to modify it as small as possible. Could you suggest me what should I replace or how to run new compilation instead of old one without installing? You can

Re: [patch 03/10] KVM: switch dirty_log to mmu_lock protection

2009-09-22 Thread Marcelo Tosatti
On Tue, Sep 22, 2009 at 09:37:51AM +0300, Avi Kivity wrote: On 09/22/2009 02:37 AM, Marcelo Tosatti wrote: get_dirty_log vs mark_page_dirty need to be mutually exclusive. Switch to mmu_lock protection. I'm not sure all archs use mmu_lock. Also, I'm unhappy about introducing more use

Re: [patch 03/10] KVM: switch dirty_log to mmu_lock protection

2009-09-22 Thread Avi Kivity
On 09/22/2009 03:44 PM, Marcelo Tosatti wrote: I think you can use rcu for this as well. When you read the log, allocate a new empty bitmap, switch the memslots pointer to include it, and synchronize_srcu(). Now we are certain everyone is using the new bitmap we can copy the old one to

Re: [patch 07/10] KVM: introduce kvm-srcu and convert kvm_set_memory_region to SRCU update

2009-09-22 Thread Marcelo Tosatti
On Tue, Sep 22, 2009 at 07:40:10AM -0300, Fernando Carrijo wrote: Resending with Cc: added On Mon, 2009-09-21 at 20:37 -0300, Marcelo Tosatti wrote: - kvm_arch_flush_shadow(kvm); + flush_shadow = 1; } #else /* not defined CONFIG_S390 */

Re: [PATCH 05/24] compatfd is included before, and it is compiled unconditionally

2009-09-22 Thread Christoph Hellwig
Btw, what's the state of getting compatfd upstream? It's a pretty annoying difference between qemu upstream and qemu-kvm. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH 05/24] compatfd is included before, and it is compiled unconditionally

2009-09-22 Thread Juan Quintela
Christoph Hellwig h...@infradead.org wrote: Btw, what's the state of getting compatfd upstream? It's a pretty annoying difference between qemu upstream and qemu-kvm. I haven't tried. I can try to send a patch. Do you have any use case that will help the cause? Later, Juan. -- To unsubscribe

Re: [PATCH 05/24] compatfd is included before, and it is compiled unconditionally

2009-09-22 Thread Christoph Hellwig
On Tue, Sep 22, 2009 at 03:25:13PM +0200, Juan Quintela wrote: Christoph Hellwig h...@infradead.org wrote: Btw, what's the state of getting compatfd upstream? It's a pretty annoying difference between qemu upstream and qemu-kvm. I haven't tried. I can try to send a patch. Do you have

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Ingo Molnar
* Avi Kivity a...@redhat.com wrote: On 09/19/2009 09:40 AM, Avi Kivity wrote: Add a general per-cpu notifier that is called whenever the kernel is about to return to userspace. The notifier uses a thread_info flag and existing checks, so there is no impact on user return or context switch

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Avi Kivity
On 09/22/2009 05:32 PM, Ingo Molnar wrote: * Avi Kivitya...@redhat.com wrote: On 09/19/2009 09:40 AM, Avi Kivity wrote: Add a general per-cpu notifier that is called whenever the kernel is about to return to userspace. The notifier uses a thread_info flag and existing checks, so

[PATCH] Don't call kvm_cpu_synchronize_state() if there is no irqchip events to process.

2009-09-22 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- qemu-kvm-x86.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 32561f0..acb1b91 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -1673,9 +1673,12 @@ uint32_t

[PATCH] Don't call cpu_synchronize_state() in apic_init_reset()

2009-09-22 Thread Gleb Natapov
Each caller of the function already calls it. Signed-off-by: Gleb Natapov g...@redhat.com --- hw/apic.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 3a2e128..a9d1fb8 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -488,7 +488,6 @@ void

[PATCH] Update halted state from mpstate only in case of inkernel irq chip

2009-09-22 Thread Gleb Natapov
Otherwise cpu is always unhalted by call to kvm_arch_get_registers() Signed-off-by: Gleb Natapov g...@redhat.com --- qemu-kvm.c | 10 ++ qemu-kvm.h |9 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 6511cb6..2a7fe3d 100644

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-22 Thread Ira W. Snyder
On Tue, Sep 22, 2009 at 12:43:36PM +0300, Avi Kivity wrote: On 09/22/2009 12:43 AM, Ira W. Snyder wrote: Sure, virtio-ira and he is on his own to make a bus-model under that, or virtio-vbus + vbus-ira-connector to use the vbus framework. Either model can work, I agree. Yes,

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread H. Peter Anvin
Ingo Molnar wrote: * Avi Kivity a...@redhat.com wrote: On 09/19/2009 09:40 AM, Avi Kivity wrote: Add a general per-cpu notifier that is called whenever the kernel is about to return to userspace. The notifier uses a thread_info flag and existing checks, so there is no impact on user return

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Avi Kivity
On 09/22/2009 05:45 PM, Avi Kivity wrote: Would be nice to convert some existing open-coded return-to-user-space logic to this facility. One such candidate would be lockdep_sys_exit? I only implemented this for x86, while lockdep is arch independent. If arch support is added, it should be

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-22 Thread Avi Kivity
On 09/22/2009 06:25 PM, Ira W. Snyder wrote: Yes. vbus is more finely layered so there is less code duplication. The virtio layering was more or less dictated by Xen which doesn't have shared memory (it uses grant references instead). As a matter of fact lguest, kvm/pci, and kvm/s390 all

Re: eepro100.c

2009-09-22 Thread Stefan Weil
Amit Shah schrieb: On (Tue) Sep 22 2009 [13:31:11], Michal Filka wrote: I don't want to corrupt present kvm installation, or better to say, I want to modify it as small as possible. Could you suggest me what should I replace or how to run new compilation instead of old one without

Re: [patch 07/10] KVM: introduce kvm-srcu and convert kvm_set_memory_region to SRCU update

2009-09-22 Thread Marcelo Tosatti
On Tue, Sep 22, 2009 at 09:59:04AM +0300, Avi Kivity wrote: On 09/22/2009 02:37 AM, Marcelo Tosatti wrote: Use two steps for memslot deletion: mark the slot invalid (which stops instantiation of new shadow pages for that slot, but allows destruction), then instantiate the new empty slot.

Re: Differences on Intel and Amd

2009-09-22 Thread Alpár Török
Alpar Torok [...] On really new kvms this is no longer true, you can now load a snapshot saved on a processor from another vendor. I am really happy to hear that, another good thing about the latest release is that loadvm from console works. Previously Win XP BSOD-ed. [..] In deed, this

Re: [RFC] Virtual Machine Device Queues(VMDq) support on KVM

2009-09-22 Thread Stephen Hemminger
On Tue, 22 Sep 2009 13:50:54 +0200 Arnd Bergmann a...@arndb.de wrote: On Tuesday 22 September 2009, Michael S. Tsirkin wrote: More importantly, when virtualizations is used with multi-queue NIC's the virtio-net NIC is a single CPU bottleneck. The virtio-net NIC should preserve the

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Peter Zijlstra
On Tue, 2009-09-22 at 16:32 +0200, Ingo Molnar wrote: * Avi Kivity a...@redhat.com wrote: On 09/19/2009 09:40 AM, Avi Kivity wrote: Add a general per-cpu notifier that is called whenever the kernel is about to return to userspace. The notifier uses a thread_info flag and existing

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Avi Kivity
On 09/22/2009 07:50 PM, Peter Zijlstra wrote: Would be nice to convert some existing open-coded return-to-user-space logic to this facility. One such candidate would be lockdep_sys_exit? And here I was thinking this was one of the hottest code paths in the whole kernel... If you're

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Peter Zijlstra
On Tue, 2009-09-22 at 19:52 +0300, Avi Kivity wrote: On 09/22/2009 07:50 PM, Peter Zijlstra wrote: Would be nice to convert some existing open-coded return-to-user-space logic to this facility. One such candidate would be lockdep_sys_exit? And here I was thinking this was one of the

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Avi Kivity
On 09/22/2009 07:55 PM, Peter Zijlstra wrote: If you're using lockdep, surely that's not your biggest worry? No, but that's all under #ifdef and fully disappears when not enabled. Generic return-tu-user notifiers don't sound like they will though. They will if not selected. If

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Avi Kivity
On 09/22/2009 06:50 PM, Avi Kivity wrote: On 09/22/2009 05:45 PM, Avi Kivity wrote: Would be nice to convert some existing open-coded return-to-user-space logic to this facility. One such candidate would be lockdep_sys_exit? I only implemented this for x86, while lockdep is arch independent.

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Peter Zijlstra
On Tue, 2009-09-22 at 16:32 +0200, Ingo Molnar wrote: Would be nice to convert some existing open-coded return-to-user-space logic to this facility. One such candidate would be lockdep_sys_exit? I don't really like lockdep_sys_exit() in such a call, lockdep_sys_exit() is currently placed such

Re: [RFC] Virtual Machine Device Queues(VMDq) support on KVM

2009-09-22 Thread Arnd Bergmann
On Tuesday 22 September 2009, Stephen Hemminger wrote: My idea for that was to open multiple file descriptors to the same macvtap device and let the kernel figure out the right thing to do with that. You can do the same with raw packed sockets in case of vhost_net, but I wouldn't want to

[ kvm-Bugs-2864630 ] XP Guest, Karmic, Bluescreen c0000221 on boot

2009-09-22 Thread SourceForge.net
Bugs item #2864630, was opened at 2009-09-22 17:05 Message generated for change (Tracker Item Submitted) made by aolney You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2864630group_id=180599 Please note that this message will contain a full copy of the

Re: [PATCH 5/5] Notify nested hypervisor of lost event injections

2009-09-22 Thread Joerg Roedel
On Fri, Sep 18, 2009 at 03:00:32PM +0200, Alexander Graf wrote: Normally when event_inj is valid the host CPU would write the contents to exit_int_info, so the hypervisor knows that the event wasn't injected. We failed to do so so far, so let's model closer to the CPU. Signed-off-by:

Re: [PATCH 2/5] Don't call svm_complete_interrupts for nested guests

2009-09-22 Thread Joerg Roedel
On Fri, Sep 18, 2009 at 03:00:29PM +0200, Alexander Graf wrote: SVM has some cleanup code, that tries to reinject interrupts and exceptions when the guest didn't manage to deal with them yet. It basically transfers them to KVM internal state. Unfortunately, the internal state is reserved for

Re: [PATCH 1/5] Implement #NMI exiting for nested SVM

2009-09-22 Thread Joerg Roedel
On Fri, Sep 18, 2009 at 03:00:28PM +0200, Alexander Graf wrote: When injecting an NMI to the l1 guest while it was running the l2 guest, we didn't #VMEXIT but just injected the NMI to the l2 guest. Let's be closer to real hardware and #VMEXIT if we're supposed to do so. Signed-off-by:

Re: [PATCH 3/5] Don't #VMEXIT(INTR) if we still have event_inj waiting

2009-09-22 Thread Joerg Roedel
On Fri, Sep 18, 2009 at 03:00:30PM +0200, Alexander Graf wrote: Real hardware would first process the event_inj field and then notify the host that an interrupt is waiting. Does it really? I couldn't find this in the SVM spec. Let's do the same and just not EXIT_INTR if we have an event

[PATCH] fix an error of undefine variable

2009-09-22 Thread Amos Kong
09/23 09:50:27 ERROR| traceback:0013| File /usr/lib64/python2.4/logging/__init__.py, line 744, in emit 09/23 09:50:27 ERROR| traceback:0013| self.handleError(record) 09/23 09:50:27 ERROR| traceback:0013| File /root/project/autotest/client/setup_modules.py, line 86, in

[KVM-AUTOTEST PATCH] fix an error of undefine variable

2009-09-22 Thread Amos Kong
Sorry for lost autot...@test.kernel.org. So send again. Thanks. -- fix an error of undefine variable 09/23 09:50:27 ERROR| traceback:0013| File /usr/lib64/python2.4/logging/__init__.py, line 744, in emit 09/23 09:50:27 ERROR| traceback:0013|

latest qemu-kvm has broken MSI support

2009-09-22 Thread renevant
Hello, Guests which use Message Signalled Interrupts at least with virtio block device hang the guest with the latest qemu-kvm tree. Tested on AMD Phenom II. Should be easy to reproduce. Regards, Will Trives This email was sent

RE: eepro100.c

2009-09-22 Thread Michal Filka
Hi, I did a couple of tests. 1. test Kernel modules from distribution (kvm-72) new user space application (qemu-system-x86_64 - patched kvm-88) It seems that it is not working Possibilities: 1) ru is not ready because of other reason than switching to suspended state 2) patch is not working