All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH v1 0/3] x86 UEFI: pass envs and args
@ 2022-02-20 22:42 Zixuan Wang
  2022-02-20 22:42 ` [kvm-unit-tests PATCH v1 1/3] x86 UEFI: pull UEFI definitions for file operations Zixuan Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Zixuan Wang @ 2022-02-20 22:42 UTC (permalink / raw)
  To: kvm, pbonzini, drjones
  Cc: marcorr, erdemaktas, rientjes, seanjc, brijesh.singh,
	Thomas.Lendacky, varad.gautam, jroedel, bp

Hello,

This patch series enables kvm-unit-tests to get envs and args under
UEFI. The host passes envs and args through files:

1. The host stores envs into ENVS.TXT and args into ARGS.TXT
2. The guest boots up and reads data from these files through UEFI file
operation services
3. The file data is passed to corresponding setup functions

As a result, several x86 test cases (e.g., kvmclock_test and vmexit)
can now get envs/args from the host [1], thus do not report FAIL when
running ./run-tests.sh.

An alternative approach for envs/args passing under UEFI is to use
QEMU's -append/-initrd options. However, this approach requires EFI
binaries to be passed through QEMU's -kernel option. While currently,
EFI binaries are loaded from a disk image. Changing this bootup process
may make kvm-unit-tests (under UEFI) unable to run on bare-metal [2].
On the other hand, passing envs/args through files should work on
bare-metal because UEFI's file operation services do not rely on QEMU's
functionalities, thus working on bare-metal.

The summary of this patch series:

Patch #1 pulls Linux kernel's UEFI definitions for file operations.

Patch #2 implements file read functions and envs setup functions.

Patch #3 implements the args setup functions.

Best regards,
Zixuan

[1] https://github.com/TheNetAdmin/KVM-Unit-Tests-dev-fork/issues/8
[2] https://lore.kernel.org/kvm/CAEDJ5ZQLm1rz+0a7MPPz3wMAoeTq2oH9z92sd0ZhCxEjWMkOpg@mail.gmail.com

Zixuan Wang (3):
  x86 UEFI: pull UEFI definitions for file operations
  x86 UEFI: read envs from file
  x86 UEFI: read args from file

 lib/efi.c       | 150 ++++++++++++++++++++++++++++++++++++++++++++++++
 lib/linux/efi.h |  82 +++++++++++++++++++++++++-
 x86/efi/run     |  36 +++++++++++-
 3 files changed, 265 insertions(+), 3 deletions(-)

-- 
2.35.1


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

end of thread, other threads:[~2022-02-22  6:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-20 22:42 [kvm-unit-tests PATCH v1 0/3] x86 UEFI: pass envs and args Zixuan Wang
2022-02-20 22:42 ` [kvm-unit-tests PATCH v1 1/3] x86 UEFI: pull UEFI definitions for file operations Zixuan Wang
2022-02-20 22:42 ` [kvm-unit-tests PATCH v1 2/3] x86 UEFI: read envs from file Zixuan Wang
2022-02-20 22:42 ` [kvm-unit-tests PATCH v1 3/3] x86 UEFI: read args " Zixuan Wang
2022-02-21  8:40 ` [kvm-unit-tests PATCH v1 0/3] x86 UEFI: pass envs and args Andrew Jones
2022-02-21 15:25   ` Andrew Jones
2022-02-21 18:47     ` Zixuan Wang
2022-02-22  6:11     ` Gerd Hoffmann

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.