From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA5EBCD98D2 for ; Thu, 11 Jun 2026 11:17:42 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wXdPg-0007qL-2F; Thu, 11 Jun 2026 07:17:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wXdPe-0007qC-Vt for qemu-devel@nongnu.org; Thu, 11 Jun 2026 07:17:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wXdPb-0005vu-QO for qemu-devel@nongnu.org; Thu, 11 Jun 2026 07:17:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1781176646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7qcbo9Um2tsGYWOv/UswD+5S096bTkRZ87+AruqpHGw=; b=gTwpxRscQLUXyPenFWxS5k9+Ye62QlfxhLaGijfQ/QT6LEtlQ8qhTRFO8sXjLPlXvKeOMP X+R1AFKFOol3rgaltWIcxUewYcb2fAptrpzYlU1pcoBQ/ZXqC0m9tpykuzcR+mmgJkER+S QuEiz+Y6JwkyUftXWaXAII0Mh922U+c= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-343-mkiTFMhyMNiwzzbwA9Ri6w-1; Thu, 11 Jun 2026 07:17:24 -0400 X-MC-Unique: mkiTFMhyMNiwzzbwA9Ri6w-1 X-Mimecast-MFC-AGG-ID: mkiTFMhyMNiwzzbwA9Ri6w_1781176644 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-45ef2bd566bso4463236f8f.0 for ; Thu, 11 Jun 2026 04:17:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1781176644; x=1781781444; darn=nongnu.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=7qcbo9Um2tsGYWOv/UswD+5S096bTkRZ87+AruqpHGw=; b=Zb9vZg92TYmjogNHdTEgC4sOfcG0mbpvH6tqtb2t88GuRk63XXXomW1MAULd+5te2/ 27FRpKFNi9Mdqdx+O21NZiANX8pn0jaSB8ExtXRqou08g0rouQyGzGFSuGU1CE8BVr0Z S0gXWRde1IfJ2ZTyKGlB1oTw6pDA69aLEhUHzBWjkB3w5BSlWoGP5W1zs3WoqIn9Lnzx uVV1iVT06r0mO8Ug7sUzlGTW/GmAf5Zp/APYiZrpgW2gku0D8TYSyhtOJBvd2ZNoxJmQ Qe1uoJgK2R13ZG0tmPvSdYz6+qqI1OaZRBczDkRqgvE8Uo57jQszE7M6lWhmjP/mvV/I y/Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781176644; x=1781781444; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7qcbo9Um2tsGYWOv/UswD+5S096bTkRZ87+AruqpHGw=; b=E4Jf6PR3nKs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dWY6VCrmSoOm53hw37TxAJ+F1x8nw== X-Received: by 2002:a05:6000:4013:b0:460:3234:77d4 with SMTP id ffacd0b85a97d-460677eeb17mr3592346f8f.42.1781176643749; Thu, 11 Jun 2026 04:17:23 -0700 (PDT) X-Received: by 2002:a05:6000:4013:b0:460:3234:77d4 with SMTP id ffacd0b85a97d-460677eeb17mr3592282f8f.42.1781176643171; Thu, 11 Jun 2026 04:17:23 -0700 (PDT) Received: from leonardi-redhat ([176.206.19.176]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f351ac0sm138396728f8f.27.2026.06.11.04.17.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 04:17:22 -0700 (PDT) Date: Thu, 11 Jun 2026 13:17:20 +0200 From: Luigi Leonardi To: Gerd Hoffmann Cc: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= , qemu-devel@nongnu.org, Stefano Garzarella , Ani Sinha , Paolo Bonzini Subject: Re: [PATCH] igvm: populate errp in stub functions Message-ID: References: <20260609-igvm_stubs-v1-1-5f39d6e0db4a@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=170.10.129.124; envelope-from=leonardi@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.445, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.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