From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, David Hildenbrand <david@kernel.org>,
Igor Mammedov <imammedo@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>
Subject: Re: qemu-system-x86_64 appears to have sgx-epc, but not memory-backend-epc
Date: Fri, 23 Oct 2026 11:20:45 +0100 [thread overview]
Message-ID: <ats0_RfeVugAofN9@redhat.com> (raw)
In-Reply-To: <87zew5j3iv.fsf@pond.sub.org>
On Thu, Oct 22, 2026 at 02:58:16PM +0200, Markus Armbruster wrote:
> My build of qemu-system-x86_64 has device sgx-epc:
>
> --> {"execute": "qom-list-types", "arguments": {"implements": "sgx-epc"}}
> <-- {"return": [{"name": "sgx-epc", "parent": "device"}]}
>
> The device as a link property to a memory-backend-epc:
>
> --> {"execute": "qom-list-properties", "arguments": {"typename": "sgx-epc"}}
> <-- {"return": [...
> {"name": "memdev", "type": "link<memory-backend-epc>"},
> ...]}
>
> However, type memory-backend-epc does not exist:
>
> --> {"execute": "qom-list-types", "arguments": {"implements": "memory-backend"}}
> <-- {"return": [{"name": "memory-backend-ram", "parent": "memory-backend"}, {"name": "memory-backend-file", "parent": "memory-backend"}, {"name": "memory-backend-memfd", "parent": "memory-backend"}, {"name": "memory-backend-shm", "parent": "memory-backend"}]}
There is some rather dubious code that conditionally registers
the type
static void register_types(void)
{
int fd = qemu_open_old("/dev/sgx_vepc", O_RDWR);
if (fd >= 0) {
close(fd);
type_register_static(&sgx_epc_backed_info);
}
}
Normal practice is for types to be unconditionally registered. Do we
have any examples outside of this SGX case where we conditionally
register types ? Should we change this to follow normal practice ?
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
next prev parent reply other threads:[~2026-10-23 10:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 12:58 qemu-system-x86_64 appears to have sgx-epc, but not memory-backend-epc Markus Armbruster
2026-10-23 10:20 ` Daniel P. Berrangé [this message]
2026-10-23 10:44 ` Peter Maydell
2026-10-23 11:07 ` Daniel P. Berrangé
2026-10-23 11:50 ` Peter Maydell
2026-10-23 12:36 ` Daniel P. Berrangé
2026-10-23 12:44 ` Peter Maydell
2026-10-27 6:28 ` Markus Armbruster
2026-10-27 6:40 ` Markus Armbruster
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=ats0_RfeVugAofN9@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=david@kernel.org \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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 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.