All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zixuan Wang <zixuanwang@google.com>
To: Sean Christopherson <seanjc@google.com>
Cc: Varad Gautam <varadgautam@gmail.com>,
	Nadav Amit <nadav.amit@gmail.com>, Marc Orr <marcorr@google.com>,
	Joerg Roedel <jroedel@suse.de>, kvm list <kvm@vger.kernel.org>,
	Linux Virtualization <virtualization@lists.linux-foundation.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Andrew Jones <drjones@redhat.com>,
	bp@suse.de, Thomas.Lendacky@amd.com, brijesh.singh@amd.com,
	Hyunwook Baek <baekhw@google.com>,
	Erdem Aktas <erdemaktas@google.com>,
	Tom Roeder <tmroeder@google.com>,
	Varad Gautam <varad.gautam@suse.com>
Subject: Re: [kvm-unit-tests PATCH v2 0/6] Initial x86_64 UEFI support
Date: Fri, 20 Aug 2021 17:42:57 -0700	[thread overview]
Message-ID: <CAFVYft099UxddW_BRv7sQCGhtwwo-id=4YWQTUKDpaU-Oad2ng@mail.gmail.com> (raw)
In-Reply-To: <YSBCSjJKvvowFbyb@google.com>

On Fri, Aug 20, 2021 at 5:01 PM Sean Christopherson <seanjc@google.com> wrote:
>
> On Thu, Aug 19, 2021, Varad Gautam wrote:
> > This series brings EFI support to kvm-unit-tests on x86_64.
> >
> > EFI support works by changing the test entrypoint to a stub entry
> > point for the EFI loader to jump to in long mode, where the test binary
> > exits EFI boot services, performs the remaining CPU bootstrapping,
> > and then calls the testcase main().
> >
> > Since the EFI loader only understands PE objects, the first commit
> > introduces a `configure --efi` mode which builds each test as a shared
> > lib. This shared lib is repackaged into a PE via objdump.
> >
> > Commit 2-4 take a trip from the asm entrypoint to C to exit EFI and
> > relocate ELF .dynamic contents.
> >
> > Commit 5 adds post-EFI long mode x86_64 setup and calls the testcase.
> >
> > Commit 6 from Zixuan [1] fixes up some testcases with non-PIC inline
> > asm stubs which allows building these as PIC.
> >
> > Changes in v2:
> > - Add Zixuan's patch to enable more testcases.
> > - Fix TSS setup in cstart64.S for CONFIG_EFI.
> >
> > [1]: https://lore.kernel.org/r/20210818000905.1111226-10-zixuanwang@google.com/
> > git tree: https://github.com/varadgautam/kvm-unit-tests/tree/efi-stub-v2
> >
> > Varad Gautam (5):
> >   x86: Build tests as PE objects for the EFI loader
> >   x86: Call efi_main from _efi_pe_entry
> >   x86: efi_main: Get EFI memory map and exit boot services
> >   x86: efi_main: Self-relocate ELF .dynamic addresses
> >   cstart64.S: x86_64 bootstrapping after exiting EFI
>
> Zixuan and Varad, are your two series complimentary or do they conflict?  E.g.
> can Zixuan's series be applied on top with little-to-no change to Varad's patches,
> or are both series trying to do the same things in different ways?
>
> And if they conflict, are the conflicts largely superficial, or are there
> fundamental differences in how the problems are being solved?
>
> Thanks!

I’m currently building my patches on top of Varad’s. This does not
require too many changes to my patches: I just need to (1) replace the
GNU-EFI function calls with Varad’s approach; (2) copy more
EFI-related definitions from Linux to implement several additional
UEFI service calls, e.g. a reset_system() call to shutdown the guest
VM; and (3) remove some duplicated code from Varad’s patches, e.g. I
remove Varad’s modifications in x86/cstart64.S because I implement
similar setup code in lib/x86/setup.c.

This migration affects only the first part of my patch series, and I’m
currently working on it. Hopefully I can send out the second version
where I take Varad’s patches as the foundation of mine.

Regards,
Zixuan

      reply	other threads:[~2021-08-21  0:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19 11:33 [kvm-unit-tests PATCH v2 0/6] Initial x86_64 UEFI support Varad Gautam
2021-08-19 11:33 ` [kvm-unit-tests PATCH v2 1/6] x86: Build tests as PE objects for the EFI loader Varad Gautam
2021-08-19 11:33 ` [kvm-unit-tests PATCH v2 2/6] x86: Call efi_main from _efi_pe_entry Varad Gautam
2021-08-24 22:08   ` Krish Sadhukhan
2021-08-19 11:33 ` [kvm-unit-tests PATCH v2 3/6] x86: efi_main: Get EFI memory map and exit boot services Varad Gautam
2021-08-24 22:10   ` Krish Sadhukhan
2021-08-19 11:33 ` [kvm-unit-tests PATCH v2 4/6] x86: efi_main: Self-relocate ELF .dynamic addresses Varad Gautam
2021-08-24 22:10   ` Krish Sadhukhan
2021-08-19 11:33 ` [kvm-unit-tests PATCH v2 5/6] cstart64.S: x86_64 bootstrapping after exiting EFI Varad Gautam
2021-08-24 22:11   ` Krish Sadhukhan
2021-08-19 11:34 ` [kvm-unit-tests PATCH v2 6/6] x86 UEFI: Convert x86 test cases to PIC Varad Gautam
2021-08-24 22:12   ` Krish Sadhukhan
2021-08-21  0:01 ` [kvm-unit-tests PATCH v2 0/6] Initial x86_64 UEFI support Sean Christopherson
2021-08-21  0:42   ` Zixuan Wang [this message]

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='CAFVYft099UxddW_BRv7sQCGhtwwo-id=4YWQTUKDpaU-Oad2ng@mail.gmail.com' \
    --to=zixuanwang@google.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=baekhw@google.com \
    --cc=bp@suse.de \
    --cc=brijesh.singh@amd.com \
    --cc=drjones@redhat.com \
    --cc=erdemaktas@google.com \
    --cc=jroedel@suse.de \
    --cc=kvm@vger.kernel.org \
    --cc=marcorr@google.com \
    --cc=nadav.amit@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tmroeder@google.com \
    --cc=varad.gautam@suse.com \
    --cc=varadgautam@gmail.com \
    --cc=virtualization@lists.linux-foundation.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.