From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hollis Blanchard Subject: Re: [PATCH 0 of 3] RFC: creating a particular vcpu type Date: Tue, 05 Feb 2008 11:53:34 -0600 Message-ID: <1202234014.26953.25.camel@basalt> References: <47A89285.40802@us.ibm.com> Reply-To: Hollis Blanchard Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Avi Kivity To: Anthony Liguori Return-path: In-Reply-To: <47A89285.40802-r/Jw6+rmf7HQT0dZR+AlfA@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 If it's the "ioctl" in the function name you object to, that's easily changed. I think it's reasonable to say that single-system-image software requires identical cores, but that's not what we're talking about here. Heterogeneous core designs are not common, but a VM needs to reflect hardware layout, and people do it in hardware (again, not running a single system image). "VCPU type" is a VCPU property, and I think the design should reflect that, and as you can see from the patch it's not at all difficult to do. -- Hollis Blanchard IBM Linux Technology Center On Tue, 2008-02-05 at 10:44 -0600, Anthony Liguori wrote: > Why do this at the VCPU level? Would you ever want a VM with two VCPUs > with different cores? You could just add a per-VM arch ioctl to set the > core type that has to be issued before any VCPU creates. Then you don't > have to do ugly stuff like calling ioctls from modules. > > Regards, > > Anthony Liguori > > Hollis Blanchard wrote: > > These patches allow PowerPC to create vcpus of a particular type. Since we are > > actually emulating the core's supervisor mode, we can choose to emulate any > > type of core. However, since the core chosen will change the size of the vcpu > > structure (among other things), we need to know it at vcpu creation time, > > rather than after the fact (which is how x86's cpuid is handled). > > > > I've included the first example of how PowerPC will be using the new > > capability, and this will be significantly extended in the future. I think you > > get the idea... > > > > I still need to update my tree and patch IA64 to match, but is this approach > > acceptable? > > > > 6 files changed, 99 insertions(+), 11 deletions(-) > > arch/powerpc/kvm/powerpc.c | 80 ++++++++++++++++++++++++++++++++++++++-- > > arch/x86/kvm/x86.c | 4 +- > > include/asm-powerpc/kvm_host.h | 5 ++ > > include/linux/kvm.h | 8 ++++ > > include/linux/kvm_host.h | 4 +- > > virt/kvm/kvm_main.c | 9 ++-- > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ > > kvm-devel mailing list > > kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > > 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/vse0120000070mrt/direct/01/