Re: [kvm-devel] Reverting back in lapic2 branch of kvm-userspace?

2007-07-24 Thread Avi Kivity
Dong, Eddie wrote: ??? I didn't think the APIC is removed. Who and which commit? commit 394b6efba95f21d22687743def9aa1a0b7125809 Author: Eddie Dong [EMAIL PROTECTED] Date: Thu Jul 19 12:12:53 2007 +0300 kvm: rename KVM_CAP_PIC to KVM_CAP_IRQCHIP had parts of the patch that removed

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

2007-07-24 Thread Rusty Russell
On Tue, 2007-07-24 at 08:30 +0300, Avi Kivity wrote: Rusty Russell wrote: On Mon, 2007-07-23 at 13:27 +0300, Avi Kivity wrote: Having an address_space (like your patch does) is remarkably simple, and requires few hooks from the current vm. However using existing vmas mapped by the

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

2007-07-24 Thread Rusty Russell
On Tue, 2007-07-24 at 09:21 +0300, Avi Kivity wrote: Rusty Russell wrote: Actually, get_user_pages() does that for you. You have to make R/O any writable pte where the guest doesn't set the dirty bit (so you can trap it later) but last I put a printk in there, Linux doesn't do that.

Re: [kvm-devel] Reverting back in lapic2 branch of kvm-userspace?

2007-07-24 Thread Dong, Eddie
O, I checked minutes ago (using local mirror), everthing is fine. I got live migration works for FC5_32 which uses PIC only. Eddie - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find

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

2007-07-24 Thread Avi Kivity
Rusty Russell wrote: If not, it does get harder. A callback in the mm struct to say I want to swap your page out is required if we don't take a reference to the page. Dirty bit handling would be an interesting issue (maybe the callback can say No! and dirty the page again?). Since

[kvm-devel] [PATCH 2/2] kvm: pr_guest: don't let guest invoke printk() on host

2007-07-24 Thread Rusty Russell
If the guest can invoke a printk(), it can potentially flood the logs, causing a host DoS. We should also indicate *which* guest we're talking about. This patch adds pr_guest (analogous to pr_debug) which ratelimits. Not all printk's were replaced: some are only printed once and others should

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

2007-07-24 Thread Rusty Russell
On Tue, 2007-07-24 at 09:59 +0300, Avi Kivity wrote: However, you can probably work around that by not setting an rmap for the kernel mappings, and instead have the guest teach the host where the kernel page tables live. You'd only be left with shared libraries, until the kernel can share

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

2007-07-24 Thread Avi Kivity
Shaohua Li wrote: gfn_to_page might sleep with swap support. Move it out of the kmap calls. I'd like to apply this to the kvm.git master branch so we don't have to maintain it. Was this tested on a highmem machine? If not, I can do it. -- error compiling committee.c: too many

Re: [kvm-devel] preclean up for live migration

2007-07-24 Thread Avi Kivity
Dong, Eddie wrote: Against lapic2 This is a pre-cleanup for in kernel irqchip live migration support. A guest may not have APIC but still have apic_base_msr be save/restored in current live migration framework. Signed-off-by: Yaozu (Eddie) Dong [EMAIL PROTECTED] diff --git

Re: [kvm-devel] preview of in kernel irqchip live migration support

2007-07-24 Thread Avi Kivity
Dong, Eddie wrote: This patch is only for idea collection so far. The dilemma is that how to export the pic/IOAPIC/apic state data structure to user and make sure it has same/similar structure in user level. Otherwise a convert is a must and we must maintain the converter. I think we

Re: [kvm-devel] [PATCH 1/2] kvm: Insist on a reason when injecting a #GP into a guest

2007-07-24 Thread Avi Kivity
Rusty Russell wrote: Insist on a reason when injecting a #GP into a guest All places but one already do a printk before injecting a #GP: just formalize it a little. Signed-off-by: Rusty Russell [EMAIL PROTECTED] diff -r f75b0a5fc387 drivers/kvm/kvm_main.c --- a/drivers/kvm/kvm_main.c Mon

Re: [kvm-devel] [PATCH 2/2] kvm: pr_guest: don't let guest invoke printk() on host

