All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bandan Das <bsd@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>,
	kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [PATCH 1/2] kvm: make vendor_intel a generic function
Date: Tue, 04 Jun 2013 12:10:19 -0400	[thread overview]
Message-ID: <jpg38sxj1qs.fsf@redhat.com> (raw)
In-Reply-To: <51A6F260.4060409@redhat.com> (Paolo Bonzini's message of "Thu, 30 May 2013 08:32:00 +0200")

Paolo Bonzini <pbonzini@redhat.com> writes:

> 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. :)

OK, I posted a v2. I changed vendor_intel() to just do the checking and the call
to cpuid happens outside the function now through whatever method is appropriate.
As a cleanup work, I think there should be a corresponding vendor_amd() too for 
the AMD related checks that happen in emulate.c. I will send a separate 
change for it.

Bandan
> Paolo

  reply	other threads:[~2013-06-04 16:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 21:40 [PATCH 0/2] kvm: x86: Emulate MSR_PLATFORM_INFO Bandan Das
2013-05-29 21:40 ` [PATCH 1/2] kvm: make vendor_intel a generic function Bandan Das
2013-05-30  5:39   ` Paolo Bonzini
2013-05-30  6:07     ` Gleb Natapov
2013-05-30  6:32       ` Paolo Bonzini
2013-06-04 16:10         ` Bandan Das [this message]
2013-05-29 21:40 ` [PATCH 2/2] kvm: x86: emulate MSR_PLATFORM_INFO Bandan Das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jpg38sxj1qs.fsf@redhat.com \
    --to=bsd@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.