public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	edk2-devel-01 <edk2-devel@lists.01.org>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	"Fan, Jeff" <jeff.fan@intel.com>
Subject: Re: SMRAM sizes on large hosts
Date: Thu, 4 May 2017 13:34:13 +0200	[thread overview]
Message-ID: <ed570fd7-998e-52ce-6e3b-3facd4ac1ae4@redhat.com> (raw)
In-Reply-To: <20170504102359.45724558@nial.brq.redhat.com>

On 05/04/17 10:23, Igor Mammedov wrote:
> On Thu, 4 May 2017 00:33:27 +0200
> Laszlo Ersek <lersek@redhat.com> wrote:
> 
> [...] 
>> If we invented a read-only, side-effect-free PCI config space register
>> that gave me this value plain and simple (similarly to how a new fw_cfg
>> file would do), that would be a lot cleaner for me.
> Just a thought,
> have you considered firmware setting size it needs explicitly?
> That way we won't have to bump that value on qemu side when
> qemu dictated size becomes too small and won't need compat cruft
> around it.

The problem is that I don't know what size to set. The per-VCPU SMRAM
demand varies (mostly, grows) over time as edk2's SMM stack gets new
features and/or is refactored occasionally. The size hint would have to
come from OvmfPkg (platform code) while the overwhelming majority of the
SMM stack lives outside of OvmfPkg.

Also, it's not just data that is allocated from SMRAM, it's also the SMM
driver binaries themselves. The size of those varies even with the
compiler toolchain that you use to build OVMF -- for example, with
gcc-5, link-time optimization is enabled in edk2, which results in
significantly smaller binaries --, and whether you build OVMF for NOOPT
/ DEBUG / RELEASE. This kind of difference is likely not significant per
se, but it could be the difference between working with N*100 VCPUs, or
only with N*100-5 VCPUs.

So I continue to think of SMRAM size as another board property, like
plain RAM size. If the guest payload doesn't fit, make QEMU provide more
of it, be it disk space, normal RAM, or SMRAM. In fact I think the SMRAM
size property should not be an X-* property but something that users
could *validly* override on the command line, if they wanted to. Even
exposing it on the libvirt level wouldn't be wrong, I believe; the same
way we already expose whether SMM emulation is enabled at all.

Thanks
Laszlo


  reply	other threads:[~2017-05-04 11:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-02 18:16 SMRAM sizes on large hosts Laszlo Ersek
2017-05-02 20:49 ` Kinney, Michael D
2017-05-03  1:20   ` Yao, Jiewen
2017-05-03  6:57   ` Gerd Hoffmann
2017-05-03 12:56     ` Paolo Bonzini
2017-05-03 13:14       ` Laszlo Ersek
2017-05-03 13:26         ` Paolo Bonzini
2017-05-03 13:35           ` Laszlo Ersek
2017-05-03 13:55             ` Paolo Bonzini
2017-05-03 22:34               ` Laszlo Ersek
2017-05-03 12:58     ` Laszlo Ersek
2017-05-03 13:44       ` Gerd Hoffmann
2017-05-03 22:33         ` Laszlo Ersek
2017-05-03 23:36           ` Laszlo Ersek
2017-05-04  6:18             ` Gerd Hoffmann
2017-05-04 14:52             ` Gerd Hoffmann
2017-05-04 15:21               ` Laszlo Ersek
2017-05-04  8:23           ` Igor Mammedov
2017-05-04 11:34             ` Laszlo Ersek [this message]
2017-05-04 14:00               ` Igor Mammedov
2017-05-04 14:41                 ` Gerd Hoffmann
2017-05-04 14:50                   ` Igor Mammedov
2017-05-04 15:19                     ` Laszlo Ersek

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-list 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=ed570fd7-998e-52ce-6e3b-3facd4ac1ae4@redhat.com \
    --to=devel@edk2.groups.io \
    /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