qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Claudio Fontana <claudio.fontana@huawei.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	"linaro-acpi@lists.linaro.org" <linaro-acpi@lists.linaro.org>,
	Alexander Spyridakis <a.spyridakis@virtualopensystems.com>,
	Paul Mundt <Paul.Mundt@huawei.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Jani Kokkonen <Jani.Kokkonen@huawei.com>,
	"tech@virtualopensystems.com" <tech@virtualopensystems.com>
Subject: Re: [Qemu-devel] [Linaro-acpi] [RFC PATCH 0/7] hw/arm/virt: Dynamic ACPI v5.1 table generation
Date: Wed, 12 Nov 2014 10:56:40 +0000	[thread overview]
Message-ID: <20141112105640.GB28015@leverpostej> (raw)
In-Reply-To: <546323A7.6040805@huawei.com>

On Wed, Nov 12, 2014 at 09:08:55AM +0000, Claudio Fontana wrote:
> On 11.11.2014 16:29, Mark Rutland wrote:
> > Hi,
> > 
> > On Thu, Nov 06, 2014 at 01:33:20PM +0000, Alexander Spyridakis wrote:
> >> On 6 November 2014 14:44, Peter Maydell <peter.maydell@linaro.org> wrote:
> >>>
> >>>
> >>>> We need ACPI guest support in QEMU for AArch64 over here, with all features
> >>>> (including the ability to run ACPI code and add specific tables), for
> >>>> ACPI-based guests.
> >>>
> >>> The plan for providing ACPI to guests is that we run a UEFI BIOS
> >>> blob which is what is responsible for providing ACPI and UEFI
> >>> runtime services to guests which need them. (The UEFI blob finds
> >>> out about its hardware by looking at a device tree that QEMU
> >>> passes it, but that's a detail between QEMU and its bios blob).
> >>> This pretty much looks like what x86 QEMU used to do with ACPI
> >>> for a very long time, so we know it's a feasible approach.
> >>
> >> Hi Peter,
> >>
> >> The rational in the proposed approach is meant for cases where the
> >> user does not want to rely on external firmware layers. While UEFI
> >> could do what you are describing, the point is to avoid this not so
> >> trivial overhead in the booting process. Especially in the case of
> >> thin guests, where another software dependency is undesired.
> > 
> > I'm not sure how you plan to use ACPI without UEFI, as there are several
> > pieces of information which ACPI misses, such as the memory map, which
> > must be discovered from UEFI. How do you intend to discover the memory
> > map without UEFI?
> > 
> > Additionally, with Linux and other generic OSs, the expectation is that
> > the ACPI tables are discovered via the UEFI system table. How do you
> > intend to discover the ACPI tables? Or other system information?
> > 
> > From experience with Linux, querying this information from UEFI is a
> > trivial overhead, though a UEFI implementation might take a while to
> > boot to the point where that is possible. It would be more generally
> > helpful to have an optimized virtualised UEFI for this case (or perhaps
> > just a UEFI frontend that presents the same interface to EFI
> > applications but doesn't have to do any heavy lifting at boot).
> > 
> > So far the general trend with AArch64 at the system level is to use
> > generic interfaces as far as possible. The generic interface for
> > discovering ACPI tables is to boot as an EFI application and then to
> > query the tables from UEFI. That is the interface others are likely to
> > follow, and ACPI without UEFI is unlikely to be of much use to anyone
> > else.
> > 
> > Why is it worth expending the effort on the boot protocol you suggest
> > (which so far is not well defined) when there is already a portable,
> > well-defined standard that others are already following?
> > 
> > Thanks,
> > Mark.
> > 
> 
> Hi,
> 
> I tend to mostly agree with this, we might look for alternative
> solutions for speeding up guest startup in the future but in general
> if getting ACPI in the guest for ARM64 requires also getting UEFI,
> then I can personally live with that, especially if we strive to have
> the kind of optimized virtualized UEFI you mention.

Given that UEFI will be required for other guests (e.g. if you want to
boot a distribution's ISO image), I hope that virtualised UEFI will see
some optimisation work.

> We can in the meantime use these patches to test the "fast path" to
> the guest by just hardcoding or passing on the command line what is
> needed to be able to test information reading from ACPI from the guest
> side.
> 
> I cc: my colleagues Jani and Paul which have more the use case in mind
> and
> might correct me there.
> 
> For x86 though what is the state of UEFI in QEMU? Is it relying on the
> OVMF project to provide the firmware images if I understand
> correctly..
> How is it working out in practice?
> Should the same kind of approach be taken for ARM64?

I'm unfortunately not familiar enough with OVMF to answer any of these
questions.

> As mentioned by others, I'd rather see an implementation of ACPI in
> QEMU which learns from the experience of X86 (and possibly shares some
> code if possible), rather than going in a different direction by
> creating device trees first, and then converting them to ACPI tables
> somewhere in the firmware, just because device trees are "already
> there", for the reasons which have already been mentioned before by
> Igor and others.

For the features which ACPI provides which device trees do not (e.g. the
dynamic addition and removal of memory and CPUs), there will need to be
some sort of interface between QEMU and the ACPI implementation. That's
already outside of the realm of DT, so as previously mentioned a simple
conversion doesn't cover the general case.

For most static things, device tree should be suitable as-is (i.e.
without translation to ACPI) for all currently supported guests.

I think any ACPI implemenation for a hypervisor should provide a
demonstrable useful feature (e.g. hot-add of CPUs) before merging so we
know the infrastructure is suitable.

> I wouldn't want for ACPI to be "sort of" supported in QEMU, but with a
> limited functionality which makes it not fully useful in practice. I'd
> rather see it as a first class citizen instead, including the ability
> to run AML code.

I agree that there's no point in having ACPI in a guest unless it
provides something which dt does not. I don't know how it should be
structured to provide those useful features.

Thanks,
Mark.

  reply	other threads:[~2014-11-12 10:57 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-30 17:43 [Qemu-devel] [RFC PATCH 0/7] hw/arm/virt: Dynamic ACPI v5.1 table generation Alexander Spyridakis
2014-10-30 17:43 ` [Qemu-devel] [RFC PATCH 1/7] hw/i386: Move ACPI header definitions in an arch-independent location Alexander Spyridakis
2014-10-30 17:44 ` [Qemu-devel] [RFC PATCH 2/7] hw/arm/virt-acpi: Basic skeleton for dynamic generation of ACPI tables Alexander Spyridakis
2014-10-30 17:46   ` Peter Maydell
2014-10-30 17:52 ` [Qemu-devel] [RFC PATCH 0/7] hw/arm/virt: Dynamic ACPI v5.1 table generation Peter Maydell
2014-10-30 18:02   ` [Qemu-devel] [Linaro-acpi] " Mark Rutland
2014-11-05  9:58     ` Claudio Fontana
2014-11-06 12:44       ` Peter Maydell
2014-11-06 12:57         ` Igor Mammedov
2014-11-06 13:33         ` Alexander Spyridakis
2014-11-06 13:52           ` Peter Maydell
2014-11-11 15:29           ` Mark Rutland
2014-11-11 16:31             ` Christoffer Dall
2014-11-11 16:48               ` Mark Rutland
2014-11-11 21:33                 ` Christoffer Dall
2014-11-12 10:38                   ` Mark Rutland
2014-11-12 10:44                     ` Christoffer Dall
2014-11-12 10:55                       ` Julien Grall
2014-11-12 11:07                       ` Mark Rutland
2014-11-12 11:38                         ` Graeme Gregory
2014-11-12 11:52                     ` Paolo Bonzini
2014-11-12 12:04                       ` Mark Rutland
2014-11-12 12:12                         ` Paolo Bonzini
2014-11-12 13:27                         ` Peter Maydell
2014-11-12 13:32                           ` Paolo Bonzini
2014-11-12 15:01                           ` Claudio Fontana
2014-11-12 15:32                             ` Arnd Bergmann
2014-11-12 15:39                               ` Peter Maydell
2014-11-12 15:52                                 ` Paolo Bonzini
2014-11-12 15:57                                   ` Arnd Bergmann
2014-11-12 16:04                                     ` Paolo Bonzini
2014-11-12 16:13                                       ` Arnd Bergmann
2014-11-12 16:25                                         ` Paolo Bonzini
2014-11-12 17:33                                           ` Peter Maydell
2014-11-13  8:32                                           ` Gerd Hoffmann
2014-11-13  8:14                             ` Gerd Hoffmann
2014-11-13  8:10                           ` Gerd Hoffmann
2014-11-13 18:16                             ` Al Stone
2014-11-13 19:22                               ` Paolo Bonzini
2014-11-14  7:54                               ` Gerd Hoffmann
2014-11-12  9:08             ` Claudio Fontana
2014-11-12 10:56               ` Mark Rutland [this message]
2014-11-12 11:15                 ` Arnd Bergmann
2014-11-12 11:34                   ` Christoffer Dall
2014-11-12 11:48                     ` Paolo Bonzini
2014-11-12 12:18                       ` Mark Rutland
2014-11-12 12:27                         ` Paolo Bonzini
2014-11-12 12:40                           ` Christoffer Dall
2014-11-12 13:08                           ` Arnd Bergmann
2014-11-12 13:27                             ` Paolo Bonzini
2014-11-12 13:41                           ` Mark Rutland
2014-11-12 13:59                             ` Paolo Bonzini
2014-11-12 14:10                               ` Mark Rutland
2014-11-12 14:46                                 ` Paolo Bonzini
2014-11-12 13:03                     ` Arnd Bergmann
2014-11-12 13:35                       ` Christoffer Dall
2014-11-12 11:55                   ` Mark Rutland
2014-11-12 18:10               ` Peter Maydell
2014-11-13  9:57                 ` Claudio Fontana
2014-11-17 17:52                   ` Peter Maydell
2014-11-06  6:53     ` Hanjun Guo
2014-11-06 13:30       ` Mark Rutland
2014-11-06 13:33         ` Arnd Bergmann
2014-11-06 15:57       ` Paolo Bonzini
2014-11-06 16:18         ` Igor Mammedov
2014-11-06 16:27           ` Paolo Bonzini
2014-11-07  8:31         ` Hanjun Guo
2015-03-09 12:12   ` Leif Lindholm
2015-03-09 12:28     ` Peter Maydell
2015-03-09 12:47       ` Shannon Zhao
2015-03-09 14:50       ` Leif Lindholm

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=20141112105640.GB28015@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=Jani.Kokkonen@huawei.com \
    --cc=Paul.Mundt@huawei.com \
    --cc=a.spyridakis@virtualopensystems.com \
    --cc=claudio.fontana@huawei.com \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=tech@virtualopensystems.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).