From: Markus Armbruster <armbru@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
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>,
"Thomas Huth" <thuth@redhat.com>,
"Jared Rossi" <jrossi@linux.ibm.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>
Subject: Re: qemu-system-x86_64 appears to have sgx-epc, but not memory-backend-epc
Date: Thu, 12 Nov 2026 13:15:25 +0100 [thread overview]
Message-ID: <87wlqiqm8y.fsf@pond.sub.org> (raw)
In-Reply-To: <87qzgu2i45.fsf@pond.sub.org> (Markus Armbruster's message of "Mon, 09 Nov 2026 15:29:30 +0100")
Markus Armbruster <armbru@redhat.com> writes:
> Daniel P. Berrangé <berrange@redhat.com> writes:
[...]
>> 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 ?
>
> Loosely related: conditional *class* properties. Example:
>
> static void
> memfd_backend_class_init(ObjectClass *oc, const void *data)
> {
> HostMemoryBackendClass *bc = MEMORY_BACKEND_CLASS(oc);
>
> bc->alloc = memfd_backend_memory_alloc;
>
> if (qemu_memfd_check(MFD_HUGETLB)) {
> object_class_property_add_bool(oc, "hugetlb",
> memfd_backend_get_hugetlb,
> memfd_backend_set_hugetlb);
> object_class_property_set_description(oc, "hugetlb",
> "Use huge pages");
> object_class_property_add(oc, "hugetlbsize", "uint64",
> &uint64_type_info,
> memfd_backend_get_hugetlbsize,
> memfd_backend_set_hugetlbsize,
> NULL, NULL);
> object_class_property_set_description(oc, "hugetlbsize",
> "Huge pages size (ex: 2M, 1G)");
> }
>
> [...]
> }
>
> These properties are also declared in qapi/qom.json if CONFIG_LINUX.
> QAPI introspection (query-qmp-schema) shows them then. QOM
> introspection (qom-list-properties etc.) only shows them when the
> MFD_HUGETLB check succeeded.
>
> Feels undesirable to me.
[...]
Conditional turned out to be unnecessary here:
Subject: [PATCH 7/7] backends/hostmem-memfd: Add huge TLB properties unconditionally
Date: Wed, 11 Nov 2026 13:23:42 +0100
Message-ID: <20261111122342.634370-8-armbru@redhat.com>
I found a few more:
* Property "loadparm" of scsi-cd, scsi-hd, virtio-blk-pci,
virtio-net-pci only if target_s390x()
* Several properties of xenpvh-machine on ARM and i386 only if
->has_virtio_mmio, ->has_pci, ->has_tpm
I don't plan to examine these.
next prev parent reply other threads:[~2026-11-12 12:16 UTC|newest]
Thread overview: 19+ 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é
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
2026-11-02 11:23 ` Igor Mammedov
2026-11-11 14:02 ` Markus Armbruster
2026-11-11 12:16 ` Markus Armbruster
2026-11-11 12:27 ` Daniel P. Berrangé
2026-11-11 13:33 ` Cornelia Huck
2026-11-11 14:15 ` Daniel P. Berrangé
2026-11-11 16:02 ` Cornelia Huck
2026-11-09 14:29 ` Markus Armbruster
2026-11-12 12:15 ` Markus Armbruster [this message]
2026-11-12 15:36 ` Daniel P. Berrangé
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=87wlqiqm8y.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=david@kernel.org \
--cc=edgar.iglesias@gmail.com \
--cc=imammedo@redhat.com \
--cc=jrossi@linux.ibm.com \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.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 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.