[kvm-devel] amd64: does it ever work? ;)

2008-02-01 Thread Michael Tokarev
Hello! A first-time poster (and user) is here... but not a newbie ;) Some time ago I tried KVM for the first time, on an AMD X2-64 system (BE-2400 processor, also tried with other similar processors, like plain X2-64 4888+ etc), first with 2.6.23 vanilla kernel compiled for 64 bits, SMP. After

[kvm-devel] [Patch] virtio_blk: implement naming for vda-vdz, vdaa-vdzz, vdaaa-vdzzz

2008-02-01 Thread Christian Borntraeger
Am Freitag, 1. Februar 2008 schrieb Christian Borntraeger: Right. I will fix that with an additional patch. This patch goes on top of the minor number patch. Please let me know if you want a merged patch: Currently virtio_blk creates the disk name combinging vd with 'a'++. This will give

Re: [kvm-devel] amd64: does it ever work? ;)

2008-02-01 Thread Amit Shah
Hello Michael, On Friday 01 February 2008 13:30:03 Michael Tokarev wrote: Hello! A first-time poster (and user) is here... but not a newbie ;) Some time ago I tried KVM for the first time, on an AMD X2-64 system (BE-2400 processor, also tried with other similar processors, like plain X2-64

[kvm-devel] [RFC][PATCH 0/7]Enabling Extended Page Table(EPT) for VMX

2008-02-01 Thread Yang, Sheng
Hi, Avi Here is the patchset which enabling EPT for VMX. We tested it with 32e host, and it works well on Linux, Windows, also SMP with kernel build, though the X Window and windows need a patch for qemu to solve the dirty bitmap problem. The format of EPT entry is different from the page

[kvm-devel] [RFC][PATCH 1/7] KVM: Add EPT support in kvm_arch

2008-02-01 Thread Yang, Sheng
From 51705fa4cee9ee6eb4244599a4eb26bb055199c9 Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Fri, 1 Feb 2008 05:08:35 +0800 Subject: [PATCH] KVM: Add EPT support in kvm_arch EPT pointer is a per-domain data, and it contains info more than root_hpa. It may can be put in a better

[kvm-devel] [RFC][PATCH 3/7] KVM: MMU: Add Two Level Paging (TLP)

2008-02-01 Thread Yang, Sheng
From 22895ad4778189242dd546c98709bcd3fadb0cf6 Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Fri, 1 Feb 2008 06:32:19 +0800 Subject: [PATCH] KVM: MMU: Add Two Level Paging (TLP) For EPT's path is very different from NPT's, the return value of the function tlp_enable() indicate

[kvm-devel] [RFC][PATCH 5/7] KVM: VMX: Enable EPT feature

2008-02-01 Thread Yang, Sheng
From 5062793a4aae25b8f701decbcf6dead9a4a38348 Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Fri, 1 Feb 2008 06:51:01 +0800 Subject: [PATCH] KVM: VMX: Enable EPT feature For EPT's entry format is different from page table, we would set up EPT in this patch. In EPT, hardware

[kvm-devel] [RFC][PATCH 6/7] KVM: VMX: Add swap support for EPT

2008-02-01 Thread Yang, Sheng
From 720eee463536fdb6e15dcc5388754ea229c71118 Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Fri, 1 Feb 2008 06:53:39 +0800 Subject: [PATCH] KVM: VMX: Add swap support for EPT Add tlp_unmap() in kvm_x86_ops, to support swap of EPT pages. Now EPT can support linux swap along

[kvm-devel] [RFC][PATCH 4/7] KVM: Export necessary function to modules()

2008-02-01 Thread Yang, Sheng
From 1b7e6dcffe5845a05b7bfe42b52d680f17f34d5d Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Fri, 1 Feb 2008 06:41:35 +0800 Subject: [PATCH] KVM: Export necessary function to modules() The function load_pdptrs() is needed by VMX for EPT in PAE mode. The function gfn_to_hva() is

[kvm-devel] [RFC][PATCH 7/7] kvm: qemu: Enable EPT support for real mode

2008-02-01 Thread Yang, Sheng
From de2bedf0890c95828b07ba3d2d98025fd39050a1 Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Fri, 1 Feb 2008 07:33:13 +0800 Subject: [PATCH] kvm: qemu: Enable EPT support for real mode The patch allocated one page from 0xcf000 (the last page of vga bios region), took it as the

Re: [kvm-devel] amd64: does it ever work? ;)

