[kvm-devel] [RFC] nmi watchdog in kvm

2008-01-28 Thread Balaji Rao
Hello, I was trying to enable the use of nmi watchdog within a linux guest running in kvm. I have done it by allowing direct access to perfmon msrs using the MSR_BITMAP field in vmcs region. Most of the times the NMI Watchdog Test in the guest fails, but with a finite number of NMI's

Re: [kvm-devel] [RFC] nmi watchdog in kvm

2008-01-28 Thread Ingo Molnar
* Balaji Rao [EMAIL PROTECTED] wrote: I was trying to enable the use of nmi watchdog within a linux guest running in kvm. I have done it by allowing direct access to perfmon msrs using the MSR_BITMAP field in vmcs region. your patch looks pretty clean and simple to me - and it would make

Re: [kvm-devel] [PATCH] Update virtio to latest ABI

2008-01-28 Thread Avi Kivity
Anthony Liguori wrote: This ABI breakage is worrying. While it is expected to take some time for the ABI to congeal, we need some way to prevent mismatched guests and hosts from running. Perhaps something like the kvm abi version, storedin the pci revision field? Keep incrementing it

Re: [kvm-devel] [PATCH 0 of 7] PowerPC Embedded KVM qemu enablement patches

2008-01-28 Thread Avi Kivity
Jerone Young wrote: This set of patches is to enable PowerPC embedded KVM capablities to be taken advantage of by qemu. The code currently boots a ungziped uImage of the Linux kernel complied for PowerPC 440 AMCC Bamboo evalution board. We have not fully tested userspace, but fixes will

Re: [kvm-devel] [PATCH][RFC] SVM: Add Support for Nested Paging in AMD Fam16 CPUs

2008-01-28 Thread Avi Kivity
Jeremy Fitzhardinge wrote: Avi Kivity wrote: I find it non-descriptive, and it reminds me of another hypervisor. I suggest 'tlp' for two-level paging. That has its own ambiguity; without other context it reads like two-level pagetable. Anyway, using the same term for the same

Re: [kvm-devel] [PATCH 1/2] KVM: In-kernel PIT model

2008-01-28 Thread Avi Kivity
Yang, Sheng wrote: From af5d9ee2a189c2f0998c5c46d1fcd25c5cb72f8c Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Mon, 28 Jan 2008 05:10:22 +0800 Subject: [PATCH] KVM: In-kernel PIT model The patch moved PIT from userspace to kernel, and increase the timer accuracy

Re: [kvm-devel] [PATCH 2/2] kvm: libkvm/qemu: Support in-kernel PIT model

