From nobody Fri May 17 16:47:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1601340110; cv=none; d=zohomail.com; s=zohoarc; b=Gi2nLlp4csRzZ2QTrMXzcO4MBAdfpbSdQbmeKtsoHhobqqpTNquEHwAm4msMeKfUC1AdB5bOsPJexu1ePymUtYuXY97lfmPpx34sBei92elcl5Ifk7ywPBPypAP8xLpC9FfEC+JMMLO4mR6ZZuwyeENS3rUqWeojjeVF+n+rpUc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601340110; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=sYg5Kzsr8KLjdNXvzs0OEoN/iOhrZqYW4HJOWew+/+s=; b=mYUIqPcmpG1FgonDQ6DG76qrtU8M968ZsmmM5sWwUVrW8c54gMDMDy1Q+6DigQyCx33iKvEpuR2A+4Zee3gUSVaExDguetgz75ctpfxVpIVo6TcLB0ajs0UFtnazdLlJUUWfmI6R1G3q3RWnP2ZU3jY4ekUMTsOXCpQ8HpxCgSQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1601340110076682.5411248173014; Mon, 28 Sep 2020 17:41:50 -0700 (PDT) Received: from localhost ([::1]:39684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kN3iF-0003Xk-GT for importer@patchew.org; Mon, 28 Sep 2020 20:41:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3SYJyXwsKCho7IA8DD4CE4D6EE6B4.2ECG4CK-34L4BDED6DK.EH6@flex--hskinnemoen.bounces.google.com>) id 1kN3gD-0002GG-Is for qemu-devel@nongnu.org; Mon, 28 Sep 2020 20:39:41 -0400 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]:54424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3SYJyXwsKCho7IA8DD4CE4D6EE6B4.2ECG4CK-34L4BDED6DK.EH6@flex--hskinnemoen.bounces.google.com>) id 1kN3gC-0000PR-4F for qemu-devel@nongnu.org; Mon, 28 Sep 2020 20:39:41 -0400 Received: by mail-yb1-xb4a.google.com with SMTP id s128so2930157ybc.21 for ; Mon, 28 Sep 2020 17:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=sYg5Kzsr8KLjdNXvzs0OEoN/iOhrZqYW4HJOWew+/+s=; b=BZ3o1k9NYKMO7qfF55oxjLloDhis/h5uzOHdD1+Glkqmycmr7sdCcWQLIM8oHrLam/ ajvjmoiHKOmluhD5kRvP9yAy8nkLeOn9zNnG+l/kin32Slr+YyXhfrS4vOmw+sO5hTFw 7dH3QsZWfT+1QozINyHSnTShuWvSazI444mwNyCv/r0l3MFyH6OWlCMG0CF4RDrCb1wJ LlgtJkmSd75Gxk+vd3QQHqybpwIXNZFITctH212DCsBAyAxm4yicYhvpez5VKnymXsRp Rmv9V5j3igggOx2UU00uA+7/X3QlP3xfgnEl5KUQHfg9dho2KIiKE/Js7XK2Hq0w2LhD aavw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=sYg5Kzsr8KLjdNXvzs0OEoN/iOhrZqYW4HJOWew+/+s=; b=UbMguYQvh2UDS7Tiky/VdkQgm99QqJSYjqSC2e9LFUYWPOvxUyqZyry+ustPxcH44S xvlq5ZwOzl2nkwnqZ7NNDHO9UOFkX43mrPhfulS7CJP7//1WbfdAJWLuKlzAxH63pitv 0pBf5sBO5LZm1og0WAqE7m1BzvG7goeoIscbzfXfBpJpsUQjrdT2eVPXLZCDPYZy39oN /KcyEyufvhfP809E1GxkSVoF4ZSiW3dujUb3BEjkXRZ5OOZTuporLYZCBd/HBNgvdMjM I6uk7z/3sL3ipF1pz0xTR0iL7WmQIb/zJBZ6S7ErEVLcEqtKBWtyu4VWda12+zdM8V4C 6uiw== X-Gm-Message-State: AOAM532QgsZrdkFiU6MnPlc8pkXGCfXX2uhf306Qo8Bm/PJoedr2jkUf vOwzfh3GEAvRe44BflCu+Yy/F3a8h/v7ZHqiLPZDVhwZtrDX/S2i5hAJICdgODa+usySr12ASmq uaJJmac+9wqF+cVsnQ2zYAEEk3VWs4zRMPH8RS1nMid60OHFx7V+ToF2ypi/YLZTkjYEsDEWp9Q == X-Google-Smtp-Source: ABdhPJxTcetwlCFZyOjMP+C2TBvcHwYdQfNWBOFiw86GDfnqsPDSJMZnoA0+3ma64bpwlR8iehEF39QYoElAnO4qTQ== X-Received: from skybert.c.googlers.com ([fda3:e722:ac3:10:24:72f4:c0a8:3107]) (user=hskinnemoen job=sendgmr) by 2002:a25:d1d4:: with SMTP id i203mr2838876ybg.429.1601339977897; Mon, 28 Sep 2020 17:39:37 -0700 (PDT) Date: Mon, 28 Sep 2020 17:39:14 -0700 In-Reply-To: <20200929003916.4183696-1-hskinnemoen@google.com> Message-Id: <20200929003916.4183696-2-hskinnemoen@google.com> Mime-Version: 1.0 References: <20200929003916.4183696-1-hskinnemoen@google.com> X-Mailer: git-send-email 2.28.0.709.gb0816b6eb0-goog Subject: [RFC 1/3] docs: enable sphinx blockdiag extension 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 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::b4a; envelope-from=3SYJyXwsKCho7IA8DD4CE4D6EE6B4.2ECG4CK-34L4BDED6DK.EH6@flex--hskinnemoen.bounces.google.com; helo=mail-yb1-xb4a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -100 X-Spam_score: -10.1 X-Spam_bar: ---------- X-Spam_report: (-10.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.468, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: Havard Skinnemoen From: Havard Skinnemoen via X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Havard Skinnemoen --- docs/conf.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 0dbd90dc11..7c72f1a074 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -67,7 +67,10 @@ needs_sphinx =3D '1.6' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions =3D ['kerneldoc', 'qmp_lexer', 'hxtool', 'depfile'] +extensions =3D ['kerneldoc', 'qmp_lexer', 'hxtool', 'depfile', 'sphinxcont= rib.blockdiag'] + +# Fontpath for blockdiag (truetype font) +blockdiag_fontpath =3D '/usr/share/fonts/truetype/liberation/LiberationSan= s-Regular.ttf' =20 # Add any paths that contain templates here, relative to this directory. templates_path =3D ['_templates'] --=20 2.28.0.709.gb0816b6eb0-goog From nobody Fri May 17 16:47:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1601340119; cv=none; d=zohomail.com; s=zohoarc; b=nL9w7GWwZD0FTLZuozx6wL62UP1pMS/v7pOXkTrroeHJ2UnexTKhmFyya5zgqD4UM9XSWGqPw3iyDENpnePyQzXJTQn1fSwXo8RGs/jf6CmU+OemPspC1UqMsN0FnPGgpakF57Umk3Sog/dd2HjGIYE4Pr4Y6sdwNpHxBv56EDs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601340119; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=cQm7cQnpxJnDzr+vk7QqhOO9BS7RbVnXECEf70CLEk4=; b=lo1lzqe98jZtUIbDwdQ3sFcFpTEpm4quji1MBuX7X8Kr+LTy0LsBnn93zPs2sBhKL1XSC/0lNnCBWpuEosslG1wd4U+93itv3U7vf0GBhLgbknSiN7avWpAltJM0ykQ9Bs+HzBjeyDkZDYXmt4EAoQS9VwKOq3n/ovF7rb0hLuM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 160134011957478.28440639155349; Mon, 28 Sep 2020 17:41:59 -0700 (PDT) Received: from localhost ([::1]:40020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kN3iP-0003gs-BN for importer@patchew.org; Mon, 28 Sep 2020 20:41:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3S4JyXwsKChw9KCAFF6EG6F8GG8D6.4GEI6EM-56N6DFGF8FM.GJ8@flex--hskinnemoen.bounces.google.com>) id 1kN3gF-0002HA-5x for qemu-devel@nongnu.org; Mon, 28 Sep 2020 20:39:43 -0400 Received: from mail-qk1-x749.google.com ([2607:f8b0:4864:20::749]:55211) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3S4JyXwsKChw9KCAFF6EG6F8GG8D6.4GEI6EM-56N6DFGF8FM.GJ8@flex--hskinnemoen.bounces.google.com>) id 1kN3gD-0000PV-D1 for qemu-devel@nongnu.org; Mon, 28 Sep 2020 20:39:42 -0400 Received: by mail-qk1-x749.google.com with SMTP id r184so1663085qka.21 for ; Mon, 28 Sep 2020 17:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=cQm7cQnpxJnDzr+vk7QqhOO9BS7RbVnXECEf70CLEk4=; b=HU6erWKPw9aMyTgiKxlAcd2qHr20i+LP1CvcEwXrgmv16+zZwShULOzZz/tNutSUZt 530oaldDcj8awRacuv7AyiKzGAQdLZM9UwE24th1UIvUSD6dwtRLILTxXO+/njkIqA1i ywOP7c9c2y0omiqdRTFNZ3U1T8Fxsu0px7oDXDmogJSOY7swrjbT2o5DuPE+QDMOzzo1 JxgZMaRuYSa/k2iG9JwPJf+ywvdVyxHRep0EPsZiHCqcMpcoSGKsedHySRaKUh5e4Vdy QabkwPte1fOi1jwq0AxhEZIcQ6donG8/IQrNAM6g5krup8w5yuFHpVLJnMBfWVrJYSw3 cNJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=cQm7cQnpxJnDzr+vk7QqhOO9BS7RbVnXECEf70CLEk4=; b=nKt97U6VI1oHy/k8rZabb2BRtUNihNHNjl58BbLwHWKvZBc3ZQLzb7c6/mj5P0KjNC KN6JJDsy0FbyyQ28kVOHFeqcQKSVfWIiXVm80fHONkekVTdt0P1AwbgeDR7Ivz78/Yht 7WlVz7Wok5UO2AYYsE6t/arRnzex96bzixgKhrwXEcEYqydciCpl0g26Og0Nqr7fJb4z pgHVxoHlODSFQzI5jlhpLog5agxbK3JoM4a3sTj/k3Z3G+8R8lmJAjaEyFBkj+lj9E37 rcyYnhKILoJO/STRg1mIDBG4fbHRas3jtGY5PntHP0XSmBAW8uN/lLtG8MXMZ2W7GTNZ 9s7A== X-Gm-Message-State: AOAM53287dUGNutQuhpJWINnXhVskiOobXYxSueC9HK0QHZ/m6yh1zHj KurE03jcFZMEO5FoQc5ErfJ2noXFqcPHrMGC7uZZdWbz8OLLXLnBRMhuPBgeJ6i2oVUHvdJgN0D eHXa9iSEYzqsFA4UUy8UgtZ03/Y4RcbOmU6Mr/GU6GzphXXDHIIVgo3dkNIFL4lrwx9YW6qOa8A == X-Google-Smtp-Source: ABdhPJwcbn6pxAJejfFvxdbgXmAxP0hPbeo0iA2hBs+h4G2i5Dafpfg2tOJWLEdp/l7awGmWVQnOjXMeGdwdOPoJoA== X-Received: from skybert.c.googlers.com ([fda3:e722:ac3:10:24:72f4:c0a8:3107]) (user=hskinnemoen job=sendgmr) by 2002:ad4:4b61:: with SMTP id m1mr2320198qvx.11.1601339979400; Mon, 28 Sep 2020 17:39:39 -0700 (PDT) Date: Mon, 28 Sep 2020 17:39:15 -0700 In-Reply-To: <20200929003916.4183696-1-hskinnemoen@google.com> Message-Id: <20200929003916.4183696-3-hskinnemoen@google.com> Mime-Version: 1.0 References: <20200929003916.4183696-1-hskinnemoen@google.com> X-Mailer: git-send-email 2.28.0.709.gb0816b6eb0-goog Subject: [RFC 2/3] docs/specs: IPMI device emulation: main processor 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 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::749; envelope-from=3S4JyXwsKChw9KCAFF6EG6F8GG8D6.4GEI6EM-56N6DFGF8FM.GJ8@flex--hskinnemoen.bounces.google.com; helo=mail-qk1-x749.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -100 X-Spam_score: -10.1 X-Spam_bar: ---------- X-Spam_report: (-10.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.468, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: Havard Skinnemoen From: Havard Skinnemoen via X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This document is an attempt to briefly document the existing IPMI emulation support on the main processor. It provides the necessary background for the BMC-side IPMI emulation proposed by the next patch. Signed-off-by: Havard Skinnemoen --- docs/specs/index.rst | 1 + docs/specs/ipmi.rst | 100 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 docs/specs/ipmi.rst diff --git a/docs/specs/index.rst b/docs/specs/index.rst index 1b0eb979d5..9fdb94a578 100644 --- a/docs/specs/index.rst +++ b/docs/specs/index.rst @@ -14,5 +14,6 @@ Contents: ppc-spapr-xive ppc-spapr-numa acpi_hw_reduced_hotplug + ipmi tpm acpi_hest_ghes diff --git a/docs/specs/ipmi.rst b/docs/specs/ipmi.rst new file mode 100644 index 0000000000..e0f9ab20ba --- /dev/null +++ b/docs/specs/ipmi.rst @@ -0,0 +1,100 @@ +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +IPMI device emulation +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +QEMU supports emulating many types of machines. This includes machines tha= t may +serve as the main processor in an IPMI system, e.g. x86 or POWER server +processors, as well as machines emulating ARM-based Baseband Management +Controllers (BMCs), e.g. AST2xxx or NPCM7xxx systems-on-chip. + +Main processor emulation +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +A server platform may include one of the following system interfaces for +communicating with a BMC: + +* A Keyboard Controller Style (KCS) Interface, accessible via ISA + (``isa-ipmi-kcs``) or PCI (``pci-ipmi-kcs``). +* A Block Transfer (BT) Interface, accessible via ISA (``isa-ipmi-bt``) or= PCI + (``pci-ipmi-bt``). +* An SMBus System Interface (SSIF; ``smbus-ipmi``). + =20 +These interfaces can all be emulated by QEMU. To emulate the behavior of t= he +BMC, the messaging interface emulators use one of the following backends: + +* A BMC simulator running within the QEMU process (``ipmi-bmc-sim``). +* An external BMC simulator or emulator, connected over a chardev + (``ipmi-bmc-extern``). `ipmi_sim + `_ + from OpenIPMI is an example external BMC emulator. + +The following diagram shows how these entities relate to each other. + +.. blockdiag:: + + blockdiag main_processor_ipmi { + orientation =3D portrait + default_group_color =3D "none"; + class msgif [color =3D lightblue]; + class bmc [color =3D salmon]; + + ipmi_sim [color=3D"aquamarine", label=3D"External BMC"] + ipmi-bmc-extern <-> ipmi_sim [label=3D"chardev"]; + + group { + orientation =3D portrait + + ipmi-interface <-> ipmi-bmc; + + group { + orientation =3D portrait + + ipmi-interface [class =3D "msgif"]; + isa-ipmi-kcs [class=3D"msgif", stacked]; + + ipmi-interface <- isa-ipmi-kcs [hstyle =3D generalization]; + } + + + group { + orientation =3D portrait + + ipmi-bmc [class =3D "bmc"]; + ipmi-bmc-sim [class=3D"bmc"]; + ipmi-bmc-extern [class=3D"bmc"]; + + ipmi-bmc <- ipmi-bmc-sim [hstyle =3D generalization]; + ipmi-bmc <- ipmi-bmc-extern [hstyle =3D generalization]; + } + + } + } + +IPMI System Interfaces +---------------------- + +The system software running on the main processor may use a *system interf= ace* +to communicate with the BMC. These are hardware devices attached to an ISA= , PCI +or i2c bus, and in QEMU, they all need to implement ``ipmi-interface``. +This allows a BMC implementation to interact with the system interface in a +standard way. + +IPMI BMC +-------- + +The system interface devices delegate emulation of BMC behavior to a BMC +device, that is a subclass of ``ipmi-bmc``. This type of device is called +a BMC because that's what it looks like to the main processor guest softwa= re. + +The BMC behavior may be simulated within the qemu process (``ipmi-bmc-sim`= `) or +further delegated to an external emulator, or a real BMC. The +``ipmi-bmc-extern`` device has a required ``chardev`` property which speci= fies +the communications channel to the external BMC. + +Wire protocol +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +The wire protocol used between ``ipmi-bmc-extern`` and the external BMC +emulator is defined by `README.vm +`_ fr= om +the OpenIPMI project. --=20 2.28.0.709.gb0816b6eb0-goog From nobody Fri May 17 16:47:47 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1601340239; cv=none; d=zohomail.com; s=zohoarc; b=MqsO+w7Ebm8XecWYfJOBWcp7mX+Qk0zsBhIwoDe2rDDHRf3dOFMoIN2phFRxDoLAjJHZMCu+Ip15sXe405W13MXYpIBFfaFThAz438jiyn3hxXix7khGXyJkRHWv5kA2kW1+E0yKmVzffaAMnFXOexz+M4xsGhoxZtt+otDbGbE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601340239; h=Content-Type:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=IE9YiOAtzWYoZYcMDmL5AUmQ+PJ06ojbARZV342gJy8=; b=fC8kJQakzs1X6avSnqcCBwfq0rRKgTxEDEHPAKKvZirWJc5m49bT9qz70xQ69gk5ZzyOeVySRJsi+wvJ50K7+dgNLyQwx2CFCp4ZI8NS8CGUKv2H9xuQjY8fQ/df9jugl9mMKjsg8fNPbmrEuGXIo9igXw/uZwdQ0enmwp5oHyg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1601340239684341.92787750170396; Mon, 28 Sep 2020 17:43:59 -0700 (PDT) Received: from localhost ([::1]:44850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kN3kM-0005h7-90 for importer@patchew.org; Mon, 28 Sep 2020 20:43:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3TIJyXwsKCh0ALDBGG7FH7G9HH9E7.5HFJ7FN-67O7EGHG9GN.HK9@flex--hskinnemoen.bounces.google.com>) id 1kN3gG-0002K3-KB for qemu-devel@nongnu.org; Mon, 28 Sep 2020 20:39:44 -0400 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]:37689) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3TIJyXwsKCh0ALDBGG7FH7G9HH9E7.5HFJ7FN-67O7EGHG9GN.HK9@flex--hskinnemoen.bounces.google.com>) id 1kN3gE-0000Ph-Ra for qemu-devel@nongnu.org; Mon, 28 Sep 2020 20:39:44 -0400 Received: by mail-yb1-xb49.google.com with SMTP id x1so3013683ybi.4 for ; Mon, 28 Sep 2020 17:39:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=IE9YiOAtzWYoZYcMDmL5AUmQ+PJ06ojbARZV342gJy8=; b=eS4Q8vjXUpdO9EMbbN+iv3/haS33YOyKlZo034g1j5iji3pIYcwiYMupM4zGCQIeBV NLE034W5P8xfb6zqLQxMlmw1UVQ6qymDbH17icyXA3oZSqnX0MThtWUXa11rh5j1pNnR HVK5he3pfbYPaoz/yhHnpKtlf9tgO+Mv6j5d1LwbiHrBrxeluXrrjs2uV8xAPyHYBHac Iau+JZsChrNaiDPsa/KsH7I5vZBFefIRvC3v3AKpQZ+H+OnsrpYV4be7UJneLCgfy6pD b8QtZ+4znocqtyvyHVEnCR28vaED7GiJmcKhQxU/yAo7SbhqEy4ISfxGByxFeopZoqPA CSEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=IE9YiOAtzWYoZYcMDmL5AUmQ+PJ06ojbARZV342gJy8=; b=aaEnd6174OtEk8/axTpChRy38Z32uuPcvm7T+P0QDeQsHogNgFAl6EUS1NQVOOqp9V YZoUF9ZXk/uHiBYuUP7KNr6z6ic69+fmTpF/n8olK4nqendSNq9qZNdSm+cPSjNJGTvy 8jQTyaLqRynH2p1VlDUufiFe+Dha661tkWZn2D3B92i77TNC3cZBGC63z86rTBuvcJ2h REGW4cHKqYVDj9++MYOPTGdmkrljUudVQ0bX39S5ls7rWLbQ48cce7qkQbKY/sEQRW1X Cc5T50W/Lmnj1ptn1X0PiGmgbX1z6YB0ICtszqtLkR+3br0ddTdIm1IvJZV9ZbNChrNk YpQQ== X-Gm-Message-State: AOAM533Bpc39VgV9izs7xi0f4bAv7VMTQgOF+rQZjMQ755PURr9ocp2B yBnX2NFujRsZxXkGw7t/I95vewflxdDj3q23UYziapnQptedGCRXvyrQYbLSsyLtfeMAwljgiCF SsaFG33jnGz3jlaHIgsqmle5J6VgsaQ3WsUuCoHkvQfYDXW0IwYQhuzl3Z5evpQPoazBSkkplow == X-Google-Smtp-Source: ABdhPJySV96yQ17e4fJZqw0CTKxsP4G/VCU2QmaKygzlovPsaQQuFlAE6Ni74ez0nqEpfoVfGDD7oUylncpgDKSUFQ== X-Received: from skybert.c.googlers.com ([fda3:e722:ac3:10:24:72f4:c0a8:3107]) (user=hskinnemoen job=sendgmr) by 2002:a25:b78d:: with SMTP id n13mr2876098ybh.152.1601339980945; Mon, 28 Sep 2020 17:39:40 -0700 (PDT) Date: Mon, 28 Sep 2020 17:39:16 -0700 In-Reply-To: <20200929003916.4183696-1-hskinnemoen@google.com> Message-Id: <20200929003916.4183696-4-hskinnemoen@google.com> Mime-Version: 1.0 References: <20200929003916.4183696-1-hskinnemoen@google.com> X-Mailer: git-send-email 2.28.0.709.gb0816b6eb0-goog Subject: [RFC 3/3] docs/specs: IPMI device emulation: BMC 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 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::b49; envelope-from=3TIJyXwsKCh0ALDBGG7FH7G9HH9E7.5HFJ7FN-67O7EGHG9GN.HK9@flex--hskinnemoen.bounces.google.com; helo=mail-yb1-xb49.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -100 X-Spam_score: -10.1 X-Spam_bar: ---------- X-Spam_report: (-10.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.468, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: Havard Skinnemoen From: Havard Skinnemoen via X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- 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 speci= fies the communications channel to the external BMC. =20 +Baseband Management Controller (BMC) emulation +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +.. note:: This section is just a proposal. QEMU does not yet support BMC-s= ide + 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 t= hat +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 n= eed +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 Keybo= ard + Controller Style (KCS) channels. + +.. blockdiag:: + + blockdiag bmc_ipmi { + orientation =3D portrait + default_group_color =3D "none"; + class responder [color =3D lightblue]; + class host [color =3D salmon]; + + host [color=3D"aquamarine", label=3D"External Host"] + + group { + orientation =3D portrait + + group { + orientation =3D portrait + + ipmi-responder [class =3D "responder"] + npcm7xx-ipmi-kcs [class =3D "responder", stacked] + + ipmi-responder <- npcm7xx-ipmi-kcs [hstyle =3D generalizat= ion]; + } + + group { + orientation =3D portrait + + ipmi-host [class =3D "host"]; + ipmi-host-sim [class =3D "host"]; + ipmi-host-extern [class =3D "host"]; + + ipmi-host <- ipmi-host-sim [hstyle =3D generalization]; + ipmi-host <- ipmi-host-extern [hstyle =3D generalization]; + } + + ipmi-responder <-> ipmi-host + } + + ipmi-host-extern <-> host [label=3D"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`` inter= face +to allow an IPMI Host implementation to interact with them in a standard w= ay. + +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 communicati= ons +channel to the external host. The wire format is the same as for +``ipmi-bmc-extern``. + Wire protocol =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 --=20 2.28.0.709.gb0816b6eb0-goog