All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/28] x86: Improve operation under QEMU
@ 2025-02-16 20:43 Simon Glass
  2025-02-16 20:43 ` [PATCH v2 01/28] x86: Expand x86_64 early memory Simon Glass
                   ` (29 more replies)
  0 siblings, 30 replies; 72+ messages in thread
From: Simon Glass @ 2025-02-16 20:43 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Bin Meng, Simon Glass, Andrew Goodbody, Andy Shevchenko,
	Angelo Dureghello, Love Kumar, Mattijs Korpershoek,
	Philip Oberfichtner, Stephen Warren, Stephen Warren, Tom Rini,
	qemu-devel

U-Boot can start and boot an OS in both qemu-x86 and qemu-x86_64 but it
is not perfect.

With both builds, executing the VESA ROM causes an intermittent hang, at
least on some AMD CPUs.

With qemu-x86_64 kvm cannot be used since the move to long mode (64-bit)
is done in a way that works on real hardware but not with QEMU. This
means that performance is 4-5x slower than it could be, at least on my
CPU.

We can work around the first problem by using Bochs, which is anyway a
better choice than VESA for QEMU. The second can be addressed by using
the same descriptor across the jump to long mode.

With an MTRR fix this allows booting into Ubuntu on qemu-x86_64

Changes in v2:
- Redo commit message
- Add new patch to rename the _D dirty flag
- Add new patch to support CPU functions in long mode
- Add new patch to tidy up address size in MTRR calculations
- Add new patch with a 64-bit version of is_power_of_2()
- Add new patch to set an MTRR for the RAM in QEMU
- Add new patch with a helper to send characters
- Add new patch to allow tests to be filtered by role
- Add more patches to support booting with kvm
- Add new patch with a test for booting Ubuntu 24.04

Simon Glass (28):
  x86: Expand x86_64 early memory
  x86: qemu: Switch to bochs display
  x86: qemu: Enable dhrystone
  x86: qemu: Avoid accessing BSS too early
  x86: Drop mpspec from the SPL build
  x86: Add some log categories
  x86: Drop use of CONFIG_REALMODE_DEBUG
  x86: Avoid clearing the VESA display
  x86: Add 64-bit entries to the GDT
  x86: Use defines for the cache flags
  x86: spl: Drop duplicate CPU init
  x86: Drop the message about features missing in 64-bit
  x86: Include stdbool.h in interrupt header
  x86: Tidy up the GDT size in start/16.S
  x86: Disable paging before changing to long mode
  x86: Use the same GDT when jumping to long mode
  x86: Use a simple jump into long mode
  x86: Rename the _D dirty flag
  x86: Support CPU functions in long mode
  x86: Tidy up address size in MTRR calculations
  Add a 64-bit version of is_power_of_2()
  x86: Support MTRRs of 4GB on 32-bit machines
  x86: emulation: Set an MTRR for the RAM
  scripts: Expand a few options
  test/py: Add a helper to send characters
  test/py: Allow tests to be filtered by role
  RFC: test/py: Deal with timeouts
  test: Add a test for booting Ubuntu 24.04

 .gitlab-ci.yml                   |  5 +++
 arch/x86/cpu/cpu.c               | 24 +++++++++++++++
 arch/x86/cpu/i386/call64.S       | 35 +++++++++------------
 arch/x86/cpu/i386/cpu.c          | 41 +++++++++---------------
 arch/x86/cpu/mtrr.c              | 12 +++++---
 arch/x86/cpu/qemu/dram.c         | 15 +++++++++
 arch/x86/cpu/qemu/qemu.c         | 20 ++++++++----
 arch/x86/cpu/start.S             |  4 ++-
 arch/x86/cpu/start16.S           |  3 +-
 arch/x86/cpu/x86_64/cpu.c        |  5 ---
 arch/x86/include/asm/cpu.h       | 35 ++++++++++++++++++---
 arch/x86/include/asm/interrupt.h |  1 +
 arch/x86/include/asm/processor.h |  5 ++-
 arch/x86/lib/Makefile            |  2 ++
 arch/x86/lib/bios.c              | 27 +++++++++-------
 arch/x86/lib/bios_interrupts.c   |  8 ++---
 arch/x86/lib/i8259.c             |  2 ++
 arch/x86/lib/spl.c               |  4 +--
 configs/qemu-x86_64_defconfig    | 10 +++---
 configs/qemu-x86_defconfig       |  6 ++--
 include/linux/log2.h             |  6 ++++
 scripts/build-qemu.sh            |  4 +--
 test/py/conftest.py              | 22 +++++++++++++
 test/py/console_base.py          | 33 ++++++++++++--------
 test/py/pytest.ini               |  1 +
 test/py/tests/test_distro.py     | 53 ++++++++++++++++++++++++++++++++
 test/py/tests/test_sleep.py      |  1 +
 27 files changed, 273 insertions(+), 111 deletions(-)
 create mode 100644 test/py/tests/test_distro.py

-- 
2.43.0



^ permalink raw reply	[flat|nested] 72+ messages in thread

