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

2007-11-18 Thread Izik Eidus

On Sat, 2007-11-17 at 23:02 -0800, Neo Jia wrote:
 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?
 
check out:
http://kvm.qumranet.com/kvmwiki/TODO
and:
http://sourceforge.net/tracker/?group_id=180599atid=893831


 
 


-
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] Split kvm_create_vm and kvm_destory_vm to support arch

2007-11-18 Thread Avi Kivity
Zhang, Xiantao wrote:
 KVM Portability: Add two arch hooks to handle kvm_create_vm and
 kvm destroy_vm. Now, just put io_bus init and destory in common.
 1. kvm_arch_create_vm
 2. kvm_arch_destroy_vm
   

This doesn't apply.  Is it against some older codebase?


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


-
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] Move kvm_vcpu_ioctl_translation implementation to arch

2007-11-18 Thread Avi Kivity
Zhang, Xiantao wrote:
 This is the preparation for moving mmu code to arch. Since mmu code in
 arch, translation functionality should be implemented for every arch.
 Xiantao

   

Applied, thanks.

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


-
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] KVM: x86 emulator: Discard CR2 in x86 emulator

2007-11-18 Thread Avi Kivity
Sheng Yang wrote:
 From f8aca5afbc018e71dc37d2e6001bcec376499939 Mon Sep 17 00:00:00 2001
 From: Sheng Yang [EMAIL PROTECTED]
 Date: Fri, 16 Nov 2007 16:29:15 +0800
 Subject: [PATCH] KVM: x86 emulator: Discard CR2 in x86 emulator

 For CR2 is unreliable and unavailable in many condition, this patch
 completely decode memory operand instead of using CR2 in x86 emulator.
   

Applied, thanks.

This is just a rename, right?  That means lods/stos was the last 
instance of using cr2.

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


-
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] [ kvm-Bugs-1833976 ] Network Emulation Model Incompele

2007-11-18 Thread SourceForge.net
Bugs item #1833976, was opened at 2007-11-18 12:48
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=893831aid=1833976group_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: Technologov (technologov)
Assigned to: Nobody/Anonymous (nobody)
Summary: Network Emulation Model Incompele

Initial Comment:
QEMU-related bug:

I just found, that when issuing a command on Linux guest:

# ethtool eth0
Settings for eth0:
No data available

That's what you get. You should get speed, duplex and link settings.

Tried with standard network card (NE2000=RTL8029). Fedora7/8/openSUSE 32-bit 
guests.

The same problem happens with -no-kvm.

Host: Fedora 7/x64, KVM-52.

NOTE: RTL8139 doesn't have this problem.

-Alexey. 18.11.2007.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=893831aid=1833976group_id=180599

-
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] Split kvm_create_vm and kvm_destory_vm to support arch

2007-11-18 Thread Zhang, Xiantao
Avi Kivity wrote:
 Zhang, Xiantao wrote:
 KVM Portability: Add two arch hooks to handle kvm_create_vm and
 kvm destroy_vm. Now, just put io_bus init and destory in common.
 1. kvm_arch_create_vm
 2. kvm_arch_destroy_vm
 
 
 This doesn't apply.  Is it against some older codebase?

Maybe too old. I made it days ago. Now I rebased it. Please check
attached one.:-)

Xiantao 


0001-KVM-Portability-move-Add-two-hooks-to-handle-kvm_cr.patch
Description: 0001-KVM-Portability-move-Add-two-hooks-to-handle-kvm_cr.patch
-
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] [PATCH] check shadow_pte == NULL in FNAME(page_fault); drivers/kvm/paging_tmpl.h

2007-11-18 Thread Avi Kivity
Roel Kluin wrote:
 #--#
 in function FNAME(page_fault), drivers/kvm/paging_tmpl.h, line 450, (linus' 
 git)

 I think a check is in place. I am not sure whether this is how it should be
 done, nor was the patch below tested. So please review.
 --
 The u64 pointer shadow_pte is initialized by the function FNAME(fetch), but
 FNAME(fetch) can return NULL,

   

