From nobody Mon Feb 9 17:25:19 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) client-ip=209.85.221.54; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f54.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail(p=quarantine dis=quarantine) header.from=amsat.org ARC-Seal: i=1; a=rsa-sha256; t=1643672126; cv=none; d=zohomail.com; s=zohoarc; b=GGMy2nF9d/RtvlHMNcxbONlgNR5/RE85UgXqSd/MB97Zi8VHb3ZOGtMdV2Olq5gqfIhkDmKkhBSMqA9pJe1x4sYUWv8ZNqKoS/lFxVjzzYZlQMX17xTzI2LP3g0BTLXiQTHhosi7gtxrJaCY3By0EwetcuLIE9ZcJELsdOMcwMs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1643672126; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zj+Qri8GcGZt7FEwIVzC4hgXAvnCPP2yo0dnh3pQ+eg=; b=nYDeDX08AtdGfWKbmVi8dqGKSSHs3Pha5WatobLn9my1egGImrFH2Gyozn8jWbuWXJkZbS6DwfvlglUk5LHyqw3ZXyTsehsQpItVDXSiRO+LMCp0VmBMcz/GVBh8HbpZlPc8Yg5TZmYLKj1vvqXa8FxLkkjOMOgtOj23qXwFu8s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.54 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com; dmarc=fail header.from= (p=quarantine dis=quarantine) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.zohomail.com with SMTPS id 164367212681526.657816076751942; Mon, 31 Jan 2022 15:35:26 -0800 (PST) Received: by mail-wr1-f54.google.com with SMTP id s18so28446197wrv.7 for ; Mon, 31 Jan 2022 15:35:26 -0800 (PST) Return-Path: Return-Path: Received: from nuc.. (154.red-83-50-83.dynamicip.rima-tde.net. [83.50.83.154]) by smtp.gmail.com with ESMTPSA id j28sm590674wms.14.2022.01.31.15.35.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 15:35:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zj+Qri8GcGZt7FEwIVzC4hgXAvnCPP2yo0dnh3pQ+eg=; b=ZZvm4w4DaqlyuuxbGZ73x5aQlxLmfFG1/qdXGExkVnc/pwJXUroFPCLP8LJCNxEKc+ Oq5ILq2HNaKl5iRY3WCpJmxLEsqw0Sqjl37/tbrHeS7/zX6PUh3wPF5e/e5Hy/sXGVxa 1kO+HDljrfGpERNBvfTVO85ivPkY/eBrV1QNMamNZKhxSSx3EUTnwqrZGgX+PbeYijrc yblJ5Y/AR/ropqZNQv+mmIu9uGIPnj9rmE3B6UHgd3ty6os9Yco/ksz+8+J5k7s+nt3n 81c7IOdx56qdjb8XCd6aG1IX5ae9nsVoaT64SJ/Q1M/jSv7LuaQwIKl5JFBimgD0nex/ hS5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=zj+Qri8GcGZt7FEwIVzC4hgXAvnCPP2yo0dnh3pQ+eg=; b=a5HOLqzetDjGM2FbGvhojxRty8rUWmPVqsAWZWkIJFjVTaJykURVEo0xmGcjK9wTpV RakmgK4SOSCYggyKHjC08MnJJbKwzqki/r71zknvKDYNfkK6gIWIJvGeuES1mCkeZ6xQ S3VnUPwNLYLLAEt3H8HOwSzjHIEFy67r9+MrBegDdd134r3dNbg1WuQVxEm6JatVYJ5o WfSUssrKktOdRhBh7NvhR4tW1QQFR0lgxGSW1ZLg3dZPvsOrth/Qp/uwei3Q4AXYShqD CGe6fmlpXAh/e30kfpZbPm5ZtkhPxLbhocIZ9g6g58P6RaFeI7Hpy0BsKpyXG2aj5B1y i2wQ== X-Gm-Message-State: AOAM5335oUQLr3tDaXvQtpCYDvEQQ2rlTdMlABl2gPVAfNM3RC1DrHyc DOKsA6GCgpj0lTzh9VtYJbg= X-Google-Smtp-Source: ABdhPJwJj4g/0yEovyDQhxWmq7DmPLuZC+St8XVGoYaifI5Vq0b8lcWKvHGqU2vQQRV7VG1Z2UI0lQ== X-Received: by 2002:a05:6000:18af:: with SMTP id b15mr18560679wri.589.1643672120384; Mon, 31 Jan 2022 15:35:20 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Yang Zhong , "Michael S. Tsirkin" , Eduardo Habkost , Marcel Apfelbaum , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 2/2] hw/i386/sgx: Attach SGX-EPC objects to machine Date: Tue, 1 Feb 2022 00:35:07 +0100 Message-Id: <20220131233507.334174-3-f4bug@amsat.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220131233507.334174-1-f4bug@amsat.org> References: <20220131233507.334174-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1643672128075100001 Previously SGX-EPC objects were exposed in the QOM tree at a path /machine/unattached/device[nn] where the 'nn' varies depending on what devices were already created. With this change the SGX-EPC objects are now at /machine/sgx-epc[nn] where the 'nn' of the first SGX-EPC object is always zero. Reported-by: Yang Zhong Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Daniel P. Berrang=C3=A9 --- hw/i386/sgx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/i386/sgx.c b/hw/i386/sgx.c index a2b318dd938..3ab2217ca43 100644 --- a/hw/i386/sgx.c +++ b/hw/i386/sgx.c @@ -304,6 +304,8 @@ void pc_machine_init_sgx_epc(PCMachineState *pcms) for (list =3D x86ms->sgx_epc_list; list; list =3D list->next) { obj =3D object_new("sgx-epc"); =20 + object_property_add_child(OBJECT(pcms), "sgx-epc[*]", OBJECT(obj)); + /* set the memdev link with memory backend */ object_property_parse(obj, SGX_EPC_MEMDEV_PROP, list->value->memde= v, &error_fatal); --=20 2.34.1