[kvm-devel] [RFC 8/8]KVM: cache pages

2007-07-22 Thread Shaohua Li
KVM use gfn_to_page very frequestly, which makes find_get_page a bottleneck, so cache pages found to speed up. Signed-off-by: Shaohua Li <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |1 + drivers/kvm/kvm_main.c |9 + 2 files changed, 10 insertions(+) Index: linux/drivers/kvm/kv

[kvm-devel] [RFC 7/8]KVM: swap out guest pages

2007-07-22 Thread Shaohua Li
Make KVM guest pages be allocated dynamically and able to be swaped out. One issue: all inodes returned from anon_inode_getfd are shared, if one module changes field of the inode, other moduels might break. Should we introduce a new API to not share inode? Signed-off-by: Shaohua Li <[EMAIL PROTEC

[kvm-devel] [RFC 6/8]KVM: introduce kvm_mmu_zap_pagetbl

2007-07-22 Thread Shaohua Li
add a routine to zap all shadow pgtble for a gfn. If kvm supports SMP, the API should zap pgtble for all vcpus, but kvm shadow page table really should be per-vm, instead of per-vcpu. Signed-off-by: Shaohua Li <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |1 + drivers/kvm/mmu.c | 28 ++

[kvm-devel] [RFC 5/8]KVM: rmap readonly pages

2007-07-22 Thread Shaohua Li
Make shadow page table rmap readonly pages. Signed-off-by: Shaohua Li <[EMAIL PROTECTED]> --- drivers/kvm/mmu.c | 66 ++ drivers/kvm/paging_tmpl.h |2 - 2 files changed, 39 insertions(+), 29 deletions(-) Index: linux/drivers/kvm/mmu.c ===

[kvm-devel] [RFC 4/8]KVM: move gfn_to_page out of kmap/unmap pars

2007-07-22 Thread Shaohua Li
gfn_to_page might sleep with swap support. Move it out of the kmap calls. Signed-off-by: Shaohua Li <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |2 - drivers/kvm/kvm_main.c|9 ++--- drivers/kvm/mmu.c |2 - drivers/kvm/paging_tmpl.h | 80 +++-

[kvm-devel] [RFC 3/8]KVM: convert vm lock to a mutex

2007-07-22 Thread Shaohua Li
convert kvm lock to a mutex. TBD: after this change, a lot of logic in kvm can be simplified, eg, we don't need release lock and then do operation blocking. Signed-off-by: Shaohua Li <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |2 - drivers/kvm/kvm_main.c | 58 --

[kvm-devel] [RFC 2/8]KVM: export several symbols kvm swap out needed

2007-07-22 Thread Shaohua Li
export symbols kvm swapout required Signed-off-by: Shaohua Li <[EMAIL PROTECTED]> Index: linux/mm/swap_state.c === --- linux.orig/mm/swap_state.c 2007-07-23 13:06:20.0 +0800 +++ linux/mm/swap_state.c 2007-07-23 13:29:1

[kvm-devel] [RFC 1/8]KVM: fix bugs in kvm sched integration patch

2007-07-22 Thread Shaohua Li
fix some bugs in kvm-sch patch. 1. vmcs_readl/vmcs_writel are called with preempt enabled 2. preempt_count check doesn't make sense with preempt disabled 3. vmx_cpu_run doesn't handle error correctly and kvm_mmu_reload might sleep with mutex changes, so I move it above. Signed-off-by: Shaohua Li <

[kvm-devel] [RFC 0/8]KVM: swap out guest pages

2007-07-22 Thread Shaohua Li
This patch series make kvm guest pages be able to be swapped out and dynamically allocated. Without it, all guest memory is allocated at guest start time. patches are against latest git, and you need first patch Avi's kvm-sch integration patch (http://sourceforge.net/mailarchive/forum.php?thread_n

Re: [kvm-devel] idle linux guest takes up to 8.5% of host CPU

2007-07-22 Thread Avi Kivity
Adam Monsen wrote: > Hi Avi, > > On 7/22/07, Avi Kivity <[EMAIL PROTECTED]> wrote: > >> Adam Monsen wrote: >> > [...] > >>> Any idea why an idle Fedora 7 guest would use more host CPU than an >>> idle Windows XP guest? >>> >> Several reasons: >> >> - Linux userspace sucks up more

Re: [kvm-devel] Data corruption in guest using KVM

2007-07-22 Thread Aurelien Jarno
On Mon, Jul 23, 2007 at 01:34:29AM +0200, Aurelien Jarno wrote: > On Sun, Jul 22, 2007 at 08:34:37PM +0300, Avi Kivity wrote: > > Aurelien Jarno wrote: > > > On Sun, Jul 22, 2007 at 04:46:19PM +0300, Avi Kivity wrote: > > > > > >> If you do happen to get a same-size corruption, that may tell us

[kvm-devel] Oops at boot - kernel 2.6.22.1

2007-07-22 Thread Fix
Host system: Linux Processor: Athlon64 X2 3600+ Kernel: 2.6.22.1 KVM version: 31 Guest system: Linux Kernel: 2.6.22.1 $ kvm -hda linux.img -boot c -m 256 Host system freeze immediately after pressing in LILO /var/log/messages: Jul 23 11:57:10 linux kernel: Unable to handle kernel NULL point

Re: [kvm-devel] idle linux guest takes up to 8.5% of host CPU

2007-07-22 Thread Adam Monsen
Hi Avi, On 7/22/07, Avi Kivity <[EMAIL PROTECTED]> wrote: > Adam Monsen wrote: [...] > > Any idea why an idle Fedora 7 guest would use more host CPU than an > > idle Windows XP guest? > > Several reasons: > > - Linux userspace sucks up more cpu than Windows. That's especially > true if you have X

Re: [kvm-devel] Vista networking and guest SMP on Windows XP

2007-07-22 Thread Haydn Solomon
Hi Jorge, I was able to install the driver using the url. What's happening when you try to install it? Haydn On 7/22/07, Jorge Lucángeli Obes <[EMAIL PROTECTED]> wrote: Hi all, I've been able to successfully install and use Vista Ultimate after all. However, I think the link in http://kvm.qu

[kvm-devel] Vista networking and guest SMP on Windows XP

2007-07-22 Thread Jorge Lucángeli Obes
Hi all, I've been able to successfully install and use Vista Ultimate after all. However, I think the link in http://kvm.qumranet.com/kvmwiki/Vista_Networking_Workaround to "Windows 2000 driver disk" for NE2000 PCI is broken. Is the disk available somewhere else? On another subject, I'm testing

Re: [kvm-devel] Data corruption in guest using KVM

2007-07-22 Thread Aurelien Jarno
On Sun, Jul 22, 2007 at 08:34:37PM +0300, Avi Kivity wrote: > Aurelien Jarno wrote: > > On Sun, Jul 22, 2007 at 04:46:19PM +0300, Avi Kivity wrote: > > > >> If you do happen to get a same-size corruption, that may tell us more. > >> > >> > > > > I have just got one same-size corruption buil

Re: [kvm-devel] [RFC][PATCH 00/01]qemu VM entrypoints

2007-07-22 Thread David Windsor
On 7/22/07 3:07 PM, "Anthony Liguori" <[EMAIL PROTECTED]> wrote: > Joshua Brindle wrote: >> James Morris wrote: >> >>> On Sat, 21 Jul 2007, Anthony Liguori wrote: >>> >>> Can you already write an selinux policy that changes the label of a process when it open()s a different file

Re: [kvm-devel] kvm-31 configure file bug

2007-07-22 Thread Simon Gao
Avi Kivity wrote: > Simon Gao wrote: >> Hi, >> >> I found there is a bug with configure file shipped with kvm-31. Here is >> the part of configure file: >> >> === >> target_cpu() { >> if [[ $(uname -m) = i?86 ]]; then >>echo x86_64 >> else >> unam

Re: [kvm-devel] [RFC][PATCH 00/01]qemu VM entrypoints

2007-07-22 Thread Anthony Liguori
Joshua Brindle wrote: > James Morris wrote: > >> On Sat, 21 Jul 2007, Anthony Liguori wrote: >> >> >>> Can you already write an selinux policy that changes the label of a >>> process when it open()s a different file? >>> >> No, and you normally want to do this over an exec anyway, to

Re: [kvm-devel] Data corruption in guest using KVM

2007-07-22 Thread Aurelien Jarno
On Sun, Jul 22, 2007 at 08:34:37PM +0300, Avi Kivity wrote: > Aurelien Jarno wrote: > > On Sun, Jul 22, 2007 at 04:46:19PM +0300, Avi Kivity wrote: > > > >> If you do happen to get a same-size corruption, that may tell us more. > >> > >> > > > > I have just got one same-size corruption buil

Re: [kvm-devel] [RFC][PATCH 00/01]qemu VM entrypoints

2007-07-22 Thread David Windsor
On 7/21/07 11:54 AM, "Anthony Liguori" <[EMAIL PROTECTED]> wrote: > David Windsor wrote: >> On 7/21/07 2:21 AM, "Avi Kivity" <[EMAIL PROTECTED]> wrote: >> >> >>> Anthony Liguori wrote: >>> James Morris wrote: > On Fri, 20 Jul 2007, Daniel P. Berrange wrote: >>

Re: [kvm-devel] Data corruption in guest using KVM

2007-07-22 Thread Avi Kivity
Aurelien Jarno wrote: > On Sun, Jul 22, 2007 at 04:46:19PM +0300, Avi Kivity wrote: > >> If you do happen to get a same-size corruption, that may tell us more. >> >> > > I have just got one same-size corruption building glibc 2.6 on > GNU/kFreeBSD i386 (32-bit nonpae). > > One byte at addr

Re: [kvm-devel] Data corruption in guest using KVM

2007-07-22 Thread Aurelien Jarno
On Sun, Jul 22, 2007 at 04:46:19PM +0300, Avi Kivity wrote: > If you do happen to get a same-size corruption, that may tell us more. > I have just got one same-size corruption building glibc 2.6 on GNU/kFreeBSD i386 (32-bit nonpae). One byte at address 0x9000 has been replaced by 0x00. Please f

Re: [kvm-devel] Data corruption in guest using KVM

2007-07-22 Thread Avi Kivity
Aurelien Jarno wrote: >> >> btw, are you running a parallel make (-jN)? >> > > I wasn't using -j until a few hours. I am now trying -j2 with SMP > guests. I already get what I think is a corruption, a parse error from > ld on a file generated by gcc. Unfortunately I don't have the corrupted >

Re: [kvm-devel] Data corruption in guest using KVM

2007-07-22 Thread Aurelien Jarno
On Sun, Jul 22, 2007 at 06:14:16PM +0300, Avi Kivity wrote: > Aurelien Jarno wrote: > > > >>How would I go about reproducing this? Is a single ./configure; make > >>clean; make in a loop compiling gcc sufficient? > >> > > > >Yes basically that's what I am doing but on the glibc sources as

Re: [kvm-devel] Data corruption in guest using KVM

2007-07-22 Thread Avi Kivity
Aurelien Jarno wrote: > >> How would I go about reproducing this? Is a single ./configure; make >> clean; make in a loop compiling gcc sufficient? >> > > Yes basically that's what I am doing but on the glibc sources as I get > more "success" to reproduce the bug. Note that you should ru

Re: [kvm-devel] idle linux guest takes up to 8.5% of host CPU

2007-07-22 Thread Avi Kivity
Adam Monsen wrote: > I have a Fedora 7 host with two guests: > lnx01: Fedora 7 > win01: Windows XP Pro > > When they are both active, the host CPU usage by the Linux guest > hovers around 8 to 9 percent, while the host CPU usage by the Windows > guest hovers around 1 to 1.5 percent. These values ar

[kvm-devel] idle linux guest takes up to 8.5% of host CPU

2007-07-22 Thread Adam Monsen
I have a Fedora 7 host with two guests: lnx01: Fedora 7 win01: Windows XP Pro When they are both active, the host CPU usage by the Linux guest hovers around 8 to 9 percent, while the host CPU usage by the Windows guest hovers around 1 to 1.5 percent. These values are seen in the "virt-manager" app

Re: [kvm-devel] [kvm-commits] kvm: qemu: consume all signals available in order to reduce latency

2007-07-22 Thread Avi Kivity
Aurelien Jarno wrote: > >> } >> /* >> * we call select() even if no signal was received, to account for >> * for which there is no signal handler installed. >> */ >> +pthread_mutex_unlock(&qemu_mutex); >> +cpu_single_env = vcpu_env; >> main_loop_wait(0);

Re: [kvm-devel] Data corruption in guest using KVM

2007-07-22 Thread Avi Kivity
Aurelien Jarno wrote: > On Sun, Jul 22, 2007 at 10:52:03AM +0300, Avi Kivity wrote: > >> Aurelien Jarno wrote: >> >>> Hi all, >>> >>> For a long time I am seeing data corruption in guests when using KVM, >>> but I am convinced only since today that the problem comes from KVM. >>> >>> The sy

Re: [kvm-devel] [kvm-commits] kvm: qemu: consume all signals available in order to reduce latency

2007-07-22 Thread Aurelien Jarno
Avi Kivity a écrit : > repository: /home/avi/kvm > branch: master > commit eae5c47eee477f63b55aab2374f702229b697626 > Author: Avi Kivity <[EMAIL PROTECTED]> > Date: Sun Jul 22 13:28:12 2007 +0300 > > kvm: qemu: consume all signals available in order to reduce latency > [snip] > } >