It cannot; if walker-pte is not present we bail out sooner.  See the 
check immediately before the call to FNAME(fetch).  

The check in FNAME(fetch) is dead code.

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


-
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 Avi Kivity
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.

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


-
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] - drivers/kvm/* - remove ptr comparisons to 0

2007-11-18 Thread Avi Kivity
Joe Perches wrote:
 fix sparse warnings Using plain integer as NULL pointer

   

Applied, thanks.

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


-
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] [RESEND] qemu: simulate edge-triggered interrupt in master PIC for time-drift-fix

2007-11-18 Thread Avi Kivity
Carlo Marcelo Arenas Belon wrote:
 The following patch fixes 1a483ef4040ed380bf69d684783d06a617073256 so that the
 parent PIC pointer is used to send the edge irq0 instead of the PIC pair and
 that is an incompatible pointer type as reported in :

   qemu/hw/i8259.c: In function `pic_read_irq':
   qemu/hw/i8259.c:248:
   warning: passing arg 1 of `pic_set_irq1' from incompatible pointer type
   qemu/hw/i8259.c:249:
   warning: passing arg 1 of `pic_set_irq1' from incompatible pointer type

 the code is equivalent as the compiler packs the PicState2 struct for s in a
 way that makes s and s-pics[0] point to the same address.

   

Applied, thanks.

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


-
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 Avi Kivity
Neo Jia wrote:
 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.

   

I generally compile kvm.git with kvm as modules, and kvm-userspace.git 
with --with-patched-kernel.  If I make a change to kvm, I just recompile 
and reload the modules; no full rebuild is necessary.

Occasionally I merge mainline into kvm.git, which does require a full or 
partial rebuild.


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


-
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] Split kvm_create_vm and kvm_destory_vm to support arch

2007-11-18 Thread Avi Kivity
Zhang, Xiantao wrote:
 Avi Kivity wrote:
   
 Zhang, Xiantao wrote:
 
 KVM Portability: Add two arch hooks to handle kvm_create_vm and
 kvm destroy_vm. Now, just put io_bus init and destory in common.
 1. kvm_arch_create_vm
 2. kvm_arch_destroy_vm

   
 This doesn't apply.  Is it against some older codebase?
 

 Maybe too old. I made it days ago. Now I rebased it. Please check
 attached one.:-)

   
Applied, but

 Signed-off-by: Zhang Xiantao [EMAIL PROTECTED]

Is this the right email address?!



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


-
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] [PATCH] Remove __init attribute for two functions.

2007-11-18 Thread Avi Kivity
Zhang, Xiantao wrote:
 Remove __init attributes for kvm_init_debug and kvm_init_msr_list, since
 their callers are not declared with __init.  It maybe introduce prolems,
 once kvm is built-in while kvm-intel or kvm-amd is built as module.
   

Applied, thanks.  We will want to redo __init and __exit support one day.


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


-
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 Avi Kivity
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.

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

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


-
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 Avi Kivity
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.

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


-
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] KVM portability split : move mmu code to arch

2007-11-18 Thread Avi Kivity
Zhang, Xiantao wrote:
 According to privious decisions, mmu code should be moved to arch.  

 From 43a629932b6babcbf2af75299192c1d77c2393d5 Mon Sep 17 00:00:00 2001
 From: Zhang Xiantao [EMAIL PROTECTED]
 Date: Fri, 16 Nov 2007 13:16:40 +0800
 Subject: [PATCH] KVM: MMU split for portability.
 Since mmu code is very arch-denpendent, move them to archs.
 1. For kvm_vm_ioctl_get_dirty_log, this ioctl should be first transfered
 to arch-specific code, and will 
 call the common code implemtend in kvm_get_dirty_log to perform common
 task. 
 2. For set_memory_region,  I moved the mmu-speicific operations to an
 arch-ops. 
 Signed-off-by: Zhang Xiantao [EMAIL PROTECTED]
 ---
  drivers/kvm/kvm.h  |8 
  drivers/kvm/kvm_main.c |   49 +++
  drivers/kvm/x86.c  |   85
 +---
  3 files changed, 94 insertions(+), 48 deletions(-)

 diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
 index 0414e92..84eec47 100644
 --- a/drivers/kvm/kvm_main.c
 +++ b/drivers/kvm/kvm_main.c
 @@ -362,29 +362,9 @@ int __kvm_set_memory_region(struct kvm *kvm,
   if (mem-slot = kvm-nmemslots)
   kvm-nmemslots = mem-slot + 1;
  
 - if (!kvm-n_requested_mmu_pages) {
 - unsigned int n_pages;
 -
 - if (npages) {
 - n_pages = npages * KVM_PERMILLE_MMU_PAGES /
 1000;
 - kvm_mmu_change_mmu_pages(kvm,
 kvm-n_alloc_mmu_pages +
 -  n_pages);
 - } else {
 - unsigned int nr_mmu_pages;
 -
 - n_pages = old.npages * KVM_PERMILLE_MMU_PAGES /
   

We rely on the values in 'old' here...

 1000;
 - nr_mmu_pages = kvm-n_alloc_mmu_pages - n_pages;
 - nr_mmu_pages = max(nr_mmu_pages,
 - (unsigned int)
 KVM_MIN_ALLOC_MMU_PAGES);
 - kvm_mmu_change_mmu_pages(kvm, nr_mmu_pages);
 - }
 - }
  
   *memslot = new;
  
 - kvm_mmu_slot_remove_write_access(kvm, mem-slot);
 - kvm_flush_remote_tlbs(kvm);
 -
   kvm_free_physmem_slot(old, new);
   return 0;
  
 @@ -404,6 +384,8 @@ int kvm_set_memory_region(struct kvm *kvm,
  
   mutex_lock(kvm-lock);
   r = __kvm_set_memory_region(kvm, mem, user_alloc);
 + if (r == 0)
 + kvm_arch_set_memory_region(kvm, mem, user_alloc);
   

But 'old' does not longer exist here.  You recalculate it from  
kvm-memslots[] but the value is not longer identical to the 'old' value.

Suggest changing this code not to rely on 'old' at all; instead 
recalculate nr_mmu_pages from kvm-memslots[] each time.  That will make 
the code more robust, enabling the movement later.


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


-
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] Split kvm_create_vm and kvm_destory_vm to support arch

2007-11-18 Thread Zhang, Xiantao
Avi Kivity wrote:
 Zhang, Xiantao wrote:
 Avi Kivity wrote:
 
 Zhang, Xiantao wrote:
 
 KVM Portability: Add two arch hooks to handle kvm_create_vm and
 kvm destroy_vm. Now, just put io_bus init and destory in common.
 1. kvm_arch_create_vm
 2. kvm_arch_destroy_vm
 
 
 This doesn't apply.  Is it against some older codebase?
 
 
 Maybe too old. I made it days ago. Now I rebased it. Please check
 attached one.:-) 
 
 
 Applied, but
 
 Signed-off-by: Zhang Xiantao [EMAIL PROTECTED]
 
 Is this the right email address?!

Oh, Sorry. Seems I wrongly used a internal machine mail address. I will
check it carefully next time. 

Signed-off-by: Zhang Xiantao[EMAIL PROTECTED]

-
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] para virtualized kvm virtio drivers and performance comparing to Xen

2007-11-18 Thread Mark Ryden
Hello,

I saw in this mailing list (kvm-devel) that there is a git tree
which uses Rusty Russel virtio API. The intention that this tree will be
integrated inot mainstream in the near future.

(for example,
http://www.mail-archive.com/kvm-devel@lists.sourceforge.net/msg08854.html).

My question is about performance of these virtio para virtualized
drivers (I am talking mainly about network and disk drivers):
How this is in comparison with the paravirtualized drivers of Xen
(the split devices model)?

I am talking about Xen in its paravirtualized mode, where the
guests run unmodified OSes (on ordinary, non virtualized processors).

Is the performance about the same as the Xen paravirtualized drivers ?

In case is it so, can we see kvm a competitor to Xen in server virtualization
(when we deal with a high loads of thousands/ten of thousands of
interrupts per second).?

Regards,
Mark

-
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] [RFT] embedded kvm distribution: endemics

2007-11-18 Thread Gildas
Hello all,

2 months ago, I had a discussion [1] on this Mailing-List with Haydn
Solomon and Wes Felter about KVM and the raging competition on the
hypervisor market.

I am perfectly aware that this is a technical Mailing-List so I'll try
to cut the business crap short, but still I think every company is
presently trying to have their solution be The Hypervisor present on
the hardware by default:

Since the discussion, phoenix has announced that they would make a
BIOS hypervisor, Sun and Oracle announced their own hypervisors
based on Xen and last week Microsoft announced that they will sell
Hyper-V (the new name for their viridian hypervisor) as a stand alone
product for only 28$ [3].

As a sysadmin, I hate not having choice or being forced to use a
broken design just because it's here. I strongly believe in KVM and
think it's the cleanest design available at the moment, and I'm sure
most of the people on this ML also do.

So, I took a moment to build an embedded distribution based on KVM
that I codenamed endemics [4], because I would really like to see
KVM present everywhere. This distribution is build using only
opensource and will always be opensource.

I have a beta3 image of my first release [5] that I consider mature
enough to be publicly announced here, even though this release is 64
bits only.

What I need now is testing on as many platforms as possible, and test
reports so I know what need to be improved or fixed.  Testing
shouldn't take you too long: just download the disk image, copy it to
an usb key and boot your usual kvm box on this key! No installation
required!

I hope you will find this project useful and will find time to help me
improving it by testing!

Best regards,
Gildas
-- 
[1] http://www.mail-archive.com/kvm-devel@lists.sourceforge.net/msg06463.html
[2] 
http://investor.phoenix.com/en/about+phoenix/investors/news+releases/ReleaseDetail.cfm?ReleaseID=273099Year=2007
[3] http://www.microsoft.com/presspass/press/2007/nov07/11-12HyperVPR.mspx
[4] http://www.endemics.info/
[5] http://www.endemics.info/download

-
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] KVM: x86 emulator: Discard CR2 in x86 emulator

2007-11-18 Thread Sheng Yang
On Sunday 18 November 2007 18:35:22 Avi Kivity wrote:
 Sheng Yang wrote:
  From f8aca5afbc018e71dc37d2e6001bcec376499939 Mon Sep 17 00:00:00 2001
  From: Sheng Yang [EMAIL PROTECTED]
  Date: Fri, 16 Nov 2007 16:29:15 +0800
  Subject: [PATCH] KVM: x86 emulator: Discard CR2 in x86 emulator
 
  For CR2 is unreliable and unavailable in many condition, this patch
  completely decode memory operand instead of using CR2 in x86 emulator.

 Applied, thanks.

 This is just a rename, right?  That means lods/stos was the last
 instance of using cr2.

Yeah, I think so.

-- 
Thanks
Yang, Sheng

-
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] para virtualized kvm virtio drivers and performance comparing to Xen

2007-11-18 Thread Anthony Liguori
Mark Ryden wrote:
 Hello,

 I saw in this mailing list (kvm-devel) that there is a git tree
 which uses Rusty Russel virtio API. The intention that this tree will be
 integrated inot mainstream in the near future.

 (for example,
 http://www.mail-archive.com/kvm-devel@lists.sourceforge.net/msg08854.html).

 My question is about performance of these virtio para virtualized
 drivers (I am talking mainly about network and disk drivers):
 How this is in comparison with the paravirtualized drivers of Xen
 (the split devices model)?
   

Optimization is still ongoing.  I'm pretty confident that the linux-aio 
based disk driver is at least as good.  The RX side of the network 
driver is also pretty decent (I can get 1.5 gbit/sec).  I think over 
time we'll be able to get a fair bit more without even going to 
kernel-space.  Once we have a kernel space backend, I think we'll get 
performance that's at least as good as Xen's drivers.

Regards,

Anthony Liguori

 I am talking about Xen in its paravirtualized mode, where the
 guests run unmodified OSes (on ordinary, non virtualized processors).

 Is the performance about the same as the Xen paravirtualized drivers ?

 In case is it so, can we see kvm a competitor to Xen in server virtualization
 (when we deal with a high loads of thousands/ten of thousands of
 interrupts per second).?

 Regards,
 Mark

 -
 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

   


-
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] KVM: SVM: Disable Lazy FPU optimization because of regressions

2007-11-18 Thread Avi Kivity
Amit Shah wrote:
 From 76204eda7e03035c16702105e78724137ecad24b Mon Sep 17 00:00:00 2001
 From: Amit Shah [EMAIL PROTECTED]
 Date: Sun, 18 Nov 2007 22:42:47 +0530
 Subject: [PATCH] KVM: SVM: Disable Lazy FPU optimization because of 
 regressions

 Host FPU state is leaked into the guest FPU state. This happens
 because of the lazy FPU optimization, so just reload the FPU
 each time there's a VM exit/entry.

 The real fix should follow soon.

   
Applied, thanks, and:

 diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
 index ea2cb83..d7c9b92 100644
 --- a/drivers/kvm/svm.c
 +++ b/drivers/kvm/svm.c
 @@ -1600,11 +1600,11 @@ static void svm_set_cr3(struct kvm_vcpu *vcpu, 
 unsigned long root)
   svm-vmcb-save.cr3 = root;
   force_new_asid(vcpu);
  
 - if (vcpu-fpu_active) {
 - svm-vmcb-control.intercept_exceptions |= (1  NM_VECTOR);
 - svm-vmcb-save.cr0 |= X86_CR0_TS;
 - vcpu-fpu_active = 0;
 - }
 +/*   if (vcpu-fpu_active) { */
 +/*   svm-vmcb-control.intercept_exceptions |= (1  NM_VECTOR); */
 +/*   svm-vmcb-save.cr0 |= X86_CR0_TS; */
 +/*   vcpu-fpu_active = 0; */
 +/*   } */
  }
  
  static void svm_inject_page_fault(struct kvm_vcpu *vcpu,
   

Changed those into a #if 0.  Those comments were unsightly.

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


-
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] KVM: SVM: Disable Lazy FPU optimization because of regressions