2008-01-28 Thread Avi Kivity
Yang, Sheng wrote: +void kvm_create_pit(kvm_context_t kvm) +{ + int r; + + if (!kvm-no_pit_creation) { + r = ioctl(kvm-fd, KVM_CHECK_EXTENSION, KVM_CAP_PIT); + if (r 0) { + r = ioctl(kvm-vm_fd, KVM_CREATE_PIT); + if

Re: [kvm-devel] [PATCH 0/2]KVM: In-kernel PIT model

2008-01-28 Thread Avi Kivity
Yang, Sheng wrote: Hi, Here is the updated in-kernel PIT model. The main improvements are: Looking good; apart from some very minor comments all that is missing is save/restore support. -- error compiling committee.c: too many arguments to function

Re: [kvm-devel] [RFC] nmi watchdog in kvm

2008-01-28 Thread Joerg Roedel
On Mon, Jan 28, 2008 at 01:48:40PM +0530, Balaji Rao wrote: Hello, I was trying to enable the use of nmi watchdog within a linux guest running in kvm. I have done it by allowing direct access to perfmon msrs using the MSR_BITMAP field in vmcs region. Is there a proper virtualization of

Re: [kvm-devel] [PATCH 0 of 7] PowerPC Embedded KVM qemu enablement patches

2008-01-28 Thread Anthony Liguori
Jerone Young wrote: The issue here is that qemu does not support u-boot firmware. What we are doing is actually loading a u-boot image and booting Linux directly with a pre made device tree (which is something normally u-boot firmware would provide Linux). So this code wouldn't fit into plain

Re: [kvm-devel] [RFC] nmi watchdog in kvm

2008-01-28 Thread Balaji Rao
On Monday 28 January 2008 08:30:32 pm Joerg Roedel wrote: On Mon, Jan 28, 2008 at 08:12:26PM +0530, Balaji Rao wrote: On Monday 28 January 2008 05:59:25 pm Joerg Roedel wrote: This patch kills the ability of KVM to migrate between AMD and Intel because the Intel performance counters are

Re: [kvm-devel] [PATCH 2/2] virtio reset support

2008-01-28 Thread Anthony Liguori
Avi Kivity wrote: Rusty Russell wrote: + +static void vp_reset(struct virtio_device *vdev) +{ +struct virtio_pci_device *vp_dev = to_vp_device(vdev); +/* 0 status means a reset. */ +return iowrite8(0, vp_dev-ioaddr + VIRTIO_PCI_STATUS); } pci has something called FLR for

Re: [kvm-devel] [patch 0/4] [RFC] MMU Notifiers V1

2008-01-28 Thread Izik Eidus
Andrea Arcangeli wrote: On Thu, Jan 24, 2008 at 09:56:06PM -0800, Christoph Lameter wrote: Andrea's mmu_notifier #4 - RFC V1 - Merge subsystem rmap based with Linux rmap based approach - Move Linux rmap based notifiers out of macro - Try to account for what locks are held while the

[kvm-devel] [RFC] VMX CR3 cache

2008-01-28 Thread Marcelo Tosatti
Hi, The CR3 cache feature of VMX CPU's does not seem to increase context switch performance significantly as it did in the original implementation (http://lkml.org/lkml/2007/1/5/205). The following is similar to the original, but it also caches roots for 4-level pagetables on x86-64, and

Re: [kvm-devel] [PATCH] Update virtio to latest ABI

2008-01-28 Thread Avi Kivity
Anthony Liguori wrote: I'm worried about the ramp up to 2.6.25 causing confusion among users as before that things will break left and right, if we don't provide a tighter check. Well, using the PCI revision ID isn't a bad idea. It wouldn't have helped this last problem because that

Re: [kvm-devel] [patch 0/4] [RFC] MMU Notifiers V1

2008-01-28 Thread Andrea Arcangeli
On Mon, Jan 28, 2008 at 06:10:39PM +0200, Izik Eidus wrote: i dont understand how is that better than notification on tlb flush? I certainly agree. The quoted call wasn't actually the one that could be moved in a single place in the .h file though. But the 4/4 patch could be reduced to a few

Re: [kvm-devel] [RFC] VMX CR3 cache

2008-01-28 Thread Avi Kivity
Marcelo Tosatti wrote: So the questions are, why the benefit is not similar (vm-exit's are now way cheaper?) and is it worth to merge this given the results? Yes, vmexits are now about 5 times faster compared to older kvm. + +/* + * Avoid the VM exit upon cr3 load by using the cached

Re: [kvm-devel] [PATCH 0 of 7] PowerPC Embedded KVM qemu enablement patches

2008-01-28 Thread Jerone Young
This is true (you got me there). I'll test it out and submit it to qemu-devel. On Mon, 2008-01-28 at 10:17 -0600, Anthony Liguori wrote: From: Anthony Liguori [EMAIL PROTECTED] To: [EMAIL PROTECTED]

Re: [kvm-devel] [PATCH 2/2] virtio reset support

2008-01-28 Thread Avi Kivity
Anthony Liguori wrote: PCI-e has a common reset concept (warm and cold). I've been looking around and I can't seem to find any common reset mechanism for PCI. Is FLR something that is per-device or a standard PCI mechanism? If it's the former, than we've basically implemented FLR using

Re: [kvm-devel] [PATCH] virtio_net tx performance fix

2008-01-28 Thread Anthony Liguori
Dor Laor wrote: On Mon, 2008-01-28 at 09:32 -0600, Anthony Liguori wrote: Hi Dor, How are you measuring performance? The numbers I've gotten with netperf before and after your patch are: tx - 647.27mbit rx - 89.22 tx - 27.82 rx - 79.93 I've been testing with iperf

Re: [kvm-devel] [PATCH] virtio_net tx performance fix

2008-01-28 Thread Anthony Liguori
Hi Dor, How are you measuring performance? The numbers I've gotten with netperf before and after your patch are: tx - 647.27mbit rx - 89.22 tx - 27.82 rx - 79.93 So this patch is pretty much killing performance for netperf. Dor Laor wrote: There was a problem with the location of the

Re: [kvm-devel] [patch 1/4] mmu_notifier: Core code

2008-01-28 Thread Christoph Lameter
On Sat, 26 Jan 2008, Robin Holt wrote: No you cannot do that because there are still callbacks that come later. The invalidate_all may lead to invalidate_range() doing nothing for this mm. The ops notifier and the freeing of the structure has to wait until release(). Could you be a

Re: [kvm-devel] Migration problems

2008-01-28 Thread Guido Guenther
On Fri, Jan 25, 2008 at 05:08:41PM +0100, Guido Guenther wrote: On Thu, Jan 24, 2008 at 01:52:16PM +0200, Uri Lublin wrote: Sometimes after lodavm guest network does work better with '-no-kvm-irqchip' I am trying to use bisection to find the problematic patch. Another migration problem that

Re: [kvm-devel] [RFC] VMX CR3 cache

2008-01-28 Thread Marcelo Tosatti
On Mon, Jan 28, 2008 at 06:37:08PM +0100, Ingo Molnar wrote: try running your shell on one CPU: taskset -p 1 $$ that should give you the 'raw' single-CPU context switch results. With pinning ~= 3.30, and on an UP guest still ~= 6. I'll check the vmexits later, thanks.

Re: [kvm-devel] [RFC] VMX CR3 cache

2008-01-28 Thread Ingo Molnar
* Marcelo Tosatti [EMAIL PROTECTED] wrote: when i did the testing then i was able to get zero VM exits in the lat_ctx hotpath and get the same performance as on native. The above numbers you got suggest that this is not the case. (your lat_ctx numbers on native are probably around 1

[kvm-devel] [PATCH] QEMU support for virtio ABI version

2008-01-28 Thread Anthony Liguori
As Avi pointed out, as we continue to massage the virtio PCI ABI, we can make things a little more friendly to users by utilizing the PCI revision field to indicate which version of the ABI we're using. This is a hard ABI version and incrementing it will cause the guest driver to break. This is

Re: [kvm-devel] [PATCH] virtio_net tx performance fix

2008-01-28 Thread Dor Laor
On Mon, 2008-01-28 at 09:32 -0600, Anthony Liguori wrote: Hi Dor, How are you measuring performance? The numbers I've gotten with netperf before and after your patch are: tx - 647.27mbit rx - 89.22 tx - 27.82 rx - 79.93 I've been testing with iperf (patched with Ingo's fix). I

Re: [kvm-devel] [RFC] nmi watchdog in kvm

2008-01-28 Thread Balaji Rao
On Monday 28 January 2008 05:59:25 pm Joerg Roedel wrote: On Mon, Jan 28, 2008 at 01:48:40PM +0530, Balaji Rao wrote: Hello, I was trying to enable the use of nmi watchdog within a linux guest running in kvm. I have done it by allowing direct access to perfmon msrs using the MSR_BITMAP

Re: [kvm-devel] [PATCH 0 of 7] PowerPC Embedded KVM qemu enablement patches

2008-01-28 Thread Jerone Young
The issue here is that qemu does not support u-boot firmware. What we are doing is actually loading a u-boot image and booting Linux directly with a pre made device tree (which is something normally u-boot firmware would provide Linux). So this code wouldn't fit into plain qemu just yet. On Sun,

Re: [kvm-devel] [kvm-ppc-devel] [PATCH 0 of 7] PowerPC Embedded KVM qemu enablement patches

2008-01-28 Thread Hollis Blanchard
On Mon, 2008-01-28 at 10:17 -0600, Anthony Liguori wrote: Jerone Young wrote: The issue here is that qemu does not support u-boot firmware. What we are doing is actually loading a u-boot image and booting Linux directly with a pre made device tree (which is something normally u-boot

Re: [kvm-devel] [patch 1/4] mmu_notifier: Core code

2008-01-28 Thread Christoph Lameter
On Sat, 26 Jan 2008, Robin Holt wrote: But what if the caller is already holding the mmap_sem? Why force the acquire into this function? Since we are dealing with a semaphore/mutex, Then you need to call __register_mmu_notifier.

Re: [kvm-devel] [PATCH] Update virtio to latest ABI

2008-01-28 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: I'm worried about the ramp up to 2.6.25 causing confusion among users as before that things will break left and right, if we don't provide a tighter check. Well, using the PCI revision ID isn't a bad idea. It wouldn't have helped this last

[kvm-devel] [ kvm-Bugs-1881418 ] win xp guest BSOD and host kernel oops if -smb path

2008-01-28 Thread SourceForge.net
Bugs item #1881418, was opened at 2008-01-28 21:55 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=1881418group_id=180599 Please note that this message will contain a full copy of

[kvm-devel] [patch 1/6] mmu_notifier: Core code

2008-01-28 Thread Christoph Lameter
Core code for mmu notifiers. Signed-off-by: Christoph Lameter [EMAIL PROTECTED] Signed-off-by: Andrea Arcangeli [EMAIL PROTECTED] --- include/linux/list.h | 14 ++ include/linux/mm_types.h |6 + include/linux/mmu_notifier.h | 210 +++

[kvm-devel] [patch 6/6] mmu_notifier: Add invalidate_all()

2008-01-28 Thread Christoph Lameter
when a task exits we can remove all external pts at once. At that point the extern mmu may also unregister itself from the mmu notifier chain to avoid future calls. Note the complications because of RCU. Other processors may not see that the notifier was unlinked until a quiescent period has

[kvm-devel] [patch 4/6] MMU notifier: invalidate_page callbacks using Linux rmaps

2008-01-28 Thread Christoph Lameter
These notifiers here use the Linux rmaps to perform the callbacks. In order to walk the rmaps locks must be held. Callbacks can therefore only operate in an atomic context. Signed-off-by: Christoph Lameter [EMAIL PROTECTED] --- mm/rmap.c | 12 +++- 1 file changed, 11 insertions(+), 1

[kvm-devel] [patch 3/6] mmu_notifier: invalidate_page callbacks for subsystems with rmap

2008-01-28 Thread Christoph Lameter
Callbacks to remove individual pages if the subsystem has an rmap capability. The pagelock is held but no spinlocks are held. The refcount of the page is elevated so that dropping the refcount in the subsystem will not directly free the page. The callbacks occur after the Linux rmaps have been

Re: [kvm-devel] [patch 0/4] [RFC] MMU Notifiers V1

2008-01-28 Thread Christoph Lameter
On Mon, 28 Jan 2008, Andrea Arcangeli wrote: With regard to the synchronize_rcu troubles they also be left to the notifier-user to solve. Certainly having the synchronize_rcu like in Ahh. Ok. - This SF.net email is

Re: [kvm-devel] [RFC] VMX CR3 cache

2008-01-28 Thread Ingo Molnar
* Marcelo Tosatti [EMAIL PROTECTED] wrote: lat_ctx numbers (output is nr-procs overhead-in-us): cr3-cache: size=0k ovr=1.30 2 6.63 size=0k ovr=1.31 4 7.43 size=0k ovr=1.32 8 11.02 when i did the testing then i was able to get zero VM exits in the lat_ctx hotpath and get the same

Re: [kvm-devel] [PATCH] Update virtio to latest ABI

2008-01-28 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: This ABI breakage is worrying. While it is expected to take some time for the ABI to congeal, we need some way to prevent mismatched guests and hosts from running. Perhaps something like the kvm abi version, storedin the pci revision field? Keep

Re: [kvm-devel] [RFC] nmi watchdog in kvm

2008-01-28 Thread Joerg Roedel
On Mon, Jan 28, 2008 at 08:12:26PM +0530, Balaji Rao wrote: On Monday 28 January 2008 05:59:25 pm Joerg Roedel wrote: This patch kills the ability of KVM to migrate between AMD and Intel because the Intel performance counters are not available on AMD and vice verca. Yes. The way we

Re: [kvm-devel] [patch 1/6] mmu_notifier: Core code

2008-01-28 Thread Christoph Lameter
mmu core: Need to use hlist_del Wrong type of list del in mmu_notifier_release() Signed-off-by: Christoph Lameter [EMAIL PROTECTED] --- mm/mmu_notifier.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6/mm/mmu_notifier.c

[kvm-devel] [patch 5/6] mmu_notifier: Callbacks for xip_filemap.c

2008-01-28 Thread Christoph Lameter
Problem for external rmaps: There is no pagelock held on the page. Signed-off-by: Robin Holt [EMAIL PROTECTED] --- mm/filemap_xip.c |5 + 1 file changed, 5 insertions(+) Index: linux-2.6/mm/filemap_xip.c === ---

[kvm-devel] [patch 2/6] mmu_notifier: Callbacks to invalidate address ranges

2008-01-28 Thread Christoph Lameter
The invalidation of address ranges in a mm_struct needs to be performed when pages are removed or permissions etc change. Most of the VM address space changes can use the range invalidate callback. invalidate_range() is generally called with mmap_sem held but no spinlocks are active. If

Re: [kvm-devel] [PATCH 2/2] virtio reset support

2008-01-28 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: PCI-e has a common reset concept (warm and cold). I've been looking around and I can't seem to find any common reset mechanism for PCI. Is FLR something that is per-device or a standard PCI mechanism? If it's the former, than we've basically

[kvm-devel] [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier

2008-01-28 Thread Hollis Blanchard
# HG changeset patch # User Hollis Blanchard [EMAIL PROTECTED] # Date 1201563731 21600 # Node ID 6a2f4869cf5da00fa0ccacc9188ea493459ce4cb # Parent a6dd6b5a597903a069cb9711f73ea1b5c4f0b764 This allows kvm_host.h to be #included even when struct preempt_notifier is undefined. This is needed to

Re: [kvm-devel] [RFC] VMX CR3 cache

2008-01-28 Thread Marcelo Tosatti
On Mon, Jan 28, 2008 at 06:17:34PM +0100, Ingo Molnar wrote: * Marcelo Tosatti [EMAIL PROTECTED] wrote: lat_ctx numbers (output is nr-procs overhead-in-us): cr3-cache: size=0k ovr=1.30 2 6.63 size=0k ovr=1.31 4 7.43 size=0k ovr=1.32 8 11.02 when i did the testing then i

Re: [kvm-devel] [patch 0/4] [RFC] MMU Notifiers V1

2008-01-28 Thread Christoph Lameter
On Mon, 28 Jan 2008, Andrea Arcangeli wrote: So I'd like to know what can we do to help to merge the 4 patches from Christoph in mainline, I'd appreciate comments on them so we can help to address any outstanding issue! There are still some pending issues (RCU troubles). I will post V2 today.

Re: [kvm-devel] [patch 1/6] mmu_notifier: Core code

2008-01-28 Thread Robin Holt
+void mmu_notifier_release(struct mm_struct *mm) ... + hlist_for_each_entry_safe_rcu(mn, n, t, + mm-mmu_notifier.head, hlist) { + if (mn-ops-release) + mn-ops-release(mn, mm); +

[kvm-devel] [PATCH]

2008-01-28 Thread S.Çağlar Onur
Hi; This patch (rediffed againg kvm-60) from Tavis Ormandy [EMAIL PROTECTED] fixes an infinite loop in the emulated SB16 device (See http://taviso.decsystem.org/virtsec.pdf for more details.) I'm not sure why qemu upstream not merged these but Xen already did. [1]

[kvm-devel] [PATCH] CVE-2007-1320

2008-01-28 Thread S.Çağlar Onur
Hi; This patch (rediffed againg kvm-60) from Tavis Ormandy [EMAIL PROTECTED] fixes CVE-2007-1320 [1] Again, I'm not sure why qemu upstream not merged these but Xen already did [2]. [1] http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-1320 [2]

[kvm-devel] [PATCH] Cleanup extern declerations for now removed vcpu_env in Qemu

2008-01-28 Thread Jerone Young
# HG changeset patch # User Jerone Young [EMAIL PROTECTED] # Date 1201568508 21600 # Node ID a568d031723942e1baf77077031d2b77795cbd8a # Parent 5ce532cf9a1f711d1fecb42814d301abd37aa378 Cleanup extern declerations for now removed vcpu_env in Qemu This patch removes extern decleration for vcpu_env

[kvm-devel] [ kvm-Bugs-1881532 ] Network access seg faults KVM on large-memory machine

2008-01-28 Thread SourceForge.net
Bugs item #1881532, was opened at 2008-01-28 18:16 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=1881532group_id=180599 Please note that this message will contain a full copy of

Re: [kvm-devel] [patch 1/6] mmu_notifier: Core code

2008-01-28 Thread Christoph Lameter
On Mon, 28 Jan 2008, Robin Holt wrote: USE_AFTER_FREE!!! I made this same comment as well as other relavent comments last week. Must have slipped somehow. Patch needs to be applied after the rcu fix. Please repeat the other relevant comments if they are still relevant I thought I had

Re: [kvm-devel] [PATCH] virtio_net tx performance fix

2008-01-28 Thread Anthony Liguori
Dor Laor wrote: On Mon, 2008-01-28 at 09:32 -0600, Anthony Liguori wrote: Hi Dor, How are you measuring performance? The numbers I've gotten with netperf before and after your patch are: tx - 647.27mbit rx - 89.22 tx - 27.82 rx - 79.93 I've been testing with iperf

[kvm-devel] [PATCH] Remove unoptimal code from qemu dcr handles for powerpc

2008-01-28 Thread Jerone Young
# HG changeset patch # User Jerone Young [EMAIL PROTECTED] # Date 1201585078 21600 # Node ID 34d726145a8ee9d58a4573473e861db2ad695c37 # Parent a568d031723942e1baf77077031d2b77795cbd8a Remove unoptimal code from qemu dcr handles for powerpc A patch I submitted yesterday to use the call