From patchwork Thu Nov 24 21:29:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 13055377 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0597AC43219 for ; Thu, 24 Nov 2022 21:46:29 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oyJnA-0006UV-JE; Thu, 24 Nov 2022 16:29:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyJn7-0006SY-Bv for qemu-devel@nongnu.org; Thu, 24 Nov 2022 16:29:53 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oyJn5-00048W-JX for qemu-devel@nongnu.org; Thu, 24 Nov 2022 16:29:53 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 11E685C016A; Thu, 24 Nov 2022 16:29:47 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 24 Nov 2022 16:29:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1669325387; x=1669411787; bh=1zsrzX6vaejmJbURVi62glnsc fYVvJuRsmZxbAbDBaE=; b=jvFckfFpbiJZBJj4U0GneZJ5Qkwb1G6gorijSc+G+ Oo6cWeEqzuyvVDs67Y+xEd3qpu4W4fkHFoDO4mqBFMw4HPSMLGam++FXJ35tQRMm E1tsns/U8z8bUfPpKqR7/t5rJcEp4E/qI+xBnHeATM7Z7wfIh5iF1Fr2TZkqy4V5 kL4PjHtPx7A4fMwiEbnUg3o1s/J0A0yBTog0Z+WIboC/KUP22439lnbok39TBpoj dHLYuX77Nctr0+mjKGkllwrJjPx2FORG1qli+ewjYk8NA76Y0iB55i7r/5jdeeSD VX/W7atkg/fUsvCElWruc45s5ZiUcWQSoTS4PqfSPlQOg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1669325387; x=1669411787; bh=1zsrzX6vaejmJbURVi62glnscfYVvJuRsmZ xbAbDBaE=; b=eUfpqdd7XxqYJ5ZG5lq89RVofhb0SbtDqfmCe03JGTGd8uuI50H Pa+9ZJxKAWIp0iOrNYZK/ljbXb9U61E5xcmXDwaJ6bR/XB0MLQn5OoYMfIjj/+NY u0QWXCQ2TfH9DQumtZAYaVJMWnyjrhmmzNwAiP9LgsRI1Cpnx7IfPBCm6BEi8xVV o7VhT3HliXSZdNfp9bKTA8hC3zxhcudQ9+7rZfFULo616Lh7FwdsyD0TGo8bgmUo by7mGUeNgf/ZJwoidOM8iVwZhmqYMkJAwo6JR6t60nFFsAsNCPka9fI4C+HkDQgc xYObd3W5/EcpVVaX1msLN7xPe+uUnRZ/lKw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieefgdduhedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpeflihgrgihunhcujggrnhhguceojhhirgiguhhnrdihrghnghes fhhlhihgohgrthdrtghomheqnecuggftrfgrthhtvghrnhepgfdtheehiedvgeduudduvd duleegleffgeekjedttdfhhfefleetheevvefftefgnecuffhomhgrihhnpehgihhthhhu sgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Nov 2022 16:29:46 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Cc: f4bug@amsat.org, Jiaxun Yang Subject: [RFC PATCH 0/3] MIPS VirtIO Machine Date: Thu, 24 Nov 2022 21:29:13 +0000 Message-Id: <20221124212916.723490-1-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=66.111.4.28; envelope-from=jiaxun.yang@flygoat.com; helo=out4-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Hi there, This patchset is to add a new machine type for MIPS architecture, which is purely a VirtIO machine. It is design to utilize existing VirtIO infrastures but also comptitable with MIPS's existing internal simulation tools. It should be able to cooperate with any MIPS core and boot Generic MIPS kernel. For testing purpose I've built little endian kernel[1] to work with this machine with R4X00, loongson2f, octeon, mips32r2, mips64r2 and mips64r6. TODO: - Documentation - Test against big endian kernel - nanoMIPS options Thanks [1]: https://github.com/FlyGoat/qemu-testing-blob/tree/main/kernel Jiaxun Yang (3): hw/intc: Add missing include for goldfish_pic.h hw/misc: Add MIPS Trickbox device hw/mips: Add MIPS VirtIO board configs/devices/mips-softmmu/common.mak | 1 + hw/mips/Kconfig | 18 + hw/mips/meson.build | 1 + hw/mips/virt.c | 1039 +++++++++++++++++++++++ hw/misc/Kconfig | 3 + hw/misc/meson.build | 1 + hw/misc/mips_trickbox.c | 97 +++ hw/misc/trace-events | 4 + include/hw/intc/goldfish_pic.h | 2 + include/hw/misc/mips_trickbox.h | 41 + 10 files changed, 1207 insertions(+) create mode 100644 hw/mips/virt.c create mode 100644 hw/misc/mips_trickbox.c create mode 100644 include/hw/misc/mips_trickbox.h