2007-11-18 Thread Amit Shah
On Sunday 18 November 2007 22:58:56 Avi Kivity wrote:
 Amit Shah wrote:

  diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
  index ea2cb83..d7c9b92 100644
  --- a/drivers/kvm/svm.c
  +++ b/drivers/kvm/svm.c
  @@ -1600,11 +1600,11 @@ static void svm_set_cr3(struct kvm_vcpu *vcpu,
  unsigned long root)
  svm-vmcb-save.cr3 = root;
  force_new_asid(vcpu);
 
  -   if (vcpu-fpu_active) {
  -   svm-vmcb-control.intercept_exceptions |= (1  NM_VECTOR);
  -   svm-vmcb-save.cr0 |= X86_CR0_TS;
  -   vcpu-fpu_active = 0;
  -   }
  +/* if (vcpu-fpu_active) { */
  +/* svm-vmcb-control.intercept_exceptions |= (1  
  NM_VECTOR); */
  +/* svm-vmcb-save.cr0 |= X86_CR0_TS; */
  +/* vcpu-fpu_active = 0; */
  +/* } */
   }
 
   static void svm_inject_page_fault(struct kvm_vcpu *vcpu,

 Changed those into a #if 0.  Those comments were unsightly.

Oh, I really just let emacs do it for me..

-
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] KVM: Use write_emulated and not write_std, which is not implemented

