Re: [kvm-devel] [PATCH] make some functions/vars static

2007-06-03 Thread Avi Kivity
Nguyen Anh Quynh wrote:
> This patch turns some local functions and variables in hypercall.c 
> static.
>
> Signed-off-by: Nguyen Anh Quynh <[EMAIL PROTECTED]>

Applied, thanks.

Please give patch attachments real names; and if you end them with 
".patch", I think gmail will add the magic necessary to have them show 
up inline with the message body.


-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] Use symbol insted of number

2007-06-03 Thread Avi Kivity
Nguyen Anh Quynh wrote:
> This patch makes hypercall.c use symbol instead of number with
> hypercall-ioport-size.

Applied, thanks.


-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [ANNOUNCE] kvm-27 release

2007-06-03 Thread Avi Kivity
A bit of friendly mmu hacking.

Changes since kvm-26:
- use slab cache for mmu shadow pages
- make shadow pte updates atomic (for guest smp)
- general mmu cleanups

Notes:
   If you use the modules from kvm-27, you can use any version of Linux
from 2.6.9 upwards.
   If you use the modules from Linux 2.6.20, you need to use kvm-12.
   If you use the modules from Linux 2.6.21, you need to use kvm-17.

   API/ABI stability is planned for Linux 2.6.22.

http://kvm.qumranet.com

-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 0/9] in-kernel APIC v9 (kernel side)

2007-06-03 Thread Avi Kivity
Gregory Haskins wrote:
> Incorporates v8 plus the following changes:
>
> 1) Fix for hang on AMD
> 2) Fixes issue where irq-windows are inaccurately reported to userspace
> 3) Fixed issue where irq-window-exiting requests can be ignored in some cases
>
>   

FC6 x86_64 hangs on this (AMD) after 'Detected 62.502 MHz APIC Timer.'.  
At least it doesn't kill the machine -- just the guest.  I'll try to see 
what's wrong.

Note that this is with just the kernel patches applied.

The patchset is available as the lapic branch in kvm.git (with some 
whitespace damage fixed).

-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] use symbols rather than constant vars in kvm_create

2007-06-03 Thread Nguyen Anh Quynh

This patch replaces 2 constant variables "dosmem" and "exmem" in
kvm_create() with symbols.

Signed-off-by: Nguyen Anh Quynh <[EMAIL PROTECTED]>


patch3.patch
Description: Binary data
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] use symbols rather than constant vars in kvm_create

2007-06-03 Thread Avi Kivity
Nguyen Anh Quynh wrote:
> This patch replaces 2 constant variables "dosmem" and "exmem" in
> kvm_create() with symbols.

What is the benefit of this?  Readability is not improved.


-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] kvmctl.h

2007-06-03 Thread Nguyen Anh Quynh

This patch moves a comment in kvmctl.h to the right place, and fixes
some stuffs for doxygen.

Signed-off-by: Nguyen Anh Quynh <[EMAIL PROTECTED]>


patch4.patch
Description: Binary data
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] use symbols rather than constant vars in kvm_create

2007-06-03 Thread Nguyen Anh Quynh
On 6/3/07, Avi Kivity <[EMAIL PROTECTED]> wrote:
> Nguyen Anh Quynh wrote:
> > This patch replaces 2 constant variables "dosmem" and "exmem" in
> > kvm_create() with symbols.
>
> What is the benefit of this?  Readability is not improved.
>
>

yes, but what is the reason to use vars instead of symbols here? do
you want to waste some place in stack?

i am not sure if gcc can optmize that, but there is no good reason to
use variables here.

cheers,
Q

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] make handle_debug() static

2007-06-03 Thread Nguyen Anh Quynh

This patch turnes a local function in kvmctl.c static.

Signed-off-by: Nguyen Anh Quynh <[EMAIL PROTECTED]>


patch5.patch
Description: Binary data
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] use symbols rather than constant vars in kvm_create

2007-06-03 Thread Avi Kivity
Nguyen Anh Quynh wrote:
> On 6/3/07, Avi Kivity <[EMAIL PROTECTED]> wrote:
>> Nguyen Anh Quynh wrote:
>> > This patch replaces 2 constant variables "dosmem" and "exmem" in
>> > kvm_create() with symbols.
>>
>> What is the benefit of this?  Readability is not improved.
>>
>>
>
> yes, but what is the reason to use vars instead of symbols here? do
> you want to waste some place in stack?
>
> i am not sure if gcc can optmize that, but there is no good reason to
> use variables here.
>

gcc does optimize it, and even if it didn't, this function is called 
once per virtual machine.  There's no reason to try to make it more 
efficient.

-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] return NULL instead of 0

2007-06-03 Thread Nguyen Anh Quynh

This patch makes kvm_get_msr_list() returns NULL rather than plain 0
in error cases.

Signed-off-by: Nguyen Anh Quynh <[EMAIL PROTECTED]>


patch6.patch
Description: Binary data
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] kvmctl.h

2007-06-03 Thread Avi Kivity
Nguyen Anh Quynh wrote:
> This patch moves a comment in kvmctl.h to the right place, and fixes
> some stuffs for doxygen.
>

Applied, thanks.  Patches still don't show up in my mailer, so please 
add a copy inline.

-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] use symbols rather than constant vars in kvm_create