Re: [kvm-devel] Data corruption in guest using KVM

2007-07-22 Thread Aurelien Jarno
On Sun, Jul 22, 2007 at 10:52:03AM +0300, Avi Kivity wrote: > Aurelien Jarno wrote: > > Hi all, > > > > For a long time I am seeing data corruption in guests when using KVM, > > but I am convinced only since today that the problem comes from KVM. > > > > The symptoms are a few bytes that are mangle

Re: [kvm-devel] Network performance regression between kvm-29 and kvm-31

2007-07-22 Thread Aurelien Jarno
On Sun, Jul 22, 2007 at 01:30:14PM +0300, Avi Kivity wrote: > Aurelien Jarno wrote: > >>> > >>> I finally didn't resist to run git bisect before going to bed... > >>> > >>> The patch that causes the regression is: > >>> > >>> commit 7d2e674835492040c9baddf0989a95abea9a8d0f > >>> Author: Avi Kivity

Re: [kvm-devel] Dont leak debug flugs in ioctl_get_regs()?

2007-07-22 Thread Avi Kivity
Jun Koi wrote: > Hi, > > In kvm_vcpu_ioctl_get_regs() function (kvm_main.c), we have a comment > like this: "Dont leak debug flags in case they were set for guest > debugging". > > What is the reasons that make us filter out TF and RF bit in EFLAGS like that? > VT and SVM don't virtualize the d

