All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: Bandan Das <bsd@redhat.com>,
	kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>,
	"Nakajima, Jun" <jun.nakajima@intel.com>
Subject: Re: [PATCH v2 0/2] kvm: x86: Emulate MSR_PLATFORM_INFO
Date: Thu, 20 Jun 2013 10:34:39 +0200	[thread overview]
Message-ID: <51C2BE9F.4030605@redhat.com> (raw)
In-Reply-To: <20130620073151.GU5832@redhat.com>

Il 20/06/2013 09:31, Gleb Natapov ha scritto:
>> I agree with you on the potential problems but I think we are completely
>> ignoring the "non-migration" use case. These users will probably benefit 
>> from a correct value of (virtual) msr_platform_info. And it appears, the 
>> easiest way to give both options to the user is using a new module_param, 
>> say ignore_platform_info.
>>
> Migration is important part of virtualization. PMU emulation currently
> is in demo status because migration is not implemented yet, but at least
> it is possible to implement it.

But there's a lot more to do for migration than just moving the MSR
contents from one machine to another.  We need to support customizing
the values of CPUID leaf 0ah, so that PMU migration can work if you
specify "lowest common denominator" CPU models.

I haven't looked at it yet because QEMU support for this is not in sight.

>> Scenarios :
>> 1. ignore_platform_info = 0 (Default). Inject #GP if application tries to
>> read this MSR.
>> 2. ignore_platform_info = 1. User wants to read the calculated value, her
>> environment doesn't require migration.
>> 3. ignore_msrs = 1. If this is set, we always return 0 and application will
>> hopefully resort to a workaround.
>>
> Module flag is global for all VMs on a host. Implementing it like this
> will guaranty that the feature will not be used in production ever.
> ignore_msrs exists only for developers to quickly check if a problem goes
> away if some MSR does not #GP, never as a real solution.
> 
> To make it somewhat useful the flag should be per-vm and exposed to all
> layers up to a management. Management is the one who enables it per VM
> basis and guaranties that VM with the feature enabled is never live
> migrated. Frankly IMO it will be another management knob that will never
> be set.

I agree.

I think it's fine to apply Bandan's patches.  It's just one more thing
to care about when migrating machines that use the PMU.  And I hope that
Intel will add TSC scaling sooner or later, which will fix the issue
automatically.  Hear, Jun! :)

Paolo

  reply	other threads:[~2013-06-20  8:34 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04 16:02 [PATCH v2 0/2] kvm: x86: Emulate MSR_PLATFORM_INFO Bandan Das
2013-06-04 16:02 ` [PATCH v2 1/2] kvm: make vendor_intel a generic function Bandan Das
2013-06-04 23:33   ` Paolo Bonzini
2013-06-04 16:02 ` [PATCH v2 2/2] kvm: x86: emulate MSR_PLATFORM_INFO Bandan Das
2013-06-18 14:07   ` Paolo Bonzini
2013-06-18 15:11     ` Bandan Das
2013-06-05  8:42 ` [PATCH v2 0/2] kvm: x86: Emulate MSR_PLATFORM_INFO Gleb Natapov
2013-06-18 14:05   ` Paolo Bonzini
2013-06-18 15:16     ` Gleb Natapov
2013-06-18 15:29       ` Bandan Das
2013-06-18 15:40         ` Gleb Natapov
2013-06-19 17:50           ` Bandan Das
2013-06-20  7:31             ` Gleb Natapov
2013-06-20  8:34               ` Paolo Bonzini [this message]
2013-06-20  8:57                 ` Gleb Natapov
2013-06-18 17:59       ` Nakajima, Jun
2013-06-19 10:57         ` Gleb Natapov

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=51C2BE9F.4030605@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bsd@redhat.com \
    --cc=gleb@redhat.com \
    --cc=jun.nakajima@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@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.