2007-07-24 Thread Avi Kivity
Rusty Russell wrote: If the guest can invoke a printk(), it can potentially flood the logs, causing a host DoS. We should also indicate *which* guest we're talking about. This patch adds pr_guest (analogous to pr_debug) which ratelimits. Not all printk's were replaced: some are only printed

Re: [kvm-devel] [PATCH 1/2] kvm: Insist on a reason when injecting a #GP into a guest

2007-07-24 Thread Rusty Russell
On Tue, 2007-07-24 at 13:15 +0300, Avi Kivity wrote: Rusty Russell wrote: +static void __attribute__((format(printf, 2, 3))) +inject_gp(struct kvm_vcpu *vcpu, const char *why_fmt, ...) ... kvm_arch_ops-inject_gp(vcpu, 0); } Some guests (non hardware accelerated hypervisors,

Re: [kvm-devel] [PATCH 1/2] kvm: Insist on a reason when injecting a #GP into a guest

2007-07-24 Thread Avi Kivity
Rusty Russell wrote: On Tue, 2007-07-24 at 13:15 +0300, Avi Kivity wrote: Rusty Russell wrote: +static void __attribute__((format(printf, 2, 3))) +inject_gp(struct kvm_vcpu *vcpu, const char *why_fmt, ...) ... kvm_arch_ops-inject_gp(vcpu, 0); } Some

[kvm-devel] [patch] mmu.c: remove unused functions

2007-07-24 Thread Nguyen Anh Quynh
This patch removes some unused functions in mmu.c Signed-off-by: Nguyen Anh Quynh [EMAIL PROTECTED] diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c index a7985b1..13fb6bb 100644 --- a/drivers/kvm/mmu.c +++ b/drivers/kvm/mmu.c @@ -156,21 +156,6 @@ static struct kmem_cache *pte_chain_cache;

Re: [kvm-devel] [patch] mmu.c: remove unused functions

2007-07-24 Thread Avi Kivity
Nguyen Anh Quynh wrote: This patch removes some unused functions in mmu.c -static int is_nx(struct kvm_vcpu *vcpu) -{ - return vcpu-shadow_efer EFER_NX; -} - is_nx() for example, is used. More care, please. -- error compiling committee.c: too many arguments to function

Re: [kvm-devel] [PATCH 2/2] kvm: pr_guest: don't let guest invoke printk() on host

2007-07-24 Thread Avi Kivity
Rusty Russell wrote: On Tue, 2007-07-24 at 13:19 +0300, Avi Kivity wrote: Rusty Russell wrote: diff -r 3f158ee9df43 drivers/kvm/kvm_main.c --- a/drivers/kvm/kvm_main.cTue Jul 24 16:22:39 2007 +1000 +++ b/drivers/kvm/kvm_main.cTue Jul 24 16:28:33 2007 +1000 @@ -425,8

[kvm-devel] KVM-33 + Windows Server 2003 = VMX-OK / SVM-kernel panic?

2007-07-24 Thread Alessandro Sardo
Hello list, I am facing some big issues with the latest KVM release. I am still trying to boot and use the same VM image on four different hosts, but with outstanding bad luck. More precisely, I created a brand new VM image and installed Windows Server 2003. Then, I did shut it down and

Re: [kvm-devel] [PATCH 2/2] kvm: pr_guest: don't let guest invoke printk() on host

2007-07-24 Thread Rusty Russell
On Tue, 2007-07-24 at 14:01 +0300, Avi Kivity wrote: Rusty Russell wrote: KVM *will* be used to run malicious guests. That's going to be hard to lock down later, so I figure we should start now. There's no reason to make this KERN_WARN. There's nothing wrong with the host, and there

Re: [kvm-devel] KVM-33 + Windows Server 2003 = VMX-OK / SVM-kernel panic?

2007-07-24 Thread Alexey Eremenko
Actually this is known problem, that I reproduced easily. Windows 2000/XP/2003 (32-bit) all fails on AMD SVM. Strage, but Vista runs on SVM fine. VMX and SVM have different problems, with different guests failing on each. -- -Alexey Eremenko Technologov

Re: [kvm-devel] KVM-33 + Windows Server 2003 = VMX-OK / SVM-kernel panic?

