From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 1/2] kvm: make vendor_intel a generic function Date: Thu, 30 May 2013 08:32:00 +0200 Message-ID: <51A6F260.4060409@redhat.com> References: <1369863613-14781-1-git-send-email-bsd@redhat.com> <1369863613-14781-2-git-send-email-bsd@redhat.com> <51A6E5F5.8010605@redhat.com> <20130530060738.GA28405@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, Marcelo Tosatti To: Gleb Natapov , Bandan Das Return-path: Received: from mail-ea0-f179.google.com ([209.85.215.179]:56010 "EHLO mail-ea0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967614Ab3E3GcN (ORCPT ); Thu, 30 May 2013 02:32:13 -0400 Received: by mail-ea0-f179.google.com with SMTP id z16so6091452ead.38 for ; Wed, 29 May 2013 23:32:12 -0700 (PDT) In-Reply-To: <20130530060738.GA28405@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 30/05/2013 08:07, Gleb Natapov ha scritto: >> > Unfortunately, this is not acceptable. The emulator is not supposed to >> > know about the vcpu. Everything has to go through the context; in >> > principle, the emulator should be usable outside of KVM. >> > >> > I would just duplicate the code in kvm_guest_vcpu_model (perhaps you can >> > rename it to kvm_cpuid_get_intel_model or something like that; having >> > both "guest" and "vcpu" in the name is a pleonasm :)). > > I thought having inline function that gets &eax, &ebx, &ecx, &edx as a > parameter and returns a vendor. That could work too. Bandan, whatever looks nicer to you. :) Paolo