Re: [kvm-devel] kvm very slow

2007-08-02 Thread Avi Kivity
Ulrich Schreiner wrote: > dmesg|grep kvm > > SELinux: initialized (dev kvmfs, type kvmfs), uses genfs_contexts > kvm: emulating exchange as write > > There may be messages that aren't prefixed with 'kvm:' (that's a bug btw). Please check. > now booting into a F7 image, after the system is re

Re: [kvm-devel] [PATCH 4/5] vmx.c uses x86_decode_prefix() instead of get_io_count().

2007-08-02 Thread Avi Kivity
Laurent Vivier wrote: > vmx.c uses x86_decode_prefix() instead of get_io_count(). > > > static int handle_io(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) > { > u64 exit_qualification; > @@ -1831,8 +1780,32 @@ > port = exit_qualification >> 16; > address = 0; > if (st

Re: [kvm-devel] [PATCH 4/5] vmx.c uses x86_decode_prefix() instead of get_io_count().

2007-08-02 Thread Laurent Vivier
Avi Kivity wrote: > Laurent Vivier wrote: >> vmx.c uses x86_decode_prefix() instead of get_io_count(). >> >>static int handle_io(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) >> { >> u64 exit_qualification; >> @@ -1831,8 +1780,32 @@ >> port = exit_qualification >> 16; >> addre

Re: [kvm-devel] [PATCH 4/5] vmx.c uses x86_decode_prefix() instead of get_io_count().

2007-08-02 Thread Avi Kivity
Laurent Vivier wrote: >> >> How about just calliing emulate_instruction() from here (just for the >> string case)? That will eliminate all the setup code. >> > > But this setup is in emulate_instruction() so it will be executed anyway. > > I'm not worried about run-time overhead, but abo

[kvm-devel] [PATCH] kvm: bypass irq_pending get/set when using in kernel irqchip

2007-08-02 Thread He, Qing
vcpu->irq_pending is saved in get/set_sreg IOCTL, but when in-kernel local APIC is used, doing this may occasionally overwrite vcpu->apic to an invalid value, as in the vm restore path. Signed-off-by: Qing He <[EMAIL PROTECTED]> diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c in

Re: [kvm-devel] Storing command line options in qcow2 images

2007-08-02 Thread Avi Kivity
Andrew Walrond wrote: > Jorge Lucángeli Obes wrote: > >> Ideas? Suggestions? I can send the patches for the functionality >> that's implemented right now. >> >> > > Great idea, and one I would certainly use. I guess then on Windoze I > could associate .qcow2 files with qemu and just double

Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX

2007-08-02 Thread Avi Kivity
Yang, Sheng wrote: > Add MSR Bitmap support in VMX so that some execution of RDMSR or WRMSR > won't cause a VM exit. > > Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> > Signed-off-by: Qing He <[EMAIL PROTECTED]> > --- > drivers/kvm/vmx.c | 44 +++- > drive

Re: [kvm-devel] [PATCH] kvm: bypass irq_pending get/set when using in kernel irqchip

2007-08-02 Thread Avi Kivity
He, Qing wrote: > vcpu->irq_pending is saved in get/set_sreg IOCTL, but when in-kernel > local APIC is used, doing this may occasionally overwrite vcpu->apic to > an invalid value, as in the vm restore path. > > Applied, thanks. -- error compiling committee.c: too many arguments to function

[kvm-devel] [RFC] lapic3: cleanup for save/restore data structure of in-kernel irqchips

2007-08-02 Thread He, Qing
Hi, The argument of in-kernel irqchip save/restore IOCTL uses a separate data structure (struct kvm_irqchip and struct kvm_ioctl_pic in include/linux/kvm.h) different from functional data structure (struct kvm_pic_state and struct kvm_ioapic in driver/kvm/irq.h), this is because while most

Re: [kvm-devel] [RFC] lapic3: cleanup for save/restore data structure of in-kernel irqchips

2007-08-02 Thread Avi Kivity
He, Qing wrote: > Hi, > The argument of in-kernel irqchip save/restore IOCTL uses a > separate data structure (struct kvm_irqchip and struct kvm_ioctl_pic in > include/linux/kvm.h) different from functional data structure (struct > kvm_pic_state and struct kvm_ioapic in driver/kvm/irq.h), thi

Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX

2007-08-02 Thread He, Qing
>-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Avi Kivity >Sent: 2007年8月2日 19:00 >To: Yang, Sheng >Cc: kvm-devel@lists.sourceforge.net >Subject: Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX > >Yang, Sheng wrote: >> Add MSR Bitmap support

Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX

2007-08-02 Thread Avi Kivity
He, Qing wrote: >> >> hmm. While there's nothing wrong with the patch, there is a simpler way >> to do this: >> >>static unsigned long vmx_msr_bitmap[PAGE_SIZE / sizeof(unsigned >> long)] __aligned(PAGE_SIZE); >> >> now there's no need to allocate, error-check, free, or kmap the memory. >> The

Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX

2007-08-02 Thread Avi Kivity
Avi Kivity wrote: > However, I do see an issue with my proposal. To get the physical address > of the page, we need to use vmalloc_to_page(). But that won't work if > kvm is built into the kernel (and thus uses large pages for data). > Because of this issue, I'd like to apply the patch now and

Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX

2007-08-02 Thread Li, Xin B
>Did you see any performance improvements out of this? Acturally we don't expect any obviously performance because MSR accesses are not frequent. -Xin - This SF.net email is sponsored by: Splunk Inc. Still grepping through lo

Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX

2007-08-02 Thread Avi Kivity
Li, Xin B wrote: >> Did you see any performance improvements out of this? >> > > Acturally we don't expect any obviously performance because MSR accesses > are not frequent. > Well, why do this then? -- error compiling committee.c: too many arguments to function ---

Re: [kvm-devel] KVM hangs on start

2007-08-02 Thread Anthony Liguori
Scott Lerman wrote: > On 8/1/07, *Avi Kivity* <[EMAIL PROTECTED] > > wrote: > > Scott Lerman wrote: > > The kernel is the current Ubuntu version, /proc/version is Linux > > version 2.6.20-16-generic ([EMAIL PROTECTED]) (gcc version 4.1.2 > (Ubuntu > >

Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX

2007-08-02 Thread Li, Xin B
>-Original Message- >From: Avi Kivity [mailto:[EMAIL PROTECTED] >Sent: Thursday, August 02, 2007 10:50 PM >To: Li, Xin B >Cc: He, Qing; Rusty Russell; kvm-devel@lists.sourceforge.net >Subject: Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX > >Li, Xin B wrote: >>> Did you see an

Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX

2007-08-02 Thread Avi Kivity
ron minnich wrote: > On 8/2/07, Avi Kivity <[EMAIL PROTECTED]> wrote: > >> Li, Xin B wrote: >> Did you see any performance improvements out of this? >>> Acturally we don't expect any obviously performance because MSR accesses >>> are not frequent. >>> >>> >> W

Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX

2007-08-02 Thread ron minnich
On 8/2/07, Avi Kivity <[EMAIL PROTECTED]> wrote: > Li, Xin B wrote: > >> Did you see any performance improvements out of this? > >> > > > > Acturally we don't expect any obviously performance because MSR accesses > > are not frequent. > > > > Well, why do this then? ah, see, you asked the question

Re: [kvm-devel] [PATCH 4/5] vmx.c uses x86_decode_prefix() instead of get_io_count().

2007-08-02 Thread Laurent Vivier
Avi Kivity wrote: > Laurent Vivier wrote: >>> >>> How about just calliing emulate_instruction() from here (just for the >>> string case)? That will eliminate all the setup code. >>> >> >> But this setup is in emulate_instruction() so it will be executed anyway. >> >> > > I'm not worried

Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX

2007-08-02 Thread Nakajima, Jun
Avi Kivity wrote: > ron minnich wrote: > > On 8/2/07, Avi Kivity <[EMAIL PROTECTED]> wrote: > > > > > Li, Xin B wrote: > > > > > > > > Did you see any performance improvements out of this? > > > > > > > > > > > > > > Acturally we don't expect any obviously performance because MSR > > > > access

Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX

2007-08-02 Thread Ulrich Drepper
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nakajima, Jun wrote: >> Looking at the Linux context switch code, it can bang on MSR_FS_BASE > and >> MSR_KERNEL_GS_BASE. A high context switch rate between threads (which >> use %gs or %fs) can show an improvement with this. Things like kbuild >> pro

[kvm-devel] AutoCAD 2008 ready to download

2007-08-02 Thread Tina Downs
on their own little seat cushions, wearing soft caps Cascading snowflakes settle in the pines,My soul lies cracked; and when, in its despair, High on this surface, guarding the edge of PèrePeople might see to be the opening That this mud draws on the stone.Your gloved hands covering your lips' go

Re: [kvm-devel] kvm very slow

2007-08-02 Thread Ulrich Schreiner
/sbin/hdparm /dev/sda /dev/sda: IO_support = 0 (default 16-bit) readonly = 0 (off) readahead= 256 (on) geometry = 3263/255/63, sectors = 52428800, start = 0 top in the guest-vm shows nothing special top - 10:27:37 up 13:09, 2 users, load average: 0.05, 0.07, 0.02 Tasks:

[kvm-devel] migration with exec giving truncated images

2007-08-02 Thread Jim Paris
http://kvm.qumranet.com/kvmwiki/Migration suggests to use stop migrate "exec:dd of=STATEFILE" to save an image that can be loaded later. I was having trouble getting this to work (loading gave "Migration failed rc=233") and discovered that not all of the data was being saved, probably becau

Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX

2007-08-02 Thread Rusty Russell
On Thu, 2007-08-02 at 15:39 +0300, Avi Kivity wrote: > He, Qing wrote: > >> > >> hmm. While there's nothing wrong with the patch, there is a simpler way > >> to do this: > >> > >>static unsigned long vmx_msr_bitmap[PAGE_SIZE / sizeof(unsigned > >> long)] __aligned(PAGE_SIZE); > >> > >> now the

Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX

2007-08-02 Thread Li, Xin B
>-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of >Ulrich Drepper >Sent: Friday, August 03, 2007 2:24 AM >To: Nakajima, Jun >Cc: kvm-devel@lists.sourceforge.net >Subject: Re: [kvm-devel] [PATCH 2/2] Add MSR Bitmap support in VMX > >-BEGIN PGP SIGNED

Re: [kvm-devel] [RFC] lapic3: cleanup for save/restore data structure of in-kernel irqchips

2007-08-02 Thread He, Qing
>-Original Message- >From: Avi Kivity [mailto:[EMAIL PROTECTED] >Sent: 2007年8月2日 19:58 >To: He, Qing >Cc: kvm-devel >Subject: Re: [kvm-devel] [RFC] lapic3: cleanup for save/restore data structure >of >in-kernel irqchips > >He, Qing wrote: >> Hi, >> The argument of in-kernel irqchip

[kvm-devel] [PATCH 5/6] kvm: libkvm: in-kernel LAPIC get/set ioctls

2007-08-02 Thread He, Qing
kvm: libkvm: in-kernel LAPIC get/set ioctls This patch allows save and restore of in-kernel local apics Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> --- user/kvmctl.c | 26 ++ user/kvmctl.h |

[kvm-devel] [PATCH 4/6] KVM: in-kernel LAPIC save and restore support

2007-08-02 Thread He, Qing
KVM: in-kernel LAPIC save and restore support This patch adds a new vcpu-based IOCTL to save and restore the local apic registers for a single vcpu. The kernel only copies the apic page as a whole, extraction of registers is left to userspace side. On restore, the APIC timer

[kvm-devel] [PATCH 3/6] kvm: qemu: in-kernel IOAPIC live migration support

2007-08-02 Thread He, Qing
kvm: qemu: in-kernel IOAPIC live migration support This patch adds the live migration support for in-kernel IOAPIC. It uses a similar logic with in-kernel PIC live migration. Also, the original Qemu IOAPIC savevm is used. Signed-off-by: Qing He <[EMAIL PROTECTED]>

[kvm-devel] [PATCH 0/6] in-kernel APIC save/restore and live migration

2007-08-02 Thread He, Qing
Hi Avi, This is the patch set that enables live migration of VMs that are using in-kernel APIC, it's against lapic3 branch. 6 patches follow: [PATCH 1/6] a preparation cleanup patch that removes status in kernel struct kvm_lapic [PATCH 2/6] ioapic live migration kernel part,

[kvm-devel] [PATCH 1/6] KVM: remove status in kvm_lapic structure

2007-08-02 Thread He, Qing
KVM: remove status in kvm_lapic structure status is a redundancy to apic spurious vector, it's not needed. Removing it also reduces the states that should be saved. Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Qing He <[EMAIL PROTECTED]> --- d

[kvm-devel] [PATCH 2/6] KVM: in-kernel IOAPIC save and restore support

2007-08-02 Thread He, Qing
KVM: in-kernel IOAPIC save and restore support This patch adds support for in-kernel ioapic save and restore (to and from userspace). It uses the same get/set_irqchip ioctl as in-kernel PIC. Signed-off-by: Qing He <[EMAIL PROTECTED]> Signed-off-by: Yaozu (Eddie) Dong <

[kvm-devel] [PATCH 6/6] kvm: qemu: in-kernel LAPIC live migration support

2007-08-02 Thread He, Qing
kvm: qemu: in-kernel LAPIC live migration support This patch adds the live migration support for in-kernel LAPICs. The kernel and qemu has different data structures, kernel saves the apic to the userspace as a apic page while qemu uses separate varaibles. The translation is don