qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Denemark <jdenemar@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "thomas.lendacky@amd.com" <thomas.lendacky@amd.com>,
	"Kang, Luwei" <luwei.kang@intel.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	"libvir-list@redhat.com" <libvir-list@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Robert Hoo <robert.hu@linux.intel.com>,
	"Huang, Kai" <kai.huang@intel.com>,
	"Hu, Robert" <robert.hu@intel.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [libvirt] [RFC] cpu_map: Remove pconfig from Icelake-Server CPU model
Date: Thu, 3 Oct 2019 16:28:35 +0200	[thread overview]
Message-ID: <20191003142835.GA4204@orkuz.int.mamuti.net> (raw)
In-Reply-To: <4d94d1d1-746b-dbe4-f705-b33e347f9138@redhat.com>

On Tue, Oct 01, 2019 at 11:20:42 +0200, Paolo Bonzini wrote:
> On 30/09/19 18:16, Jiri Denemark wrote:
> > On Mon, Sep 30, 2019 at 17:16:27 +0200, Paolo Bonzini wrote:
> >> On 30/09/19 16:31, Hu, Robert wrote:
> >>>> This might be a problem if there are plans to eventually make KVM support
> >>>> pconfig, though.  Paolo, Robert, are there plans to support pconfig in KVM in the
> >>>> future?
> >>> [Robert Hoo] 
> >>> Thanks Eduardo for efforts in resolving this issue, introduced from my Icelake CPU
> >>> model patch.
> >>> I've no idea about PCONFIG's detail and plan. Let me sync with Huang, Kai and answer
> >>> you soon.
> >>
> >> It's really, really unlikely.  It's possible that some future processor
> >> overloads PCONFIG in such a way that it will become virtualizable, but
> >> not IceLake.
> > 
> > I guess, the likelihood of this happening would be similar to
> > reintroducing other features, such as osxsave or ospke, right?
> 
> No, haveing osxsave and ospke was a mistake in the first place (they are
> not CPU features at all; they are more like a special way to let
> unprivileged programs read some bits of CR4).  For pconfig, it's just
> very unlikely.
> 
> >> Would it make sense for libvirt to treat absent CPU flags as "default
> >> off" during migration, so that it can leave out the flag in the command
> >> line if it's off?  If it's on, libvirt would pass pconfig=on as usual.
> >> This is a variant of [2], but more generally applicable:
> >>
> >>> [2] However starting a domain with Icelake-Server so that it can be
> >>> migrated or saved/restored on QEMU in 3.1.1 and 4.0.0 would be
> >>> impossible. This can be solved by a different hack, which would drop
> >>> pconfig=off from QEMU command line.
> > 
> > The domain XML does not contain a complete list of all CPU features.
> > Features which are implicitly included in a CPU model are not listed in
> > the XML. Count in the differences in libvirt's vs QEMU's definitions of
> > a particular CPU model and you can see feat=off cannot be mechanically
> > dropped from the command line as the CPU model itself could turn it on
> > by default and thus feat=off is not redundant.
> 
> I think I wasn't very clear, I meant "unsupported by QEMU" when I said
> "absent".  Libvirt on the destination knows that from
> query-cpu-model-expansion, so it can leave off pconfig if it is not
> supported by the destination QEMU.

Oh yeah, we should do this (and I plan to do so), but it won't really
help us in this case. Although it could potentially save us some work in
case we end up in a similar situation.

Jirka


  reply	other threads:[~2019-10-03 14:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190926214305.17690-1-ehabkost@redhat.com>
     [not found] ` <20190930102453.GO4884@orkuz.int.mamuti.net>
2019-09-30 14:11   ` [RFC] cpu_map: Remove pconfig from Icelake-Server CPU model Eduardo Habkost
2019-09-30 14:31     ` Hu, Robert
2019-09-30 15:16       ` Paolo Bonzini
2019-09-30 16:16         ` Jiri Denemark
2019-10-01  9:20           ` Paolo Bonzini
2019-10-03 14:28             ` Jiri Denemark [this message]
2019-10-01  0:51         ` Huang, Kai

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=20191003142835.GA4204@orkuz.int.mamuti.net \
    --to=jdenemar@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=kai.huang@intel.com \
    --cc=libvir-list@redhat.com \
    --cc=luwei.kang@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=robert.hu@intel.com \
    --cc=robert.hu@linux.intel.com \
    --cc=rth@twiddle.net \
    --cc=thomas.lendacky@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).