2007-06-03 Thread Nguyen Anh Quynh
On 6/3/07, Avi Kivity <[EMAIL PROTECTED]> wrote:
> Nguyen Anh Quynh wrote:
> > On 6/3/07, Avi Kivity <[EMAIL PROTECTED]> wrote:
> >> Nguyen Anh Quynh wrote:
> >> > This patch replaces 2 constant variables "dosmem" and "exmem" in
> >> > kvm_create() with symbols.
> >>
> >> What is the benefit of this?  Readability is not improved.
> >>
> >>
> >
> > yes, but what is the reason to use vars instead of symbols here? do
> > you want to waste some place in stack?
> >
> > i am not sure if gcc can optmize that, but there is no good reason to
> > use variables here.
> >
>
> gcc does optimize it, and even if it didn't, this function is called
> once per virtual machine.  There's no reason to try to make it more
> efficient.

ok, it is up to you. but i always find that constants in capitalized
(DOSMEM instead of dosmem) is far more readable.

cheers,
Q

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] make handle_debug() static

2007-06-03 Thread Avi Kivity
Nguyen Anh Quynh wrote:
> This patch turnes a local function in kvmctl.c static.
>

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] return NULL instead of 0

2007-06-03 Thread Avi Kivity
Nguyen Anh Quynh wrote:
> This patch makes kvm_get_msr_list() returns NULL rather than plain 0
> in error cases.

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] symbol instead of constant in kvm_show_code()

2007-06-03 Thread Nguyen Anh Quynh

This patch uses symbol rather than a constant in kvm_show_code(), so
more readable :-)

Signed-off-by: Nguyen Anh Quynh <[EMAIL PROTECTED]>


patch7.patch
Description: Binary data
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] remove dead structure in kvmctl.c

2007-06-03 Thread Nguyen Anh Quynh

This patch removes a dead struct in kvmctl.c

Signed-off-by: Nguyen Anh Quynh <[EMAIL PROTECTED]>


patch8.patch
Description: Binary data
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] symbol instead of constant in kvm_show_code()

2007-06-03 Thread Avi Kivity
Nguyen Anh Quynh wrote:
> This patch uses symbol rather than a constant in kvm_show_code(), so
> more readable :-)

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH RFC 1/3] virtio infrastructure

2007-06-03 Thread Rusty Russell
On Sun, 2007-06-03 at 08:28 +0300, Avi Kivity wrote:
> Sure, 'used' is important (how else do you get the packet size on
> receive?)

Well, the sender can prepend the length, or for networking just leave
Linux to trim packets.  It's the trust issue which bugs me.

> ,  I'm just bitching about the linear scan.

If you're doing interrupt mitigation on a high-bandwidth device, I think
it's optimal.  And if you're not, you obviously don't care 8)

That said, thousands of descriptors may not be insane...

> Well, if you have 256 slots per direction, you will scan 4KB of memory
> per interrupt (256 slots x 2 directions x 8 bytes).  You may need a
> queue length greater than 256 for a high bandwidth interface, if you
> want to reduce your interrupt rate, or if your guest is scheduled out
> for lengthy periods (say, a millisecond).

Hmm... Perhaps I should move the used arrays into the "struct
virtio_device" and guarantee that the id (returned by add_*buf) is an
index into that.  Then we can trivially add a corresponding bit array.

This also makes the "id" easier to use from the driver side: if we add a
"max_id" field it can size its own arrays if it wants to.  Gets rid of
the linked-list in the block driver...

Thoughts?
Rusty.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [Xen-devel] Re: [PATCH RFC 1/3] virtio infrastructure

2007-06-03 Thread Avi Kivity
Rusty Russell wrote:
> Hmm... Perhaps I should move the used arrays into the "struct
> virtio_device" and guarantee that the id (returned by add_*buf) is an
> index into that.  Then we can trivially add a corresponding bit array.
>
>   

That may force the virtio backend to do things it doesn't want to.

> This also makes the "id" easier to use from the driver side: if we add a
> "max_id" field it can size its own arrays if it wants to.  Gets rid of
> the linked-list in the block driver...
>   

How about

struct virtio_completion {
unsigned long length;
void *data;
};

int virtio_complete(struct virtio_completion *completions, int nr);


where 'data' is an opaque pointer passed by the device during add_*buf()?

-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] kvm >= 25: vmx.c no longer compiles on F7

2007-06-03 Thread Carsten Emde

Avi,

From kvm-25 onwards, vmx.c no longer compiles on Fedora 7:

{standard input}: Assembler messages:
{standard input}:4361: Error: no instruction mnemonic suffix given and 
no register operands; can't size instruction


After applying the attached patch, everything works as usual (kvm-25 to 
kvm-27)


--cbe
diff -ura kvm-27/kernel/vmx.c kvm-27-movl/kernel/vmx.c
--- kvm-27/kernel/vmx.c 2007-06-03 10:31:15.0 +0200
+++ kvm-27-movl/kernel/vmx.c2007-06-03 14:08:02.0 +0200
@@ -1345,7 +1345,7 @@
get_idt(&dt);
vmcs_writel(HOST_IDTR_BASE, dt.base);   /* 22.2.4 */
 
