Commit Graph

25 Commits

Author SHA1 Message Date
Ross Burton
a1b9c06ff5 qemu/machine: rename QEMU_EXTRAOPTIONS for consistency
The per-tune qemu options variable is QEMU_EXTRAOPTIONS_${TUNE_PKGARCH},
but this doesn't follow the pattern of all of the other tune-specific
variables in the machine configuration which is VARIABLE:tune-[name].

Rename QEMU_EXTRAOPTIONS_${TUNE_PKGARCH} to
QEMU_EXTRAOPTIONS:tune-${TUNE_PKGARCH} for consistency.

Note that this will mean that BSPs need to update any assignments of
this variable.

(From OE-Core rev: 7f981d074442b901f7e64dbdb9db851ff31c3733)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2025-01-11 18:34:15 +00:00
Simone Weiß
97fd704adc tune-core2: Update qemu cpu to supported model
Fixes [YOCTO #12388]

QEMUs documentation does recommend to not use n270 and core2duo as
an argument to -cpu anymore. See also the QEMU documentation for this at
[0].
Update therefore the QEMU cpu option for the core2duo tune to Nehalam.
Tested it locally with QEMU and KVM.

[0]: https://qemu-project.gitlab.io/qemu/system/qemu-cpu-models.html#other-non-recommended-x86-cpus

(From OE-Core rev: f2383a2bff3eb756740ecaf48147bea89303e443)

Signed-off-by: Simone Weiß <simone.p.weiss@posteo.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-01-21 12:27:12 +00:00
Richard Purdie
36d6275314 qemux86/qemuarm: Drop kernel version overrides
Drop the version overrides for the kernel for the x86 and arm machines
so we can go back to following the distro versions. The reasons for
these versions is mostly historical at this point as the issues were
resolved.

(From OE-Core rev: 298fa078fab58b64246376ffd70ad6a0c7589876)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-10 09:53:32 +01:00
Bruce Ashfield
ad9b04b051 conf/machine: set preferred kernel to be 6.4
(From OE-Core rev: b544e62827d2a3606fbc886ea520256c948e197c)

(From OE-Core rev: 505ea7fe653d4c61f348e737c409d43bb490ee4f)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-16 07:49:17 +01:00
Thomas Roos
8cbc584641 qemuboot-x86.inc: allow overwrite of QB_CPU
To test nested kvm with qemu QB_CPU* needs to be modified.
E.g. set to "-cpu Haswell-noTSX-IBRS,vmx=on"

This allows to overwrite this from local.conf etc.

(From OE-Core rev: aa9d145d90893b04cde197e9b5f4dc574e4738e1)

Signed-off-by: Thomas Roos <throos@amazon.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-06 09:52:16 +00:00
Trevor Woerner
9e0145df7a QB_SMP: allow user modification
Allow a user to override the QM_SMP value giving them the opportunity to
select for themselves the number of CPUs to use in qemu.

(From OE-Core rev: 70a91e6d0357149c00b97f7e66e16cbc52997a92)

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-02-23 12:11:29 +00:00
Bruce Ashfield
24d0d20633 conf/qemu: bump preferred kernel version to 6.1
6.1 has been soaking for a while now, so it is time to bump the
default qemu version to 6.1 and prepare to remove 5.19.

(From OE-Core rev: 91c1f7d4eb9ec5ad683c798812395df3a56747ba)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-26 22:22:53 +00:00
Martin Jansa
dca9b920e0 tune-x86-64-v3.inc: set QEMU_EXTRAOPTIONS like other tune-* files
* use Skylake-Client to match QB_CPU_KVM as changed in:
  https://git.openembedded.org/openembedded-core/commit/?id=6f2af1e5d1537b4d31e14946292bf58f0fd76fc9

* explicitly set -cpu instead of letting qemu to choose based
  on host cpu

* check=false is still useful as e.g. on on AMD Threadripper 3970X:
  orc/0.4.33-r0 $ PSEUDO_UNLOAD=1 qemu-x86_64 -r 3.2.0 -cpu Skylake-Client  -L recipe-sysroot -E LD_LIBRARY_PATH=recipe-sysroot//usr/lib:recipe-sysroot//lib
  orc/0.4.33-r0/build/meson-private/sanitycheckc_cross.exe
  qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.pcid [bit 17]
  qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]
  qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.01H:ECX.tsc-deadline [bit 24]
  qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.hle [bit 4]
  qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.invpcid [bit 10]
  qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.rtm [bit 11]
  qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.07H:EBX.rdseed [bit 18]
  qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.80000001H:ECX.3dnowprefetch [bit 8]
  qemu-x86_64: warning: TCG doesn't support requested feature: CPUID.0DH:EAX.xsavec [bit 1]

* if this still doesn't work for you on your host, you might need to downgrade
  DEFAULTTUNE to e.g. corei7-64 (all all the way back to core2-64), for
  more details see:
  https://www.openembedded.org/pipermail/openembedded-core/2018-April/150178.html

* the leading space shouldn't be needed, I've kept it for consistency
  with other QEMU_EXTRAOPTIONS

