From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dor Laor Subject: Re: question on #UD emulation Date: Sun, 16 Dec 2007 14:49:31 +0200 Message-ID: <47651EDB.2010601@qumranet.com> References: <10EA09EFD8728347A513008B6B0DA77A02858E27@pdsmsx411.ccr.corp.intel.com><47650CD8.5060401@qumranet.com> <20071216123318.GB31298@amd.com> Reply-To: dor.laor-atKUWr5tajBWk0Htik3J/w@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1967211216==" Cc: kvm-devel , Avi Kivity To: Joerg Roedel Return-path: In-Reply-To: <20071216123318.GB31298-5C7GfCeVMHo@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. --===============1967211216== Content-Type: multipart/alternative; boundary="------------060308070304090504030604" This is a multi-part message in MIME format. --------------060308070304090504030604 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Joerg Roedel wrote: > > On Sun, Dec 16, 2007 at 01:32:40PM +0200, Avi Kivity wrote: > > Dong, Eddie wrote: > > > > > BTW, do we need to support live migrating an AMD VM to Intel > platform or > > > vice versa > > > > Yes, it allows users to buy the machines with the best cost/performance > > ratio, rather than continue to buy machines from the same vendor all the > > time. > > I don't agree with this. A user can still buy machines from both vendors > and migrate offline it he wants to. In general I think that allowing > live migration between Intel and AMD hosts is not a good idea because > you limit the guest to the subset of the CPU features available on both > platforms. This disallows many optimizations and costs performance for > the guest. > Having the option to live migrate between various hosts is a powerful feature. Of course it costs some performance penalty but it might not be relevant for the user work load. By having cmd line parameters to control the cpuid and cpu type one can dynamically calculate the lowest common denominator and to run his virtual machines using it. One can always pass -cpu=host to have maximum performance. For users who like to live migrate between Amd-Intel we'll use one of cpu types for both. Regards, Dor > > Take the problem Dor mentioned this week about the performance impact of > the gettimeofday() syscall causing many cpuid guest exits. If we had > not to support migration between AMD and Intel we could simply propagate > FEATURE_RDTSCP to an guest on AMD an SYNC_RDTSC on Intel platforms. The > Linux get_cycles_sync() function would then no longer execute CPUID. > This is only one example, I found some more during my work on KVM. > > Joerg > > -- > | AMD Saxony Limited Liability Company & Co. KG > Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany > System | Register Court Dresden: HRA 4896 > Research | General Partner authorized to represent: > Center | AMD Saxony LLC (Wilmington, Delaware, US) > | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, > Thomas McCoy > > > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services > for just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > kvm-devel mailing list > kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/kvm-devel > --------------060308070304090504030604 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Joerg Roedel wrote:
Re: [kvm-devel] question on #UD emulation

On Sun, Dec 16, 2007 at 01:32:40PM +0200, Avi Kivity wrote:
> Dong, Eddie wrote:
>
> > BTW, do we need to support live migrating an AMD VM to Intel platform or
> > vice versa
>
> Yes, it allows users to buy the machines with the best cost/performance
> ratio, rather than continue to buy machines from the same vendor all the
> time.

I don't agree with this. A user can still buy machines from both vendors
and migrate offline it he wants to. In general I think that allowing
live migration between Intel and AMD hosts is not a good idea because
you limit the guest to the subset of the CPU features available on both
platforms. This disallows many optimizations and costs performance for
the guest.

Having the option to live migrate between various hosts is a powerful feature.
Of course it costs some performance penalty but it might not be relevant for the user
work load.
By having cmd line parameters to control the cpuid and cpu type one can dynamically calculate
the lowest common denominator and to run his virtual machines using it.
One can always pass -cpu=host to have maximum performance.
For users who like to live migrate between Amd-Intel we'll use one of cpu types
for both.
Regards,
Dor

Take the problem Dor mentioned this week about the performance impact of
the gettimeofday() syscall causing many cpuid guest exits. If we had
not to support migration between AMD and Intel we could simply propagate
FEATURE_RDTSCP to an guest on AMD an SYNC_RDTSC on Intel platforms. The
Linux get_cycles_sync() function would then no longer execute CPUID.
This is only one example, I found some more during my work on KVM.

Joerg

--
           |           AMD Saxony Limited Liability Company & Co. KG
 Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System    |                  Register Court Dresden: HRA 4896
 Research  |              General Partner authorized to represent:
 Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
           | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy



-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel


--------------060308070304090504030604-- --===============1967211216== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace --===============1967211216== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --===============1967211216==--