-   asm ("mov $.Lkvm_vmx_return, %0" : "=g"(kvm_vmx_return));
+   asm ("movl $.Lkvm_vmx_return, %0" : "=g"(kvm_vmx_return));
vmcs_writel(HOST_RIP, kvm_vmx_return); /* 22.2.5 */
vmcs_write32(VM_EXIT_MSR_STORE_COUNT, 0);
vmcs_write32(VM_EXIT_MSR_LOAD_COUNT, 0);

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] kvm-26 and Vista

2007-06-03 Thread Nakajima, Jun
Jorge Lucángeli Obes wrote:
> Hi everyone. I'm again trying to get 32-bit Vista Ultimate to run as a
> guest on my 64-bit Core 2 Duo T5600. I'm using Xubuntu Feisty with a
> custom 2.6.20.3 kernel and kvm-26. Avi's WBINVD patch in kvm-26 got
> Vista not to generate real-mode errors anymore. However, I still
> cannot get to boot it correctly. Now I get a "Bus error". Something,
> somewhere, is making unaligned reads:
> 
> Program received signal SIGBUS, Bus error.
> [Switching to Thread 47681682213376 (LWP 6570)]
> ldl_phys (addr=47681685016573) at ../cpu-all.h:322
> 322 return *(uint32_t *)ptr;
> (gdb) bt
> #0  ldl_phys (addr=47681685016573) at ../cpu-all.h:322
> #1  0x0047e9dd in kvm_readl (opaque=0x7fffeaf13670,
> addr=140737135064688, data=0x2b5de2610028)
> at /home/tamsyn/stuff/kvm/kvm-26/qemu/qemu-kvm.c:568
> #2  0x004de1e3 in handle_mmio (kvm=0x2922010,
> kvm_run=0x2b5de261) at kvmctl.c:768
> #3  0x004de8d0 in kvm_run (kvm=0x2922010, vcpu=0) at kvmctl.c:971
> #4  0x0047e803 in kvm_cpu_exec (env=0x29c4330) at
> /home/tamsyn/stuff/kvm/kvm-26/qemu/qemu-kvm.c:469
> #5  0x0047fb8a in cpu_x86_exec (env1=0x7fffeaf13670) at
> /home/tamsyn/stuff/kvm/kvm-26/qemu/cpu-exec.c:411
> #6  0x0040c1ba in main_loop () at
> /home/tamsyn/stuff/kvm/kvm-26/qemu/vl.c:6272
> #7  0x0040db91 in main (argc=7699872, argv=0x29220f0) at
> /home/tamsyn/stuff/kvm/kvm-26/qemu/vl.c:7730
> 
> Seeing that, I added a few printf's in ldl_phys, so then I got:
> 
> [EMAIL PROTECTED]:~$ sudo qemu-system-x86_64 -localtime -no-rtc -no-reboot
> stuff/qemu/vista.img -m 512 -S -s

Just wondering, but why do you use -no-rtc?

Jun
---
Intel Open Source Technology Center

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] kvm-26 and Vista

2007-06-03 Thread Jorge Lucángeli Obes
On 6/3/07, Nakajima, Jun <[EMAIL PROTECTED]> wrote:
> Jorge Lucángeli Obes wrote:
> > Hi everyone. I'm again trying to get 32-bit Vista Ultimate to run as a
> > guest on my 64-bit Core 2 Duo T5600. I'm using Xubuntu Feisty with a
> > custom 2.6.20.3 kernel and kvm-26. Avi's WBINVD patch in kvm-26 got
> > Vista not to generate real-mode errors anymore. However, I still
> > cannot get to boot it correctly. Now I get a "Bus error". Something,
> > somewhere, is making unaligned reads:
> >
> > Program received signal SIGBUS, Bus error.
> > [Switching to Thread 47681682213376 (LWP 6570)]
> > ldl_phys (addr=47681685016573) at ../cpu-all.h:322
> > 322 return *(uint32_t *)ptr;
> > (gdb) bt
> > #0  ldl_phys (addr=47681685016573) at ../cpu-all.h:322
> > #1  0x0047e9dd in kvm_readl (opaque=0x7fffeaf13670,
> > addr=140737135064688, data=0x2b5de2610028)
> > at /home/tamsyn/stuff/kvm/kvm-26/qemu/qemu-kvm.c:568
> > #2  0x004de1e3 in handle_mmio (kvm=0x2922010,
> > kvm_run=0x2b5de261) at kvmctl.c:768
> > #3  0x004de8d0 in kvm_run (kvm=0x2922010, vcpu=0) at kvmctl.c:971
> > #4  0x0047e803 in kvm_cpu_exec (env=0x29c4330) at
> > /home/tamsyn/stuff/kvm/kvm-26/qemu/qemu-kvm.c:469
> > #5  0x0047fb8a in cpu_x86_exec (env1=0x7fffeaf13670) at
> > /home/tamsyn/stuff/kvm/kvm-26/qemu/cpu-exec.c:411
> > #6  0x0040c1ba in main_loop () at
> > /home/tamsyn/stuff/kvm/kvm-26/qemu/vl.c:6272
> > #7  0x0040db91 in main (argc=7699872, argv=0x29220f0) at
> > /home/tamsyn/stuff/kvm/kvm-26/qemu/vl.c:7730
> >
> > Seeing that, I added a few printf's in ldl_phys, so then I got:
> >
> > [EMAIL PROTECTED]:~$ sudo qemu-system-x86_64 -localtime -no-rtc -no-reboot
> > stuff/qemu/vista.img -m 512 -S -s
>
> Just wondering, but why do you use -no-rtc?

