Re: [kvm-devel] exposing PCI devices to guest

2008-05-12 Thread Neo Jia
Weidong,

Just curious, is it any estimation of this feature? when will it be available?

If I can get a draft version, that would be great. I want to play with it.

Thanks,
Neo

On Mon, May 12, 2008 at 8:22 PM, Han, Weidong <[EMAIL PROTECTED]> wrote:
> Not yet. It's working in process.
>
>  Randy (Weidong)
>
>
>
>  Neo Jia wrote:
>  > Does KVM provide VT-D to allow u pass through your PCI device?
>  >
>  > Thanks,
>  > Neo
>  >
>  > -
>  > I would remember that if researchers were not ambitious
>  > probably today we haven't the technology we are using!
>  >
>  > On May 12, 2008, at 9:07 AM, Gerry Reno <[EMAIL PROTECTED]> wrote:
>  >
>  >> I would like to expose some fxo PCI cards to my Asterisk guest under
>  >> KVM.  How can I do this?  I see where maybe you can hotplug some nic
>  >> | storage devices but what about other PCI devices like my fxo
>  >> cards? Is there some kernel line options that could do this?
>  >>
>  >> Regards,
>  >> Gerry
>  >>
>  >>
>  >> ---
>  >>
>  --
>  >> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
>  >> Don't miss this year's exciting event. There's still time to save
>  >> $100. Use priority code J8TL2D2.
>  >>
>  http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/j
>  avaone
>  >> ___
>  >> kvm-devel mailing list
>  >> kvm-devel@lists.sourceforge.net
>  >> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>  >
>  >
>  
>  -
>  > This SF.net email is sponsored by: Microsoft
>  > Defy all challenges. Microsoft(R) Visual Studio 2008.
>  > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
>
>
> > ___
>  > kvm-devel mailing list
>  > kvm-devel@lists.sourceforge.net
>  > https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
>



-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] exposing PCI devices to guest

2008-05-12 Thread Neo Jia
Does KVM provide VT-D to allow u pass through your PCI device?

Thanks,
Neo

-
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

On May 12, 2008, at 9:07 AM, Gerry Reno <[EMAIL PROTECTED]> wrote:

> I would like to expose some fxo PCI cards to my Asterisk guest under
> KVM.  How can I do this?  I see where maybe you can hotplug some nic |
> storage devices but what about other PCI devices like my fxo cards?   
> Is
> there some kernel line options that could do this?
>
> Regards,
> Gerry
>
>
> --- 
> --
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save  
> $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> ___
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel

-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] KVM running on Mac?

2007-12-04 Thread Neo Jia
On Dec 4, 2007 11:03 AM, Javier Guerra <[EMAIL PROTECTED]> wrote:
> On 12/4/07, Neo Jia <[EMAIL PROTECTED]> wrote:
> > I have seen the Qemu is ported to OSX. Is there any plan for KVM? Just 
> > curious.
>
> similarily, there are OSX installs over VMWare, but haven't seen one on KVM...

I have seen a post about this. They claim that it is because Mac is
using different firmware.

"And If you can run Mac OS X under regular qemu, then kvm should work too."

Thanks,
Neo


>
> --
> Javier
>
> -
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell.  From the desktop to the data center, Linux is going
> mainstream.  Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> ___
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>



-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] KVM running on Mac?

2007-12-04 Thread Neo Jia
hi,

I have seen the Qemu is ported to OSX. Is there any plan for KVM? Just curious.

Thanks,
Neo

-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [ kvm-Bugs-1666308 ] Freedos HIMEM.EXE hangs kvm-14 qemu on Intel CPU

2007-11-28 Thread Neo Jia
Avi,

May I have your comments on the output I got from KVM CS:RIP instructions?

Thanks,
Neo

