Re: [kvm-devel] [2.6 patch] drivers/kvm/mmu.c: fix an if() condition

2007-04-29 Thread Avi Kivity
Adrian Bunk wrote: > It might have worked in this case since PT_PRESENT_MASK is 1, but let's > express this correctly. > > Applied, thanks. -- error compiling committee.c: too many arguments to function - This SF.net

Re: [kvm-devel] [PATCH/RFC 2/2] s390 virtualization interface.

2007-04-29 Thread Heiko Carstens
On Fri, Apr 27, 2007 at 06:53:40PM +0200, Arnd Bergmann wrote: > On Friday 27 April 2007, Carsten Otte wrote: > > Add interface which allows a process to start a virtual machine. > > Looks pretty good to me already. > > It seems a lot closer to lguest than to kvm at the moment concerning > the ke

Re: [kvm-devel] KVM management and API

2007-04-29 Thread Avi Kivity
Anthony Liguori wrote: > With QEMU 0.9.0 (and by extension, KVM), snapshots are actually stored > as part of the disk image with qcow2. This allows you to have a > consistent snapshot that includes CPU state and disk state. > How does that work when you have two qcow2 images attached to a gu

Re: [kvm-devel] Qemu Stopped when creating only one svm guest

2007-04-29 Thread Avi Kivity
Wiwida h wrote: > Hi all, > I met some problem : when I create only one svm guest, the qemu > hangs with caption "QEMU/KVM[Stopped]". And this guest can't run any > longer. If I create more than 1 svm guest, the guest are running > normally except the 1st one(qemu stopped). There's no specia

Re: [kvm-devel] Qemu crashes when running kvm-20/21 as module in kernel 2.6.21

2007-04-29 Thread Avi Kivity
Joachim Sehlstedt wrote: > Hi, > > First I tried kvm build into the kernel, 2.6.21, togeather with kvm-17, > no problem at all, except that qemu shuts down when I do a reboot in the > guest os. Is there any fix for that btw, guest os is Linux Slackware > 11.0 with kernel 2.6.21? > That's a k

Re: [kvm-devel] [PATCH/PFC 0/2] s390 host support

2007-04-29 Thread Heiko Carstens
> To investigate PowerPC support I did some work to refactor the KVM code > into x86 vs shared bits. It was based on the in-kernel KVM code, so I need > to rebase that work on kvm.git. I guess you guys have the same > problem; have you done any work in that area? We haven't done anything yet to ma

Re: [kvm-devel] [PATCH/PFC 0/2] s390 host support