2008-02-01 Thread Michael Tokarev
Amit Shah wrote: On Friday 01 February 2008 13:30:03 Michael Tokarev wrote: Some time ago I tried KVM for the first time, on an AMD X2-64 system (BE-2400 processor, also tried with other similar processors, like plain X2-64 4888+ etc), first with 2.6.23 vanilla kernel compiled for 64 bits,

[kvm-devel] Offline for a week

2008-02-01 Thread Avi Kivity
I will be offline for the entire week of Feb 2 - Feb 9. I will only be reachable by specially trained St. Bernards. Andrew, if kvm.git gives you undue trouble, please drop it and I'll sort out the mess when I return. -- Any sufficiently difficult bug is indistinguishable from a feature.

[kvm-devel] [PATCH] Make non-x86 arch partially support make sync.

2008-02-01 Thread Zhang, Xiantao
From: Xiantao Zhang [EMAIL PROTECTED] Date: Fri, 1 Feb 2008 17:18:03 +0800 Subject: [PATCH] Make non-x86 arch partially support make sync. Make non-x86 arch partially support make sync, and other archs can get right header files for userspace. Signed-off-by: Xiantao Zhang [EMAIL PROTECTED] ---

Re: [kvm-devel] [PATCH 1/6] Use correct types to enable 2G support

2008-02-01 Thread Fabrice Bellard
Anthony Liguori wrote: KVM supports more than 2GB of memory for x86_64 hosts. The following patch fixes a number of type related issues where int's were being used when they shouldn't have been. It also introduces CMOS support so the BIOS can build the appropriate e820 tables. [...] +

Re: [kvm-devel] [PATCH 6/6] QEMU support for the Kernel Virtual Machine interface

2008-02-01 Thread Fabrice Bellard
Anthony Liguori wrote: This patch actually enables KVM support for QEMU. I apologize that it is so large but this was the only sane way to preserve bisectability. The goal of this patch is to add KVM support, but not to impact users when KVM isn't being used. It achieves this by using a

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

2008-02-01 Thread Robin Holt
On Fri, Feb 01, 2008 at 04:32:21AM -0600, Robin Holt wrote: On Thu, Jan 31, 2008 at 08:43:58PM -0800, Christoph Lameter wrote: On Thu, 31 Jan 2008, Robin Holt wrote: Index: linux-2.6/mm/memory.c ... @@ -1668,6 +1678,7 @@ gotten: page_cache_release(old_page);

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

2008-02-01 Thread Robin Holt
On Thu, Jan 31, 2008 at 08:43:58PM -0800, Christoph Lameter wrote: On Thu, 31 Jan 2008, Robin Holt wrote: Index: linux-2.6/mm/memory.c ... @@ -1668,6 +1678,7 @@ gotten: page_cache_release(old_page); unlock: pte_unmap_unlock(page_table, ptl); +

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

2008-02-01 Thread Robin Holt
OK. Now that release has been moved, I think I agree with you that the down_write(mmap_sem) can be used as our lock again and still work for Jack. I would like a ruling from Jack as well. Thanks, Robin - This SF.net email

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

2008-02-01 Thread Robin Holt
On Fri, Feb 01, 2008 at 04:55:16AM -0600, Robin Holt wrote: OK. Now that release has been moved, I think I agree with you that the down_write(mmap_sem) can be used as our lock again and still work for Jack. I would like a ruling from Jack as well. Ignore this, I was in the wrong work area.