On Nov 25, 2007 7:05 PM, SourceForge.net <[EMAIL PROTECTED]> wrote:
> Bugs item #1666308, was opened at 2007-02-22 08:09
> Message generated for change (Comment added) made by chenghuan_jia
> You can respond by visiting:
> https://sourceforge.net/tracker/?func=detail&atid=893831&aid=1666308&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: Later
> Priority: 5
> Private: No
> Submitted By: David A. Madore (davidamadore)
> Assigned to: Izik Eidus (izike)
> Summary: Freedos HIMEM.EXE hangs kvm-14 qemu on Intel CPU
>
> Initial Comment:
> Host system summary: Intel CPU (Pentium D 3.40GHz) running Linux 2.6.20.1 in 
> 64-bit (x86_64) mode, using KVM module and QEMU from kvm-14 release.  
> Otherwise generally using the Debian Etch distribution.
>
> Try to launch Freedos installation using "-hda harddrive.img -cdrom 
> fdbasecd.iso -boot d -m 64 -localtime", where fdbasecd.iso is Freedos 1.0's 
> base install CD from http://www.freedos.org/freedos/files/ > (and 
> harddrive.img is an 80MB file full of zeros, but this is unimportant).  Using 
> bochsbios-2.3-2 and vgabios-0.6a-1 (both packaged by Debian).
>
> Symptom: virtual machine boots, but qemu stops soon after entering Freedos 
> installer (as soon as "install to hard drive" is chosen, or something).
>
> "Stopped" means that the window title bar is updated to add "[stopped]" after 
> QEMU title, and the virtual machine no longer runs (on host system, the QEMU 
> process is in T state, using 0% CPU).  The QEMU monitor is still accessible, 
> but "cont" has no effect.  "info registers" does not seem to show anything 
> strange.
>
> The same QEMU running with -no-kvm works fine, so it's more likely a KVM or 
> KVM-QEMU interface issue, not with QEMU.  The same QEMU+KVM boots a Knoppix 
> 5.0 CD without problem, so it's not like a complete failure to run anything.  
> Using kvm-12 instead of kvm-14 gives a QEMU segfault at the same point 
> (rather than just going in "stopped" mode).
>
> Reported on freenode's #irc channel on 2007-02-22 15:40+0100.  Someone 
> confirmed having the same problem on a 32-bit kernel+userland with FC6 (so 
> it's not x86_64-specific, nor Debian-specific), but also with an Intel CPU.
>
> --
>
> Comment By: Neo Jia (chenghuan_jia)
> Date: 2007-11-25 19:05
>
> Message:
> Logged In: YES
> user_id=446034
> Originator: NO
>
> Avi,
>
> I think for No.3 case is the one I need to implement first. But how to
> check the value of CS:RIP?
>
> CS:RIP = 0x0684:03fd = 0x6c3d
>
> I run the same command as previous comments in this bug report:
>
> (qemu) xp/10ih 0x6c3d
> 0x6c3d:  xor(%bx,%si),%ax
> 0x6c3f:  jl 0x6c5d
> 0x6c41:  pushw  816
> 0x6c45:  pushw  %gs:51(%si)
> 0x6c49:  pushl  %gs:21(%si)
> 0x6c4e:  push   $0x0
> 0x6c50:  push   %di
> 0x6c51:  push   $0x1
> 0x6c53:  call   0x2b72
> 0x6c56:  test   %ax,%ax
>
> Is that correct?
>
> Thanks,
> Neo
>
>
> --
>
> Comment By: Neo Jia (chenghuan_jia)
> Date: 2007-11-25 16:36
>
> Message:
> Logged In: YES
> user_id=446034
> Originator: NO
>
> Avi,
>
> Thanks. I have tried to reproduce this problem on my Intel E6600 (x86_64
> 2.6.23.1-49.fc8) with the latest kvm module and userspace.
>
> I found several crashes/hungs in the installation. Not sure if we need to
> file different bug to track them.
>
> I used a 128M qcow image and with the following line to install freeDOS:
> "sudo qemu-system-x86_64 -cdrom /home/cjia/download/fdbasecd.iso -hda
> freedos.img -boot d -m 1024"
>
> 1. Crashes when I happened to boot the empty image at the very beginning
> of the installation by selecting "h".
>
> exception 12 (0)
> rax 0037 rbx c539 rcx  rdx
> 0080
> rsi 7fff37b8 rdi 9c35b404 rsp  rbp
> 0280
> r8   r9   r10  r11
> 
> r12  r13  r14  r15
> 
> rip 0

Re: [kvm-devel] emulation failed but !mmio_needed? rip 10000 fc 0f 01 15

2007-11-26 Thread Neo Jia
On Nov 26, 2007 2:16 AM, Avi Kivity <[EMAIL PROTECTED]> wrote:
>
> Neo Jia wrote:
> > Avi Kivity wrote:
> >
> >> Neo Jia wrote:
> >>
> >>> On Nov 24, 2007 12:00 AM, Avi Kivity <[EMAIL PROTECTED]> wrote:
> >>>
> >>>
> >>>> Neo Jia wrote:
> >>>>
> >>>>
> >>>>> The version of kvm I used for kvm module is
> >>>>> "694401697ccd822bb08019731c3ee1bb34323d8e" and the kvm-userspace is
> >>>>> "a57b838b49bc4e4e7439b18d0323385d53e41c7f".
> >>>>>
> >>>>>
> >>>>>
> >>>> These are very recent versions, but the nature of the problem leads me
> >>>> to expect you are using the host's kvm modules.  Can you verify?
> >>>>
> >>>>
> >>> Yes. Just verified that I ran the modules from kernel "2.6.23.1-49.fc8".
> >>>
> >>> But according to Sheng's comments, I also don't see the "cld"
> >>> instruction in the latest version.
> >>>
> >>> Why does kvm not crash?
> >>>
> >>>
> >>>
> >> With the reset fix, kvm never sees the cld instruction.  It executes
> >> the jmp instruction at f000:fff0 and continues processing ROM code.
> >>
> >>
> > Do we need to add a "default" in x86 emulator switch statement?
> >
> >
>
> Take a look at the code.  That path is already covered.

Avi,

I just checkout the latest kvm.git. Please correct me if I am wrong.

I don't see the explicit "default" in swtich (c->b) statement but I
found a goto writeback.

Is that one?

Thanks,
Neo


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



-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] Remove build output file in user/test/x86/lib

