From: "Woods, Brian" <Brian.Woods@amd.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
"Woods, Brian" <Brian.Woods@amd.com>,
Wei Liu <wei.liu2@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 6/6] x86/emul: dedup hvmemul_cpuid() and pv_emul_cpuid()
Date: Wed, 14 Nov 2018 00:20:35 +0000 [thread overview]
Message-ID: <20181114002020.GA3640@amd.com> (raw)
In-Reply-To: <5BE9373702000078001FAB51@prv1-mh.provo.novell.com>
On Mon, Nov 12, 2018 at 01:17:59AM -0700, Jan Beulich wrote:
> >>> On 09.11.18 at 18:16, <andrew.cooper3@citrix.com> wrote:
> > On 06/11/18 16:16, Jan Beulich wrote:
> >>>>> On 06.11.18 at 16:52, <andrew.cooper3@citrix.com> wrote:
> >>> On 06/11/18 15:38, Jan Beulich wrote:
> >>>>>>> On 05.11.18 at 12:21, <andrew.cooper3@citrix.com> wrote:
> >>>>> They are identical, so provide a single x86emul_cpuid() instead.
> >>>>>
> >>>>> As x86_emulate() now only uses the ->cpuid() hook for real CPUID
> >>> instructions,
> >>>>> the hook can be omitted from all special-purpose emulation ops.
> >>>> So I was expecting the hook to go away altogether, but I
> >>>> now realize that it can't because of some of the customization
> >>>> that's needed. That, in turn, means that the removal of the
> >>>> hook specification as per above will get us into problems the
> >>>> moment we need to check a feature that can't be taken
> >>>> straight from the policy object. I'm therefore unconvinced we
> >>>> actually want to go this far. It'll require enough care already
> >>>> to not blindly clone a new vcpu_has_...() wrongly from the
> >>>> many pre-existing examples in such a case. Thoughts?
> >>> All dynamic bits in CPUID are derived from other control state. e.g. we
> >>> check CR4.OSXSAVE, not CPUID.OSXSAVE. The other dynamic bits are APIC,
> >>> which comes from MSR_APIC_BASE, and OSPKE which also comes from CR4.
> >>>
> >>> In the emulator itself, I think it would be a bug if we ever had
> >>> vcpu_has_osxsave etc, because that isn't how pipelines actually behave.
> >>> The feature checks here are semantically equivalent to "do the
> >>> instruction decode and execution units have silicon to cope with these
> >>> instructions".
> >> I agree that vcpu_has_os* makes no sense, but the APIC bit for
> >> example isn't really pipeline / decoder related.
> >
> > Correct, so why do you think APIC matters? All interaction with the
> > APIC is via its MMIO/MSR interface, rather than via dedicated instructions.
>
> It was a general example, not something that specifically matters here.
>
> >> And finally LWP, which again we can only hope we'll never have
> >> to emulate.
> >
> > LWP doesn't exist any more, even on the hardware it used to exist on.
> > It was never implemented on Fam17h, and was removed from Fam15/16h in a
> > microcode update to make room to implement IBPB for Spectre v2 mitigations.
> >
> > I recommend we purge the support completely.
>
> I certainly don't mind; I'd prefer though if such a withdrawal of
> functionality came actually from AMD. Brian?
>
> Jan
LWP support isn't enabled on F15h system with the latest Ucode and it
isn't available on F17h. I don't see any reason to keep it if it's
hampering cleanup and reformatting.
--
Brian Woods
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-11-14 0:20 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-05 11:21 [PATCH 0/6] x86/emul: Use struct cpuid_policy for feature checks Andrew Cooper
2018-11-05 11:21 ` [PATCH 1/6] tools: Move the typesafe min/max helpers into xen-tools/libs.h Andrew Cooper
2018-11-05 11:23 ` Wei Liu
2018-11-05 11:21 ` [PATCH 2/6] libx86: Split x86_cpuid_policy_fill_native() out of calculate_raw_policy() Andrew Cooper
2018-11-06 13:44 ` Jan Beulich
2018-11-09 16:24 ` Andrew Cooper
2018-11-12 8:13 ` Jan Beulich
2018-11-06 16:31 ` Roger Pau Monné
2018-11-09 16:26 ` Andrew Cooper
2018-11-05 11:21 ` [PATCH 3/6] tools/x86emul: Use struct cpuid_policy in the userspace test harnesses Andrew Cooper
2018-11-06 15:25 ` Jan Beulich
2018-11-05 11:21 ` [PATCH 4/6] x86/emul: Pass a full cpuid_policy into x86_emulate() Andrew Cooper
2018-11-06 15:28 ` Jan Beulich
2018-11-05 11:21 ` [PATCH 5/6] x86/emul: Don't use the ->cpuid() hook for feature checks Andrew Cooper
2018-11-06 15:32 ` Jan Beulich
2018-11-05 11:21 ` [PATCH 6/6] x86/emul: dedup hvmemul_cpuid() and pv_emul_cpuid() Andrew Cooper
2018-11-06 15:38 ` Jan Beulich
2018-11-06 15:52 ` Andrew Cooper
2018-11-06 16:16 ` Jan Beulich
2018-11-09 17:16 ` Andrew Cooper
2018-11-12 8:17 ` Jan Beulich
2018-11-14 0:20 ` Woods, Brian [this message]
2018-11-14 7:47 ` Jan Beulich
2018-11-15 14:23 ` Andrew Cooper
2018-11-15 15:09 ` Jan Beulich
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=20181114002020.GA3640@amd.com \
--to=brian.woods@amd.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/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.