[kvm-devel] Extending mmu_notifiers to handle __xip_unmap in a sleepable context?

2008-02-01 Thread Robin Holt
With this set of patches, I think we have enough to get xpmem working with most types of mappings. In the past, we operated without any of these callouts by significantly restricting why types of mappings could remotely fault and what types of operations the user could do. With this set, I am

Re: [kvm-devel] [PATCH] mmu notifiers #v5

2008-02-01 Thread Andrea Arcangeli
On Thu, Jan 31, 2008 at 05:37:21PM -0800, Christoph Lameter wrote: On Fri, 1 Feb 2008, Andrea Arcangeli wrote: I appreciate the review! I hope my entirely bug free and strightforward #v5 will strongly increase the probability of getting this in sooner than later. If something else it

Re: [kvm-devel] [PATCH] mmu notifiers #v5

2008-02-01 Thread Andrea Arcangeli
On Thu, Jan 31, 2008 at 05:44:24PM -0800, Christoph Lameter wrote: The trouble is that the invalidates are much more expensive if you have to send theses to remote partitions (XPmem). And its really great if you can simple tear down everything. Certainly this is a significant improvement

Re: [kvm-devel] Extending mmu_notifiers to handle __xip_unmap in a sleepable context?

2008-02-01 Thread Robin Holt
Argh, Here is the correct one. Sorry On Fri, Feb 01, 2008 at 05:58:41AM -0600, Robin Holt wrote: With this set of patches, I think we have enough to get xpmem working with most types of mappings. In the past, we operated without any of these callouts by significantly restricting why types

Re: [kvm-devel] [PATCH 6/6] QEMU support for the Kernel Virtual Machine interface

2008-02-01 Thread Anthony Liguori
Fabrice Bellard wrote: Some questions: - QEMU already maintains modified page status for VGA memory (and kqemu for example fully supports that), so I don't see why KVM needs a new method. KQEMU passes the dirty bitmap directly to the kernel. KVM does aggressive shadow page table caching

Re: [kvm-devel] [PATCH 1/6] Use correct types to enable 2G support

2008-02-01 Thread Avi Kivity
Anthony Liguori wrote: Fabrice Bellard wrote: Anthony Liguori wrote: +/* above 4giga memory allocation */ +if (above_4g_mem_size 0) { +ram_addr = qemu_ram_alloc(above_4g_mem_size); +cpu_register_physical_memory(0x1, above_4g_mem_size, ram_addr); +} +

[kvm-devel] [ kvm-Bugs-1884444 ] Virtual network (set up via TCP socket) dog slow, but vde ok

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

Re: [kvm-devel] [PATCH 1/6] Use correct types to enable 2G support

2008-02-01 Thread Anthony Liguori
Fabrice Bellard wrote: Anthony Liguori wrote: +/* above 4giga memory allocation */ +if (above_4g_mem_size 0) { +ram_addr = qemu_ram_alloc(above_4g_mem_size); +cpu_register_physical_memory(0x1, above_4g_mem_size, ram_addr); +} + Why do you need this ?

Re: [kvm-devel] [PATCH 1/6] Use correct types to enable 2G support

2008-02-01 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: I think I'll change this too into a single qemu_ram_alloc. That will fix the bug with KVM when using -kernel and large memory anyway :-) Won't that cause all of the memory in the hole to be wasted? You could munmap() it, but it's hardly

Re: [kvm-devel] [PATCH 1/6] Use correct types to enable 2G support

2008-02-01 Thread Fabrice Bellard
Paul Brook wrote: I agree with the fact that ram_size should be 64 bit. Maybe each machine could test the value and emit an error message if it is too big. Maybe an uint64_t would be better though. uint64_t is probably more reasonable. I wouldn't begin to know what the appropriate amount of

Re: [kvm-devel] [PATCH 1/6] Use correct types to enable 2G support

