From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: "Cédric Le Goater" <clg@kaod.org>,
"Xiaoyao Li" <xiaoyao.li@intel.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
qemu-devel@nongnu.org,
"Isaku Yamahata" <isaku.yamahata@intel.com>,
"Chenyi Qiang" <chenyi.qiang@intel.com>
Subject: Re: [PULL 24/24] i386/tdx: handle TDG.VP.VMCALL<GetQuote>
Date: Tue, 24 Jun 2025 16:08:39 +0100 [thread overview]
Message-ID: <aFq_dxjRriYSf9fV@redhat.com> (raw)
In-Reply-To: <CAJSP0QXnXSBy9bDetUL4SEOxP=tLaGZZ+5qEQCp=SU3KDNmg5A@mail.gmail.com>
On Tue, Jun 24, 2025 at 11:03:19AM -0400, Stefan Hajnoczi wrote:
> On Mon, Jun 23, 2025 at 4:37 PM Cédric Le Goater <clg@kaod.org> wrote:
> >
> > On 6/23/25 20:57, Stefan Hajnoczi wrote:
> > > On Mon, Jun 23, 2025 at 9:09 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
> > >>
> > >> On Mon, Jun 23, 2025 at 09:04:33AM -0400, Stefan Hajnoczi wrote:
> > >>> On Mon, Jun 23, 2025 at 4:04 AM Daniel P. Berrangé <berrange@redhat.com> wrote:
> > >>>>
> > >>>> On Mon, Jun 23, 2025 at 03:03:19PM +0800, Xiaoyao Li wrote:
> > >>>>> On 6/23/2025 2:43 PM, Cédric Le Goater wrote:
> > >>>>>> Hello,
> > >>>>>>
> > >>>>>> On 6/20/25 18:40, Paolo Bonzini wrote:
> > >>>>>>> From: Isaku Yamahata <isaku.yamahata@intel.com>
> > >>>>>>>
> > >>>>>>> Add property "quote-generation-socket" to tdx-guest, which is a property
> > >>>>>>> of type SocketAddress to specify Quote Generation Service(QGS).
> > >>>>>>>
> > >>>>>>> On request of GetQuote, it connects to the QGS socket, read request
> > >>>>>>> data from shared guest memory, send the request data to the QGS,
> > >>>>>>> and store the response into shared guest memory, at last notify
> > >>>>>>> TD guest by interrupt.
> > >>>>>>>
> > >>>>>>> command line example:
> > >>>>>>> qemu-system-x86_64 \
> > >>>>>>> -object '{"qom-type":"tdx-guest","id":"tdx0","quote-generation-
> > >>>>>>> socket":{"type":"unix", "path":"/var/run/tdx-qgs/qgs.socket"}}' \
> > >>>>>>> -machine confidential-guest-support=tdx0
> > >>>>>>>
> > >>>>>>> Note, above example uses the unix socket. It can be other types,
> > >>>>>>> like vsock,
> > >>>>>>> which depends on the implementation of QGS.
> > >>>>>>>
> > >>>>>>> To avoid no response from QGS server, setup a timer for the transaction.
> > >>>>>>> If timeout, make it an error and interrupt guest. Define the threshold of
> > >>>>>>> time to 30s at present, maybe change to other value if not appropriate.
> > >>>>>>>
> > >>>>>>> Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
> > >>>>>>> Co-developed-by: Chenyi Qiang <chenyi.qiang@intel.com>
> > >>>>>>> Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
> > >>>>>>> Co-developed-by: Xiaoyao Li <xiaoyao.li@intel.com>
> > >>>>>>> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
> > >>>>>>> Tested-by: Xiaoyao Li <xiaoyao.li@intel.com>
> > >>>>>>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> > >>>>>>> ---
> > >>>>>>> qapi/qom.json | 8 +-
> > >>>>>>> target/i386/kvm/tdx-quote-generator.h | 82 +++++++
> > >>>>>>> target/i386/kvm/tdx.h | 10 +
> > >>>>>>> target/i386/kvm/kvm.c | 3 +
> > >>>>>>> target/i386/kvm/tdx-quote-generator.c | 300 ++++++++++++++++++++++++++
> > >>>>>>> target/i386/kvm/tdx-stub.c | 4 +
> > >>>>>>> target/i386/kvm/tdx.c | 176 ++++++++++++++-
> > >>>>>>> target/i386/kvm/meson.build | 2 +-
> > >>>>>>> 8 files changed, 582 insertions(+), 3 deletions(-)
> > >>>>>>> create mode 100644 target/i386/kvm/tdx-quote-generator.h
> > >>>>>>> create mode 100644 target/i386/kvm/tdx-quote-generator.c
> > >>>>>>
> > >>>>>> These changes broke the build on 32-bit host.
> > >>>>>>
> > >>>>>> Could you please send a patch to avoid compiling TDX in such environment ?
> > >>>>>
> > >>>>> Paolo is on vacation.
> > >>>>>
> > >>>>> I would like to help, but I don't have 32-bit host environment on hand. Do
> > >>>>> you know how to set up such environment quickly? (I tried to set up within a
> > >>>>> 32-bit VM but the 32-bit OS is too old and I didn't get it work to install
> > >>>>> the required package for building QEMU)
> > >>>>
> > >>>> You should be able to use QEMU's docker containers to get yourself a
> > >>>> Debian i386 container, on a x86_64 host.
> > >>>
> > >>> The cross-i686-system (Debian) build CI job succeeded:
> > >>> https://gitlab.com/qemu-project/qemu/-/jobs/10423776600
> > >>>
> > >>> I wonder why the CI didn't catch the issue?
> > >>
> > >> It didn't build the x86_64 target:
> > >>
> > >> --target-list-exclude="arm-softmmu i386-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu mips64-softmmu ppc-softmmu riscv32-softmmu sh4-softmmu sparc-softmmu xtensa-softmmu $CROSS_SKIP_TARGETS"
> > >>
> > >> so in turn didn't build any TDX code
> > >
> > > Here are the targets that were built by the CI job:
> > >
> > > target list : avr-softmmu m68k-softmmu microblazeel-softmmu
> > > or1k-softmmu rx-softmmu sh4eb-softmmu tricore-softmmu xtensaeb-softmmu
> > >
> > > 64-bit targets are not supported on 32-bit hosts since commit
> > > acce728cbc6c ("meson: Disallow 64-bit on 32-bit emulation"). I don't
> > > think the x86_64 target can be built on 32-bit hosts.
> > >
> > > But notice that i386-softmmu is missing from the target list. That
> > > could be why the CI job succeeded.
> > >
> > > Cédric: What were your ./configure options?
> >
> > Just :
> >
> > --target-list=arm-softmmu,ppc-softmmu,i386-softmmu
>
> cross-i686-tci builds i386-softmmu on debian-i686-cross with
> --disable-kvm, but the TDX code isn't compiled:
> https://gitlab.com/qemu-project/qemu/-/jobs/10440424393
>
> A new CI job could be added to cover TDX on 32-bit hosts if you think
> it's worthwhile. Maybe it's a corner case and not worth spending CI
> cycles on?
We should not set any expectation of support for TDX on 32-bit host
or guest emulator. IMHO the only right answer here is to disable
build of TDX for anything other than x86_64-softmmu w/ KVM.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2025-06-24 15:09 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 16:40 [PULL 00/24] i386 (TCG, TDX), Rust changes for 2025-06-20 Paolo Bonzini
2025-06-20 16:40 ` [PULL 01/24] meson: cleanup win32 library detection Paolo Bonzini
2025-06-20 16:40 ` [PULL 02/24] target/i386: fix TB exit logic in gen_movl_seg() when writing to SS Paolo Bonzini
2025-06-20 16:40 ` [PULL 03/24] hw: Fix type constant for DTB files Paolo Bonzini
2025-06-20 16:40 ` [PULL 04/24] pc-bios/dtb/meson: Prefer target name to be outfile, not infile Paolo Bonzini
2025-06-20 16:40 ` [PULL 05/24] rust: qemu_api: introduce MaybeUninit field projection Paolo Bonzini
2025-06-20 16:40 ` [PULL 06/24] rust: hpet: fully initialize object during instance_init Paolo Bonzini
2025-06-20 16:40 ` [PULL 07/24] rust: qom: introduce ParentInit Paolo Bonzini
2025-06-20 16:40 ` [PULL 08/24] rust: qom: make ParentInit lifetime-invariant Paolo Bonzini
2025-06-20 16:40 ` [PULL 09/24] rust: qom: change instance_init to take a ParentInit<> Paolo Bonzini
2025-06-20 16:40 ` [PULL 10/24] rust: prepare variable definitions for multiple bindgen invocations Paolo Bonzini
2025-06-20 16:40 ` [PULL 11/24] rust: move rust.bindgen to qemu-api crate Paolo Bonzini
2025-06-20 16:40 ` [PULL 12/24] rust/qemu-api: Add initial logging support based on C API Paolo Bonzini
2025-06-20 16:40 ` [PULL 13/24] rust: pl011: Implement logging Paolo Bonzini
2025-06-20 16:40 ` [PULL 14/24] rust: pl011: Add missing logging to match C version Paolo Bonzini
2025-06-20 16:40 ` [PULL 15/24] rust: hpet: fix new warning Paolo Bonzini
2025-06-20 16:40 ` [PULL 16/24] i386/cpu: Move adjustment of CPUID_EXT_PDCM before feature_dependencies[] check Paolo Bonzini
2025-06-20 16:40 ` [PULL 17/24] i386/cpu: Warn about why CPUID_EXT_PDCM is not available Paolo Bonzini
2025-06-20 16:40 ` [PULL 18/24] i386/tdx: Error and exit when named cpu model is requested Paolo Bonzini
2025-06-20 16:40 ` [PULL 19/24] i386/cpu: Rename enable_cpuid_0x1f to force_cpuid_0x1f Paolo Bonzini
2025-06-20 16:40 ` [PULL 20/24] i386/tdx: Fix the typo of the comment of struct TdxGuest Paolo Bonzini
2025-06-20 16:40 ` [PULL 21/24] i386/tdx: Clarify the error message of mrconfigid/mrowner/mrownerconfig Paolo Bonzini
2025-06-20 16:40 ` [PULL 22/24] update Linux headers to v6.16-rc3 Paolo Bonzini
2025-06-20 16:40 ` [PULL 23/24] i386/tdx: handle TDG.VP.VMCALL<GetTdVmCallInfo> Paolo Bonzini
2025-06-20 16:40 ` [PULL 24/24] i386/tdx: handle TDG.VP.VMCALL<GetQuote> Paolo Bonzini
2025-06-23 6:43 ` Cédric Le Goater
2025-06-23 7:03 ` Xiaoyao Li
2025-06-23 7:44 ` Cédric Le Goater
2025-06-23 8:02 ` Daniel P. Berrangé
2025-06-23 13:04 ` Stefan Hajnoczi
2025-06-23 13:08 ` Daniel P. Berrangé
2025-06-23 18:57 ` Stefan Hajnoczi
2025-06-23 20:37 ` Cédric Le Goater
2025-06-24 15:03 ` Stefan Hajnoczi
2025-06-24 15:08 ` Daniel P. Berrangé [this message]
2025-06-24 15:22 ` Cédric Le Goater
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=aFq_dxjRriYSf9fV@redhat.com \
--to=berrange@redhat.com \
--cc=chenyi.qiang@intel.com \
--cc=clg@kaod.org \
--cc=isaku.yamahata@intel.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=xiaoyao.li@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 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.