From: Eduardo Habkost <ehabkost@redhat.com>
To: "Hu, Robert" <robert.hu@intel.com>
Cc: Eric Blake <eblake@redhat.com>,
Robert Hoo <robert.hu@linux.intel.com>,
Paolo Bonzini <pbonzini@redhat.com>,
"rth@twiddle.net" <rth@twiddle.net>,
"thomas.lendacky@amd.com" <thomas.lendacky@amd.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Liu, Jingqi" <jingqi.liu@intel.com>,
Markus Armbruster <armbru@redhat.com>,
Jiri Denemark <jdenemar@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v3 3/3] Change other funcitons referring to feature_word_info[]
Date: Mon, 10 Sep 2018 14:38:17 -0300 [thread overview]
Message-ID: <20180910173817.GC12698@habkost.net> (raw)
In-Reply-To: <9E79D1C9A97CFD4097BCE431828FDD3115FFAADC@SHSMSX103.ccr.corp.intel.com>
On Thu, Sep 06, 2018 at 06:00:29AM +0000, Hu, Robert wrote:
>
> > -----Original Message-----
> > From: Eric Blake [mailto:eblake@redhat.com]
> > Sent: Thursday, September 6, 2018 1:41
> > To: Eduardo Habkost <ehabkost@redhat.com>
> > Cc: Robert Hoo <robert.hu@linux.intel.com>; Paolo Bonzini
> > <pbonzini@redhat.com>; Hu, Robert <robert.hu@intel.com>; rth@twiddle.net;
> > thomas.lendacky@amd.com; qemu-devel@nongnu.org; Liu, Jingqi
> > <jingqi.liu@intel.com>; Markus Armbruster <armbru@redhat.com>; Jiri
> > Denemark <jdenemar@redhat.com>
> > Subject: Re: [PATCH v3 3/3] Change other funcitons referring to
> > feature_word_info[]
> >
> > On 09/05/2018 11:44 AM, Eduardo Habkost wrote:
> > > On Wed, Sep 05, 2018 at 10:32:33AM -0500, Eric Blake wrote:
> > >> On 09/05/2018 09:10 AM, Eduardo Habkost wrote:
> > >>> Question to the QAPI schema maintainers below:
> > >>>
> > >>
> > >>>> ##
> > >>>> -{ 'struct': 'X86CPUFeatureWordInfo',
> > >>>> - 'data': { 'cpuid-input-eax': 'int',
> > >>>> - '*cpuid-input-ecx': 'int',
> > >>>> - 'cpuid-register': 'X86CPURegister32',
> > >>>> +{ 'struct': 'X86CPUIDFeatureWordInfo',
> > >>>> + 'data': { 'input-eax': 'int',
> > >>>> + '*input-ecx': 'int',
> > >>>> + 'register': 'X86CPURegister32',
> > >>>> 'features': 'int' } }
> > >>
> > >> You are renaming the struct (which is not visible over the wire), as
> > >> well as renaming members within the struct (which is visible, if this
> > >> type appears on the wire).
> > >>
> > >> However, 'grep FeatureWordInfo qapi/qapi-introspect.c' has no hits
> > >> either before or after this patch (well, first you have to build with
> > >> my currently-pending patch as part of Markus' pull request for this
> > >> trick to work, https://lists.gnu.org/archive/html/qemu-devel/2018-
> > 08/msg05968.html).
> > >> Or, even without my patch, grepping for 'input-eax' has no hits as a
> > >> member name in any struct. Which means that there are no QMP
> > >> commands currently exposing this struct over the wire.
> > >
> > > There is one: qom-get.
> >
> > Oh, right, the nasty exception that is not visible to introspection :(
> >
> > >>> AFAICS, this will break the existing libvirt code: it will make
> > >>> qemuMonitorJSONParseCPUx86Features() error out because it won't find
> > >>> the "input-eax" field on all X86CPUFeatureWordInfo elements.
> > >>
> > >> No, this change can't break libvirt, since I just proved there is no
> > >> QMP command that libvirt could be using that either supplies an input
> > >> member or expects an output member named "input-eax" in the first place.
> > >
> > > I'm sure it will break libvirt. libvirt uses "qom-get path=<cpu-path>
> > > property=feature-words" to get X86FeatureWordInfo data, and it expects
> > > the returned data to have a "input-eax" field.
> >
> > Yeah, since this type is used in the qom-get backdoor that evades introspection,
> > it's even more important that you follow the backwards-compatibility rules and
> > not rename or delete any previously-mandatory members, since libvirt CAN'T
> > introspect if such changes have happened.
> >
> [Robert Hoo]
> Oh, this is more complicated than my thought.
> So, Eduardo, how about leave the QAPI expansion for MSR based features to other
> professional people?
I think it's now clear that we can't add MSR features to
"feature-words" in a compatible way, so any mechanism to
introspect MSR features will need a separate property or QMP
command.
I also think "feature-words" needs to be replaced with something
better. Probably libvirt should be able to grab all information
it needs by looking at the boolean QOM properties instead of the
low-level info at "feature-words".
This means I agree to leave this functionality out of the MSR
feature patch series for now.
--
Eduardo
next prev parent reply other threads:[~2018-09-10 17:43 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-10 14:06 [Qemu-devel] [PATCH v3 0/3] x86: QEMU side support on MSR based features Robert Hoo
2018-08-10 14:06 ` [Qemu-devel] [PATCH v3 1/3] x86: Data structure changes to support " Robert Hoo
2018-08-17 3:10 ` Eduardo Habkost
2018-08-18 3:10 ` Robert Hoo
2018-08-18 5:48 ` Robert Hoo
2018-08-18 7:50 ` Paolo Bonzini
2018-08-17 15:50 ` Paolo Bonzini
2018-08-17 15:55 ` Eduardo Habkost
2018-08-17 17:34 ` Paolo Bonzini
2018-08-17 17:48 ` [Qemu-devel] X86CPU "feature-words" property on QEMU (was Re: [PATCH v3 1/3] x86: Data structure changes to support MSR based) features Eduardo Habkost
2018-08-17 17:59 ` Paolo Bonzini
2018-08-17 18:10 ` Eduardo Habkost
2018-08-10 14:06 ` [Qemu-devel] [PATCH v3 2/3] kvm: Add support to KVM_GET_MSR_FEATURE_INDEX_LIST and KVM_GET_MSRS system ioctl Robert Hoo
2018-08-17 13:18 ` Eduardo Habkost
2018-08-18 7:27 ` Robert Hoo
2018-08-18 15:05 ` Eduardo Habkost
2018-08-23 6:28 ` Robert Hoo
2018-08-23 17:11 ` Eduardo Habkost
2018-08-23 17:28 ` Paolo Bonzini
2018-08-23 17:36 ` Eduardo Habkost
2018-08-23 20:23 ` Paolo Bonzini
2018-08-25 17:27 ` Eduardo Habkost
2018-08-30 4:22 ` Robert Hoo
2018-08-30 18:28 ` Eduardo Habkost
2018-08-10 14:06 ` [Qemu-devel] [PATCH v3 3/3] Change other funcitons referring to feature_word_info[] Robert Hoo
2018-08-10 15:17 ` Eric Blake
2018-08-14 10:06 ` Robert Hoo
2018-08-17 13:28 ` Eduardo Habkost
2018-08-18 9:01 ` Robert Hoo
2018-08-18 15:10 ` Eduardo Habkost
2018-08-17 15:52 ` Paolo Bonzini
2018-08-18 12:53 ` Robert Hoo
2018-09-05 5:47 ` Robert Hoo
2018-09-05 14:10 ` Eduardo Habkost
2018-09-05 15:32 ` Eric Blake
2018-09-05 16:44 ` Eduardo Habkost
2018-09-05 17:41 ` Eric Blake
2018-09-06 6:00 ` Hu, Robert
2018-09-10 17:38 ` Eduardo Habkost [this message]
2018-09-11 1:44 ` Robert Hoo
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=20180910173817.GC12698@habkost.net \
--to=ehabkost@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=jdenemar@redhat.com \
--cc=jingqi.liu@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 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.