Erik Bussink | 1 Jul 2008 03:13
Picon

Re: another kvm-70 compile bug with rhel/centos 5.2

Thanks Avi for the rhel-5.2.patch. I was able to successfully apply it
to kvm-70. In addition I found myself having to make one more small
modification for RHEL 5.2

I found myself also having to modify the kernel/external-module-compat.h
at line 670 (as per emails from Andrea Arcangeli on June 18th) 

and change 
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) &&
defined(CONFIG_KALLSYMS)

to

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) &&
defined(CONFIG_KALLSYMS)

So now I can successfully build KVM-70 on RHEL 5.2 for the AMD-V, and
load the modules in the kernel (2.6.18-92.1.6.el5

[root <at> eowyn ~]# lsmod | grep kvm
[root <at> eowyn ~]# modprobe kvm
[root <at> eowyn ~]# modprobe kvm_amd
[root <at> eowyn ~]# lsmod | grep kvm
kvm_amd                62888  0 
kvm                   178416  1 kvm_amd
[root <at> eowyn ~]# 

The only thing that I seem to be halting my progression right now is
that I cannot find the qemu-kvm helper program. It doesn't seem like it
was compiled and installed. Yet I find now qemu-system-x86_64 instead.
(Continue reading)

Han, Weidong | 1 Jul 2008 04:22
Picon
Favicon

RE: [PATCH] KVM: PCIPT: VT-d: fix context mapping

Ben-Ami Yassour wrote:
> On Fri, 2008-06-20 at 14:23 +0800, Han, Weidong wrote:
>> Ben-Ami Yassour1 wrote:
>>> "Han, Weidong" <weidong.han <at> intel.com> wrote on 19/06/2008 17:18:00:
>>> 
>>>> Ben-Ami Yassour wrote:
>>>>> On Thu, 2008-06-19 at 16:59 +0800, Han, Weidong wrote:
>>>>>> benami <at> il.ibm.com wrote:
>>>>>>> From: Ben-Ami Yassour <benami <at> il.ibm.com>
>>>>>>> 
>>>>>>> When changing the VT-d context mapping, according to the spec,
>>>>>>> it is required to first set the context to not present, flush
>>>>>>> and only then apply the new context.
>>>>>>> 
>>>>>>> Signed-off-by: Ben-Ami Yassour <benami <at> il.ibm.com>
>>>>>>> ---
>>>>>>>  drivers/pci/intel-iommu.c |   17 +++++++++++++++++
>>>>>>>  1 files changed, 17 insertions(+), 0 deletions(-)
>>>>>>> 
>>>>>>> diff --git a/drivers/pci/intel-iommu.c
>>>>>>> b/drivers/pci/intel-iommu.c index 930874f..dcdfa97 100644 ---
>>>>>>> a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c
>>>>>>>  <at>  <at>  -56,6 +56,7  <at>  <at> 
>>>>>>> 
>>>>>>> 
>>>>>>>  static void flush_unmaps_timeout(unsigned long data);
>>>>>>> +static void detach_domain_for_dev(struct dmar_domain *domain,
>>>>>>> u8 bus, u8 devfn); 
>>>>>>> 
>>>>>>>  DEFINE_TIMER(unmap_timer,  flush_unmaps_timeout, 0, 0);
(Continue reading)

Sukanto Ghosh | 1 Jul 2008 07:20
Picon
Favicon

Re: kvm_mmu doubts

> Sukanto Ghosh wrote:
>>
>> I am calling the entire tree-like structure (including the page
>> directories) as a page table. In the above statement are you referring
>> to
>> the same ? Or is it the last-level table that holds translated physical
>> addresses (+ dirty  bit, etc ) ?
>>
>
> No, any guest page that is part of the structure. Note the structure is
> not a tree, since multiple roots exist and as it may be cyclic.
>

I understand that it is not a tree and that in case of sharing and
aliasing, multiple roots will exist. But, how can it be cyclic ? (Are you
not considering directionality or is it because the nodes in this
structure do have pointers to the parents or there is something else as
well ?)

Thanks and Regards,
Sukanto Ghosh
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Avi Kivity | 1 Jul 2008 09:11

Re: another kvm-70 compile bug with rhel/centos 5.2

Erik Bussink wrote:
> Thanks Avi for the rhel-5.2.patch. I was able to successfully apply it
> to kvm-70. In addition I found myself having to make one more small
> modification for RHEL 5.2
>
> I found myself also having to modify the kernel/external-module-compat.h
> at line 670 (as per emails from Andrea Arcangeli on June 18th) 
>
> and change 
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) &&
> defined(CONFIG_KALLSYMS)
>
> to
>
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17) &&
> defined(CONFIG_KALLSYMS)
>
>   

That's already in kvm-userspace.git.