2007-11-18 Thread Avi Kivity
Amit Shah wrote:
 From 554315592b05eabf0355ac63145c28e11358af1f Mon Sep 17 00:00:00 2001
 From: Amit Shah [EMAIL PROTECTED]
 Date: Sun, 18 Nov 2007 00:03:27 +0530
 Subject: [PATCH] KVM: Use write_emulated and not write_std, which is not 
 implemented

 ... and calling write_emulated should work just as well
 in place of write_std.
   

Applied, thanks.

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


-
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] KVM: SVM: Disable Lazy FPU optimization because of regressions

2007-11-18 Thread Amit Shah
From 76204eda7e03035c16702105e78724137ecad24b Mon Sep 17 00:00:00 2001
From: Amit Shah [EMAIL PROTECTED]
Date: Sun, 18 Nov 2007 22:42:47 +0530
Subject: [PATCH] KVM: SVM: Disable Lazy FPU optimization because of 
regressions

Host FPU state is leaked into the guest FPU state. This happens
because of the lazy FPU optimization, so just reload the FPU
each time there's a VM exit/entry.

The real fix should follow soon.

This is observed in cases where fonts in a guest aren't rendered
correctly (bug 1807560).

The test program, courtesy Avi is:

double test_fpu_once()
{
int i;
double f = 0;

for (i = 0; i  1000; ++i)
f += 1 / (1.0 + i);
return f;
}