2007-11-26 Thread Neo Jia
>From 2d054cce30ae2e837b24144195b9785a20e08c4a Mon Sep 17 00:00:00 2001
From: Neo Jia <[EMAIL PROTECTED]>
Date: Mon, 26 Nov 2007 23:29:53 -0800
Subject: [PATCH] Remove build output file in user/test/x86/lib.

This patch will remove the generated files (.*.d, *.o) in directory
user/test/x86/lib under arch_clean target of file config-x86-common.mak.

Signed-off-by: Neo Jia <[EMAIL PROTECTED]>
---
 user/config-x86-common.mak |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/user/config-x86-common.mak b/user/config-x86-common.mak
index a6253ce..7c3a07f 100644
--- a/user/config-x86-common.mak
+++ b/user/config-x86-common.mak
@@ -41,4 +41,4 @@ $(TEST_DIR)/libcflat.a: $(TEST_DIR)/lib/exit.o

 arch_clean:
$(RM) $(TEST_DIR)/bootstrap $(TEST_DIR)/*.o $(TEST_DIR)/*.flat \
-   $(TEST_DIR)/.*.d
+   $(TEST_DIR)/.*.d $(TEST_DIR)/lib/.*.d $(TEST_DIR)/lib/*.o
-- 
1.5.3.6


-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!
From 2d054cce30ae2e837b24144195b9785a20e08c4a Mon Sep 17 00:00:00 2001
From: Neo Jia <[EMAIL PROTECTED]>
Date: Mon, 26 Nov 2007 23:29:53 -0800
Subject: [PATCH] Remove build output file in user/test/x86/lib.

This patch will remove the generated files (.*.d, *.o) in directory
user/test/x86/lib under arch_clean target of file config-x86-common.mak.

Signed-off-by: Neo Jia <[EMAIL PROTECTED]>
---
 user/config-x86-common.mak |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/user/config-x86-common.mak b/user/config-x86-common.mak
index a6253ce..7c3a07f 100644
--- a/user/config-x86-common.mak
+++ b/user/config-x86-common.mak
@@ -41,4 +41,4 @@ $(TEST_DIR)/libcflat.a: $(TEST_DIR)/lib/exit.o
 
 arch_clean:
 	$(RM) $(TEST_DIR)/bootstrap $(TEST_DIR)/*.o $(TEST_DIR)/*.flat \
-	$(TEST_DIR)/.*.d
+	$(TEST_DIR)/.*.d $(TEST_DIR)/lib/.*.d $(TEST_DIR)/lib/*.o
-- 
1.5.3.6

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] emulation failed but !mmio_needed? rip 10000 fc 0f 01 15

2007-11-25 Thread Neo Jia
Avi Kivity wrote:
> Neo Jia wrote:
>> On Nov 24, 2007 12:00 AM, Avi Kivity <[EMAIL PROTECTED]> wrote:
>>  
>>> Neo Jia wrote:
>>>
>>>> The version of kvm I used for kvm module is
>>>> "694401697ccd822bb08019731c3ee1bb34323d8e" and the kvm-userspace is
>>>> "a57b838b49bc4e4e7439b18d0323385d53e41c7f".
>>>>
>>>>   
>>> These are very recent versions, but the nature of the problem leads me
>>> to expect you are using the host's kvm modules.  Can you verify?
>>> 
>>
>> Yes. Just verified that I ran the modules from kernel "2.6.23.1-49.fc8".
>>
>> But according to Sheng's comments, I also don't see the "cld"
>> instruction in the latest version.
>>
>> Why does kvm not crash?
>>
>>   
>
> With the reset fix, kvm never sees the cld instruction.  It executes 
> the jmp instruction at f000:fff0 and continues processing ROM code.
>
Do we need to add a "default" in x86 emulator switch statement?

Thanks,
Neo

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] emulation failed but !mmio_needed? rip 10000 fc 0f 01 15

2007-11-24 Thread Neo Jia
On Nov 24, 2007 12:00 AM, Avi Kivity <[EMAIL PROTECTED]> wrote:
> Neo Jia wrote:
> > The version of kvm I used for kvm module is
> > "694401697ccd822bb08019731c3ee1bb34323d8e" and the kvm-userspace is
> > "a57b838b49bc4e4e7439b18d0323385d53e41c7f".
> >
>
> These are very recent versions, but the nature of the problem leads me
> to expect you are using the host's kvm modules.  Can you verify?

Yes. Just verified that I ran the modules from kernel "2.6.23.1-49.fc8".

But according to Sheng's comments, I also don't see the "cld"
instruction in the latest version.

Why does kvm not crash?

Thanks,
Neo

>
>
> --
> Any sufficiently difficult bug is indistinguishable from a feature.
>
>



-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] emulation failed but !mmio_needed? rip 10000 fc 0f 01 15

2007-11-24 Thread Neo Jia
On Nov 23, 2007 8:21 PM, Sheng Yang <[EMAIL PROTECTED]> wrote:
>
> On Saturday 24 November 2007 07:23:20 Neo Jia wrote:
> > hi,
> >
> > I happened to get a "emulation fail" when running the following command:
> >
> > System environment: Intel Core 2 Duo (E6600) x86_64 Fedora 8
> > (2.6.23.1-49.fc8).
> >
> > qemu-img create -f qcow debian-testing.img 10G
> >
> > sudo qemu-system-x86_64 -cdrom
> > /home/cjia/download/debian-testing-i386-netinst.iso -hda
> > debian-testing.img -boot d -m 1024
> >
> > Everything works fine until it prompts me that the installation is
> > complete and need reboot.
> >
> > > sudo qemu-system-x86_64 -cdrom
> > > /home/cjia/download/debian-testing-i386-netinst.iso -hda
> > > debian-testing.img -boot d -m 1024
> >
> > exception 13 (0)
> > rax 0100 rbx 0100 rcx  rdx
> > 0600
> > rsi  rdi  rsp  rbp
> > 
> > r8   r9   r10  r11
> > 
> > r12  r13  r14  r15
> > 
> > rip 0001 rflags 00033003
> > cs f000 (000f/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> > ds  (/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> > es  (/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> > ss  (/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> > fs  (/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> > gs  (/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
> > tr 0080 (40c0/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 0/
> > idt 0/
> > cr0 6010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
> > code: 00 00 00 00 ea 5b e0 00 f0 31 30 2f 32 38 2f 30 37 00 fc f5 -->
> > fc 0f 01 15 92 a0 31 00 b8 18 00 00 00 8e d8 8e c0 8e e0 8e e8 31 c0
> > bf 00 30 39 00 b9 7c
> > Aborted
> >
> > ---> dmesg:
> >
> > kvm: emulating exchange as write
> > emulation failed but !mmio_needed? rip 1 fc 0f 01 15// I
> > searched through the source code but not find a place to generate "but
> > !mmio_needed?" string ...
>
> It due to one instruction haven't been emulated: 0xfc(one byte instruction).
> Look it up in SDM Vol.2B's opcode map, you can find that's "CLD". And look at
> what is CLD in SDM Vol.2, you will find "CLD - Clear direction flag". So we
> miss this in x86_emulate.c.

Could you show me how to decode the log message "rip 1 fc 0f 01 15". How
can you determine that it is a one byte instruction?

Thanks,
Neo


>
> >
> > The version of kvm I used for kvm module is
> > "694401697ccd822bb08019731c3ee1bb34323d8e" and the kvm-userspace is
> > "a57b838b49bc4e4e7439b18d0323385d53e41c7f".
> > // Not sure if this is the right way to show the version I am using.
> > If not, please correct me, this is the first time I am using git...
>
> Yeah, that's the right ones. :)
>
> >
> > Anyway, I really want to get some comments about how to trace this
> > problem and would be very glad to dig into it!
>
> Here is the chance! Add this instruction to our x86 emulator. You can take the
> implement of "sti" and "cli" as a reference.
>
> Good luck!
>
> >
> > Thanks,
> > Neo
>
>
>
> --
> Thanks
> Yang, Sheng
>



-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] emulation failed but !mmio_needed? rip 10000 fc 0f 01 15

2007-11-24 Thread Neo Jia
On Nov 24, 2007 12:00 AM, Avi Kivity <[EMAIL PROTECTED]> wrote:
> Neo Jia wrote:
> > The version of kvm I used for kvm module is
> > "694401697ccd822bb08019731c3ee1bb34323d8e" and the kvm-userspace is
> > "a57b838b49bc4e4e7439b18d0323385d53e41c7f".
> >
>
> These are very recent versions, but the nature of the problem leads me
> to expect you are using the host's kvm modules.  Can you verify?

Yes, I found that also and doing the verification now.

Thanks,
Neo

>
>
> --
> Any sufficiently difficult bug is indistinguishable from a feature.
>
>



-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] emulation failed but !mmio_needed? rip 10000 fc 0f 01 15

2007-11-23 Thread Neo Jia
hi,

I happened to get a "emulation fail" when running the following command:

System environment: Intel Core 2 Duo (E6600) x86_64 Fedora 8 (2.6.23.1-49.fc8).

qemu-img create -f qcow debian-testing.img 10G

sudo qemu-system-x86_64 -cdrom
/home/cjia/download/debian-testing-i386-netinst.iso -hda
debian-testing.img -boot d -m 1024

Everything works fine until it prompts me that the installation is
complete and need reboot.

> sudo qemu-system-x86_64 -cdrom 
> /home/cjia/download/debian-testing-i386-netinst.iso -hda debian-testing.img 
> -boot d -m 1024
exception 13 (0)
rax 0100 rbx 0100 rcx  rdx
0600
rsi  rdi  rsp  rbp

r8   r9   r10  r11

r12  r13  r14  r15

rip 0001 rflags 00033003
cs f000 (000f/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ds  (/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
es  (/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
ss  (/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
fs  (/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
gs  (/ p 1 dpl 3 db 0 s 1 type 3 l 0 g 0 avl 0)
tr 0080 (40c0/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 0/
idt 0/
cr0 6010 cr2 0 cr3 0 cr4 0 cr8 0 efer 0
code: 00 00 00 00 ea 5b e0 00 f0 31 30 2f 32 38 2f 30 37 00 fc f5 -->
fc 0f 01 15 92 a0 31 00 b8 18 00 00 00 8e d8 8e c0 8e e0 8e e8 31 c0
bf 00 30 39 00 b9 7c
Aborted

---> dmesg:

kvm: emulating exchange as write
emulation failed but !mmio_needed? rip 1 fc 0f 01 15// I
searched through the source code but not find a place to generate "but
!mmio_needed?" string ...

The version of kvm I used for kvm module is
"694401697ccd822bb08019731c3ee1bb34323d8e" and the kvm-userspace is
"a57b838b49bc4e4e7439b18d0323385d53e41c7f".
// Not sure if this is the right way to show the version I am using.
If not, please correct me, this is the first time I am using git...

Anyway, I really want to get some comments about how to trace this
problem and would be very glad to dig into it!

Thanks,
Neo

-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] Change arch_clean target of config-x86-common.mak file to remove .*.d and *.o files in x86/lib directory.

2007-11-22 Thread Neo Jia
>From 3671928c13f974a9e1f551a9829b49511499d1a5 Mon Sep 17 00:00:00 2001
From: Neo Jia <[EMAIL PROTECTED]>
Date: Thu, 22 Nov 2007 23:03:17 -0800
Subject: [PATCH] Change arch_clean target of config-x86-common.mak file to
 remove .*.d and *.o files in x86/lib directory.
 Signed-off-by: Neo Jia <[EMAIL PROTECTED]>

---
 user/config-x86-common.mak |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/user/config-x86-common.mak b/user/config-x86-common.mak
index 6d5c795..94058e4 100644
--- a/user/config-x86-common.mak
+++ b/user/config-x86-common.mak
@@ -38,4 +38,4 @@ $(TEST_DIR)/libcflat.a: $(TEST_DIR)/lib/exit.o

 arch_clean:
$(RM) $(TEST_DIR)/bootstrap $(TEST_DIR)/*.o $(TEST_DIR)/*.flat \
-   $(TEST_DIR)/.*.d
+   $(TEST_DIR)/.*.d $(TEST_DIR)/lib/.*.d $(TEST_DIR)/lib/*.o
-- 
1.5.3.6

-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!
From 3671928c13f974a9e1f551a9829b49511499d1a5 Mon Sep 17 00:00:00 2001
From: Neo Jia <[EMAIL PROTECTED]>
Date: Thu, 22 Nov 2007 23:03:17 -0800
Subject: [PATCH] Change arch_clean target of config-x86-common.mak file to
 remove .*.d and *.o files in x86/lib directory.
 Signed-off-by: Neo Jia <[EMAIL PROTECTED]>

---
 user/config-x86-common.mak |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/user/config-x86-common.mak b/user/config-x86-common.mak
index 6d5c795..94058e4 100644
--- a/user/config-x86-common.mak
+++ b/user/config-x86-common.mak
@@ -38,4 +38,4 @@ $(TEST_DIR)/libcflat.a: $(TEST_DIR)/lib/exit.o
 
 arch_clean:
 	$(RM) $(TEST_DIR)/bootstrap $(TEST_DIR)/*.o $(TEST_DIR)/*.flat \
-	$(TEST_DIR)/.*.d
+	$(TEST_DIR)/.*.d $(TEST_DIR)/lib/.*.d $(TEST_DIR)/lib/*.o
-- 
1.5.3.6

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] What should I do for kvm development first?

2007-11-18 Thread Neo Jia
Avi Kivity wrote:
> Neo Jia wrote:
>> On Nov 18, 2007 3:04 AM, Avi Kivity <[EMAIL PROTECTED]> wrote:
>>  
>>> Neo Jia wrote:
>>>
>>>> Another question is about the architecture, I found it seems that the
>>>> 32-bit platform is much more stable than 64-bit. Should I switch my
>>>> system to 64-bit for later work?
>>>>
>>>>   
>>> Where do you get this impression?  I do almost all of my development on
>>> 64-bit, and I don't recall an issue that was 64-bit host specific.
>>> 
>>
>> Sorry about that ...
>>
>> because I always saw "host 64-bit" in the bug report although maybe
>> they are not 64-bit host specific problem.
>>   
>
> Yes.  Most testing (and production use) is done on 64-bit hosts, since 
> virtualization is memory-intensive.  Also, you can test more types of 
> guests this way.  Almost all virtualization-capable processors are 
> also 64-bit capable.
So, does that mean I need to install a 64-bit host to make the reproduce 
easier?

Neo
>
> 32-bit hosts are mostly useful for laptop/desktop use.
>


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] What should I do for kvm development first?

2007-11-18 Thread Neo Jia
On Nov 18, 2007 3:04 AM, Avi Kivity <[EMAIL PROTECTED]> wrote:
> Neo Jia wrote:
> > Another question is about the architecture, I found it seems that the
> > 32-bit platform is much more stable than 64-bit. Should I switch my
> > system to 64-bit for later work?
> >
>
> Where do you get this impression?  I do almost all of my development on
> 64-bit, and I don't recall an issue that was 64-bit host specific.

Sorry about that ...

because I always saw "host 64-bit" in the bug report although maybe
they are not 64-bit host specific problem.

Neo


>
> It is true that 32-bit Windows guests are more mature under kvm that
> 64-bit Windows guests.
>
> --
>
> error compiling committee.c: too many arguments to function
>
>



-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] What should I do for kvm development first?

2007-11-18 Thread Neo Jia
On Nov 18, 2007 2:47 AM, Avi Kivity <[EMAIL PROTECTED]> wrote:
> Neo Jia wrote:
> >
> > Thank you for your response! Now, I can build modules from kvm.git
> > instead of build the whole kernel.
> >
> > Any comments for the TODO item or bug  I need to pick up first?
> >
>
> It depends on your knowledge of the x86 architecture and experience in
> virtualization.  If you have little experience, you might try the
> interactivity improvements tasks on the TODO.  If you're looking for a
> difficult task, pick one of the guest failures from the sourceforge bug
> list.
>

Avi,

Thanks for your suggestions! I have some understanding of x86 archs
(tables and system call implementations). For virtualization,  I have
read several papers from vmware.

So, I think probably for me at this moment some simple bugs should be
a good starting point, which can help me understand the code and also
the development/debugging of KVM.

Another question is about the architecture, I found it seems that the
32-bit platform is much more stable than 64-bit. Should I switch my
system to 64-bit for later work?

Thanks,
Neo

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



-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] What should I do for kvm development first?

2007-11-17 Thread Neo Jia
On Nov 17, 2007 7:47 AM, Izik Eidus <[EMAIL PROTECTED]> wrote:
>
> Dan Kenigsberg wrote:
> > On Fri, Nov 16, 2007 at 09:46:03PM -0800, Neo Jia wrote:
> >
> >> I synced with kvm.git and kvm-userspace.git. Do I have to rebuild and
> >> install the entire kernel every time?
> >>
> >>
> >
> > Luckily, not. By default, when you ./configure in kvm-userspace.git, make
> > is told to build the kvm kernel module against the currently-running
> > kernel.
> >
> > The source code of the kernel module comes from the kvm.git tree. What I
> > suggest is to
> > make -C kernel LINUX=path/to/kvm.git sync
> > (when in kvm-userspace.git) in order to copy that source code to
> > kvm-userspace.git.
> >
> >
> >> I really appreciate if you can share me your development/debugging
> >> methods for KVM.
> >>
> >
> > I hope you get more clues from other more experienced folks here. Good
> > luck,
> >
> > Dan.
> >
> development methods:
> 1)reading the kvm code / reading
> 2)intel/amd system programming specs
> 3)ask questions in the list
>
> debugging is very very hard in this area, most of time is just printing
> the values all over kvm
> and biesecting.
>
> sometimes you might want to write a test program, but...

Izik and Dan,

Thank you for your response! Now, I can build modules from kvm.git
instead of build the whole kernel.

Any comments for the TODO item or bug  I need to pick up first?

Thanks,
Neo

>
>



-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] What should I do for kvm development first?

2007-11-16 Thread Neo Jia
hi,

I am trying to contribute some (just starting some bug fix first) for
KVM development.

But, I want know first what those experienced kvm developer do
everyday for the development work.

I synced with kvm.git and kvm-userspace.git. Do I have to rebuild and
install the entire kernel every time?

I really appreciate if you can share me your development/debugging
methods for KVM.

Thanks,
Neo
-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Can I run guest Windows inside Linux and doremotedebugging?

2007-11-16 Thread Neo Jia
On Nov 16, 2007 12:15 AM, Jiang, Yunhong <[EMAIL PROTECTED]> wrote:
> To achieve this, it mean QEMU will transfer serial port data write from
> guest to physical one, and also read data received through real physical
> serial port and transfer received data to guest.
>
> You can use qemu option "serial",  set serial=/dev/ttyS0 to acheive that
> . But I remember that code had some defect before and not sure current
> status.

So, I think if I want to using a expansion 1394 firewire card on my
Linux machine it will goes to the following KVM todo list, right?

"Add a Unix domain socket device. With this, the guest can talk to a
pci device which is connected to a Unix domain socket on the host."

Thanks,
Neo


>
> Thanks
> Yunhong Jiang
>
>
> Dong, Eddie <> wrote:
> > [EMAIL PROTECTED] wrote:
> >> Thanks. But I cannot use that since I am going to debug drivers
> >> running on Windows and qemu does not expose the real hardware to
> guest.
> >>
> >> So, here is another question, is there any plan to make qemu transfer
> the
> >> real hardware to guest?
> >>
> >
> > I guess you are talking about serial port assignment which is another
> story.
> >
> > Pass-through devices support is for PCI device only. For
> > leagcy serial port,
> > you don't need device assignment, I remember Yunhong Jiang
> > ever posted a
> > patch in Xen side to support Windows kernel debug. Basically you can
> > direct vSerial port input/output to physical serial port
> > easily in Qemu, but
> > there are binary data format conversion tricky there if I
> > remember correctly.
> >
> > CC yunhong here.
> > Eddie
>



-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Can I run guest Windows inside Linux and doremotedebugging?

2007-11-15 Thread Neo Jia
On Nov 15, 2007 2:30 AM, Dong, Eddie <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Thanks. But I cannot use that since I am going to debug drivers
> > running on Windows and qemu does not expose the real hardware to
> > guest.
> >
> > So, here is another question, is there any plan to make qemu transfer
> > the real hardware to guest?
> >
>
> I guess you are talking about serial port assignment which is another
> story.

How about the firewire?

Thanks,
Neo

>
> Pass-through devices support is for PCI device only. For leagcy serial
> port,
> you don't need device assignment, I remember Yunhong Jiang ever posted a
>
> patch in Xen side to support Windows kernel debug. Basically you can
> direct vSerial port input/output to physical serial port easily in Qemu,
> but
> there are binary data format conversion tricky there if I remember
> correctly.
>
> CC yunhong here.
> Eddie
>



-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Can I run guest Windows inside Linux and do remotedebugging?

2007-11-15 Thread Neo Jia
Thanks. But I cannot use that since I am going to debug drivers
running on Windows and qemu does not expose the real hardware to
guest.

So, here is another question, is there any plan to make qemu transfer
the real hardware to guest?

Thanks,
Neo

On Nov 14, 2007 11:54 PM, Dor Laor <[EMAIL PROTECTED]> wrote:
>
>  Neo Jia wrote:
>
>
> hi,
>
>  I am wondering if I can running a guest Windows inside Linux host with
>  KVM and doing remote debugging (through firewire) another Windows
>  machine (running natively).
>
>  Thanks,
>  Neo
>  While its not exactly what you asked for, one can debug a windows guest
> using another
>  windows guest. Here are the instructions:
> http://kvm.qumranet.com/kvmwiki/WindowsGuestDebug.
>  Enjoy, Dor
>
>
>
> --
>
>  I would remember that if researchers were not ambitious
>  probably today we haven't the technology we are using!
>
>  -
>  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 >> http://get.splunk.com/
>  ___
>  kvm-devel mailing list
>  kvm-devel@lists.sourceforge.net
>  https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
>



-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
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 >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] Can I run guest Windows inside Linux and do remote debugging?

2007-11-14 Thread Neo Jia
hi,

I am wondering if I can running a guest Windows inside Linux host with
KVM and doing remote debugging (through firewire) another Windows
machine (running natively).

Thanks,
Neo
-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
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 >> http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [Todo] mprove mmu page eviction algorithm (currently FIFO, change to approximate LRU).

2007-09-20 Thread Neo Jia
On 9/19/07, Avi Kivity <[EMAIL PROTECTED]> wrote:
> Neo Jia wrote:
> > Avi,
> >
> > Sorry for sending such a direct email to you!
> >
> >
>
> I really prefer posts to the list where others can help out.
>

Sorry. Just copying this message to list.

> > I am thinking to contribute some to KVM project and am very interested
> > in changing the mmu page eviction algorithm from FIFO to LRU.
> >
> > Do you have any schedule in mind? Can you point me roughly to the code?
> >
>
> The entry point is kvm_mmu_free_some_pages() which takes pages off the
> lru, however no effort is done to make sure the lru is really in lru
> order.

I will start from here.

This is particularly difficult since shadow page tables are
> accessed by the hardware so the code has no chance to change the list
> ordering.
>
> One way to do this is to remove all ptes pointing to a shadow page, so
> that the next access will cause a fault and a chance to hoist it back to
> the top of the lru.  Kind of like the Linux active/inactive lists.
>
>
> Note that others are also looking into this.
>
> --
> error compiling committee.c: too many arguments to function
>
>


-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [Todo] Improve mmu page eviction algorithm (currently FIFO, change to approximate LRU).

2007-09-19 Thread Neo Jia
hi,

I am thinking to contribute some to KVM project and am very interested
in changing the mmu page eviction algorithm from FIFO to LRU.

If you already start working on this item, could let me know you
schedule and what I should do next?

Any comments will be highly appreciated!

Thanks,
Neo

-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


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

2007-04-28 Thread Neo Jia
On 4/29/07, He, Qing <[EMAIL PROTECTED]> 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 at around
> 3%~5%.
> Because every VM uses the same io bitmap, it is shared between
> all VMs rather than a per-VM data structure.
>
> Signed-off-by: Qing He <[EMAIL PROTECTED]>
>
>
> diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
> index 1d2b41b..a91d71f 100644
> --- a/drivers/kvm/vmx.c
> +++ b/drivers/kvm/vmx.c
> @@ -33,6 +33,8 @@ MODULE_LICENSE("GPL");
>  static DEFINE_PER_CPU(struct vmcs *, vmxarea);
>  static DEFINE_PER_CPU(struct vmcs *, current_vmcs);
>
> +static char *vmx_io_bitmap;
> +
>  #ifdef CONFIG_X86_64
>  #define HOST_IS_64 1
>  #else
> @@ -1127,8 +1129,8 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu)
> vmcs_write32(GUEST_PENDING_DBG_EXCEPTIONS, 0);
>
> /* I/O */
> -   vmcs_write64(IO_BITMAP_A, 0);
> -   vmcs_write64(IO_BITMAP_B, 0);
> +   vmcs_write64(IO_BITMAP_A, (unsigned long) __pa(vmx_io_bitmap));
> +   vmcs_write64(IO_BITMAP_B, (unsigned long) __pa(vmx_io_bitmap +
> PAGE_SIZE));
>
> guest_write_tsc(0);
>
> @@ -1148,7 +1150,7 @@ static int vmx_vcpu_setup(struct kvm_vcpu *vcpu)
>CPU_BASED_HLT_EXITING /* 20.6.2
> */
>| CPU_BASED_CR8_LOAD_EXITING/* 20.6.2
> */
>| CPU_BASED_CR8_STORE_EXITING   /* 20.6.2
> */
> -  | CPU_BASED_UNCOND_IO_EXITING   /* 20.6.2
> */
> +  | CPU_BASED_ACTIVATE_IO_BITMAP  /* 20.6.2
> */
>| CPU_BASED_MOV_DR_EXITING
>| CPU_BASED_USE_TSC_OFFSETING   /* 21.3
> */
> );
> @@ -2190,11 +2192,39 @@ static struct kvm_arch_ops vmx_arch_ops = {
>
>  static int __init vmx_init(void)
>  {
> -   return kvm_init_arch(&vmx_arch_ops, THIS_MODULE);
> +   int r;
> +
> +   vmx_io_bitmap = (char *) __get_free_pages(GFP_KERNEL, 1);

Why allocate two continuous pages instead of two separate pages for
IO_BITMAP_A and IO_BITMAP_B?

> +   if (!vmx_io_bitmap) {
> +   printk(KERN_ERR "kvm: vmx_io_bitmap allocation
> failed.\n");
> +   r = -ENOMEM;
> +   goto out;
> +   }
> +
> +   /*
> +* Allow direct access to the PC debug port (it is often used
> for I/O
> +* delays, but the vmexits simply slow things down).
> +*/
> +   memset(vmx_io_bitmap, ~0, 2 * PAGE_SIZE);
> +   clear_bit(0x80, vmx_io_bitmap);
> +
> +   r = kvm_init_arch(&vmx_arch_ops, THIS_MODULE);
> +   if (r) {
> +   goto out1;
> +   }
> +
> +   return 0;
> +
> +out1:
> +   free_pages((unsigned long) vmx_io_bitmap, 1);
> +out:
> +   return r;
>  }
>
>  static void __exit vmx_exit(void)
>  {
> +   if (vmx_io_bitmap)
> +   free_pages((unsigned long) vmx_io_bitmap, 1);

Is there necessary to set vmx_io_bimap to NULL after free_page? And, I
assume that this
one should go to vmx member later.

Thanks,
Neo

> kvm_exit_arch();
>  }
>
>
> -
> 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
>
>
>


-- 
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!

-
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] Interested in KVM development

2007-03-02 Thread Neo Jia

hi,

I am quite interested in KVM project and have read through several papers
from VMware site related to the virtualization (also including some papers
from their reference list). I would like to try some small bugs/enhancement
first.

Any suggestions?

Thanks,
Neo

--
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel