From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [patch] v4 - fold struct vcpu_info into CPUState Date: Wed, 29 Oct 2008 08:01:01 -0500 Message-ID: <49085E8D.4050305@codemonkey.ws> References: <48E0F318.7050303@sgi.com> <5d6222a80810131524s7ec55bfyb296085c6c2ac4af@mail.gmail.com> <48F8AF00.1050304@sgi.com> <5d6222a80810171427m252a1cf9he711ab247ae84530@mail.gmail.com> <4901F083.3070006@sgi.com> <1224875457.9634.63.camel@localhost.localdomain> <49058E60.6080507@sgi.com> <1225123341.5543.6.camel@localhost.localdomain> <49073D0C.6030706@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Hollis Blanchard , Glauber Costa , kvm@vger.kernel.org, kvm-ia64@vger.kernel.org To: Jes Sorensen Return-path: Received: from ag-out-0708.google.com ([72.14.246.248]:26835 "EHLO ag-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753510AbYJ2NBH (ORCPT ); Wed, 29 Oct 2008 09:01:07 -0400 Received: by ag-out-0708.google.com with SMTP id 31so2129173agc.10 for ; Wed, 29 Oct 2008 06:01:06 -0700 (PDT) In-Reply-To: <49073D0C.6030706@sgi.com> Sender: kvm-owner@vger.kernel.org List-ID: Jes Sorensen wrote: > Hi, > > Here's an updated version of the patch. It should fix the problems > Hollis ran into, and also compile on x86_64 again :-) > > I managed to get rid of all the runtime use of qemu_kvm_cpu_env(), > except for the hotplug code. But I think it's reasonable to do the > walk of the linked list in that case. However, the more I have looked > at this, the more obvious to me it becomes that it is right to > expose struct CPUState to libkvm, and avoid passing around int vcpu. > > Comments and test reports very welcome! FWIW, vcpu_info seems to have nothing to do with KVM. It's entirely build around the IO thread. The IO thread really isn't KVM specific. I would just stick these fields in CPU_COMMON unconditionally if you're going to move them at all. Regards, Anthony Liguori > Cheers, > Jes >