From: Laszlo Ersek <lersek@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin O'Connor <kevin@koconnor.net>,
qemu devel list <qemu-devel@nongnu.org>,
Gerd Hoffmann <kraxel@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
"Jordan Justen (Intel address)" <jordan.l.justen@intel.com>,
Michael Kinney <michael.d.kinney@intel.com>
Subject: Re: [Qemu-devel] [PATCH v3 for-2.9 0/3] q35: add negotiable broadcast SMI
Date: Fri, 25 Nov 2016 13:31:17 +0100 [thread overview]
Message-ID: <0067a71d-74e8-d727-a2cb-a5e6dfd09127@redhat.com> (raw)
In-Reply-To: <20161125055952-mutt-send-email-mst@kernel.org>
On 11/25/16 05:00, Michael S. Tsirkin wrote:
> On Thu, Nov 24, 2016 at 09:37:41AM +0100, Laszlo Ersek wrote:
>> On 11/24/16 05:29, Michael S. Tsirkin wrote:
>>> On Wed, Nov 23, 2016 at 07:38:35PM -0500, Kevin O'Connor wrote:
>>>> As a general comment - it does seem unfortunate that we keep building
>>>> adhoc interfaces to communicate information from firmware to QEMU. We
>>>> have a generic mechanism (fw_cfg) for passing adhoc information from
>>>> QEMU to the firmware, but the inverse seems to always involve magic
>>>> pci registers, magic io space registers, specific init ordering, etc.
>>>
>>> FWIW I posted a proposal
>>> fw-cfg: support writeable blobs
>>> a while ago to try to address that
>>>
>>
>> Yes, here's the discussion (Feb 2016):
>>
>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg354852.html
>>
>> and it was even part of a pull req (Mar 2016):
>>
>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg359348.html
>>
>> but it wasn't merged, apparently.
>>
>> If QEMU (re)gains this feature, I can try basing the broadcast SMI
>> negotiation on it.
>>
>> Thanks
>> Laszlo
>
> I dropped since it wasn't used yet. Go ahead and include it
> in your patchset if you like it.
>
I can do that, but I'm no longer sure Paolo still approves of the
broadcast SMI idea.
The way I see it, I can work on getting broadcast SMI functional (with
whichever negotiation method we deem suitable), and make the basic
feature set (which ignores VCPU hotplug entirely) reliable, for now.
Then, later, we can look into VCPU hotplug. VCPU hotplug is already
broken in OVMF and whatever we do for broadcast SMI cannot worsen the
user-observable VCPU hotplug status.
(Note that VCPU hotplug will require a whole bunch of non-platform code
in edk2, such as UefiCpuPkg/Library/MpInitLib, UefiCpuPkg/CpuMpPei, and
UefiCpuPkg/CpuDxe, UefiCpuPkg/PiSmmCpuDxeSmm.)
Or, we can delay (or even drop) broadcast SMI until we divine a design
that, with a lot of code everywhere, makes (a) the basic SMM feature set
reliable *and* (b) VCPU hotplug functional, at the exact same time. I'm
not saying this is impossible, but you'll need a better guy for that
than I am. I always work in incremental, small steps, especially where
the subject matter is hard for me to grasp. If you see me walking down
the wrong path and yank me back, that's appreciated, but the broadcast
SMI idea doesn't look wrong, considering feedback from Jordan as to what
real hardware does (and the edk2 UefiCpuPkg.dec default settings).
So, I'm asking for guidance on:
(1) what interface would be preferred for negotiating SMI:
(1a) APM_STS
(1b) writeable fw_cfg
(1c) another IO port
(2) whether to prevent, and if so, how exactly, VCPU hotplug, when the
broadcast SMI is negotiated. By "how", I mean "what code to modify in QEMU".
For (1), my preference is (1a), simply because it's ready. I do see
perspective in (1b) writeable fw_cfg, so if that's preferred, I can
include Michael's patch and rework my patches to utilize it. (As far as
I see, the textual documentation for fw_cfg is not extended by Michael's
patch, so I guess I'd have to do that too.) (1c) is inferior to (1b) in
my opinion and shouldn't be chosen.
Re (2), I'm clueless. Not sure we should care about it. Even if it is a
security problem, that problem exists within the guest, and triggering
it (i.e., hot-plugging a VCPU) requires a host admin action. The host
admin can cause a bunch of other security problems for the guest, via
different misconfigurations. So if we care about (2), it should be
something minimal, to catch "inadvertent" VCPU hotplug attempts. And
then please tell me what code to mess with.
Thanks
Laszlo
next prev parent reply other threads:[~2016-11-25 12:31 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-18 10:36 [Qemu-devel] [PATCH v3 for-2.9 0/3] q35: add negotiable broadcast SMI Laszlo Ersek
2016-11-18 10:36 ` [Qemu-devel] [PATCH v3 for-2.9 1/3] hw/isa/apm: introduce callback for APM_STS_IOPORT writes Laszlo Ersek
2016-11-18 10:36 ` [Qemu-devel] [PATCH v3 for-2.9 2/3] hw/isa/lpc_ich9: add SMI feature negotiation via APM_STS Laszlo Ersek
2016-11-18 10:36 ` [Qemu-devel] [PATCH v3 for-2.9 3/3] hw/isa/lpc_ich9: ICH9_APM_STS_F_BROADCAST_SMI: inject SMI on all VCPUs Laszlo Ersek
2016-11-18 14:10 ` [Qemu-devel] [PATCH v3 for-2.9 0/3] q35: add negotiable broadcast SMI Michael S. Tsirkin
2016-11-23 15:48 ` Laszlo Ersek
2016-11-23 22:35 ` Paolo Bonzini
2016-11-24 0:01 ` Laszlo Ersek
2016-11-24 0:31 ` Laszlo Ersek
2016-11-24 0:38 ` Kevin O'Connor
2016-11-24 4:29 ` Michael S. Tsirkin
2016-11-24 8:37 ` Laszlo Ersek
2016-11-25 4:00 ` Michael S. Tsirkin
2016-11-25 12:31 ` Laszlo Ersek [this message]
2016-11-25 12:40 ` Laszlo Ersek
2016-11-28 9:01 ` Gerd Hoffmann
2016-11-28 10:22 ` Laszlo Ersek
2016-11-28 11:53 ` Paolo Bonzini
2016-11-25 14:22 ` Igor Mammedov
2016-11-24 14:55 ` Igor Mammedov
2016-11-24 17:05 ` Paolo Bonzini
2016-11-24 18:02 ` Igor Mammedov
2016-11-25 8:55 ` Paolo Bonzini
2016-11-25 14:10 ` Igor Mammedov
2016-11-28 9:41 ` Paolo Bonzini
2016-11-28 11:24 ` Igor Mammedov
2016-11-28 11:51 ` Paolo Bonzini
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=0067a71d-74e8-d727-a2cb-a5e6dfd09127@redhat.com \
--to=lersek@redhat.com \
--cc=imammedo@redhat.com \
--cc=jordan.l.justen@intel.com \
--cc=kevin@koconnor.net \
--cc=kraxel@redhat.com \
--cc=michael.d.kinney@intel.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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 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).