x86: improve NOP use for AMD CPUs
authorJan Beulich <jbeulich@suse.com>
Wed, 20 Dec 2017 09:02:53 +0000 (10:02 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 20 Dec 2017 09:02:53 +0000 (10:02 +0100)
commitd7128e735031bde3efcde2dc4e7731f723f9ba60
tree8d2e340aadf8ee147b6615901ef9fb6f1315f66b
parentb0e59e9eaa568580ff067a25fe4f0c333e6f6e60
x86: improve NOP use for AMD CPUs

For Fam10 and later AMD recommends using the "long" NOP forms. Re-write
the present Intel code into switch() statements and add AMD logic.

Default to "long" forms (which all 64-bit CPUs are supposed to
recognize), overriding to the K8 flavor on those few (older) CPUs.

This at the same time brings us in line again in this regard with
current Linux.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/alternative.c