(From OE-Core rev: d1a52559670921389a66a4c26d37481d6611042a)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-12 23:08:58 +00:00
Richard Purdie
3d67b6c60f qemux86-64: Reduce tuning to core2-64
Effectively revert "qemux86-64: build for x86-64-v3 (2013 Haswell and later) rather than Core 2 from 2006"
(commit 6f2af1e5d1537b4d31e14946292bf58f0fd76fc9)

Much as I'd love us to use the latest tuning, we do have some autobuilder
hardware which isn't ready for this yet which breaks KVM and some qemu
user mode usage as there appear to be TCG bugs too. I suspect we're not
the only ones with such hardware.

Drop the tune back to core2-64, anyone can easily customise it
themselves if they need it. We can revisit this in a year or two
as we should be ready then. It has beena  good test of the rest of the
support which all seems ready.

I'd have preferred to use corei7-64 but that causes
runqemu.RunqemuTests.test_boot_machine_iso to hang.

Leave the newer tune file inclusion so people can change tunes
more easily.

(From OE-Core rev: 369b1dfa28b1791d45f068acc765190defecd460)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-11 11:03:34 +00:00
Alexander Kanavin
ba0326071e qemux86-64: build for x86-64-v3 (2013 Haswell and later) rather than Core 2 from 2006
This allows us to
- test those more recent instruction sets (AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, XSAVE)
- benefit from improved performance across the stack both in kvm-driven system emulation and when running
on real silicon.
For example, glibc:
https://www.phoronix.com/news/Glibc-strcasecmp-AVX2-EVEX

v4 level is adding AVX-512, which is far less established, particularly Intel has famously backtracked
from supporting it in Alder Lake/Raport Lake client CPUs and AMD has only implemented it in very recent Zen4 products:
https://www.phoronix.com/news/GCC-11-x86-64-Feature-Levels

(From OE-Core rev: 6f2af1e5d1537b4d31e14946292bf58f0fd76fc9)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-06 12:03:46 +00:00
Alexander Kanavin
f2bb462850 conf/machine/include: add x86-64-v3 tunes (AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, XSAVE)
Qemu 7.2 finally allows us to move beyond building for original Core 2/Core i7 era hardware,
and this patch adds support for the newer generations. But first, a bit of
background:

Recently toolchains gained support for specifying x86-64 'levels' of
instruction set support; v3 corresponds to 2013-era Haswell CPUs
(and later), with AVX, AVX2 and a few other instructions that
were introduced in that generation. I believe this is preferrable
to picking a specific CPU model as the baseline.

Here's Phoronix's feature article that explains the feature and the available levels:

"Both LLVM Clang 12 and GCC 11 are ready to go in offering the new x86-64-v2, x86-64-v3, and x86-64-v4 targets.

These x86_64 micro-architecture feature levels have been about coming up with a few "classes" of Intel/AMD CPU processor support rather than continuing to rely on just the x86_64 baseline or targeting a
specific CPU family for optimizations. These new levels make it easier to raise the base requirements around Linux x86-64 whether it be for a Linux distribution or a particular software application where
the developer/ISV may be wanting to compile with greater instruction set extensions enabled in catering to more recent Intel/AMD CPUs."

https://www.phoronix.com/news/GCC-11-x86-64-Feature-Levels

Here's gcc docs for it:
https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html

And here's the formal specification (click on the pdf link):
https://gitlab.com/x86-psABIs/x86-64-ABI

The actual tune file was created by copying corei7 tunes and doing
search/replace on them. Qemu options were dropped as unnecessary.
32 bit tune was dropped as well, as there is no 32 bit only CPU
that also supports these new instructions; all of the v3 capable
chips are 64 bit.

(From OE-Core rev: ac041f90e71dba83b7144c91f929de88aaeae519)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-31 17:08:29 +00:00
Bruce Ashfield
5ba3b8619d meta/conf: update preferred linux-yocto version to v5.19
v5.19 is the latest reference kernel, we bump our qemu machines
to use it by default.

(From OE-Core rev: 8f3b5cab696704fdc2060c710e3429859736a63a)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-09 16:37:24 +01:00
Ross Burton
eccb34f80c qemux86-64: disable legacy i8042 (AT keyboard, PS/2 mouse)
These devices are historical, modern Linux will just use the USB
devices, and occasionally the init of these devices fails:

  atkbd serio0: Failed to deactivate keyboard on isa0060/serio0
  psmouse serio1: Failed to reset mouse on isa0060/serio1: -5

Explicitly add a USB keyboard to go with the USB tablet, and disable the
i8042 entirely.