2007-07-24 Thread Alexey Eremenko
http://sourceforge.net/tracker/index.php?func=detailaid=1750684group_id=180599atid=893831 http://sourceforge.net/tracker/index.php bug 1750684 -- -Alexey Eremenko Technologov - This SF.net email is sponsored by: Splunk Inc.

Re: [kvm-devel] [PATCH 2/2] kvm: pr_guest: don't let guest invoke printk() on host

2007-07-24 Thread Avi Kivity
Rusty Russell wrote: On Tue, 2007-07-24 at 14:01 +0300, Avi Kivity wrote: Rusty Russell wrote: KVM *will* be used to run malicious guests. That's going to be hard to lock down later, so I figure we should start now. There's no reason to make this KERN_WARN. There's nothing

Re: [kvm-devel] KVM-33 + Windows Server 2003 = VMX-OK / SVM-kernel panic?

2007-07-24 Thread Avi Kivity
Alessandro Sardo wrote: One at a time. Test #3 CPU model: 1 x Single-Core AMD Athlon64 Processor 3500+ AM2 Host: RHEL5 x86_64, kernel 2.6.18-8.1.8.el5 KVM-33 Result - boots fine, but when I try to install the SP2 I get the following kernel panic: Unable to handle kernel NULL pointer

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

2007-07-24 Thread Shaohua Li
2007/7/24, Avi Kivity [EMAIL PROTECTED]: Shaohua Li wrote: gfn_to_page might sleep with swap support. Move it out of the kmap calls. I'd like to apply this to the kvm.git master branch so we don't have to maintain it. Was this tested on a highmem machine? If not, I can do it. My test

[kvm-devel] Host/Guest SMP: Looking for answers

2007-07-24 Thread Peter Meier
Hello, I've heard that KVM-33 now supports SMP hosts and SMP guests, which is cool. However I do have some newbie-level questions about this one. - I assume this is implemented by using n threads for n CPUs/CPU cores and letting the host OS schedule accordingly? Or does the VM somehow

Re: [kvm-devel] (no subject)

2007-07-24 Thread Shaohua Li
From: Avi Kivity [EMAIL PROTECTED] To: Li, Shaohua [EMAIL PROTECTED] Date: Tue, 24 Jul 2007 13:42:29 +0800 Subject: Re: [RFC 0/8]KVM: swap out guest pages Shaohua Li wrote: On Mon, 2007-07-23 at 18:27 +0800, Avi Kivity wrote: Shaohua Li wrote: This patch series make kvm guest

Re: [kvm-devel] Host/Guest SMP: Looking for answers

2007-07-24 Thread Avi Kivity
Peter Meier wrote: Hello, I've heard that KVM-33 now supports SMP hosts and SMP guests, which is cool. However I do have some newbie-level questions about this one. - I assume this is implemented by using n threads for n CPUs/CPU cores and letting the host OS schedule accordingly? Or

Re: [kvm-devel] Host/Guest SMP: Looking for answers

2007-07-24 Thread Peter Meier
Thanks Avi :). Off to try it out ... Regards, Peter - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a

[kvm-devel] compile error [u]

2007-07-24 Thread Andreas Jellinghaus [c]
kvm needs zlib development files to compile, but does not probe for it in configure and does not complain if they are missing. a simple header check in qemu configure should fix this. Regards, Andreas - This SF.net email is

Re: [kvm-devel] Oops at boot - kernel 2.6.22.1

2007-07-24 Thread Fix
Can you post the guest image (if it is free and has no private data)? Here is the test case. Image contains kernel and bootloader: http://depositfiles.com/en/files/1304964 - This SF.net email is sponsored by: Splunk Inc.

[kvm-devel] [PATCH] KVM: VMX cannot yet handle migration-after-preemption, so disable it

2007-07-24 Thread Gregory Haskins
This patch applies to the preempt-hooks branch to enable KVM to function properly on VMX. With preemption enabled, the KVM context can get scheduled out at arbitrary points. The preempt-hooks allow us to correctly restore the host state while being preemptible, but preemption causes problems on

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

2007-07-24 Thread Gregory Haskins
On Tue, 2007-07-24 at 22:02 +, Chris Clayton wrote: I've been doing some more digging around here and thought I'd report my findings. I've found that under kvm 31 and 33, qemu-system-x86_64 always fails with a seg fault when the (__thread) variable vcpu_env (declared at line 33 of