2007-04-29 Thread Heiko Carstens
> > We intend to move to a common arch-independent kernel interface and > > userspace with kvm. > The address space and vcpu management are rather different from kvm's, > however your approach is better and we'll want to move kvm in your > direction rather than the other way round (specifically the

Re: [kvm-devel] Qemu Stopped when creating only one svm guest

2007-04-29 Thread Wiwida h
Avi, I tried as you said, it seems to be OK. Thanks a lot. 2007/4/29, Avi Kivity <[EMAIL PROTECTED]>: Wiwida h wrote: > Hi all, > I met some problem : when I create only one svm guest, the qemu > hangs with caption "QEMU/KVM[Stopped]". And this guest can't run any > longer. If I create mor

Re: [kvm-devel] [PATCH] vmx: enable io bitmaps to avoid IO port 0x80 VMEXITs

2007-04-29 Thread Avi Kivity
He, Qing wrote: > This patch enables IO bitmaps control on vmx and unmask the 0x80 port to > avoid VMEXITs caused by accessing port 0x80. 0x80 is used as delays (see > include/asm/io.h), and handling VMEXITs on its access is unnecessary but > slows things down. This patch improves kernel build test

Re: [kvm-devel] [PATCH/PFC 0/2] s390 host support

2007-04-29 Thread Avi Kivity
Heiko Carstens wrote: >>> We intend to move to a common arch-independent kernel interface and >>> userspace with kvm. >>> >> The address space and vcpu management are rather different from kvm's, >> however your approach is better and we'll want to move kvm in your >> direction rather than t

Re: [kvm-devel] Qemu Stopped when creating only one svm guest

2007-04-29 Thread Avi Kivity
Wiwida h wrote: > Avi, I tried as you said, it seems to be OK. > Thanks a lot. > Can you post your .config, and also look in your dmesg for any rtc-related messages? > > 2007/4/29, Avi Kivity <[EMAIL PROTECTED] >: > > Wiwida h wrote: > > Hi all, > > I

Re: [kvm-devel] [PATCH][SVM][UPDATE] Lazy MSR save/restore

2007-04-29 Thread Avi Kivity
Anthony Liguori wrote: > Third time's a charm, right? :-) > Right. I measured 2000 cycles saved out of a total of 5000! Applied & thanks. -- error compiling committee.c: too many arguments to function - This SF.net email

Re: [kvm-devel] [PATCH/PFC 0/2] s390 host support

2007-04-29 Thread Avi Kivity
Carsten Otte wrote: > >> The address space and vcpu management are rather different from kvm's, >> however your approach is better and we'll want to move kvm in your >> direction rather than the other way round (specifically the tight vcpu >> <-> task coupling; mmu is more diffcult). > We have trie

Re: [kvm-devel] [PATCH] vmx: enable io bitmaps to avoid IO port 0x80 VMEXITs

2007-04-29 Thread Avi Kivity
He, Qing wrote: > > +static char *vmx_io_bitmap; > If you write static char vmx_io_bitmap[PAGE_SIZE*2] __aligned(PAGE_SIZE); you can avoid the allocation and deallocation completely. But you have to use vmalloc_to_page() instead of __pa(). -- error compiling committee.c: too many a

Re: [kvm-devel] [PATCH/PFC 0/2] s390 host support

2007-04-29 Thread Carsten Otte
Avi Kivity wrote: > We'll want to keep a vcpu fd. If the vcpu is idle we'll be asleep in > poll() or the like, and we need some kind of wakeup mechanism. Our userspace does idle/wakeup differently: One cpu exits sys_s390host_sie, and the intercept code indicates a halt with interrupts enabled (

Re: [kvm-devel] Qemu crashes when running kvm-20/21 as module in kernel 2.6.21

2007-04-29 Thread Joachim Sehlstedt
I was a bit quick and deleted it. Forgot to mention that the disk image at some point magically got converted to raw format, from cow. Maybe it got corrupted when I convert it to qcow2 or by qemu itself. This makes sence since if you try to boot qemu with a empty disk image you get the same cra

Re: [kvm-devel] Qemu Stopped when creating only one svm guest

2007-04-29 Thread Avi Kivity
Wiwida h wrote: > Avi, > here is my .config, the whole .config and dmesg is attached Nothing stands out. Can you try to produce this with a valid /dev/rtc, but without kvm-amd loaded? If it reproduces, it is worthwhile posting this on lkml as it looks like an rtc bug. -- error compiling com

Re: [kvm-devel] [PATCH/PFC 0/2] s390 host support

2007-04-29 Thread Avi Kivity
Carsten Otte wrote: > > Avi Kivity wrote: >> We'll want to keep a vcpu fd. If the vcpu is idle we'll be asleep in >> poll() or the like, and we need some kind of wakeup mechanism. > Our userspace does idle/wakeup differently: > One cpu exits sys_s390host_sie, and the intercept code indicates a >

Re: [kvm-devel] Qemu Stopped when creating only one svm guest

2007-04-29 Thread Wiwida h
Avi, It can be produced without kvm modules. But it is so weird, there's no such problem on my Intel platform. Thanks a lot. 2007/4/29, Avi Kivity <[EMAIL PROTECTED]>: Wiwida h wrote: > Avi, > here is my .config, the whole .config and dmesg is attached Nothing stands out. Can you try to pro

Re: [kvm-devel] Qemu Stopped when creating only one svm guest

2007-04-29 Thread Avi Kivity
Wiwida h wrote: > Avi, > It can be produced without kvm modules. > But it is so weird, there's no such problem on my Intel platform. Well, this is very platform specific. Please do post it on lkml so that someone who knows about the RTC (or HPET RTC emulation) can take a look at it. Thanks.

Re: [kvm-devel] #PF & shadow

2007-04-29 Thread Avi Kivity
Avi Kivity wrote: > 4. not strictly mmu: after an mmio read, we re-enter the guest and get a > vmexit directly. Instead we should enter the emulator immediately after > an mmio read. I implemented that > (b0092d187cfa19dfcada3b85d728af5ae27989dc), but backed it out soon after > due to a regressio

Re: [kvm-devel] [PATCH/PFC 0/2] s390 host support

2007-04-29 Thread Carsten Otte
Avi Kivity wrote: > In both cases you wait in the kernel; with an fd you wait in the kernel > and with pthread_cond_wait you wait in futex(FUTEX_WAIT) or a close > relative. That is a good point indeed ;-). > Can one do the equivalent of a futex wakeup from the kernel easily? No, we did not hav

Re: [kvm-devel] [PATCH/PFC 0/2] s390 host support

2007-04-29 Thread Avi Kivity
Carsten Otte wrote: > > >> Can one do the equivalent of a futex wakeup from the kernel easily? > No, we did not have the need to do that. Now that you mention it, we'd > want to move interprocessor signal handling into the kernel anyway for > performance reasons. That would rise the need to wake

Re: [kvm-devel] [PATCH/PFC 0/2] s390 host support

2007-04-29 Thread Heiko Carstens
> Nested page tables/extended page tables also provide this facility, with > some caveats: > > - on 32-bit hosts (or 64-bit hosts with 32-bit userspace), host > userspace virtual address space is not enough to contain the guest > physical address space. > - there is no way to protect the host u

[kvm-devel] New powerful automation softwares

2007-04-29 Thread Stephane MASSART - IRAI
We have the pleasure to present you two new automation softwares : AUTOMGEN8, the automation workshop software which can be used to program standard PLCs (SIEMENS, OMRON, MITSUBISHI, etc...), build SCADA applications and incredibly realistic 3D process simulations including a physical engine.

Re: [kvm-devel] [PATCH/PFC 0/2] s390 host support

2007-04-29 Thread Avi Kivity
Heiko Carstens wrote: >> Nested page tables/extended page tables also provide this facility, with >> some caveats: >> >> - on 32-bit hosts (or 64-bit hosts with 32-bit userspace), host >> userspace virtual address space is not enough to contain the guest >> physical address space. >> - there is

[kvm-devel] KVM-21 on RHEL4: cannot build kernel module

2007-04-29 Thread Alessandro Sardo
Hello list, I am trying to compile KVM-21 on RHEL4 U4 (kernel version is 2.6.9-42.0.10.EL SMP). While I do not have any problem compiling the 'user' and 'qemu' targets, I cannot seem to be able to build the kernel module. I would like to point out that: 1) kernel-devel packages are installed