That's leftover from an old script. I needed '-no-rtc' because if not
my dmesg would choke with "Lost interrupt" messages. I've just tried
removing 'no-rtc' and it doesn't make any difference. However, I'm not
getting those messages anymore, so it's gone from the script as well.
Should it make any difference?

Thanks,

Jorge

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH 0/9] in-kernel APIC v9 (kernel side)

2007-06-03 Thread Avi Kivity

Avi Kivity wrote:

Gregory Haskins wrote:

Incorporates v8 plus the following changes:

1) Fix for hang on AMD
2) Fixes issue where irq-windows are inaccurately reported to userspace
3) Fixed issue where irq-window-exiting requests can be ignored in 
some cases


  


FC6 x86_64 hangs on this (AMD) after 'Detected 62.502 MHz APIC 
Timer.'.  At least it doesn't kill the machine -- just the guest.  
I'll try to see what's wrong.


Note that this is with just the kernel patches applied.

The patchset is available as the lapic branch in kvm.git (with some 
whitespace damage fixed).




Things are a little better with the attached patch.

On AMD, to detect the interrupt window opening, we queue an interrupt 
and then ask for an intercept immediately before interrupt disaptching.  
Effectively that means an intercept after sti, as on vmx.


The problem occurs when we want to inject an interrupt _and_ request an 
interrupt window.  Using the current code, we loop immediately because 
we queue the requested interrupt, then ask for an intercept when it is 
dispatched.  A complex way to spin.


The fix is to inject the interrupt instead of queueing it.  Injected 
events are not intercepted, so we can ask for an interrupt window 
concurrently with injecting an interrupt.


However, there are still problems (like Windows spontaneously 
rebooting).  Will investigate further.


--
error compiling committee.c: too many arguments to function

diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index bdc5d98..651c860 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -1425,13 +1425,18 @@ static void do_intr_requests(struct kvm_vcpu *vcpu,
 
 		if (ack.flags & KVM_IRQACKDATA_VECTOR_VALID) {
 			control = &vcpu->svm->vmcb->control;
+#if 0
 			control->int_vector = ack.vector;
 			control->int_ctl &= ~V_INTR_PRIO_MASK;
 			control->int_ctl |= V_IRQ_MASK |
 ((/*control->int_vector >> 4*/ 0xf) <<
  V_INTR_PRIO_SHIFT);
+#endif
+			control->event_inj = ack.vector
+| SVM_EVTINJ_VALID
+| SVM_EVTINJ_TYPE_INTR;
 
 			++vcpu->stat.irq_accepted;
 		}
 	}
 
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] remove dead structure in kvmctl.c

2007-06-03 Thread Avi Kivity
Nguyen Anh Quynh wrote:
> This patch removes a dead struct in kvmctl.c
>

Applied, thanks.



-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] kvm >= 25: vmx.c no longer compiles on F7

2007-06-03 Thread Avi Kivity
Carsten Emde wrote:
> Avi,
>
> From kvm-25 onwards, vmx.c no longer compiles on Fedora 7:
>
> {standard input}: Assembler messages:
> {standard input}:4361: Error: no instruction mnemonic suffix given and 
> no register operands; can't size instruction
>
> After applying the attached patch, everything works as usual (kvm-25 
> to kvm-27)
>

Applied, thanks.

Is this on i386?  It's fairly suspicious if it happens on x86_64.

Also:
 - your patch was corrupted (tabs were replaced by spaces). please don't 
cut'n'paste from a terminal.
 - supply sign-off-lines to kernel patches.


-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] kvm-26 and Vista

2007-06-03 Thread Avi Kivity
Jorge Lucángeli Obes wrote:
> Hi everyone. I'm again trying to get 32-bit Vista Ultimate to run as a
> guest on my 64-bit Core 2 Duo T5600. I'm using Xubuntu Feisty with a
> custom 2.6.20.3 kernel and kvm-26. Avi's WBINVD patch in kvm-26 got
> Vista not to generate real-mode errors anymore. However, I still
> cannot get to boot it correctly. Now I get a "Bus error". Something,
> somewhere, is making unaligned reads:
>
> Program received signal SIGBUS, Bus error.
> [Switching to Thread 47681682213376 (LWP 6570)]
> ldl_phys (addr=47681685016573) at ../cpu-all.h:322
> 322 return *(uint32_t *)ptr;
> (gdb) bt
> #0  ldl_phys (addr=47681685016573) at ../cpu-all.h:322
> #1  0x0047e9dd in kvm_readl (opaque=0x7fffeaf13670,
>   


can you add a line here (kvm_readl)

if (addr > 0x9fffc && addr < 0xa) return 0;

?

the problem is not the misalignment, it's reading from the vga address 
range at 0xa which is not memory mapped.

I'm at a loss to explain why this doesn't happen here.

-- 
error compiling committee.c: too many arguments to function


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] kvm-26 and Vista