Re: [kvm-devel] KVM 29: Page fault in kernel mode while booting GNU/kFreeBSD

2007-07-24 Thread Aurelien Jarno
On Fri, Jul 20, 2007 at 09:57:55AM +0300, Avi Kivity wrote: Avi Kivity wrote: Please tell me what I can do to help debugging this problem. Alternatively I have uploaded an image to reproduce the problem here: http://temp.aurel32.net/kfreebsd-amd64.img.g I've downloaded the image

Re: [kvm-devel] [patch] mmu.c: remove unused functions

2007-07-24 Thread Avi Kivity
Nguyen Anh Quynh wrote: On 7/24/07, Avi Kivity [EMAIL PROTECTED] wrote: Nguyen Anh Quynh wrote: This patch removes some unused functions in mmu.c -static int is_nx(struct kvm_vcpu *vcpu) -{ - return vcpu-shadow_efer EFER_NX; -} - is_nx() for example, is used. More care,

Re: [kvm-devel] KVM 29: Page fault in kernel mode while booting GNU/kFreeBSD

2007-07-24 Thread Avi Kivity
Aurelien Jarno wrote: On Fri, Jul 20, 2007 at 09:57:55AM +0300, Avi Kivity wrote: Avi Kivity wrote: Please tell me what I can do to help debugging this problem. Alternatively I have uploaded an image to reproduce the problem here: http://temp.aurel32.net/kfreebsd-amd64.img.g

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

2007-07-24 Thread Avi Kivity
Simon Gao wrote: Avi Kivity wrote: Simon Gao wrote: So from kvm-31 and on, qemu command will become qemu-system-x86_64 no matter host system is 32bit or 64bit? So it's possible to compile 64bit kvm qemu with only 32bit libraries? Yes and yes. That's even more true

Re: [kvm-devel] [PATCH] KVM: VMX cannot yet handle migration-after-preemption, so disable it

2007-07-24 Thread Avi Kivity
Gregory Haskins wrote: This patch applies to the preempt-hooks branch to enable KVM to function properly on VMX. With preemption enabled, the KVM context can get scheduled out at arbitrary points. The preempt-hooks allow us to correctly restore the host state while being preemptible, but

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

2007-07-24 Thread Avi Kivity
Chris Clayton wrote: Forgot to cc this to the list, sorry -- Forwarded Message -- Subject: Re: [kvm-devel] kvm-31 seg fault Date: Tuesday 24 July 2007 From: Chris Clayton [EMAIL PROTECTED] To: Avi Kivity [EMAIL PROTECTED] Hi again Avi, On Sunday 22 July 2007, you

[kvm-devel] [PATCH] load_pdptrs cleanups

2007-07-24 Thread Rusty Russell
load_pdptrs can be handed an invalid cr3, and it should not oops. This can happen because we injected #gp in set_cr3() after we set vcpu-cr3 to the invalid value, or from kvm_vcpu_ioctl_set_sregs(), or possibly (?) memory configuration changes after the guest did set_cr3(). We should also copy

[kvm-devel] [ kvm-Bugs-1760056 ] OpenSolaris crashes kvm due to unhandled vm_exit

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

Re: [kvm-devel] [PATCH] KVM: VMX cannot yet handle migration-after-preemption, so disable it

2007-07-24 Thread Gregory Haskins
On Wed, 2007-07-25 at 06:20 +0300, Avi Kivity wrote: I'd rather wait for the real fix, especially as this is an experimental branch. Can you provide details of the issue? Sure. Keep in mind I am working with the RT kernel, so things might be tighter and/or different than the vanilla

Re: [kvm-devel] [PATCH] KVM: VMX cannot yet handle migration-after-preemption, so disable it

2007-07-24 Thread Gregory Haskins
On Wed, 2007-07-25 at 07:13 +0300, Avi Kivity wrote: Preemption disabled yes, but interrupts? How do you think I found this? ;) From smp_call_function_single in -rt: WARN_ON(irqs_disabled()); IIRC I picked the place where sched_in is called to have interrupts enabled, but maybe -rt