2008-02-01 Thread Paul Brook
I agree with the fact that ram_size should be 64 bit. Maybe each machine could test the value and emit an error message if it is too big. Maybe an uint64_t would be better though. uint64_t is probably more reasonable. I wouldn't begin to know what the appropriate amount of ram was for

[kvm-devel] [PATCH] X86: fix variable name collision

2008-02-01 Thread Joerg Roedel
When compiling KVM on 32 bit Linux there is a variable name collision in the function emulator_write_emulated() with variable 'addr' which is a function parameter and later redefined. The addr parameter for gva_to_gpa is therefore uninitialized. Fixing this by renaming the function parameter to

Re: [kvm-devel] [ kvm-Bugs-1884444 ] Virtual network (set up via TCP socket) dog slow, but vde ok

2008-02-01 Thread Simon Gao
SourceForge.net wrote: Bugs item #188, was opened at 2008-02-01 15:30 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=188group_id=180599 Please note that this message

Re: [kvm-devel] amd64: does it ever work? ;)

2008-02-01 Thread Michael Tokarev
Michael Tokarev wrote: Amit Shah wrote: [] With 2.6.23 and vanilla kvm modules, while from X, it opens the virtual console (an X window), but that console is entirely empty (black), and nothing more happens. I can Ctrl+C the original process, but nothing more. With 2.6.23+modules-59, and

Re: [kvm-devel] [Qemu-devel] Re: [PATCH 1/6] Use correct types to enable 2G support

2008-02-01 Thread Anthony Liguori
Ian Jackson wrote: Anthony Liguori writes ([Qemu-devel] Re: [kvm-devel] [PATCH 1/6] Use correct types to enable 2G support): The alternative is to change all the places that assume phys_ram_base + PA which I don't like very much. We would ideally like to do this for Xen, at

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

2008-02-01 Thread Christoph Lameter
On Fri, 1 Feb 2008, Robin Holt wrote: Maybe I haven't looked closely enough, but let's start with some common assumptions. Looking at do_wp_page from 2.6.24 (I believe that is what my work area is based upon). On line 1559, the function begins being declared. Aah I looked at the wrong

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

2008-02-01 Thread Christoph Lameter
Argh. Did not see this soon enougn. Maybe this one is better since it avoids the additional unlocks? On Fri, 1 Feb 2008, Robin Holt wrote: do_wp_page can reach the _end callout without passing the _begin callout. This prevents making the _end unles the _begin has also been made. Index:

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

2008-02-01 Thread Christoph Lameter
On Fri, 1 Feb 2008, Robin Holt wrote: OK. Now that release has been moved, I think I agree with you that the down_write(mmap_sem) can be used as our lock again and still work for Jack. I would like a ruling from Jack as well. Talked to Jack last night and he said its okay.

Re: [kvm-devel] Extending mmu_notifiers to handle __xip_unmap in a sleepable context?

