From: "Philippe Mathieu-Daudé via" <qemu-devel@nongnu.org>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Yang Zhong" <yang.zhong@intel.com>,
"Daniel P . Berrangé" <berrange@redhat.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [RFC PATCH v2 2/2] hw/i386/sgx: Attach SGX-EPC objects to machine
Date: Mon, 17 Jan 2022 15:55:49 +0100 [thread overview]
Message-ID: <20220117145549.145650-3-f4bug@amsat.org> (raw)
In-Reply-To: <20220117145549.145650-1-f4bug@amsat.org>
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 <yang.zhong@intel.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/i386/sgx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/i386/sgx.c b/hw/i386/sgx.c
index 5de5dd08936..d60485fc422 100644
--- a/hw/i386/sgx.c
+++ b/hw/i386/sgx.c
@@ -297,6 +297,8 @@ void pc_machine_init_sgx_epc(PCMachineState *pcms)
for (list = x86ms->sgx_epc_list; list; list = list->next) {
obj = object_new("sgx-epc");
+ 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->memdev,
&error_fatal);
--
2.34.1
prev parent reply other threads:[~2022-01-17 15:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-17 14:55 [PATCH v2 0/2] hw/i386: QOM-attach CPUs/SGX-EPC objects to their parents Philippe Mathieu-Daudé via
2022-01-17 14:55 ` [PATCH v2 1/2] hw/i386: Attach CPUs to machine Philippe Mathieu-Daudé via
2022-01-17 14:55 ` Philippe Mathieu-Daudé via [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220117145549.145650-3-f4bug@amsat.org \
--to=qemu-devel@nongnu.org \
--cc=berrange@redhat.com \
--cc=eduardo@habkost.net \
--cc=f4bug@amsat.org \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=richard.henderson@linaro.org \
--cc=yang.zhong@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).