From nobody Tue Feb 10 14:33:19 2026 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=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615392340; cv=none; d=zohomail.com; s=zohoarc; b=b/3hu1w+D5wfFsNjHlIfE+aFmy8uzSI7Hb+7yw0p8zp7Ep8K0bX0/9FMXuVEPY9Y09z/wigP+HJzqRcByfop4EbJe5KI8LqvEvVkkkHfXeX7kwsI3xnvqqXYYlajKLZ2kBzVn0rWLVjNCM3ZdjHRhHpLz0dae22WwumIl/nezr4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615392340; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IR6vFLzUACk+G2n73bw/zv7txMf+sDqfwEPpB5jBt2E=; b=PEmsA9dvSSP1uo/xcgRkRaVJtaZTVOgONQxr0oCCbupOc1zN0XlxBTA2sCPAR5o8eglpNyIC+DSkrzAmrVaX2VGQr6iNCaSdgfccA932fe5Gv9lOQeQ9DsRsRj/Vnl0eohWwM73zIy5VURRwuwe4j1+7F5bxZBaEqdqvQsLAiNs= 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=fail 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 1615392340588455.00973179722746; Wed, 10 Mar 2021 08:05:40 -0800 (PST) Received: from localhost ([::1]:57876 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lK1L8-0006tY-2i for importer@patchew.org; Wed, 10 Mar 2021 11:05:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lK1G3-0004cw-IA for qemu-devel@nongnu.org; Wed, 10 Mar 2021 11:00:23 -0500 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]:33621) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lK1G1-0002jx-Mv for qemu-devel@nongnu.org; Wed, 10 Mar 2021 11:00:23 -0500 Received: by mail-ej1-x62c.google.com with SMTP id jt13so39766020ejb.0 for ; Wed, 10 Mar 2021 08:00:21 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q20sm10259207ejs.41.2021.03.10.08.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 08:00:10 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BC7DD1FF9B; Wed, 10 Mar 2021 16:00:03 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IR6vFLzUACk+G2n73bw/zv7txMf+sDqfwEPpB5jBt2E=; b=gf7eH1U0fD3i/L4Cn77E7dK5yphSv1EyV1ndkFrUyjClzXVcrFMpyygN1j/hbweuZg d6iHu7gEfG4bdNUGdV+ElkDb95bRHq8vT4CCW1oZjaDBix0hn/hOG9VBCHA90AL5DeNk opCu8Dml657lniNj8MjI4b4gWdE4E3oHrRRH5gDodcWFSKy3o3wzEg6eiQh9PhBX63Vz LnjZ7H2iCtasPPimHVHBGUwFMjPJaF7QDdkqLeDtPYmYVJpm+6mLrRIwZ3tQxpZlHWZ6 mTjLcObi2vopkYSJkTsq/pQnSnt+pL4c4KFP0+PJIbjsMU1qjIgyU1DjVwpPsvoA9niT IIPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IR6vFLzUACk+G2n73bw/zv7txMf+sDqfwEPpB5jBt2E=; b=Ux6Uw4aYtjRCo5VrTpxc6TdqkAP5gAb62/c6Pz25PmRj3itEGsIGbV9c3LzI1xxsQt ZV8EsUR4iO1IgUiWUj+CY1Wp8FyP5L/SDS/qF8feMnS3hfmFp1/jF3yUIDM8+QzQvrPm EZva3+VsbtyVzWaTnhBvMmCHWy+0Fpu0reLFb8AJHIAadoGdoTybwJgpFjNNDCdRwSjK iSb5c6TD7G2dZJr9zuVSplU9t0lnZ7nL25459kjkAVnLO2wNm8P0kJ3RMlQNbjigUCZV Gz7jrtapmOG9Xd6ZopAVYTH/N7SoaSmp2p9m/IOlktY/s0/fKkBC9tOuyJpctCqw0ozO Q4Ug== X-Gm-Message-State: AOAM530+FB9E4xGyw33M/xhAINunf1stn3VPOC91u6DZAzQUwtKYKplL NtPjchcOGNh5kvFE3MrjPY4TUw== X-Google-Smtp-Source: ABdhPJxMg4tVsNupsiitJHNHfj3d3oi4GJc74XwtG4DmhBuMLgifratdY97DbczToMlA9ZdFygu8ug== X-Received: by 2002:a17:906:72d1:: with SMTP id m17mr4407947ejl.118.1615392015229; Wed, 10 Mar 2021 08:00:15 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 12/15] docs: add some documentation for the guest-loader Date: Wed, 10 Mar 2021 15:59:59 +0000 Message-Id: <20210310160002.11659-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210310160002.11659-1-alex.bennee@linaro.org> References: <20210310160002.11659-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::62c; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, 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 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: , Cc: Alistair Francis , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Alistair Francis Message-Id: <20210303173642.3805-7-alex.bennee@linaro.org> diff --git a/docs/system/guest-loader.rst b/docs/system/guest-loader.rst new file mode 100644 index 0000000000..37d03cbd89 --- /dev/null +++ b/docs/system/guest-loader.rst @@ -0,0 +1,54 @@ +.. + Copyright (c) 2020, Linaro + +Guest Loader +------------ + +The guest loader is similar to the `generic-loader` although it is +aimed at a particular use case of loading hypervisor guests. This is +useful for debugging hypervisors without having to jump through the +hoops of firmware and boot-loaders. + +The guest loader does two things: + + - load blobs (kernels and initial ram disks) into memory + - sets platform FDT data so hypervisors can find and boot them + +This is what is typically done by a boot-loader like grub using it's +multi-boot capability. A typical example would look like: + +.. parsed-literal:: + + |qemu_system| -kernel ~/xen.git/xen/xen \ + -append "dom0_mem=3D1G,max:1G loglvl=3Dall guest_loglvl=3Dall" \ + -device guest-loader,addr=3D0x42000000,kernel=3DImage,bootargs=3D"root= =3D/dev/sda2 ro console=3Dhvc0 earlyprintk=3Dxen" \ + -device guest-loader,addr=3D0x47000000,initrd=3Drootfs.cpio + +In the above example the Xen hypervisor is loaded by the -kernel +parameter and passed it's boot arguments via -append. The Dom0 guest +is loaded into the areas of memory. Each blob will get +`/chosen/module@` entry in the FDT to indicate it's location and +size. Additional information can be passed with by using additional +arguments. + +Currently the only supported machines which use FDT data to boot are +the ARM and RiscV `virt` machines. + +Arguments +^^^^^^^^^ + +The full syntax of the guest-loader is:: + + -device guest-loader,addr=3D[,kernel=3D,[bootargs=3D]]= [,initrd=3D] + +``addr=3D`` + This is mandatory and indicates the start address of the blob. + +``kernel|initrd=3D`` + Indicates the filename of the kernel or initrd blob. Both blobs will + have the "multiboot,module" compatibility string as well as + "multiboot,kernel" or "multiboot,ramdisk" as appropriate. + +``bootargs=3D`` + This is an optional field for kernel blobs which will pass command + like via the `/chosen/module@/bootargs` node. diff --git a/docs/system/index.rst b/docs/system/index.rst index cee1c83540..6ad9c93806 100644 --- a/docs/system/index.rst +++ b/docs/system/index.rst @@ -26,6 +26,7 @@ Contents: ivshmem linuxboot generic-loader + guest-loader vnc-security tls gdb diff --git a/MAINTAINERS b/MAINTAINERS index a1170bad5a..2ad004fed5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2026,6 +2026,7 @@ Guest Loader M: Alex Benn=C3=A9e S: Maintained F: hw/core/guest-loader.c +F: docs/system/guest-loader.rst =20 Intel Hexadecimal Object File Loader M: Su Hang --=20 2.20.1