From patchwork Fri Nov 8 17:38:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 841758 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp1770735wru; Fri, 8 Nov 2024 09:39:25 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUylkFfE6bMrMwBQWbEAvoH/Ju/Hro2rnvJHODWNyv2gaPcD5JXBMFAN8FmnykMZQuLgNTtlQ==@linaro.org X-Google-Smtp-Source: AGHT+IH1nH8fJNkuS6aQ5T4YEgaCc/FDi7RI8PEqZBZ7LP5zWECINTCT8FO4u97TWlZsO1MXsGgZ X-Received: by 2002:ac8:5850:0:b0:460:ab1b:a16d with SMTP id d75a77b69052e-46309369835mr49625821cf.27.1731087565373; Fri, 08 Nov 2024 09:39:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731087565; cv=none; d=google.com; s=arc-20240605; b=JhsPgemkPGFmMjypyvLN0bWOw8Md5VJCFkwSPV5zMjPvt4V65/fNMHFrYHaSIAlu7T NtL6XM6WcCPVH5ORS45e3Ougsvg1ocsF/QdREd0NfFssDPeVJntSx+/mO/2IpzeQTxcX Y/CaNcjlah6h8zItDfK+/IXpT954mafZzf7pHgrfRRx3v0qUsCwmkha1gIVxpR59pixO VAp7Q8D9dy8YCXH7xC2oIteLCVuctRHPcde3UreV4cNUWuH18Cru0qreeqRkRc8G/i3O lcRDI75RkeUzGL9IxT0bYzCifcvytLYQf6RmB97flcYZp6D+5P9/EuecPTg5MP4s2vJ+ ZtOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=feHirvi/ZngWxKhCaO9WNrlm3HvMMVj7FfnuxqJ1OpE=; fh=vm85eyWrvOAHduw3sqEA+cYBqvHB7M0MHFcRJg7VWOo=; b=EcXIQU1S/nVj9LtXgROq45x56ndX7o5joglFp9EnEXsFXMPapnu+F9ps2WQl/HfpS5 InOyTPvFH4LZkRX+cm47or1DodfMAJuef8MYQEl5mMnIgrw0U4IJbtJGvGMFlkN2vFQs 302W5bmh+zYra0teSmlXZeSH99W5ugvveEesx7yvD3G7VClpFcnqP41ebt2mKlSDktiX AJD6aKUS2ICWxIzWRlDh/BHKHQ1KPfMKmrS4g7HJ8AP16nj+Iz8EQMoHRLTKegJEWbxs piVLLxEQVPn4ZE8wNYrVi5lgj2DzBV1VbHUJIwsOtO4oGIHpA5aYK5g9QY9wWHsCFYTG jpbA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LDE0sBJ5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ff6778e1si41747001cf.617.2024.11.08.09.39.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Nov 2024 09:39:25 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LDE0sBJ5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9SwU-0003j7-5f; Fri, 08 Nov 2024 12:38:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9SwR-0003er-Pt for qemu-devel@nongnu.org; Fri, 08 Nov 2024 12:38:39 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9SwP-0007Zj-VR for qemu-devel@nongnu.org; Fri, 08 Nov 2024 12:38:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731087517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=feHirvi/ZngWxKhCaO9WNrlm3HvMMVj7FfnuxqJ1OpE=; b=LDE0sBJ5DbOt4iim6sPytu1aIgp796gY3i49g2Qic1OdbB6K5Y3NsT79aDwUYl+bkTq0mv RG1BAvIkA12dd0QTOVepVzE48vbUMOIEEK+wgYfyMzs4GH5ILONZUmq3LWqqc8i0UeaiGq v5jTRwYKNZF8R54vatJ3+wU0HZ25IYk= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-682-fzHdzTf8M26FD7SmpeFjQw-1; Fri, 08 Nov 2024 12:38:36 -0500 X-MC-Unique: fzHdzTf8M26FD7SmpeFjQw-1 X-Mimecast-MFC-AGG-ID: fzHdzTf8M26FD7SmpeFjQw Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37d4af408dcso1129847f8f.0 for ; Fri, 08 Nov 2024 09:38:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731087514; x=1731692314; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=feHirvi/ZngWxKhCaO9WNrlm3HvMMVj7FfnuxqJ1OpE=; b=HX20l4FODhULxXu5z3Jl+pmZ1ZA4KQoth5qcaCSqnxmKJmVV5y17Rn0wtGui7a+T0V 2eWhii4VjBAY2DfISTj98Yn6s/wcnjLSKmzRf+rWbJt1yYvKUl63UCjQABIzWhIKP4r6 0ilmaGuBjTBY6I4/4G+0g/KRDqYNb+WZgWsbN6y9ZpgGiecwkauomAe0Vv8QKAQ/cekW QUhD3amfolMOWGSupQPdy7UWi4cNKM7zZs4S9ELhCFXBLk1+IhpsQ0+qhATMK45IYe9J 3WzwvDcFshXcf7dSqiXsntIEzAZopubqNChqMgTMva0EMdum/DWGIm5NigHeHcs9GeI8 ouQA== X-Gm-Message-State: AOJu0YzuoaqzNylmj2QNugsWV3FLnON0ZjjLz+gKeE3OFLVu/3lTQlIh 5mdU/thPlyI0HaAJk8InXrZP7K9bRJuD3SBAl4WA1NaNiFiVl/sHFGb+YyRwzLVjSbwUVLhmQlg RgUrOaTllxIPE52j5NqR7OfbKAB9pvcldxRf65vcgQ7M1rdu7HQjKT1/dpv6Z5vzJtY/GnJTpUi PhKfkm7sdZE2ViUDV/K49TAqCzoupRwLVJJ1TSju0= X-Received: by 2002:a5d:6d01:0:b0:37d:4e56:9a2a with SMTP id ffacd0b85a97d-381f1885822mr2628855f8f.40.1731087513990; Fri, 08 Nov 2024 09:38:33 -0800 (PST) X-Received: by 2002:a5d:6d01:0:b0:37d:4e56:9a2a with SMTP id ffacd0b85a97d-381f1885822mr2628844f8f.40.1731087513464; Fri, 08 Nov 2024 09:38:33 -0800 (PST) Received: from [192.168.10.47] ([151.49.84.243]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-432b053ff08sm79185335e9.10.2024.11.08.09.38.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 09:38:32 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Pierrick Bouvier Subject: [PULL 02/13] target/i386/hvf: fix clang compilation warning Date: Fri, 8 Nov 2024 18:38:17 +0100 Message-ID: <20241108173828.111454-3-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241108173828.111454-1-pbonzini@redhat.com> References: <20241108173828.111454-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.34, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Pierrick Bouvier ../target/i386/hvf/x86_cpuid.c:35:28: error: a function declaration without a prototype is deprecated in all versions of C Fixes: 7cac7aa7040a823c585f1578a38f28e83c8bf3e1 Signed-off-by: Pierrick Bouvier Link: https://lore.kernel.org/r/20241104222102.1522688-1-pierrick.bouvier@linaro.org Signed-off-by: Paolo Bonzini --- target/i386/hvf/x86_cpuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/hvf/x86_cpuid.c b/target/i386/hvf/x86_cpuid.c index 3a116548a3d..492e8bfc809 100644 --- a/target/i386/hvf/x86_cpuid.c +++ b/target/i386/hvf/x86_cpuid.c @@ -32,7 +32,7 @@ static bool cached_xcr0; static uint64_t supported_xcr0; -static void cache_host_xcr0() +static void cache_host_xcr0(void) { if (cached_xcr0) { return; From patchwork Fri Nov 8 17:38:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 841759 Delivered-To: patch@linaro.org Received: by 2002:a5d:6307:0:b0:381:e71e:8f7b with SMTP id i7csp1771057wru; Fri, 8 Nov 2024 09:40:07 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUEhzn6X60uTh1iHoYM+7hd4AjWaMgA12u1f+dvXVlRbRe9M+2oEPoloqSeFeS0K6IHwZqSFw==@linaro.org X-Google-Smtp-Source: AGHT+IEX2hnciUEnc5wH/SJay30Mcl6wnrksNR0xyZ36HVNxmQdUV88MEsjc1Ent3iH/8HG/LhGV X-Received: by 2002:a05:622a:11d0:b0:460:96b6:3b56 with SMTP id d75a77b69052e-4630941ab24mr31913261cf.55.1731087607114; Fri, 08 Nov 2024 09:40:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731087607; cv=none; d=google.com; s=arc-20240605; b=fpPGea/SbVWcbaGv7bOesyAs4XZHbw6CNLyRyYhBsv4/XqsIonyT1DujjsU4FjP48E 0CGnl60wwE5nRasQj4/SbFV0PTPBPBjKQh6ACmtyw5+nM1EgRbdNVZqu0aMH0zv5inBz GrRL7Gwyu8A7osQV6f61qKR3NCX6bFEiOcUYpwv1HV7HBtgxyY+c8GvohkEW92qfxFT5 x9rbECZi1z96rC8dIzWcUmE9Az5E3h7qj1STvRUbQ9LTu2WcKur+5twleDpIDi4GJPAT dPu4oSYuDv0bj11/oxfilvzL9Cg7Kixsjxhg1ZKWKz+krE2Hm5dY7pQFUoTtPDDsL06Q wSpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WlWrYmpsyykMxq9th+UoPeQpQpPsd/MHm4v4chl35/U=; fh=pqxCZA/j2BCV4+qx6QHUtcC81c7HqPpC9e70d3NjSMU=; b=PvbO/PEifL7stgnaxBsS6BFQmXMo6mHUxczudYjwo4NonOeUCqP6IFurmDpZe3XD77 Z0y9mKqeOii0DjnWOQbvmJO/G3eiFZ9pSds3XFRxvF6G4Aj5CoBs2SYwlvD6nBFUTsja nuqenVg3IuEtnDnlcrnJyf4zvVfeDyEKrs/7AgMfqcGGBCPvv62myfQ6uWEGqGUzfoPb uJKjR3iW3lJkLHtKI2v6MbYtybeuEYE0RU+j0f+uNycY+5Q7Rx8/gI0Q5qbEij+2BN2J 9cISJQUbvRaXTW9JLKY5PoFTb6y/c1FTnjXF0mJyv5rWiNF7qWPu7XkN8a6wHosY9SeF 0qyg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IJ46+vg8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-462ff6c335asi43006771cf.662.2024.11.08.09.40.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 08 Nov 2024 09:40:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=IJ46+vg8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9Swq-00046E-2H; Fri, 08 Nov 2024 12:39:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9Swp-00045y-4D for qemu-devel@nongnu.org; Fri, 08 Nov 2024 12:39:03 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9Swn-0007fU-Ip for qemu-devel@nongnu.org; Fri, 08 Nov 2024 12:39:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731087540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WlWrYmpsyykMxq9th+UoPeQpQpPsd/MHm4v4chl35/U=; b=IJ46+vg8NhabJ03RIqUoRj+5XOWfCSS3/6K7DEYZUVXiG5nZD1fQTF7wLg8GBHA7mqE6B/ 6R3fo/HSnexkmpReF5PNnkhwkedk4tc9+3p1ktOh9r2RyDMDxMElob3Jygn7Gk7xjUksfw cwvYpU9rFCd+10DzONGh4r9gHjpTxUA= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-664-fyS9gj-dOTCIl269Gq-AJA-1; Fri, 08 Nov 2024 12:38:59 -0500 X-MC-Unique: fyS9gj-dOTCIl269Gq-AJA-1 X-Mimecast-MFC-AGG-ID: fyS9gj-dOTCIl269Gq-AJA Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-37d5a3afa84so1406148f8f.3 for ; Fri, 08 Nov 2024 09:38:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731087537; x=1731692337; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WlWrYmpsyykMxq9th+UoPeQpQpPsd/MHm4v4chl35/U=; b=chhZaqN8h1NoaEICdRTZNm7oJ2DD9ZQwWDn18XhxwzuxZId69jLwPncNWJJAflzx0E pIjqPhPnPQeabuR2hfwcWBSGS/iUbwKMTz6W6lL/gaNkjP+Wz7fHFr4Av/HzL2x4kUTs vCK3ARYban6DEmyvVrg+KKLGxD1DrGYVVclCY+/iGdPjenQbq3uofvZos6npseXDYYaB 54NTyIMlWU+4iGheRf8P/xkt73uNlHfJVZUN0s0WHRRVmy4bsXbq+X5r4+kFo+aasm8q VGtcu6XcD/b60VVnhLZRmJ1i7NbTNlObZO4yr/raTWBSYE0rJXCVTfj2emu2x95Xhw6V l6KQ== X-Gm-Message-State: AOJu0Yxdb70aGVW0+DPEUkPJUGqHzM6syYRckJgVv+RrrKZlpSMf2U26 9pUCS1sdCsXCEg3cU+6iY9aRs5wvcn0SgWGS9LLJOfze1jzVAhJMbdpKNnrOQhQn28sHGzEAaVH OIx7AXNpv3ueBceuIrf1NoRVJglQTNrq6wUmO9FmkknOeTxTfKGpw+7n0xB1fiVRwovlHukdAAE hLbv7a6aooiqe/HFosgzHgGAJI99xZEDtSVwJ5L6U= X-Received: by 2002:a05:6000:4023:b0:37d:4c8f:2e1 with SMTP id ffacd0b85a97d-381f1867325mr3146506f8f.22.1731087536765; Fri, 08 Nov 2024 09:38:56 -0800 (PST) X-Received: by 2002:a05:6000:4023:b0:37d:4c8f:2e1 with SMTP id ffacd0b85a97d-381f1867325mr3146487f8f.22.1731087536371; Fri, 08 Nov 2024 09:38:56 -0800 (PST) Received: from [192.168.10.47] ([151.49.84.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381eda0604bsm5460304f8f.105.2024.11.08.09.38.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 09:38:55 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-stable@nongnu.org Subject: [PULL 13/13] hw/i386/pc: Don't try to init PCI NICs if there is no PCI bus Date: Fri, 8 Nov 2024 18:38:28 +0100 Message-ID: <20241108173828.111454-14-pbonzini@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241108173828.111454-1-pbonzini@redhat.com> References: <20241108173828.111454-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.34, 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, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Peter Maydell The 'isapc' machine type has no PCI bus, but pc_nic_init() still calls pci_init_nic_devices() passing it a NULL bus pointer. This causes the clang sanitizer to complain: $ ./build/clang/qemu-system-i386 -M isapc ../../hw/pci/pci.c:1866:39: runtime error: member access within null pointer of type 'PCIBus' (aka 'struct PCIBus') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../hw/pci/pci.c:1866:39 in This is because pci_init_nic_devices() does &bus->qbus which is undefined behaviour on a NULL pointer even though we're not actually dereferencing the pointer. (We don't actually crash as a result, so if you aren't running a sanitizer build then there are no user-visible effects.) Make pc_nic_init() avoid trying to initialize PCI NICs on a non-PCI system. Cc: qemu-stable@nongnu.org Fixes: 8d39f9ba14d64 ("hw/i386/pc: use qemu_get_nic_info() and pci_init_nic_devices()") Signed-off-by: Peter Maydell Link: https://lore.kernel.org/r/20241105171813.3031969-1-peter.maydell@linaro.org Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 830614d9303..f9147fecbdc 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1252,7 +1252,9 @@ void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bus, PCIBus *pci_bus) } /* Anything remaining should be a PCI NIC */ - pci_init_nic_devices(pci_bus, mc->default_nic); + if (pci_bus) { + pci_init_nic_devices(pci_bus, mc->default_nic); + } rom_reset_order_override(); }