[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 4/4] hw/i386/sgx: Attach SGX-EPC objects to machine
From: |
Yang Zhong |
Subject: |
Re: [PATCH v4 4/4] hw/i386/sgx: Attach SGX-EPC objects to machine |
Date: |
Mon, 14 Feb 2022 15:27:21 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Feb 07, 2022 at 09:37:52AM +0100, Igor Mammedov wrote:
> On Sat, 5 Feb 2022 13:45:26 +0100
> Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> > 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.
>
> yet again, why it's necessary?
>
> >
> > Reported-by: Yang Zhong <yang.zhong@intel.com>
> > Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> > Reviewed-by: Daniel P. Berrangé <berrange@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 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 = 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);
Philippe, I verified this patch, which work well. Thanks a lot!
(qemu) qom-list /machine
......
sgx-epc[2] (child<sgx-epc>)
......
sgx-epc[0] (child<memory-region>)
acpi-device (link<hotplug-handler>)
sgx-epc[1] (child<sgx-epc>)
......
Yang
- Re: [PATCH v4 2/4] hw/i386: Attach CPUs to machine, (continued)
[PATCH v4 4/4] hw/i386/sgx: Attach SGX-EPC objects to machine, Philippe Mathieu-Daudé, 2022/02/05
- Re: [PATCH v4 4/4] hw/i386/sgx: Attach SGX-EPC objects to machine, Igor Mammedov, 2022/02/07
- Re: [PATCH v4 4/4] hw/i386/sgx: Attach SGX-EPC objects to machine, Philippe Mathieu-Daudé, 2022/02/07
- Re: [PATCH v4 4/4] hw/i386/sgx: Attach SGX-EPC objects to machine, Yang Zhong, 2022/02/14
- Re: [PATCH v4 4/4] hw/i386/sgx: Attach SGX-EPC objects to machine, Igor Mammedov, 2022/02/14
- Re: [PATCH v4 4/4] hw/i386/sgx: Attach SGX-EPC objects to machine, Daniel P . Berrangé, 2022/02/14
- Re: [PATCH v4 4/4] hw/i386/sgx: Attach SGX-EPC objects to machine, Igor Mammedov, 2022/02/16
Re: [PATCH v4 4/4] hw/i386/sgx: Attach SGX-EPC objects to machine,
Yang Zhong <=
[PATCH v4 3/4] tests/qtest/acpi: Update VIOT table blob, Philippe Mathieu-Daudé, 2022/02/05
Re: [PATCH v4 0/4] hw/i386: QOM-attach CPUs/SGX-EPC objects to their parents, Philippe Mathieu-Daudé, 2022/02/05