All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luigi Leonardi <leonardi@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>,
	qemu-devel@nongnu.org, "Stefano Garzarella" <sgarzare@redhat.com>,
	"Ani Sinha" <anisinha@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH] igvm: populate errp in stub functions
Date: Thu, 11 Jun 2026 13:17:20 +0200	[thread overview]
Message-ID: <aiqYzfMjIMheO7kC@leonardi-redhat> (raw)
In-Reply-To: <ailrwxbi1i-xy37h@dobby.home.kraxel.org>

Hi,

On Wed, Jun 10, 2026 at 04:27:18PM +0200, Gerd Hoffmann wrote:
>  Hi,
>
>> No, when IGVM is not enabled in the build it's not possible to trigger
>> any of these stubs. On top of that, I don't think it is possible to trigger
>> these stubs even when igvm is enabled. This is because the only architecture
>> that implements igvm support in qemu is x86.
>
>We have these stubs mainly to avoid linker errors when compiling igvm
>support on !x86 architectures.  So we do compile igvm support for other
>architectures (or, to be exact, we compile the core igvm code once and
>link it into all qemu-system-$arch variants).
>
>Nevertheless I think that the stubs should not be reachable.  The igvm
>code already has checks like this ...
>
>    } else if (target_arch() == SYS_EMU_TARGET_X86_64) {
>        result = qigvm_x86_set_vp_context(data, vp_context->vp_index, errp);
>
>... so it should never try to call x86 support code on
>qemu-system-$somethingelse.
>
>On that base I think switching to asserts should be fine.  If we
>actually hit any assert the core code lacks a sanity check.
>
>take care,
>  Gerd
>

Right, I got confused by madt function not checking the arch.

Ignore this patch, I'll send a new series that improves madt and switches
to asserts.

Sorry for the confusion.

Thanks,
Luigi



      reply	other threads:[~2026-06-11 11:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09 13:20 [PATCH] igvm: populate errp in stub functions Luigi Leonardi
2026-06-09 13:25 ` Daniel P. Berrangé
2026-06-09 13:43   ` Markus Armbruster
2026-06-09 14:02   ` Luigi Leonardi
2026-06-10 14:27     ` Gerd Hoffmann
2026-06-11 11:17       ` Luigi Leonardi [this message]

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=aiqYzfMjIMheO7kC@leonardi-redhat \
    --to=leonardi@redhat.com \
    --cc=anisinha@redhat.com \
    --cc=berrange@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@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.