2008-02-01 Thread Christoph Lameter
On Fri, 1 Feb 2008, Robin Holt wrote: Currently, it is calling mmu_notifier _begin and _end under the i_mmap_lock. I _THINK_ the following will make it so we could support __xip_unmap (although I don't recall ever seeing that done on ia64 and don't even know what the circumstances are for

Re: [kvm-devel] [kvm-ppc-devel] [RFC PATCH] KVM for PowerPC: simpler TLB handling, better page management

2008-02-01 Thread Hollis Blanchard
On Fri, 2008-02-01 at 13:07 -0600, Nathan Lynch wrote: Hollis Blanchard wrote: --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c @@ -22,6 +22,7 @@ #include linux/mman.h #include linux/mm.h #include linux/suspend.h +#include linux/kvm_host.h #ifdef

Re: [kvm-devel] [PATCH] mmu notifiers #v5

2008-02-01 Thread Christoph Lameter
On Fri, 1 Feb 2008, Andrea Arcangeli wrote: Note that my #v5 doesn't require to increase the page count all the time, so GRU will work fine with #v5. But that comes with the cost of firing invalidate_page for every page being evicted. In order to make your single invalidate_range work without

[kvm-devel] [PATCH] Fix libkvm so that it's usable from outside of kvm-userspace

2008-02-01 Thread Anthony Liguori
This removes -DCONFIG_X86 and installs asm/kvm.h. Otherwise, it's impossible to build an application based on a make install of libkvm. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/configure b/configure index 6b20c2f..418dbea 100755 --- a/configure +++ b/configure @@ -94,7

[kvm-devel] [PATCH 2/6] Use correct types to enable 2G support (v2)

2008-02-01 Thread Anthony Liguori
KVM supports more than 2GB of memory for x86_64 hosts. The following patch fixes a number of type related issues where int's were being used when they shouldn't have been. It also introduces CMOS support so the BIOS can build the appropriate e820 tables. For v2 of this page, I've moved

Re: [kvm-devel] [kvm-commits] [PATCH] kvm: qemu: add copyright notices

2008-02-01 Thread Anthony Liguori
Avi Kivity wrote: From: Avi Kivity [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] Can you also add one for qemu-kvm-x86.c? Regards, Anthony Liguori - This SF.net email is sponsored by: Microsoft Defy

Re: [kvm-devel] amd64: does it ever work? ;)

2008-02-01 Thread Michael Tokarev
Michael Tokarev wrote: Amit Shah wrote: On Friday 01 February 2008 13:30:03 Michael Tokarev wrote: [] With 2.6.23 and vanilla kvm modules, while from X, it opens the virtual console (an X window), but that console is entirely empty (black), and nothing more happens. I can Ctrl+C the

Re: [kvm-devel] [Qemu-devel] Re: [PATCH 1/6] Use correct types to enable 2G support

2008-02-01 Thread Paul Brook
virtio could still be made to work with map cache. You would just have to change it to be able to map more than one page contiguously. As I mentioned though, it just starts getting ugly. That's why you should be using the cpu_physical_memory_rw routines :-) Anything that assume large linear

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

2008-02-01 Thread Christoph Lameter
On Fri, 1 Feb 2008, Robin Holt wrote: We are getting this callout when we transition the pte from a read-only to read-write. Jack and I can not see a reason we would need that callout. It is causing problems for xpmem in that a write fault goes to get_user_pages which gets back to

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

2008-02-01 Thread Robin Holt
Christoph, The following code in do_wp_page is a problem. We are getting this callout when we transition the pte from a read-only to read-write. Jack and I can not see a reason we would need that callout. It is causing problems for xpmem in that a write fault goes to get_user_pages which gets

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

2008-02-01 Thread Christoph Lameter
On Fri, 1 Feb 2008, Robin Holt wrote: On Fri, Feb 01, 2008 at 03:19:32PM -0800, Christoph Lameter wrote: On Fri, 1 Feb 2008, Robin Holt wrote: We are getting this callout when we transition the pte from a read-only to read-write. Jack and I can not see a reason we would need that

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

2008-02-01 Thread Robin Holt
On Fri, Feb 01, 2008 at 04:05:08PM -0800, Christoph Lameter wrote: On Fri, 1 Feb 2008, Robin Holt wrote: On Fri, Feb 01, 2008 at 03:19:32PM -0800, Christoph Lameter wrote: On Fri, 1 Feb 2008, Robin Holt wrote: We are getting this callout when we transition the pte from a read-only

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

2008-02-01 Thread Robin Holt
On Fri, Feb 01, 2008 at 06:21:45PM -0600, Robin Holt wrote: On Fri, Feb 01, 2008 at 04:05:08PM -0800, Christoph Lameter wrote: Are you saying that you get the callback when transitioning from a read only to a read write pte on the *same* page? I believe that is what we saw. We have not