2007-06-03 Thread Jorge Lucángeli Obes
On 6/3/07, Avi Kivity <[EMAIL PROTECTED]> wrote:
> Jorge Lucángeli Obes wrote:
> > Hi everyone. I'm again trying to get 32-bit Vista Ultimate to run as a
> > guest on my 64-bit Core 2 Duo T5600. I'm using Xubuntu Feisty with a
> > custom 2.6.20.3 kernel and kvm-26. Avi's WBINVD patch in kvm-26 got
> > Vista not to generate real-mode errors anymore. However, I still
> > cannot get to boot it correctly. Now I get a "Bus error". Something,
> > somewhere, is making unaligned reads:
> >
> > Program received signal SIGBUS, Bus error.
> > [Switching to Thread 47681682213376 (LWP 6570)]
> > ldl_phys (addr=47681685016573) at ../cpu-all.h:322
> > 322 return *(uint32_t *)ptr;
> > (gdb) bt
> > #0  ldl_phys (addr=47681685016573) at ../cpu-all.h:322
> > #1  0x0047e9dd in kvm_readl (opaque=0x7fffeaf13670,
> >
>
>
> can you add a line here (kvm_readl)
>
> if (addr > 0x9fffc && addr < 0xa) return 0;
>
> ?
>
> the problem is not the misalignment, it's reading from the vga address
> range at 0xa which is not memory mapped.
>
> I'm at a loss to explain why this doesn't happen here.

I'm now using kvm-27. This is the new 'kvm_readl':

static int kvm_readl(void *opaque, uint64_t addr, uint32_t *data)
{
if (addr > 0x9fffc && addr < 0xa) return 0;

*data = ldl_phys(addr);
return 0;
}

There's no more "Bus error", as expected, but I'm getting an
"Unhandled VM exit".

[EMAIL PROTECTED]:~$ sudo qemu-system-x86_64 -localtime -no-reboot
stuff/qemu/vista.img -m 512
unhandled vm exit:  0x8021
rax 6010 rbx 0001 rcx  rdx
0080
rsi 0026b238 rdi 0008b238 rsp 0200 rbp
1f30
r8   r9   r10  r11

r12  r13  r14  r15