void test_fpu()
{
double a, b;
int runs;

runs = 0;
a = test_fpu_once();
while (1) {
b = test_fpu_once();
if (fabs(a - b)  1e-9)
printf(error: %20.16f - %20.16f\n, a, b);
a = b;
if (++runs % 100 == 0)
printf(runs: %8d\n, runs);
}
}

int main(int ac, char **av)
{
test_fpu();
return 0;
}

Run this on the host and the guest, both pinned to the same
host CPU.

Signed-off-by: Amit Shah [EMAIL PROTECTED]
---
 drivers/kvm/svm.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index ea2cb83..d7c9b92 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -1600,11 +1600,11 @@ static void svm_set_cr3(struct kvm_vcpu *vcpu, 
unsigned long root)
svm-vmcb-save.cr3 = root;
force_new_asid(vcpu);
 
-   if (vcpu-fpu_active) {
-   svm-vmcb-control.intercept_exceptions |= (1  NM_VECTOR);
-   svm-vmcb-save.cr0 |= X86_CR0_TS;
-   vcpu-fpu_active = 0;
-   }
+/* if (vcpu-fpu_active) { */
+/* svm-vmcb-control.intercept_exceptions |= (1  NM_VECTOR); */
+/* svm-vmcb-save.cr0 |= X86_CR0_TS; */
+/* vcpu-fpu_active = 0; */
+/* } */
 }
 
 static void svm_inject_page_fault(struct kvm_vcpu *vcpu,
-- 
1.4.4.2


-
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] KVM: Use write_emulated and not write_std, which is not implemented

