* [PATCH v2 0/2] hw/i386: QOM-attach CPUs/SGX-EPC objects to their parents
@ 2022-01-17 14:55 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 ` [RFC PATCH v2 2/2] hw/i386/sgx: Attach SGX-EPC objects " Philippe Mathieu-Daudé via
0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-01-17 14:55 UTC (permalink / raw)
To: qemu-devel
Cc: Richard Henderson, Eduardo Habkost, Marcel Apfelbaum,
Paolo Bonzini, Michael S. Tsirkin, Yang Zhong,
Daniel P . Berrangé, Philippe Mathieu-Daudé
Trying to fix the issue reported here:
https://lists.nongnu.org/archive/html/qemu-devel/2021-11/msg05670.html
First attach the CPUs and SGX-EPC objects to the machine.
Since v1:
- addressed Paolo & Daniel review feedbacks
Philippe Mathieu-Daudé (2):
hw/i386: Attach CPUs to machine
hw/i386/sgx: Attach SGX-EPC objects to machine
hw/i386/sgx.c | 2 ++
hw/i386/x86.c | 1 +
2 files changed, 3 insertions(+)
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/2] hw/i386: Attach CPUs to machine
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 ` Philippe Mathieu-Daudé via
2022-01-17 14:55 ` [RFC PATCH v2 2/2] hw/i386/sgx: Attach SGX-EPC objects " Philippe Mathieu-Daudé via
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-01-17 14:55 UTC (permalink / raw)
To: qemu-devel
Cc: Richard Henderson, Eduardo Habkost, Marcel Apfelbaum,
Paolo Bonzini, Michael S. Tsirkin, Yang Zhong,
Daniel P . Berrangé, Philippe Mathieu-Daudé
Previously CPUs were exposed in the QOM tree at a path
/machine/unattached/device[nn]
where the 'nn' of the first CPU is usually zero, but can
vary depending on what devices were already created.
With this change the CPUs are now at
/machine/cpu[nn]
where the 'nn' of the first CPU is always zero.
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/i386/x86.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index b84840a1bb9..50bf249c700 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -108,6 +108,7 @@ void x86_cpu_new(X86MachineState *x86ms, int64_t apic_id, Error **errp)
{
Object *cpu = object_new(MACHINE(x86ms)->cpu_type);
+ object_property_add_child(OBJECT(x86ms), "cpu[*]", OBJECT(cpu));
if (!object_property_set_uint(cpu, "apic-id", apic_id, errp)) {
goto out;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [RFC PATCH v2 2/2] hw/i386/sgx: Attach SGX-EPC objects to machine
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
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-01-17 14:55 UTC (permalink / raw)
To: qemu-devel
Cc: Richard Henderson, Eduardo Habkost, Marcel Apfelbaum,
Paolo Bonzini, Michael S. Tsirkin, Yang Zhong,
Daniel P . Berrangé, Philippe Mathieu-Daudé
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-01-17 15:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [RFC PATCH v2 2/2] hw/i386/sgx: Attach SGX-EPC objects " Philippe Mathieu-Daudé via
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.