All of lore.kernel.org
 help / color / mirror / Atom feed
From: Havard Skinnemoen via <qemu-devel@nongnu.org>
To: qemu-devel@nongnu.org
Cc: Avi.Fishman@nuvoton.com, kfting@nuvoton.com, joel@jms.id.au,
	clg@kaod.org,  venture@google.com, wuhaotsh@google.com,
	minyard@acm.org,  Havard Skinnemoen <hskinnemoen@google.com>
Subject: [RFC 3/3] docs/specs: IPMI device emulation: BMC
Date: Mon, 28 Sep 2020 17:39:16 -0700	[thread overview]
Message-ID: <20200929003916.4183696-4-hskinnemoen@google.com> (raw)
In-Reply-To: <20200929003916.4183696-1-hskinnemoen@google.com>

The IPMI document is expanded with a proposal to emulate BMC-side IPMI
devices. This allows a QEMU instance running server software to interact
with a different QEMU instance running BMC firmware, which should
closely model how a real server system works.

The document as rendered by "make sphinxdocs" can be seen here:

https://hskinnemoen.github.io/qemu/specs/ipmi.html

Signed-off-by: Havard Skinnemoen <hskinnemoen@google.com>
---
 docs/specs/ipmi.rst | 83 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 83 insertions(+)

diff --git a/docs/specs/ipmi.rst b/docs/specs/ipmi.rst
index e0f9ab20ba..f45a452ef9 100644
--- a/docs/specs/ipmi.rst
+++ b/docs/specs/ipmi.rst
@@ -91,6 +91,89 @@ further delegated to an external emulator, or a real BMC. The
 ``ipmi-bmc-extern`` device has a required ``chardev`` property which specifies
 the communications channel to the external BMC.
 
+Baseband Management Controller (BMC) emulation
+==============================================
+
+.. note:: This section is just a proposal. QEMU does not yet support BMC-side
+   IPMI emulation.
+
+This section is about emulation of IPMI-related devices in a System-on-Chip
+(SoC) used as a Baseband Management Controller. This is not to be confused with
+emulating the BMC device as seen by the main processor.
+
+SoCs that are designed to be used as a BMC often have dedicated hardware that
+allows them to be connected to one or more of the IPMI System Interfaces. The
+BMC-side hardware interface is not standardized, so each type of SoC may need
+its own device implementation in QEMU, for example:
+
+* ``aspeed-ipmi-ibt`` for emulating the Aspeed iBT peripheral.
+* ``npcm7xx-ipmi-kcs`` for emulating the Nuvoton NPCM7xx Host-to-BMC Keyboard
+  Controller Style (KCS) channels.
+
+.. blockdiag::
+
+    blockdiag bmc_ipmi {
+        orientation = portrait
+        default_group_color = "none";
+        class responder [color = lightblue];
+        class host [color = salmon];
+
+        host [color="aquamarine", label="External Host"]
+
+        group {
+            orientation = portrait
+
+            group {
+                orientation = portrait
+
+                ipmi-responder [class = "responder"]
+                npcm7xx-ipmi-kcs [class = "responder", stacked]
+
+                ipmi-responder <- npcm7xx-ipmi-kcs [hstyle = generalization];
+            }
+
+            group {
+                orientation = portrait
+
+                ipmi-host [class = "host"];
+                ipmi-host-sim [class = "host"];
+                ipmi-host-extern [class = "host"];
+
+                ipmi-host <- ipmi-host-sim [hstyle = generalization];
+                ipmi-host <- ipmi-host-extern [hstyle = generalization];
+            }
+
+            ipmi-responder <-> ipmi-host
+        }
+
+        ipmi-host-extern <-> host [label="chardev"];
+    }
+
+IPMI Responder
+--------------
+
+The software running on the BMC needs to intercept reads and writes to the
+system interface registers on the main processor. This requires special
+hardware that needs to be emulated by QEMU. We'll call these device *IPMI
+responders*.
+
+All *IPMI responder* devices should implement the ``ipmi-responder`` interface
+to allow an IPMI Host implementation to interact with them in a standard way.
+
+IPMI Host
+---------
+
+Mirroring the main processor emulation, the responder devices delegate
+emulation of host behavior to a Host device that is a subclass of
+``ipmi-host``. This type of device is called a Host because that's what it
+looks like to the BMC guest software.
+
+The host behavior may be further delegated to an external emulator (e.g.
+another QEMU VM) through the ``ipmi-host-extern`` host implementation. This
+device has a required ``chardev`` property which specifies the communications
+channel to the external host. The wire format is the same as for
+``ipmi-bmc-extern``.
+
 Wire protocol
 =============
 
-- 
2.28.0.709.gb0816b6eb0-goog



  parent reply	other threads:[~2020-09-29  0:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-29  0:39 [RFC 0/3] QEMU as IPMI BMC emulator Havard Skinnemoen via
2020-09-29  0:39 ` [RFC 1/3] docs: enable sphinx blockdiag extension Havard Skinnemoen via
2020-09-29  0:39 ` [RFC 2/3] docs/specs: IPMI device emulation: main processor Havard Skinnemoen via
2020-09-29  0:39 ` Havard Skinnemoen via [this message]
2020-09-29  2:48 ` [RFC 0/3] QEMU as IPMI BMC emulator no-reply
2020-09-29  2:51 ` no-reply
2020-09-29  5:27 ` Cédric Le Goater
2020-09-29 16:28   ` Havard Skinnemoen
2020-10-01 15:28     ` Cédric Le Goater
2020-09-29 17:46 ` Corey Minyard
2020-09-30  1:05   ` Havard Skinnemoen
2020-09-30  1:54     ` Corey Minyard
2020-10-01 15:32     ` Cédric Le Goater

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=20200929003916.4183696-4-hskinnemoen@google.com \
    --to=qemu-devel@nongnu.org \
    --cc=Avi.Fishman@nuvoton.com \
    --cc=clg@kaod.org \
    --cc=hskinnemoen@google.com \
    --cc=joel@jms.id.au \
    --cc=kfting@nuvoton.com \
    --cc=minyard@acm.org \
    --cc=venture@google.com \
    --cc=wuhaotsh@google.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 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.