2007-11-18 Thread Amit Shah
From 554315592b05eabf0355ac63145c28e11358af1f Mon Sep 17 00:00:00 2001
From: Amit Shah [EMAIL PROTECTED]
Date: Sun, 18 Nov 2007 00:03:27 +0530
Subject: [PATCH] KVM: Use write_emulated and not write_std, which is not 
implemented

... and calling write_emulated should work just as well
in place of write_std.

Signed-off-by: Amit Shah [EMAIL PROTECTED]
---
 drivers/kvm/x86_emulate.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 2765559..c2c9c8a 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1076,9 +1076,10 @@ static inline int emulate_grp45(struct x86_emulate_ctxt 
*ctxt,
}
register_address_increment(c-regs[VCPU_REGS_RSP],
   -c-dst.bytes);
-   rc = ops-write_std(register_address(ctxt-ss_base,
-   c-regs[VCPU_REGS_RSP]), c-dst.val,
-   c-dst.bytes, ctxt-vcpu);
+   rc = ops-write_emulated(register_address(ctxt-ss_base,
+ c-regs[VCPU_REGS_RSP]),
+c-dst.val,
+c-dst.bytes, ctxt-vcpu);
if (rc != 0)
return rc;
c-dst.type = OP_NONE;
-- 
1.4.4.2


