From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, Xiaoyao Li <xiaoyao.li@intel.com>,
qemu-stable@nongnu.org
Subject: Re: [PATCH] physmem: replace assertion with error
Date: Mon, 17 Feb 2025 12:19:51 +0000 [thread overview]
Message-ID: <Z7MpZ6QqBD4MM5yp@redhat.com> (raw)
In-Reply-To: <20250217120812.396522-1-pbonzini@redhat.com>
On Mon, Feb 17, 2025 at 01:08:12PM +0100, Paolo Bonzini wrote:
> It is possible to start QEMU with a confidential-guest-support object
> even in TCG mode. While there is already a check in qemu_machine_creation_done:
>
> if (machine->cgs && !machine->cgs->ready) {
> error_setg(errp, "accelerator does not support confidential guest %s",
> object_get_typename(OBJECT(machine->cgs)));
> exit(1);
> }
>
> the creation of RAMBlocks happens earlier, in qemu_init_board(), if
> the command line does not override the default memory backend with
> -M memdev. Then the RAMBlock will try to use guest_memfd (because
> machine_require_guest_memfd correctly returns true; at least correctly
> according to the current implementation) and trigger the assertion
> failure for kvm_enabled(). This happend with a command line as
> simple as the following:
>
> qemu-system-x86_64 -m 512 -nographic -object sev-snp-guest,reduced-phys-bits=48,id=sev0 \
> -M q35,kernel-irqchip=split,confidential-guest-support=sev0
> qemu-system-x86_64: ../system/physmem.c:1871: ram_block_add: Assertion `kvm_enabled()' failed.
>
> Cc: Xiaoyao Li <xiaoyao.li@intel.com>
> Cc: qemu-stable@nongnu.org
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> system/physmem.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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-02-17 12:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 12:08 [PATCH] physmem: replace assertion with error Paolo Bonzini
2025-02-17 12:19 ` Daniel P. Berrangé [this message]
2025-02-17 12:28 ` Philippe Mathieu-Daudé
2025-02-17 13:15 ` Paolo Bonzini
2025-02-18 1:30 ` Xiaoyao Li
2025-02-18 15:45 ` David Hildenbrand
2025-02-19 6:39 ` Gupta, Pankaj
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=Z7MpZ6QqBD4MM5yp@redhat.com \
--to=berrange@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).