[kvm-devel] Life is good!

2007-07-25 Thread Sal Arnold
<>- 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 browser. Download your FREE copy of Splunk now >> htt

Re: [kvm-devel] [PATCH]Abstract vmcs feature detect part

2007-07-25 Thread Yang, Sheng
Sorry for not explain clearly. This patch replaces vmcs_write32_fixedbits() with adjust_vmx_controls(), and add some relevant fields to vmcs_config for the global using. Put vmcs situation in global variable enables us using it to check current vmcs condition and deal with different types of C

Re: [kvm-devel] [PATCH 3/3] usermode for in kernel PIC live migration support

2007-07-25 Thread He, Qing
Avi, This is the updated patch for the qemu part of PIC save/restore. All the above patches are against lapic2 branch. Thanks, Qing kvm: qemu: in-kernel PIC live migration support This patch fixes the live migration of VMs with in-kernel PIC. It saves the in-kernel PIC using the origina

Re: [kvm-devel] [PATCH 3/3] usermode for in kernel PIC live migration support

2007-07-25 Thread He, Qing
Avi, This is the updated patch for libkvm part to adapt get/set irqchip ioctls. Thanks, Qing kvm: libkvm: in-kernel irqchip get/set ioctls This patch allows save and restore of in-kernel irqchips Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Qing He <[EMAIL PROTE

Re: [kvm-devel] [PATCH 2/3] add get/set irqchip ioctls for in kernel PIC live migration support

2007-07-25 Thread He, Qing
Avi, This is the updated patch for the kernel part, please check. Thanks, Qing kvm: add get/set irqchip ioctls for in-kernel PIC live migration support This patch adds two new ioctls to dump and write kernel irqchips for save/restore and live migration. PIC s/r and l/m is implemented in

Re: [kvm-devel] [PATCH 2/3] add get/set irqchip ioctls for in kernel PIC live migration support

2007-07-25 Thread Avi Kivity
He, Qing wrote: > >>> +union { >>> + struct kvm_ioctl_pic pic; >>> >>> >> Reserve some space here so that other members can be added to the union >> without changing the ioctl number. >> > > I checked the kvm_ioapic structure, if IOAPIC_NUM_PINS==24, at least 216 >

Re: [kvm-devel] kvm-33 crash

2007-07-25 Thread Jun Koi
On 7/26/07, Avi Kivity <[EMAIL PROTECTED]> wrote: > Jun Koi wrote: > > Hi, > > > > kvm-33 crashes on my Linux box. It happens after booting for few > > seconds, ie not reached the prompt yet. And that never happens before > > with previous versions on the same qemu image. > > > > I want to post the

Re: [kvm-devel] kvm-33 crash

2007-07-25 Thread Avi Kivity
Jun Koi wrote: > Hi, > > kvm-33 crashes on my Linux box. It happens after booting for few > seconds, ie not reached the prompt yet. And that never happens before > with previous versions on the same qemu image. > > I want to post the boot log here, but dont know how to configure qemu > to do that.

Re: [kvm-devel] [PATCH]Abstract vmcs feature detect part

2007-07-25 Thread Avi Kivity
Yang, Sheng wrote: > This patch changes a method to check cpu capability, so we can set vmcs > more conveniently. > > Please explain the motivation for the change. What is more convenient? > > -static __init void setup_vmcs_descriptor(void) > +static __init u32 adjust_vmx_controls(u32 ctl_m

[kvm-devel] kvm-33 crash

2007-07-25 Thread Jun Koi
Hi, kvm-33 crashes on my Linux box. It happens after booting for few seconds, ie not reached the prompt yet. And that never happens before with previous versions on the same qemu image. I want to post the boot log here, but dont know how to configure qemu to do that. Any pointer? Thanks, Jun --

[kvm-devel] [PATCH] KVM: Remove arch specific components from the general code

2007-07-25 Thread Gregory Haskins
This is a cleanup patch to "de-VMX" the general code. It was developed in the preempt-hooks branch, but it should apply elsewhere as well. Signed-off-by: Gregory Haskins <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h | 33 + drivers/kvm/kvm_main.c | 12 +- drivers/kvm/kvm_svm.h |3

Re: [kvm-devel] [PATCH 2/3] add get/set irqchip ioctls for in kernel PIC live migration support

2007-07-25 Thread He, Qing
>-Original Message- >From: Avi Kivity [mailto:[EMAIL PROTECTED] >Sent: 2007年7月25日 19:22 >To: He, Qing >Cc: kvm-devel >Subject: Re: [kvm-devel] [PATCH 2/3] add get/set irqchip ioctls for in kernel >PIC live >migration support > >He, Qing wrote: >> This patch adds two new ioctls to dump an

Re: [kvm-devel] [PATCH] Memory Based Block Device

2007-07-25 Thread Evan Felix
The Current way to boot a kernel and initrd is to use an option ROM, bt it still needs a boot sector to hand to the bios so that it knows where the code got loaded into ram. This patch makes a fake one just before its needed. I never though of the /dev/null trick. :) Evan On 7/25/07, Anthony L

Re: [kvm-devel] [PATCH] Memory Based Block Device

2007-07-25 Thread Anthony Liguori
Evan Felix wrote: > The Current way to boot a kernel and initrd is to use an option ROM, > Currently, the block infrastructure has this nasty hack that allows you to set an override of the first sector of the disk (which is the boot sector). It has the appropriate magic to do this in such a

Re: [kvm-devel] [PATCH] Memory Based Block Device

2007-07-25 Thread Anthony Liguori
Evan Felix wrote: > Folks here is a patch i've made for qemu that adds a memory based > block device, it utilizes memory on the Host side to emulate a block > device. > I often use -hda /dev/null for -kernel/-append. If you really want to implement a "proper" solution for -kernel/-append, I t

Re: [kvm-devel] [RFC] Deferred interrupt handling.

2007-07-25 Thread Pavel Machek
Hi! I guess this will also allow UIO to work without _any_ kernel parts, with only slight performance penalty in 'almost-never-happens' deadlock case? (Greg, details are below, and better description is in the lkml thread). Pavel > > - Our

[kvm-devel] [PATCH] Memory Based Block Device

2007-07-25 Thread Evan Felix
Folks here is a patch i've made for qemu that adds a memory based block device, it utilizes memory on the Host side to emulate a block device. I've tested this on a few boxes to allow a kernel/initramfs system to boot without needing a specified block device(it automatically creates a small one) a

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

2007-07-25 Thread Carsten Otte
Jeff Dike wrote: > I want it to be identity-mapped, which a single address space would > guarantee. For things which change mappings, like vmalloc, I need to > be in the same address space as the guest. That'll also be mandatory required by hw when porting this to s390. --

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

2007-07-25 Thread Jeff Dike
On Tue, Jul 24, 2007 at 08:22:53AM +0300, Avi Kivity wrote: > Even in the current model, guest physical memory is mmap()ed into host > userspace. I want it to be identity-mapped, which a single address space would guarantee. For things which change mappings, like vmalloc, I need to be in the same

[kvm-devel] [ kvm-Bugs-1760424 ] Mandriva 2007, Ubuntu 7.04, openSUSE 10.2 crash on KVM

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

Re: [kvm-devel] remoted migration KVM-guest failed

2007-07-25 Thread Anthony Liguori
Zhang, Jingke wrote: > Hi Anthony, > My KVM-version is: > Kernel:b41e5014dd8712e8de2b656617f7a7a158cd992a > Userspace: 86e8eba8f8349d2e02e3b0ae0ce7c1993f4352fb > This is the latest commit which is built at 2007-07-24 by us. And there > is no any extra patch. We can do remote migratio

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

2007-07-25 Thread Avi Kivity
Shaohua Li wrote: >> So write to a file, right? Yes, it can avoid use move to swap, and >> should be feasible. > Say you want to write guest pages out to file A of back store fs, in > kvm->writepage(), we could do: > 1. lower_page = grap_cache_page(file A's mapping) > 2. file A's ->prepare_write(lo

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

2007-07-25 Thread Shaohua Li
2007/7/25, Shaohua Li <[EMAIL PROTECTED]>: > 2007/7/24, Avi Kivity <[EMAIL PROTECTED]>: > > Shaohua Li wrote: > > > 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

Re: [kvm-devel] [PATCH 1/3] SCHED: Generic hooks for trapping task preemption

2007-07-25 Thread Avi Kivity
Ingo Molnar wrote: > * Ingo Molnar <[EMAIL PROTECTED]> wrote: > > >>> This adds a general mechanism whereby a task can request the >>> scheduler to notify it whenever it is preempted or scheduled back >>> in. This allows the task to swap any special-purpose registers like >>> the fpu or Inte

Re: [kvm-devel] [PATCH 1/3] SCHED: Generic hooks for trapping task preemption

2007-07-25 Thread Ingo Molnar
* Ingo Molnar <[EMAIL PROTECTED]> wrote: > ok, this looks very clean, i've added it to my scheduler tree. You've > tested this with KVM, on both 32-bit and 64-bit, correct? alas, it didnt build ;-) Tidied and fixed up patch below. Ingo > Subject: sched: arch preempt no

Re: [kvm-devel] [PATCH 1/3] SCHED: Generic hooks for trapping task preemption

2007-07-25 Thread Ingo Molnar
* Ingo Molnar <[EMAIL PROTECTED]> wrote: > > This adds a general mechanism whereby a task can request the > > scheduler to notify it whenever it is preempted or scheduled back > > in. This allows the task to swap any special-purpose registers like > > the fpu or Intel's VT registers. > > ok,

Re: [kvm-devel] [PATCH 1/3] SCHED: Generic hooks for trapping task preemption

2007-07-25 Thread Avi Kivity
Ingo Molnar wrote: > * Avi Kivity <[EMAIL PROTECTED]> wrote: > > >> This adds a general mechanism whereby a task can request the scheduler >> to notify it whenever it is preempted or scheduled back in. This >> allows the task to swap any special-purpose registers like the fpu or >> Intel's V

Re: [kvm-devel] [PATCH 1/3] SCHED: Generic hooks for trapping task preemption

2007-07-25 Thread Ingo Molnar
* Avi Kivity <[EMAIL PROTECTED]> wrote: > This adds a general mechanism whereby a task can request the scheduler > to notify it whenever it is preempted or scheduled back in. This > allows the task to swap any special-purpose registers like the fpu or > Intel's VT registers. ok, this looks v

Re: [kvm-devel] [PATCH 1/3] SCHED: Generic hooks for trapping task preemption

2007-07-25 Thread Avi Kivity
Avi Kivity wrote: > /** > * prepare_task_switch - prepare to switch tasks > * @rq: the runqueue preparing to switch > @@ -1687,6 +1746,7 @@ void fastcall wake_up_new_task(struct task_struct *p, > unsigned long clone_flags) > */ > static inline void prepare_task_switch(struct rq *rq, struct

[kvm-devel] [PATCH 0/3] Scheduler preemption hooks, #2

2007-07-25 Thread Avi Kivity
Changes since #2: - better Kconfig - documentation - spinlock->mutex conversion from Shaohua This patchset adds a general sceduler mechanism that allows tasks to be notified when they are preempted and scheduled back in, and converts kvm to use it. The main benefits are that the kvm mmu can now p

[kvm-devel] [PATCH 3/3] KVM: Convert vm lock to a mutex

2007-07-25 Thread Avi Kivity
From: Shaohua Li <[EMAIL PROTECTED]> This allows the kvm mmu to perform sleepy operations, such as memory allocation. Signed-off-by: Shaohua Li <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm.h |2 +- drivers/kvm/kvm_main.c | 54 ++

[kvm-devel] [PATCH 2/3] KVM: Use the scheduler preemption hooks to make kvm preemptible

2007-07-25 Thread Avi Kivity
Current kvm disables preemption while the new virtualization registers are in use. This of course is not very good for latency sensitive workloads (one use of virtualization is to offload user interface and other latency insensitive stuff to a container, so that it is easier to analyze the remaini

[kvm-devel] [PATCH 1/3] SCHED: Generic hooks for trapping task preemption

2007-07-25 Thread Avi Kivity
This adds a general mechanism whereby a task can request the scheduler to notify it whenever it is preempted or scheduled back in. This allows the task to swap any special-purpose registers like the fpu or Intel's VT registers. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- include/linux/pree

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

2007-07-25 Thread Shaohua Li
2007/7/24, Avi Kivity <[EMAIL PROTECTED]>: > Shaohua Li wrote: > > 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

[kvm-devel] KVM fixes for 2.6.23-rc2

2007-07-25 Thread Avi Kivity
Linus, please pull from git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm.git for-linus to fix various issues in kvm, including a silent, moderately rare guest data corruption, a performance regression on forky workloads, a problem with nx capable guests on non-nx-enabled hosts, and a race

Re: [kvm-devel] oops at boot - FIXED

2007-07-25 Thread Avi Kivity
Fix wrote: > The following patch totally eliminate hang-ups for me. > It will also eliminate smp on Windows. We need to find what's wrong there. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. --

Re: [kvm-devel] [PATCH 3/3] usermode for in kernel PIC live migration support

2007-07-25 Thread Avi Kivity
He, Qing wrote: > This patch is the usermode part of the in-kernel PIC live migration > support. It saves the in kernel PIC using the original usermode PIC > savevm, so it is safe to save a vm using kernel PIC and restore as a vm > using userspace PIC, and vice versa. > > Signed-off-by: Yaozu (Eddi

Re: [kvm-devel] [PATCH 2/3] add get/set irqchip ioctls for in kernel PIC live migration support

2007-07-25 Thread Avi Kivity
He, Qing wrote: > This patch adds two new ioctls to dump and write kernel irqchips for > save/restore and live migration. PIC s/r and l/m is implemented in this > patch. > > Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> > Signed-off-by: Qing He <[EMAIL PROTECTED]> > > > @@ -2902,6 +2949,39

[kvm-devel] oops at boot - FIXED

2007-07-25 Thread Fix
The following patch totally eliminate hang-ups for me. Bye. --- ./kernel/x86_emulate.c 2007-07-24 00:15:15.0 +0800 +++ ./kernel/x86_emulate.c 2007-07-12 18:25:33.0 +0800 @@ -1350,29 +1344,6 @@ goto cannot_emulate; realmode_set_cr(ctx

[kvm-devel] [PATCH]Abstract vmcs feature detect part

2007-07-25 Thread Yang, Sheng
This patch changes a method to check cpu capability, so we can set vmcs more conveniently. Signed-off-by: Sheng Yang ([EMAIL PROTECTED]) -- Index: kvm/drivers/kvm/vmx.c === --- kvm.orig/drivers/kvm/vmx.c 2007-07-25 16:41:38.0

Re: [kvm-devel] [PATCH 1/3] export kvm_irqchip_in_kernel to Qemu

2007-07-25 Thread He, Qing
resend as an attachment. >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of He, Qing >Sent: 2007年7月25日 18:04 >To: kvm-devel >Subject: [kvm-devel] [PATCH 1/3] export kvm_irqchip_in_kernel to Qemu > >This patch exports kvm_irqchip_in_kernel to Qemu outside k

[kvm-devel] [PATCH 3/3] usermode for in kernel PIC live migration support

2007-07-25 Thread He, Qing
This patch is the usermode part of the in-kernel PIC live migration support. It saves the in kernel PIC using the original usermode PIC savevm, so it is safe to save a vm using kernel PIC and restore as a vm using userspace PIC, and vice versa. Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]>

[kvm-devel] [PATCH 2/3] add get/set irqchip ioctls for in kernel PIC live migration support

2007-07-25 Thread He, Qing
This patch adds two new ioctls to dump and write kernel irqchips for save/restore and live migration. PIC s/r and l/m is implemented in this patch. Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Qing He <[EMAIL PROTECTED]> drivers/kvm/i8259.c|7 drivers/kvm/irq

[kvm-devel] [PATCH 1/3] export kvm_irqchip_in_kernel to Qemu

2007-07-25 Thread He, Qing
This patch exports kvm_irqchip_in_kernel to Qemu outside kvmctl. This is a preparation for the in kernel irqchip live migration support. Signed-off-by: Qing He <[EMAIL PROTECTED]> kvmctl.c |5 + kvmctl.h |7 +++ 2 files changed, 12 insertions(+) diff --git a/user/kvmctl.c b/user/k

Re: [kvm-devel] [PATCH]: KVM: Fix cmpxchg for writeback changes

2007-07-25 Thread Avi Kivity
Aurelien Jarno wrote: > KVM: Remove dead code in the cmpxchg instruction emulation > > The writeback fixes (02c03a326a5df825cc01de426f72e160db2b9538) let > some dead code in the cmpxchg instruction emulation. Remove it. > > Signed-off-by: Aurelien Jarno <[EMAIL PROTECTED]> > > Applied,

Re: [kvm-devel] [PATCH]: KVM: Fix cmpxchg for writeback changes

2007-07-25 Thread Aurelien Jarno
On Wed, Jul 25, 2007 at 12:34:02PM +0300, Avi Kivity wrote: > Aurelien Jarno wrote: > > KVM: Fix writeback for cmpxchg instruction > > > > The writeback fixes (02c03a326a5df825cc01de426f72e160db2b9538) broke > > cmpxchg emulation. The patch below fixes that. > > > > Signed-off-by: Aurelien

Re: [kvm-devel] [PATCH]: KVM: Fix cmpxchg for writeback changes

2007-07-25 Thread Avi Kivity
Aurelien Jarno wrote: > KVM: Fix writeback for cmpxchg instruction > > The writeback fixes (02c03a326a5df825cc01de426f72e160db2b9538) broke > cmpxchg emulation. The patch below fixes that. > > Signed-off-by: Aurelien Jarno <[EMAIL PROTECTED]> > > diff --git a/drivers/kvm/x86_emulate.c b/dr

[kvm-devel] [PATCH]: KVM: Fix cmpxchg for writeback changes

2007-07-25 Thread Aurelien Jarno
KVM: Fix writeback for cmpxchg instruction The writeback fixes (02c03a326a5df825cc01de426f72e160db2b9538) broke cmpxchg emulation. The patch below fixes that. Signed-off-by: Aurelien Jarno <[EMAIL PROTECTED]> diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index 21ce9

Re: [kvm-devel] [PATCH]Import some constants of vmcs from IA32 SDM

2007-07-25 Thread Avi Kivity
Yang, Sheng wrote: > This patch mainly imports some constants and rename two exist constants > of vmcs according to IA32 SDM. > > It also add two constant to indicate Lock bit and Enable bit in > MSR_IA32_FEATURE_CONTROL, and replace the hardcode _5_ with these two > bits. > > Applied, thanks.

[kvm-devel] [PATCH]Import some constants of vmcs from IA32 SDM

2007-07-25 Thread Yang, Sheng
This patch mainly imports some constants and rename two exist constants of vmcs according to IA32 SDM. It also add two constant to indicate Lock bit and Enable bit in MSR_IA32_FEATURE_CONTROL, and replace the hardcode _5_ with these two bits. Signed-off-by: Sheng Yang([EMAIL PROTECTED]) -- Index

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

2007-07-25 Thread Avi Kivity
Aurelien Jarno wrote: > After a short discussion on IRC, it seems that all 0x02 0x01 > instructions do not use the writeback. Please find an updated and > signedoff patch below. > > KVM: disable writeback for 0x02 0x01 instructions. > > 0x02 0x01 instructions (ie lgdt, lidt, smsw, lmsw and invl

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

2007-07-25 Thread Aurelien Jarno
On Wed, Jul 25, 2007 at 06:14:20AM +0300, Avi Kivity wrote: > 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 im

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

2007-07-25 Thread Avi Kivity
Dor Laor 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. >> >

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

2007-07-25 Thread Avi Kivity
Shaohua Li wrote: > 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

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

2007-07-25 Thread Dor Laor
>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. IMHO there is no need of supporting