-
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] KVM: Make unloading of FPU state when putting vcpu arch-independent

2007-11-18 Thread Amit Shah
Instead of having each architecture do it individually, we
do this in the arch-independent code (just x86 as of now).
Turns out SVM did not do this at all.

Signed-off-by: Amit Shah [EMAIL PROTECTED]
---
 drivers/kvm/vmx.c |1 -
 drivers/kvm/x86.c |1 +
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c
index da3a339..16e3935 100644
--- a/drivers/kvm/vmx.c
+++ b/drivers/kvm/vmx.c
@@ -531,7 +531,6 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
 static void vmx_vcpu_put(struct kvm_vcpu *vcpu)
 {
vmx_load_host_state(to_vmx(vcpu));
-   kvm_put_guest_fpu(vcpu);
 }
 
 static void vmx_fpu_activate(struct kvm_vcpu *vcpu)
diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c
index e905d46..f48138b 100644
--- a/drivers/kvm/x86.c
+++ b/drivers/kvm/x86.c
@@ -609,6 +609,7 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
 void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
 {
kvm_x86_ops-vcpu_put(vcpu);
+   kvm_put_guest_fpu(vcpu);
 }
 
 static void cpuid_fix_nx_cap(struct kvm_vcpu *vcpu)
-- 
1.5.3


-
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] KVM: Make unloading of FPU state when putting vcpu arch-independent

2007-11-18 Thread Avi Kivity
Amit Shah wrote:
 Instead of having each architecture do it individually, we
 do this in the arch-independent code (just x86 as of now).
 Turns out SVM did not do this at all.

   

Applied, thanks.

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


-
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] KVM: SVM: Disable Lazy FPU optimization because of regressions

2007-11-18 Thread Mike Lampard
On Mon, 19 Nov 2007 03:44:51 am Amit Shah wrote:
 From 76204eda7e03035c16702105e78724137ecad24b Mon Sep 17 00:00:00 2001

 From: Amit Shah [EMAIL PROTECTED]
 Date: Sun, 18 Nov 2007 22:42:47 +0530
 Subject: [PATCH] KVM: SVM: Disable Lazy FPU optimization because of
 regressions

 Host FPU state is leaked into the guest FPU state. This happens
 because of the lazy FPU optimization, so just reload the FPU
 each time there's a VM exit/entry.

 The real fix should follow soon.

 This is observed in cases where fonts in a guest aren't rendered
 correctly (bug 1807560).

 The test program, courtesy Avi is:

 double test_fpu_once()
 {
 int i;
 double f = 0;

 for (i = 0; i  1000; ++i)
 f += 1 / (1.0 + i);
 return f;
 }

 void test_fpu()
 {
 double a, b;
 int runs;

 runs = 0;
 a = test_fpu_once();
 while (1) {
 b = test_fpu_once();
 if (fabs(a - b)  1e-9)
 printf(error: %20.16f - %20.16f\n, a, b);
 a = b;
 if (++runs % 100 == 0)
 printf(runs: %8d\n, runs);
 }
 }

 int main(int ac, char **av)
 {
 test_fpu();
 return 0;
 }

 Run this on the host and the guest, both pinned to the same
 host CPU.

 Signed-off-by: Amit Shah [EMAIL PROTECTED]
 ---
  drivers/kvm/svm.c |   10 +-
  1 files changed, 5 insertions(+), 5 deletions(-)

 diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
 index ea2cb83..d7c9b92 100644
 --- a/drivers/kvm/svm.c
 +++ b/drivers/kvm/svm.c
 @@ -1600,11 +1600,11 @@ static void svm_set_cr3(struct kvm_vcpu *vcpu,
 unsigned long root)
   svm-vmcb-save.cr3 = root;
   force_new_asid(vcpu);

 - if (vcpu-fpu_active) {
 - svm-vmcb-control.intercept_exceptions |= (1  NM_VECTOR);
 - svm-vmcb-save.cr0 |= X86_CR0_TS;
 - vcpu-fpu_active = 0;
 - }
 +/*   if (vcpu-fpu_active) { */
 +/*   svm-vmcb-control.intercept_exceptions |= (1  NM_VECTOR); */
 +/*   svm-vmcb-save.cr0 |= X86_CR0_TS; */
 +/*   vcpu-fpu_active = 0; */
 +/*   } */
  }

  static void svm_inject_page_fault(struct kvm_vcpu *vcpu,

This patch didnt resolve the font issues for me, however the other patch 
(unload FPU state) did fix it.  I didnt run the test app (no compiler on the 
(32bit ubuntu) guest atm) but reverting this patch on my tree didnt appear to 
adversely affect anything.  Are both patches necessary?

Mike

-
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] KVM: SVM: Disable Lazy FPU optimization because of regressions