[ YOCTO #14718 ]
[ YOCTO #14743 ]

(From OE-Core rev: c01f47003f34b9ad2fe3d17e1ead84c27ee1e57d)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-20 13:14:00 +01:00
Markus Volk
d58f40bee1 x86-base.inc: replace intel i965 driver with crocus
this fixes do_rootfs for core-image-sato after mesa update:

 Problem: package packagegroup-core-x11-base-1.0-r1.noarch requires packagegroup-core-x11-xserver, but none of the providers can be installed
  - conflicting requests
  - nothing provides mesa-driver-i965 needed by packagegroup-core-x11-xserver-1.0-r40.intel_corei7_64
(try to add '--skip-broken' to skip uninstallable packages)

(From OE-Core rev: 63f10412d793c6c10290838eb230f179046f1d23)

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-15 08:40:09 +00:00
Michael Opdenacker
5c931175b4 conf/machine: fix QEMU x86 sound options
This updates the QEMU sounds options for x86 emulation,
when "runqemu" is called with the "audio" argument,
to fix the below error:

runqemu - ERROR - Failed to run qemu: qemu-system-x86_64: warning: '-soundhw ac97' is deprecated, please use '-device AC97' instead

(From OE-Core rev: b802a5dd1a79c7be3bc790223a733ebc9be4f117)

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-10 13:07:37 +00:00
Bruce Ashfield
51c1d24805 conf/machine: bump qemu preferred versions to 5.15
5.14 has been removed from the active kernel list, so we make
5.15 the new default.

(From OE-Core rev: 24fb6a22332f746e3bef89ff8e5719838f0ed8b5)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-12 21:09:01 +00:00
Bruce Ashfield
c744decea1 conf/machine: bump qemu preferred versions to 5.14
5.14 is the latest reference kernel, so let's make it the
default.

(From OE-Core rev: af19c44c4af68568de2ddb5c11d8ad34ac600522)

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-09-24 10:15:28 +01:00
Jon Mason
1d381f21f5 conf/machine: move tune files to architecture directories
Move all of the tune files found in conf/machine/include into their
respective architecture directories in that same location.  All
references to these will need to be updated.  So, change the relevant
ones for this tree in this commit as well.

For the ARM tunes, nest them one further into armv8a, armv8m, etc. and
rename some to make them uniform with the rest of the tunes.

(From OE-Core rev: b6f15209bcfff953cce69da97a93f9ddff141ced)

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-18 17:01:06 +01:00
Richard Purdie
bb6ddc3691 Convert to new override syntax
This is the result of automated script conversion:

scripts/contrib/convert-overrides.py <oe-core directory>

converting the metadata to use ":" as the override character instead of "_".

(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-08-02 15:44:10 +01:00
Jon Mason
ceefa75ac0 Space-comma Cleanups
Multiple files have " ," instead of ", " in expressions.  This changes
them to conform to the way the rest of them are done.

Found and corrected via:
git ls-files | xargs sed --follow-symlinks -i 's/ ,d/, d/g'

(From OE-Core rev: 36c3afd2dd8bded02ea8f255e89a09ebd75c795b)

Signed-off-by: Jon Mason <jon.mason@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30 15:01:51 +01:00
Saul Wold
fe31dcd2a1 arch-x86: Add x86-x32 to MACHINEOVERRIDES
This is needed as an x32 more generic x32 override later in the
OVERRIDES, currently linux-gnux32 is the first override, but we
need a stronger (later in the list) x32 override to deal with some
needed x32 dependency overrides.

(From OE-Core rev: 364b3698b78e9fea59d24e3a3a5f4476be95f6d1)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-26 11:05:01 +01:00
Alexander Kanavin
abd5b24ff7 bitbake.conf: rename 'gobject-introspection-data' machine feature to 'qemu-usermode'
The new value is more general and better reflects what having the feature really means.
Introspection data, then, is built only if 'gobject-introspection-data' is in
DISTRO_FEATURES and 'qemu-usermode' is in MACHINE_FEATURES.

(From OE-Core rev: 9927a3d72e2272d8e3dc4785ba02e27802ee1c6c)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28 15:55:49 +01:00
Richard Purdie
0dea50e423 machine/include/arch-x86: Make x32 ABI not supporting gobject-introspection-data
x32 isn't supported by user mode qemu so we can't build
gobject-introspection-data, so disable it in this case.

(From OE-Core rev: 4ee1eb8ddd3fbe144fbaeb32e07b66e191aa7548)

(From OE-Core rev: 04ecebd4a79f80c5bb054a8b21df6f555631ed8b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12 22:11:46 +00:00
Martin Jansa
06859de21b meta/conf/machine: use ' inside quoted values
(From OE-Core rev: 924ccf202a6d89de32fc34a140bf9e35e8e43b4e)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-01 21:32:05 +00:00
Darren Hart
939fec6ffc x86: Replace ia32 with x86 when referring to the generic architecture
ia32 implies 32bit, while these files provide descriptions for IA32,
X86_64, and X32 architectures. The term "x86" fits this used better
without resorting to using the term "Intel" which isn't quite right as
it excludes things like the tune-c3 file describing a Via CPU.

(From OE-Core rev: f5e0a574d87b7dc6466bfe01593fab5aa13464ff)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Paul Eggleton <paul.eggleton@intel.com>
Cc: Tom Zanussi <tom.zanussi@intel.com>
Cc: Nitin Kamble <nitin.a.kamble@intel.com>
Cc: Mark Hatle <mark.hatle@windriver.com>
Cc: Bruce Ashfield <bruce.ashfield@windriver.com>
Cc: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-28 00:50:53 +00:00