Re: [kvm-devel] [PATCH/PFC 0/2] s390 host support

2007-04-29 Thread Carsten Otte
Avi Kivity wrote: > The trick I mentioned (copying a pgd entry) means: > > - guest physical and host userspace are different (have different pgds) > - guest physical (offset 0) is aliased to host userspace (offset $bignum) > - guest address space is limited to 2^(12+9*3) > - the pte dirty and acc

Re: [kvm-devel] [PATCH/PFC 0/2] s390 host support

2007-04-29 Thread Avi Kivity
Carsten Otte wrote: > >>> Our implementation does use action bits preseted to sys_s390host_sie >>> to update the hardware control blocks for the virutal machine. The >>> hardware control blocks would be mapped read-only to user address >>> space. This way, the kernel can enforce the user not to

Re: [kvm-devel] KVM-21 on RHEL4: cannot build kernel module

2007-04-29 Thread Avi Kivity
Alessandro Sardo wrote: > Hello list, > > I am trying to compile KVM-21 on RHEL4 U4 (kernel version > is 2.6.9-42.0.10.EL SMP). While I do not have any problem > compiling the 'user' and 'qemu' targets, I cannot seem to > be able to build the kernel module. I would like to point > out that: > >

Re: [kvm-devel] KVM-21 on RHEL4: cannot build kernel module

2007-04-29 Thread David Brown
> - 2.6.9 appears to predate some Kbuild changes (like looking for the > Kbuild file in the external module directory, and instead going for > Makefile). Presumably this is easy to fix. > - RHEL 4's kernel is some mix of 2.6.9 and features from future kernels; > this may defeat our compatibility d

Re: [kvm-devel] KVM management and API

2007-04-29 Thread Anthony Liguori
Avi Kivity wrote: > Anthony Liguori wrote: >> With QEMU 0.9.0 (and by extension, KVM), snapshots are actually >> stored as part of the disk image with qcow2. This allows you to have >> a consistent snapshot that includes CPU state and disk state. >> > > How does that work when you have two qc

[kvm-devel] [PATCH 0/7] KVM: More 2.6.22 merge candidates

2007-04-29 Thread Avi Kivity
The following patches, improving performance and the userspace interface, will join the other pending kvm patches which I plan to send at the end of the week. drivers/kvm/kvm.h |3 +- drivers/kvm/kvm_main.c | 35 +++ drivers/kvm/kvm_svm.h | 11 +++ drivers/kv

[kvm-devel] [PATCH 2/7] KVM: VMX: Add lazy FPU support for VT

2007-04-29 Thread Avi Kivity
From: Anthony Liguori <[EMAIL PROTECTED]> Only save/restore the FPU host state when the guest is actually using the FPU. Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/vmx.c | 57 -

[kvm-devel] [PATCH 1/7] KVM: VMX: Properly shadow the CR0 register in the vcpu struct

2007-04-29 Thread Avi Kivity
From: Anthony Liguori <[EMAIL PROTECTED]> Set all of the host mask bits for CR0 so that we can maintain a proper shadow of CR0. This exposes CR0.TS, paving the way for lazy fpu handling. Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers

[kvm-devel] [PATCH 3/7] KVM: fix an if() condition

2007-04-29 Thread Avi Kivity
From: Adrian Bunk <[EMAIL PROTECTED]> It might have worked in this case since PT_PRESENT_MASK is 1, but let's express this correctly. Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/mmu.c |2 +- 1 files changed, 1 insertions(+), 1

[kvm-devel] [PATCH 4/7] KVM: SVM: Only save/restore MSRs when needed

2007-04-29 Thread Avi Kivity
From: Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]> We only have to save/restore MSR_GS_BASE on every VMEXIT. The rest can be saved/restored when we leave the VCPU. Since we don't emulate the DEBUGCTL MSRs and the guest cannot write to them, we don't have to worry about saving/restoring the

[kvm-devel] [PATCH 5/7] KVM: Remove extraneous guest entry on mmio read

2007-04-29 Thread Avi Kivity
When emulating an mmio read, we actually emulate twice: once to determine the physical address of the mmio, and, after we've exited to userspace to get the mmio value, we emulate again to place the value in the result register and update any flags. But we don't really need to enter the guest again

[kvm-devel] [PATCH 6/7] KVM: Don't require explicit indication of completion of mmio or pio

2007-04-29 Thread Avi Kivity
It is illegal not to return from a pio or mmio request without completing it, as mmio or pio is an atomic operation. Therefore, we can simplify the userspace interface by avoiding the completion indication. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/kvm_main.c | 28 +

[kvm-devel] [PATCH 7/7] KVM: Remove unused 'instruction_length'

2007-04-29 Thread Avi Kivity
As we no longer emulate in userspace, this is meaningless. We don't compute it on SVM anyway. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/vmx.c |1 - include/linux/kvm.h |5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/kvm/vmx.c b/drive

[kvm-devel] Regression in KVM: Remove extraneous guest entry on mmio read

2007-04-29 Thread Anthony Liguori
My 32bit FC-6 guest stopped booting on a 64-bit SVM host after this commit (9bf671a47ed6af3164524a31dbef9360f1b66fb5) Regards, Anthony Liguori - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FRE

[kvm-devel] [PATCH][SVM] Allow direct guest access to PC debug port

2007-04-29 Thread Anthony Liguori
This was inspired by Qing He's similar patch for VT. Regards, Anthony Liguori Subject: [PATCH][SVM] Allow direct guest access to PC debug port From: Anthony Liguori <[EMAIL PROTECTED]> The PC debug port is used for IO delay and does not require emulation. Signed-off-by: Anthony Liguori <[EMAIL

[kvm-devel] [PATCH][UPDATE] vmx: enable io bitmaps to avoid IO port 0x80 VMEXITs

2007-04-29 Thread He, Qing
This is updated version. Because the bitmaps are only needed to be mapped at init time, allocating them in high memory if possible saves low memory and virtual space. Thanks, Qing kvm-vmx-io-bitmaps-0x80-highmem.patch Description: kvm-vmx-io-bitmaps-0x80-highmem.patch ---

Re: [kvm-devel] [PATCH][UPDATE] vmx: enable io bitmaps to avoid IO port 0x80 VMEXITs

2007-04-29 Thread Avi Kivity
He, Qing wrote: > This is updated version. Because the bitmaps are only needed to be > mapped at init time, allocating them in high memory if possible saves > low memory and virtual space. > > Applied, thanks. Please include the changelog entry and signed-off-by: line in updates in the future

Re: [kvm-devel] [PATCH][SVM] Allow direct guest access to PC debug port

2007-04-29 Thread Avi Kivity
Anthony Liguori wrote: > This was inspired by Qing He's similar patch for VT. > Applied, thanks. -- error compiling committee.c: too many arguments to function - This SF.net email is sponsored by DB2 Express Download DB2 E

Re: [kvm-devel] [PATCH][UPDATE] vmx: enable io bitmaps to avoid IO port 0x80 VMEXITs

2007-04-29 Thread He, Qing
>-Original Message- >From: Avi Kivity [mailto:[EMAIL PROTECTED] >Sent: 2007年4月30日 14:47 >To: He, Qing >Cc: kvm-devel >Subject: Re: [kvm-devel] [PATCH][UPDATE] vmx: enable io bitmaps to avoid IO >port >0x80 VMEXITs > >He, Qing wrote: >> This is updated version. Because the bitmaps are onl

Re: [kvm-devel] Regression in KVM: Remove extraneous guest entry on mmio read

2007-04-29 Thread Avi Kivity
Anthony Liguori wrote: > My 32bit FC-6 guest stopped booting on a 64-bit SVM host after this > commit (9bf671a47ed6af3164524a31dbef9360f1b66fb5) > Yes. This is the same regression that caused this to be backed out a few weeks ago. I even tested it with the same image, but it was set to boot f