2007-11-18 Thread Amit Shah
On Sunday 18 November 2007 23:49:38 Mike Lampard wrote:
 This patch didnt resolve the font issues for me, however the other patch
 (unload FPU state) did fix it.  I didnt run the test app (no compiler on
 the (32bit ubuntu) guest atm) but reverting this patch on my tree didnt
 appear to adversely affect anything.  Are both patches necessary?

OK, thanks for confirming, even though a different patch fixed it :-)

Yes, both patches will be necessary as they fix two different things, but both 
cause FPU leaks.

With this patch, though, the guest will run slower as we disable an 
optimization (because it causes a regression).

-
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


[kvm-devel] FW: [PATCH] KVM portability split : move mmu code to arch

2007-11-18 Thread Zhang, Xiantao
Avi Kivity wrote:
 Zhang, Xiantao wrote:
 According to privious decisions, mmu code should be moved to arch.
 
 From 43a629932b6babcbf2af75299192c1d77c2393d5 Mon Sep 17 00:00:00
 2001 
 From: Zhang Xiantao [EMAIL PROTECTED]

 +kvm_arch_set_memory_region(kvm, mem, user_alloc);
 
 
 But 'old' does not longer exist here.  You recalculate it from
 kvm-memslots[] but the value is not longer identical to the 'old'
 value. 
 
 Suggest changing this code not to rely on 'old' at all; instead
 recalculate nr_mmu_pages from kvm-memslots[] each time.  That will
 make the code more robust, enabling the movement later.

Good suggestion! I will introduce a function to handle it.

Xiantao

-
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] 0/3 MMU code split

2007-11-18 Thread Zhang, Xiantao
Hi Avi,
Considering your comments,I refined the patch, and use kvm-memslots to
caculate the nr_mmu_pagas every time.   
Patch [1/3] Move kvm_vcpu_iotcl_get_dirty_log implementation into arch,
and still keep the interface in common.
Patch [2/3] Move kvm_mmu init and exit functionality to arch. 
Patch [3/3] Add the hook kvm_arch_set_memory_region.  In this patch,
introduce a function kvm_caculate_mmu_pages to compute mmu pages in
total, once memory region changes.

Xiantao

-
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] Add the hook kvm_arch_set_memory region to hold mmu-specific changes

2007-11-18 Thread Zhang, Xiantao
Patch [3/3] Add the hook kvm_arch_set_memory_region.  In this patch,
introduce a function kvm_caculate_mmu_pages to compute mmu pages in
total, once memory region changes.

Xiantao


0003-KVM-Portability-Split-kvm_set_memory_region.patch
Description: 0003-KVM-Portability-Split-kvm_set_memory_region.patch
-
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][2/3] Move kvm_mmu init and exit functionality to arch.

2007-11-18 Thread Zhang, Xiantao
Move kvm_mmu init and exit functionality to arch. 

Xiantao 


0002-KVM-Portability-MMU-split.patch
Description: 0002-KVM-Portability-MMU-split.patch
-
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 Avi Kivity
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?
   

A 32-bit host is fine, if you don't run 64-bit guests.

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


-
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