> The only thing that I seem to be halting my progression right now is
> that I cannot find the qemu-kvm helper program. It doesn't seem like it
> was compiled and installed. Yet I find now qemu-system-x86_64 instead.
>
> [root <at> eowyn ~]# which qemu-kvm
> /usr/bin/which: no qemu-kvm in
> (/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib64/ccache/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
>
> [root <at> eowyn ~]# which qemu-nbd
(Continue reading)

Dor Laor | 1 Jul 2008 09:29

Re: [PATCH] Fix block mode during halt emulation

Well, it's obiosly creates a race, it was too late <at> night.
The problem is that kvm_cpu_has_interrupt() calls apic that checks if 
the kvm_apic_accept_pic_intr and its true since probably the apic is
masked on guest shutdown.
There is no test whether the pic is masked. 
Testing.

On Tue, 2008-07-01 at 01:30 +0300, Dor Laor wrote:
> >From d85feaae019bc0abc98a2524369e04d521a78aa8 Mon Sep 17 00:00:00 2001
> From: Dor Laor <dor.laor <at> qumranet.com>
> Date: Mon, 30 Jun 2008 18:22:44 -0400
> Subject: [PATCH] Fix block mode hduring halt emulation
> 
> There is no need to check for pending pit/apic timer, nor
> pending virq, since all of the check KVM_MP_STATE_RUNNABLE
> and wakeup the waitqueue.
> 
> It fixes 100% cpu when windows guest is shutdown (non acpi HAL)
> 
> Signed-off-by: Dor Laor <dor.laor <at> qumranet.com>
> ---
>  virt/kvm/kvm_main.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
> 
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index b90da0b..faa0778 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
>  <at>  <at>  -816,10 +816,6  <at>  <at>  void kvm_vcpu_block(struct kvm_vcpu *vcpu)
>  	for (;;) {
(Continue reading)

Jerone Young | 1 Jul 2008 09:33
Picon
Favicon

Re: [PATCH 0 of 4] [kvm-userspace][test] consolidate test libs to libcflat

On Sun, 2008-06-29 at 16:24 +0300, Avi Kivity wrote:
> Avi Kivity wrote:
> > Jerone Young wrote:
> >> This set of patches are to consolidate test libraries into a single 
> >> library archive. This lib archive is libcflat. This will allow common 
> >> code to be shared among archs.
> >>
> >>   
> >
> > Applied all, thanks.  I squashed together 1-3 as Hollis suggested, and 
> > with git's rename detection, one can see that you merged exit() puts() 
> > etc into a single file.  That usually doesn't work will with libraries 
> > (if you define your own puts() but not your own exit(), you're in 
> > trouble), but we can fix this if/when it starts to hurt.
> >
> >
> 
> This fails compilation with:
> 
> gcc  -m64 -D__x86_64__ -I /tmp/BUILDER/kvm/rpmtop/BUILD/kernel/include 
> -O1 -MMD -MF test/x86/.access.d -g -fomit-frame-pointer -Wa
> ll  -fno-stack-protector   -I ../libkvm -std=gnu99 -ffreestanding -I 
> test/lib -I test/lib/x86   -c -o test/x86/access.o test/x86/a
> ccess.c
> test/x86/access.c:153: error: conflicting types for 'memset'
> /usr/include/string.h:59: error: previous declaration of 'memset' was here
> test/x86/access.c: In function 'ac_test_do_access':
> test/x86/access.c:511: warning: implicit declaration of function 'printf'
> test/x86/access.c: In function 'main':
> test/x86/access.c:578: warning: passing argument 1 of 'smp_init' from 
(Continue reading)

Sukanto Ghosh | 1 Jul 2008 09:49
Picon
Favicon

Performance guarantees

Do you think, this area is worth exploring in KVM, or is it against the
design goals ? Shouldn't it be nice and useful to have such guarantees (to
a certain extent) ?

Also, I do want to be a good kernel/KVM developer. How can I approach this
goal ? Currently I am looking at KVM along with my other course-works.

And lastly, thanks to you all for answering my questions (which might be
stupid sometimes) after taking out time from your busy schedules.

Regards,
Sukanto Ghosh
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Sukanto Ghosh | 1 Jul 2008 09:55
Picon
Favicon

Re: Performance guarantees

> Do you think, this area is worth exploring in KVM, or is it against the
> design goals ? Shouldn't it be nice and useful to have such guarantees (to
> a certain extent) ?

By Performance guarantees I mean,
i) certain %age of CPU time
ii) certain %age of memory dedicated to each guest
iii) anything else ?

Regards,
Sukanto Ghosh

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Slohm Gadaburi | 1 Jul 2008 11:12
Picon

KVM and Kernel Development

Hi all,

I want to use KVM for kernel development of modern kernels.

It looks like the best thing is to build the kernel on the host,
and then do something like:
kvm guest.img -kernel /path/to/new/kernel -append "root=...
console=ttyS0" -nographic
to test it. hopefully the guest will boot straight into a texual
login.

Unfortunately I can't get it to work with modern
distributions. I installed 64bit Hardy as a guest,
but I failed to get it to boot with an external kernel
(I did gave it an initramfs drive using the initrd option,
and set the kernel root param to the right UUID number).
Besides, I really don't need the graphics and I couldn't
find a way to make Ubuntu start in text mode (no init levels
in Ubuntu anymore..).

Any ideas ? What's the best practice for kernel development with KVM ?
do you have the perfect guest for that ? maybe even there's
a ready image somewhere to download ?

I need a modern, 64-bit distribution that I can easily produce
a bootable kernel for it, preferably without initrd stuff, and i don't
need graphics...

Thanks for the help,
Slohm.
(Continue reading)

Soren Hansen | 1 Jul 2008 11:23
Favicon
Gravatar

Re: KVM and Kernel Development

On Tue, Jul 01, 2008 at 12:12:22PM +0300, Slohm Gadaburi wrote:
> Unfortunately I can't get it to work with modern distributions. I
> installed 64bit Hardy as a guest, but I failed to get it to boot with
> an external kernel (I did gave it an initramfs drive using the initrd
> option, and set the kernel root param to the right UUID number).

I've done this loads of times with great success. What happens when you
try?

> Besides, I really don't need the graphics and I couldn't find a way to
> make Ubuntu start in text mode (no init levels in Ubuntu anymore..).

Just pass "single" on the kernel command line, and you'll end up in
single user mode.

--

-- 
Soren Hansen               | 
Virtualisation specialist  | Ubuntu Server Team
Canonical Ltd.             | http://www.ubuntu.com/

Gmane