rip 009b rflags 00023002
cs b000 (002b/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ds 0020 (0200/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
es 0020 (0200/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ss 0020 (0200/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
fs 0020 (0200/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
gs 0020 (0200/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
tr  (2085/2088 p 1 dpl 0 db 0 s 0 type b l 0 g 0 avl 0)
ldt  (/ p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
gdt 2b/27
idt 0/3ff
cr0 6010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
Aborted

Program received signal SIGABRT, Aborted.
[Switching to Thread 47468583090688 (LWP 8529)]
0x2b2c232cecab in raise () from /lib/libc.so.6
(gdb) bt
#0  0x2b2c232cecab in raise () from /lib/libc.so.6
#1  0x2b2c232d0660 in abort () from /lib/libc.so.6
#2  0x004de7bb in kvm_run (kvm=0x2922010, vcpu=0) at kvmctl.c:949
#3  0x0047e793 in kvm_cpu_exec (env=0x29c4330) at
/home/tamsyn/stuff/kvm/kvm-27/qemu/qemu-kvm.c:469
#4  0x0047fb2a in cpu_x86_exec (env1=0x2151) at
/home/tamsyn/stuff/kvm/kvm-27/qemu/cpu-exec.c:411
#5  0x0040c1ba in main_loop () at
/home/tamsyn/stuff/kvm/kvm-27/qemu/vl.c:6272
#6  0x0040db91 in main (argc=7699680, argv=0x29220f0) at
/home/tamsyn/stuff/kvm/kvm-27/qemu/vl.c:7730

Is there more debug information that I can produce? Thanks in advance.

Jorge

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] memslot check before deferencing

2007-06-03 Thread Nguyen Anh Quynh

"memslot" in makr_page_dirty() should be verified before dereferencing
it (kvm_main.c)

Signed-off-by: Nguyen Anh Quynh <[EMAIL PROTECTED]>


patch9.patch
Description: Binary data
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] kvm >= 25: vmx.c no longer compiles on F7

2007-06-03 Thread Carsten Emde
Avi Kivity wrote:
>> From kvm-25 onwards, vmx.c no longer compiles on Fedora 7:
>> {standard input}: Assembler messages:
>> {standard input}:4361: Error: no instruction mnemonic suffix given and 
>> no register operands; can't size instruction
>> After applying the attached patch, everything works as usual (kvm-25 
>> to kvm-27)
> [..]
> Is this on i386?  It's fairly suspicious if it happens on x86_64.
Yes, i386.

> - your patch was corrupted (tabs were replaced by spaces). please don't 
> cut'n'paste from a terminal.
No, I didn't. Will check and improve.

> - supply sign-off-lines to kernel patches.
Signed-off-by: Carsten Emde <[EMAIL PROTECTED]>

--cbe

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [BUG] Oops with KVM-27

2007-06-03 Thread Luca Tettamanti
Hello,
my kernel just exploded :)

The host is running 2.6-git-current, with KVM modules from KVM-27
package. kernel is 32bit, SMP, with PREEMPT enabled, no HIGHMEM (but I'm
using CONFIG_VMSPLIT_3G_OPT=y). The CPU is a Core2 (hence I'm using
kvm-intel).
Guest was a Fedora7 setup DVD, which died somewhere during the
installation (anaconda was already active at that point). Bad news is
that I cannot reproduce the bug :|

This is the OOPS:

kvm: emulating exchange as write
[ cut here ]
kernel BUG at /root/kvm-27/kernel/mmu.c:276!
invalid opcode:  [#1]
PREEMPT SMP 
Modules linked in: ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 
nf_conntrack ip_tables x_tables rtc_core rtc_lib tun kvm_intel kvm radeon drm 
binfmt_misc nfs button cpufreq_stats cpufreq_userspace cpufreq_powersave 
cpufreq_conservative cls_u32 cls_route sch_sfq sch_cbq des cbc blkcipher sha1 
md5 hmac crypto_hash cryptomgr crypto_algapi nfsd exportfs lockd sunrpc vfat 
fat nls_base fuse cpufreq_ondemand acpi_cpufreq freq_table i2c_isa ipv6 
snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_timer ohci1394 snd 
intel_agp ieee1394 parport_pc atl1 uhci_hcd ehci_hcd i2c_i801 agpgart soundcore 
snd_page_alloc parport e100 usbcore mii dm_snapshot dm_mod thermal processor 
fan pata_ali sata_uli reiserfs xfs
CPU:0
EIP:0060:[]Not tainted VLI
EFLAGS: 00010246   (2.6.22-rc3-libata-gf285e3d3-dirty #67)
EIP is at mmu_memory_cache_alloc+0xd/0x36 [kvm]
eax:    ebx:    ecx: db19f2f4   edx: 002c
esi: 0322   edi: db19e528   ebp: 3d1d   esp: ca73fc80
ds: 007b   es: 007b   fs: 00d8  gs:   ss: 0068
Process qemu (pid: 2680, ti=ca73f000 task=cc3160f0 task.ti=ca73f000)
Stack: f24aa0e2  db19e528 f24ae1eb db19f0b4  e21458e8 b129b4a0 
   db19f0b4 3d1d 0018 c000 f24ae3ea 0002   
    0003 db19f0b4 3d1d 0003 0003 f24ae4b6 db19f0b4 
Call Trace:
 [] gfn_to_page+0x14/0x27 [kvm]
 [] kvm_mmu_get_page+0x1b2/0x31c [kvm]
 [] mmu_alloc_roots+0x95/0xf0 [kvm]
 [] paging_new_cr3+0x21/0x48 [kvm]
 [] set_cr3+0x82/0x8c [kvm]
 [] handle_cr+0xf8/0x253 [kvm_intel]
 [] handle_exception+0x120/0x208 [kvm_intel]
 [] vmx_vcpu_run+0x59d/0x6c6 [kvm_intel]
 [] __mutex_lock_slowpath+0x259/0x261
 [] vmx_vcpu_load+0x2a/0xcc [kvm_intel]
 [] kvm_vcpu_ioctl+0x29a/0xcff [kvm]
 [] sock_common_recvmsg+0x3e/0x54
 [] sock_recvmsg+0xcf/0xe8
 [] sock_sendmsg+0xbc/0xd4
 [] autoremove_wake_function+0x0/0x35
 [] core_sys_select+0x234/0x30f
 [] setup_sigcontext+0x105/0x189
 [] _spin_unlock_irq+0x20/0x41
 [] trace_hardirqs_on+0x11a/0x13d
 [] do_notify_resume+0x5d1/0x611
 [] _spin_unlock_irq+0x2b/0x41
 [] do_notify_resume+0x52f/0x611
 [] convert_fxsr_from_user+0x26/0xe6
 [] kvm_vcpu_ioctl+0x0/0xcff [kvm]
 [] do_ioctl+0x1f/0x62
 [] vfs_ioctl+0x237/0x249
 [] sys_ioctl+0x33/0x4d
 [] syscall_call+0x7/0xb
 ===
Code: 01 00 00 e8 ce ff ff ff 8d 83 ec 01 00 00 81 c3 40 02 00 00 e8 bd ff ff 
ff 89 d8 5b eb b8 57 89 c1 53 83 ec 04 8b 00 85 c0 75 04 <0f> 0b eb fe 48 8b 5c 
81 04 89 01 89 d1 31 c0 c1 e9 02 89 df f3 
EIP: [] mmu_memory_cache_alloc+0xd/0x36 [kvm] SS:ESP 0068:ca73fc80
note: qemu[2680] exited with preempt_count 2
BUG: sleeping function called from invalid context at 
/home/kronos/src/linux-2.6.git/kernel/rwsem.c:20
in_atomic():1, irqs_disabled():0
INFO: lockdep is turned off.
 [] down_read+0x15/0x49
 [] futex_wake+0x19/0xb3
 [] do_futex+0x7f/0xaad
 [] vsnprintf+0x450/0x48c
 [] _spin_unlock_irqrestore+0x40/0x58
 [] release_console_sem+0x1a0/0x1b9
 [] vprintk+0x2b7/0x305
 [] try_to_wake_up+0x325/0x32f
 [] sys_futex+0xc8/0xda
 [] mm_release+0x81/0x87
 [] exit_mm+0x13/0xd6
 [] do_exit+0x1bc/0x69b
 [] die+0x1e5/0x211
 [] do_invalid_op+0x0/0x8a
 [] do_invalid_op+0x81/0x8a
 [] mmu_memory_cache_alloc+0xd/0x36 [kvm]
 [] page_header_update_slot+0x1e/0x4b [kvm]
 [] paging32_set_pte_common+0x269/0x2a1 [kvm]
 [] error_code+0x72/0x78
 [] mmu_memory_cache_alloc+0xd/0x36 [kvm]
 [] gfn_to_page+0x14/0x27 [kvm]
 [] kvm_mmu_get_page+0x1b2/0x31c [kvm]
 [] mmu_alloc_roots+0x95/0xf0 [kvm]
 [] paging_new_cr3+0x21/0x48 [kvm]
 [] set_cr3+0x82/0x8c [kvm]
 [] handle_cr+0xf8/0x253 [kvm_intel]
 [] handle_exception+0x120/0x208 [kvm_intel]
 [] vmx_vcpu_run+0x59d/0x6c6 [kvm_intel]
 [] __mutex_lock_slowpath+0x259/0x261
 [] vmx_vcpu_load+0x2a/0xcc [kvm_intel]
 [] kvm_vcpu_ioctl+0x29a/0xcff [kvm]
 [] sock_common_recvmsg+0x3e/0x54
 [] sock_recvmsg+0xcf/0xe8
 [] sock_sendmsg+0xbc/0xd4
 [] autoremove_wake_function+0x0/0x35
 [] core_sys_select+0x234/0x30f
 [] setup_sigcontext+0x105/0x189
 [] _spin_unlock_irq+0x20/0x41
 [] trace_hardirqs_on+0x11a/0x13d
 [] do_notify_resume+0x5d1/0x611
 [] _spin_unlock_irq+0x2b/0x41
 [] do_notify_resume+0x52f/0x611
 [] convert_fxsr_from_user+0x26/0xe6
 [] kvm_vcpu_ioctl+0x0/0xcff [kvm]
 [] do_ioctl+0x1f/0x62
 [] vfs_ioctl+0x237/0x249
 [] sys_ioctl+0x33/0x4d
 [] syscall_call+0x7/0xb
 ===

Luca
-- 
Il coraggio non mi manca.
E` la pa

Re: [kvm-devel] [Xen-devel] Re: [PATCH RFC 1/3] virtio infrastructure

2007-06-03 Thread Rusty Russell
On Sun, 2007-06-03 at 14:39 +0300, Avi Kivity wrote:
> Rusty Russell wrote:
> > Hmm... Perhaps I should move the used arrays into the "struct
> > virtio_device" and guarantee that the id (returned by add_*buf) is an
> > index into that.  Then we can trivially add a corresponding bit array. 
> 
> That may force the virtio backend to do things it doesn't want to.

Well, I have two implementations, and both ids already fit this model so
I have some confidence.  I just need to add the set_bit/clear_bit to the
read/write one, and use sync_clear_bit to the descriptor-based one
(which I suspect will actually get a little cleaner).

So I think this constraint is a reasonable thing to add anyway.

> > This also makes the "id" easier to use from the driver side: if we add a
> > "max_id" field it can size its own arrays if it wants to.  Gets rid of
> > the linked-list in the block driver...
> >   
> 
> How about
> 
> struct virtio_completion {
> unsigned long length;
> void *data;
> };
> 
> int virtio_complete(struct virtio_completion *completions, int nr);
> 
> where 'data' is an opaque pointer passed by the device during add_*buf()?

Other than the fact that the driver will look less like a normal driver,
it's actually harder to write the net driver if that complete call can
happen off an interrupt: we can't free skbs in interrupt context, which
is why the used-outbuf cleanup is currently done (inefficiently, but
that's orthogonal) in the xmit routine.

I'll code up the modifications now and check if I'm right about the
impact on the code.  I might have to come up with something else...

Cheers,
Rusty.


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [RFC] KVM guest page swap out support - take2

2007-06-03 Thread Shaohua Li
Hi,
This is a updated patch set of swap out kvm guest pages.Changes are:
1. refresh against to kvm-26
2. clean up shadow page handling to make gfn_to_page not be called
within kmap_atomic/kunamp_atomic.
3. variant bug fixing. Now the patch is quite stable in my test.
4. make swap out optional. A compile option can completely close swap
out. There should be no performance impact if swapout isn't enabled.

There are still a lot of unresolved issues:
1. just work for one vm. waiting for kvm hook into scheduler
2. Not work for mp guest and can't swap out pages which shadow page
table point to, this require kvm .flush_tlb can send ipi to vcpu.
3. swapoff isn't supported. We need a hook to sys_swapoff for kvm.

Please review, suggests and comments are welcome.

Thanks,
Shaohua
symbols swapout required

Index: 2.6.21-rc7/mm/swap_state.c
===
--- 2.6.21-rc7.orig/mm/swap_state.c	2007-04-24 02:20:00.0 +0800
+++ 2.6.21-rc7/mm/swap_state.c	2007-05-21 10:10:20.0 +0800
@@ -207,6 +207,7 @@ void delete_from_swap_cache(struct page 
 	swap_free(entry);
 	page_cache_release(page);
 }
+EXPORT_SYMBOL(delete_from_swap_cache);
 
 /*
  * Strange swizzling function only for use by shmem_writepage
@@ -225,6 +226,7 @@ int move_to_swap_cache(struct page *page
 		INC_CACHE_INFO(exist_race);
 	return err;
 }
+EXPORT_SYMBOL(move_to_swap_cache);
 
 /*
  * Strange swizzling function for shmem_getpage (and shmem_unuse)
@@ -307,6 +309,7 @@ struct page * lookup_swap_cache(swp_entr
 	INC_CACHE_INFO(find_total);
 	return page;
 }
+EXPORT_SYMBOL(lookup_swap_cache);
 
 /* 
  * Locate a page of swap in physical memory, reserving swap cache space
@@ -364,3 +367,4 @@ struct page *read_swap_cache_async(swp_e
 		page_cache_release(new_page);
 	return found_page;
 }
+EXPORT_SYMBOL(read_swap_cache_async);
Index: 2.6.21-rc7/mm/swapfile.c
===
--- 2.6.21-rc7.orig/mm/swapfile.c	2007-04-24 02:20:00.0 +0800
+++ 2.6.21-rc7/mm/swapfile.c	2007-05-21 10:10:20.0 +0800
@@ -211,6 +211,7 @@ noswap:
 	spin_unlock(&swap_lock);
 	return (swp_entry_t) {0};
 }
+EXPORT_SYMBOL(get_swap_page);
 
 swp_entry_t get_swap_page_of_type(int type)
 {
@@ -303,6 +304,7 @@ void swap_free(swp_entry_t entry)
 		spin_unlock(&swap_lock);
 	}
 }
+EXPORT_SYMBOL(swap_free);
 
 /*
  * How many references to page are currently swapped out?
Index: 2.6.21-rc7/mm/filemap.c
===
--- 2.6.21-rc7.orig/mm/filemap.c	2007-04-24 02:20:00.0 +0800
+++ 2.6.21-rc7/mm/filemap.c	2007-05-21 10:11:09.0 +0800
@@ -465,6 +465,7 @@ int add_to_page_cache_lru(struct page *p
 		lru_cache_add(page);
 	return ret;
 }
+EXPORT_SYMBOL(add_to_page_cache_lru);
 
 #ifdef CONFIG_NUMA
 struct page *__page_cache_alloc(gfp_t gfp)


kvm-swap.tgz
Description: application/compressed-tar
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [ kvm-Bugs-1730473 ] using VNC causes oops with latest code

2007-06-03 Thread SourceForge.net
Bugs item #1730473, was opened at 2007-06-04 13:15
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=1730473&group_id=180599

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Wilson (wilsone)
Assigned to: Nobody/Anonymous (nobody)
Summary: using VNC causes oops with latest code

Initial Comment:
Hello,

CPU : Intel Core2 DUO
Works ok if -no-kvm is specified with qemu.

Using the latest kvm git code with kernel 2.6.22-rc3-git6 results in the 
following :

 /usr/bin/qemu -boot c -m 512 -hda '/mnt/stor1/debtest.img' -cdrom  
'/mnt/stor1/debian-40r0-i386-DVD-1.iso' -net nic,vlan=0 -net tap,vlan=0,ifname= 
-localtime -vnc :7

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel: Oops:  [#1]

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel: SMP 

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel: CPU:0

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel: EIP:0060:[]Not tainted VLI

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel: EFLAGS: 00210206   (2.6.22-rc3-git6 #1)

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel: EIP is at kvm_mmu_get_page+0x156/0x350 [kvm]

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel: eax: 642f3172   ebx: 642f3172   ecx: eff48b10   edx: ef53e000

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel: esi: 00010020   edi: ef53e098   ebp:    esp: ef407e6c

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel: ds: 007b   es: 007b   fs: 00d8  gs: 0033  ss: 0068

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel: Process qemu (pid: 6639, ti=ef406000 task=f5b04a20 
task.ti=ef406000)

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel: Stack: ef53f098 eff48b10 ef53f098 0020 ef53f098  
  

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:f90f420f 0002 0001    
ef53f184 ef53f098 

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:0020 ef53e000 f90f4348 ef53f098 fff5 f90f4412 
ef53f098 f90f152a 

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel: Call Trace:

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:  [] mmu_alloc_roots+0x94/0xec [kvm]

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:  [] init_kvm_mmu+0x49/0xbb [kvm]

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:  [] kvm_mmu_reset_context+0xf/0x1d [kvm]

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:  [] kvm_vm_ioctl+0x4a5/0x741 [kvm]

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:  [] do_sync_read+0xc7/0x10a

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:  [] __handle_mm_fault+0x357/0x86d

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:  [] kvm_vm_ioctl+0x0/0x741 [kvm]

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:  [] do_ioctl+0x1f/0x62

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:  [] vfs_ioctl+0x22e/0x240

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:  [] sys_ioctl+0x33/0x4a

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:  [] sysenter_past_esp+0x5f/0x85

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:  [] arp_constructor+0xbd/0x103

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel:  ===

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel: Code: 8b 56 28 83 c3 28 85 d2 89 50 14 74 03 89 4a 04 8b 54 24 
04 89 4a 28 89 59 04 8b 4c 24 30 89 08 e9 f4 01 00 00 89 c3 85 db 74 17 <8b> 03 
0f 18 00 90 8d 4b f8 89 4c 24 04 39 69 10 75 e8 e9 20 ff 

Message from [EMAIL PROTECTED] at Mon Jun  4 12:53:25 2007 ...
disher kernel: EIP: [] kvm_mmu_get_page+0x156/0x350 [kvm] SS:ESP 
0068:ef407e6c


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1730473&group_id=180599

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get