Re: [kvm-devel] Network performance regression between kvm-29 and kvm-31

2007-07-22 Thread Avi Kivity
Aurelien Jarno wrote: >>> >>> I finally didn't resist to run git bisect before going to bed... >>> >>> The patch that causes the regression is: >>> >>> commit 7d2e674835492040c9baddf0989a95abea9a8d0f >>> Author: Avi Kivity <[EMAIL PROTECTED]> >>> Date: Sun Jul 15 15:08:23 2007 +0300 >>> >>> k

Re: [kvm-devel] cannot insert kernel module with 2.6.22

2007-07-22 Thread Avi Kivity
Thomas Ilgner wrote: > Hey, > > after I compiled kvm-31 with Kernel 2.6.22, the kernel modules won't load. > > TuxMac ~ # modprobe kvm > FATAL: Error inserting kvm > (/lib/modules/2.6.22-gentoo-mactel/extra/kvm.ko): Unknown symbol in > module, or unknown parameter (see dmesg) > > Output dmesg: > kv

Re: [kvm-devel] building kvm-31 against linux-2.6.22-git16

2007-07-22 Thread Avi Kivity
Chris Clayton wrote: > Hi, > > Due to changes to kmem_cache_create, kvm-31 fails to build against > linux-2.6.22-git16: > > CC [M] /home/users/chris/rpm/BUILD/kvm-31/kernel/vmx-debug.o > CC [M] /home/users/chris/rpm/BUILD/kvm-31/kernel/kvm_main.o > CC [M] /home/users/chris/rpm/BUILD/kvm-3

