1 Star 0 Fork 131

chendexi/qemu

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ppc-pnv-I2C-controller-is-not-user-creatablei.patch 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
Jiabo Feng 提交于 2024-06-15 08:53 +08:00 . QEMU update to version 8.2.0-14;
From e2a4aed3ef07b05302ab4d15017b720fec97905f Mon Sep 17 00:00:00 2001
From: gaojiazhen <gaojiazhen_yewu@cmss.chinamobile.com>
Date: Mon, 25 Mar 2024 18:04:40 +0800
Subject: [PATCH] ppc/pnv: I2C controller is not user creatablei
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
cherry picked from commit 5b2b9450a2f83668bedd092b43233ad35f0d40bd
The I2C controller is a subunit of the processor. Make it so and avoid
QEMU crashes.
$ build/qemu-system-ppc64 -S -machine powernv9 -device pnv-i2c
qemu-system-ppc64: ../hw/ppc/pnv_i2c.c:521: pnv_i2c_realize: Assertion `i2c->chip' failed.
Aborted (core dumped)
Fixes: 263b81e ("ppc/pnv: Add an I2C controller model")
Cc: Glenn Miles <milesg@linux.vnet.ibm.com>
Reported-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Glenn Miles <milesg@linux.vnet.ibm.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Gao Jiazhen <gaojiazhen_yewu@cmss.chinamobile.com>
---
hw/ppc/pnv_i2c.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/ppc/pnv_i2c.c b/hw/ppc/pnv_i2c.c
index 656a48eebe..0ac6aa5c06 100644
--- a/hw/ppc/pnv_i2c.c
+++ b/hw/ppc/pnv_i2c.c
@@ -673,6 +673,9 @@ static void pnv_i2c_class_init(ObjectClass *klass, void *data)
xscomc->dt_xscom = pnv_i2c_dt_xscom;
+ /* Reason: This device is part of the CPU and cannot be used separately */
+ dc->user_creatable = false;
+
dc->desc = "PowerNV I2C";
dc->realize = pnv_i2c_realize;
device_class_set_props(dc, pnv_i2c_properties);
--
2.41.0.windows.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ccdxx/qemu.git
git@gitee.com:ccdxx/qemu.git
ccdxx
qemu
qemu
master

搜索帮助