end of thread, other threads:[~2025-03-14 14:45 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-16 20:43 [PATCH v2 00/28] x86: Improve operation under QEMU Simon Glass
2025-02-16 20:43 ` [PATCH v2 01/28] x86: Expand x86_64 early memory Simon Glass
2025-02-16 20:43 ` [PATCH v2 02/28] x86: qemu: Switch to bochs display Simon Glass
2025-02-16 20:43 ` [PATCH v2 03/28] x86: qemu: Enable dhrystone Simon Glass
2025-02-16 20:43 ` [PATCH v2 04/28] x86: qemu: Avoid accessing BSS too early Simon Glass
2025-02-16 20:43 ` [PATCH v2 05/28] x86: Drop mpspec from the SPL build Simon Glass
2025-02-16 20:43 ` [PATCH v2 06/28] x86: Add some log categories Simon Glass
2025-02-16 20:43 ` [PATCH v2 07/28] x86: Drop use of CONFIG_REALMODE_DEBUG Simon Glass
2025-02-16 20:43 ` [PATCH v2 08/28] x86: Avoid clearing the VESA display Simon Glass
2025-02-16 20:43 ` [PATCH v2 09/28] x86: Add 64-bit entries to the GDT Simon Glass
2025-02-16 20:43 ` [PATCH v2 10/28] x86: Use defines for the cache flags Simon Glass
2025-02-16 20:43 ` [PATCH v2 11/28] x86: spl: Drop duplicate CPU init Simon Glass
2025-02-16 20:43 ` [PATCH v2 12/28] x86: Drop the message about features missing in 64-bit Simon Glass
2025-02-16 20:43 ` [PATCH v2 13/28] x86: Include stdbool.h in interrupt header Simon Glass
2025-02-16 20:43 ` [PATCH v2 14/28] x86: Tidy up the GDT size in start/16.S Simon Glass
2025-02-16 20:44 ` [PATCH v2 15/28] x86: Disable paging before changing to long mode Simon Glass
2025-02-16 20:44 ` [PATCH v2 16/28] x86: Use the same GDT when jumping " Simon Glass
2025-02-16 20:44 ` [PATCH v2 17/28] x86: Use a simple jump into " Simon Glass
2025-02-16 20:44 ` [PATCH v2 18/28] x86: Rename the _D dirty flag Simon Glass
2025-02-16 20:44 ` [PATCH v2 19/28] x86: Support CPU functions in long mode Simon Glass
2025-02-16 20:44 ` [PATCH v2 20/28] x86: Tidy up address size in MTRR calculations Simon Glass
2025-02-16 20:44 ` [PATCH v2 21/28] Add a 64-bit version of is_power_of_2() Simon Glass
2025-02-16 20:44 ` [PATCH v2 22/28] x86: Support MTRRs of 4GB on 32-bit machines Simon Glass
2025-02-16 20:44 ` [PATCH v2 23/28] x86: emulation: Set an MTRR for the RAM Simon Glass
2025-02-16 20:44 ` [PATCH v2 24/28] scripts: Expand a few options Simon Glass
2025-02-16 20:44 ` [PATCH v2 25/28] test/py: Add a helper to send characters Simon Glass
2025-02-16 20:44 ` [PATCH v2 26/28] test/py: Allow tests to be filtered by role Simon Glass
2025-02-17 17:48   ` Tom Rini
2025-02-18 12:09     ` Simon Glass
2025-02-18 15:12       ` Tom Rini
2025-02-19  0:04         ` Simon Glass
2025-02-19  0:25           ` Tom Rini
2025-02-19  0:39             ` Simon Glass
2025-02-19  0:50               ` Tom Rini
2025-02-21 13:57                 ` Simon Glass
2025-02-16 20:44 ` [PATCH v2 27/28] RFC: test/py: Deal with timeouts Simon Glass
2025-02-17 17:45   ` Tom Rini
2025-03-14 14:45     ` Simon Glass
2025-02-16 20:44 ` [PATCH v2 28/28] test: Add a test for booting Ubuntu 24.04 Simon Glass
2025-02-17 17:52   ` Tom Rini
2025-02-18 12:09     ` Simon Glass
2025-02-18 15:11       ` Tom Rini
2025-02-19  0:01         ` Simon Glass
2025-02-19  0:55           ` Tom Rini
2025-02-20 13:49             ` Simon Glass
2025-02-20 14:53               ` Tom Rini
2025-02-21 13:57                 ` Simon Glass
2025-02-21 16:06                   ` Tom Rini
2025-02-22  8:27                     ` Heiko Schocher
2025-02-22 13:47                       ` Heiko Schocher
2025-02-24 17:54                     ` Simon Glass
2025-02-25 13:59                       ` Tom Rini
2025-02-26  2:56                         ` Simon Glass
2025-02-26 14:35                           ` Tom Rini
2025-02-27 10:11                             ` Heiko Schocher
2025-02-27 15:26                               ` Tom Rini
2025-02-27 16:27                             ` Simon Glass
2025-02-27 17:20                               ` Tom Rini
2025-02-27 19:26                                 ` Simon Glass
2025-02-27 20:15                                   ` Tom Rini
2025-02-28  5:26                                   ` Heiko Schocher
2025-03-06 14:16                                     ` Simon Glass
2025-03-06 14:32                                       ` Tom Rini
2025-03-06 16:11                                         ` Simon Glass
2025-03-06 16:43                                           ` Tom Rini
2025-03-06 23:31                                             ` Simon Glass
2025-03-07 15:34                                               ` Tom Rini
2025-02-16 21:13 ` [PATCH v2 00/28] x86: Improve operation under QEMU Paolo Bonzini
2025-02-17 13:16   ` Simon Glass
2025-02-16 21:57 ` Tom Rini
2025-02-17 13:14   ` Simon Glass
2025-02-17 14:05     ` Tom Rini

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.