[kvm-devel] [PATCH] KVM: Require CONFIG_ANON_INODES

2007-07-22 Thread Avi Kivity
Found by Sebastian Siewior and randconfig. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/kvm/Kconfig b/drivers/kvm/Kconfig index 2f661e5..6cecc39 100644 --- a/drivers/kvm/Kconfig +++ b/drivers

Re: [kvm-devel] kvm-31 seg fault

2007-07-22 Thread Avi Kivity
Chris Clayton wrote: > Hi, > > I'm getting a seg fault running kvm-31 on linux-2.6.22.1-cfs-v19 and > linux-2.6.22-git17. > > If I use the kvm-31 kernel modules with qemu from kvm-29, all is OK Also, > running "non-kvm" guests, such as Windows ME, works fine with kvm-31. > > I have an strace log

[kvm-devel] kvm-31 seg fault

2007-07-22 Thread Chris Clayton
Hi, I'm getting a seg fault running kvm-31 on linux-2.6.22.1-cfs-v19 and linux-2.6.22-git17. If I use the kvm-31 kernel modules with qemu from kvm-29, all is OK Also, running "non-kvm" guests, such as Windows ME, works fine with kvm-31. I have an strace log but its over 99 Kilobytes, so I have

Re: [kvm-devel] kvm-31 configure file bug

2007-07-22 Thread Avi Kivity
Simon Gao wrote: > Hi, > > I found there is a bug with configure file shipped with kvm-31. Here is > the part of configure file: > > === > target_cpu() { > if [[ $(uname -m) = i?86 ]]; then >echo x86_64 > else > uname -m > fi > } > ===

Re: [kvm-devel] Missing my posts to this lists

2007-07-22 Thread Avi Kivity
Simon Gao wrote: > Just curious, is kvm-devel a moderated list? I sent two emails to the > list, but neither made to the list. If it's moderated list, please at > least let me know why they are rejected. If not, then there is something > wrong with the list server receiving emails. > > The li

Re: [kvm-devel] Data corruption in guest using KVM

2007-07-22 Thread Avi Kivity
Aurelien Jarno wrote: > Hi all, > > For a long time I am seeing data corruption in guests when using KVM, > but I am convinced only since today that the problem comes from KVM. > > The symptoms are a few bytes that are mangled to 0x00 in a file that has > been written. For now I have only seen 2 or

Re: [kvm-devel] Fix bug in unexpected ethernet irq.

2007-07-22 Thread Avi Kivity
Dong, Eddie wrote: > re-deliver level triggreed irq at time of APIC > EOI will cause some guest no progress and hang in ethernet bringup. > Temply remove it for future revisit. > > Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> > > Applied all three patches and rebas