From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756332; cv=none; d=zohomail.com; s=zohoarc; b=JIGacynj6aub5n9lgaVmEHVKOnK0k5cs+OxfpSjRhLECD+rOASIOD8ue7/Zi5aFxr6AzeH2/Rq4nJxDIecbM2UaIGcZ6SCkbXZFUOpxiRZMRyKuhfPyhwDTJoTPX7TVs6zagMoYGTk9mIBIednR+55GhaMLLdQM+VEND8IGFkSQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756332; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DXFVMeSwVtParp9Mbup0vKeg6hOlExFJyvJQqhPwGV0=; b=RxlUHh3uxuKI7sWcpo0It9LD63f5p/1v/SzU7XtnCwuKeYazHurrTNp5P6FE1ygBVOEUpfA/SWR+UkDTAjTfFv+GqM7ZStkdutamG0Qf6WCK1BVnPTj9Lwiz/WHpwfwmSotY1EnczcTLzfBLN550t/nDXYcD20vgExB23GKn7eA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756332158623.3972128422142; Mon, 22 May 2023 04:52:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1444-0005Ix-Pw; Mon, 22 May 2023 07:51:00 -0400 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 1q143V-0005A0-N5 for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:30 -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 1q143T-0007TD-It for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:24 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-617--7JaBsH6McC--PjOWJcq7A-1; Mon, 22 May 2023 07:50:18 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B47BA802A55; Mon, 22 May 2023 11:50:17 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 01BDE2166B26; Mon, 22 May 2023 11:50:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756221; 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=DXFVMeSwVtParp9Mbup0vKeg6hOlExFJyvJQqhPwGV0=; b=UIhdvVvWxCd6fHjWXiXWQND05MsbOKAEzkdgPaGHoyQ8tDdAZSMqYRjGKTMKLW5Z8Jq4s1 1W9UmaUBRE51E99ef8jIbMf7+SAGMddZZ/8pfomFINlBZzGfc6l9JWua1Ea1XXtEq5QNLV NY+Jbpt4Wwu01PS6YBf5yoocIA/Bstw= X-MC-Unique: -7JaBsH6McC--PjOWJcq7A-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 01/20] hw/i386/Kconfig: ISAPC works fine without VGA_ISA Date: Mon, 22 May 2023 13:49:55 +0200 Message-Id: <20230522115014.1110840-2-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756332898100001 Content-Type: text/plain; charset="utf-8" The "isapc" machine can also be run without VGA card, so there is no need for a hard requirement with a "select" here - "imply" is enough. Message-Id: <20230512124033.502654-2-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- hw/i386/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig index d40802d83f..9051083c1e 100644 --- a/hw/i386/Kconfig +++ b/hw/i386/Kconfig @@ -80,10 +80,10 @@ config I440FX =20 config ISAPC bool + imply VGA_ISA select ISA_BUS select PC select IDE_ISA - select VGA_ISA # FIXME: it is in the same file as i440fx, and does not compile # if separated depends on I440FX --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756310; cv=none; d=zohomail.com; s=zohoarc; b=LPfhEwoTWqPHoxzOGzipiUIm8o56ssQ6V7bsfrLFVatbIVsgBhoGeEYvt1QFm1DuzMXNO7rpoAO1Wwh4NxSdKMq6/Hatn8b2VzfiDHq8kNxpXf5Szot4lSCDzN7UKqxBClV/sqIKWzLYmgmckOMVLEBURDfZ8iqne6Juc0Q5AvU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756310; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=s73n6ACM4SznRz7qRyrl2dgnKMdWBPZZrgt5kQxingQ=; b=l/tgd7ObcwNOUUu8LxtyoseF3SlBI4I0C/q1Z7nX6fN3uCfd1MFCYUa67DRYGbjNrkXqOyK51WUUlVtv6KfeWEHwwBeYvT542hvbZ3BzYwkyH0jzd0oRRZpZo0+t8pDPsJ5GjSAo0b62sDVgnYPPK0Bf7YTcOaGF2LC0ZeMIFr0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756310510735.0650700115499; Mon, 22 May 2023 04:51:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144k-0005rk-2T; Mon, 22 May 2023 07:51:44 -0400 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 1q143V-0005A1-NB for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:29 -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 1q143T-0007UI-MP for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:24 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-21-MUz_5LO_MPWEfHHrO2eRag-1; Mon, 22 May 2023 07:50:19 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D109D800BFF; Mon, 22 May 2023 11:50:18 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 000FE2166B26; Mon, 22 May 2023 11:50:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756222; 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=s73n6ACM4SznRz7qRyrl2dgnKMdWBPZZrgt5kQxingQ=; b=BWnWoucAwj2saV/m8X45l4+9N+NgWLcllvBWZZghk7hhT3798VB/GApkbnx4tpYJh0c6/o G3B30mWE3oAZ9ujBHPS9VZtEtMXzEmitJ1rSR53uxfbH9IvQBrvroF0lWgn7pt1lJQLlF8 edZuoRCIgK78bJ+sDL9eTGtQAAmjGSo= X-MC-Unique: MUz_5LO_MPWEfHHrO2eRag-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 02/20] softmmu/vl.c: Check for the availability of the VGA device before using it Date: Mon, 22 May 2023 13:49:56 +0200 Message-Id: <20230522115014.1110840-3-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756312631100001 Content-Type: text/plain; charset="utf-8" In case the user disabled the default VGA device in the binary (e.g. with the "--without-default-devices" configure switch), we should not try to use it by default if QEMU is running with the default devices, otherwise it aborts when trying to use it. Simply emit a warning instead. Message-Id: <20230512124033.502654-3-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- softmmu/vl.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 6c2427262b..43d3b972da 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -957,7 +957,18 @@ static const char * get_default_vga_model(const MachineClass *machine_class) { if (machine_class->default_display) { - return machine_class->default_display; + for (int t =3D 0; t < VGA_TYPE_MAX; t++) { + const VGAInterfaceInfo *ti =3D &vga_interfaces[t]; + + if (ti->opt_name && vga_interface_available(t) && + g_str_equal(ti->opt_name, machine_class->default_display))= { + return machine_class->default_display; + } + } + + warn_report_once("Default display '%s' is not available in this bi= nary", + machine_class->default_display); + return NULL; } else if (vga_interface_available(VGA_CIRRUS)) { return "cirrus"; } else if (vga_interface_available(VGA_STD)) { --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756452; cv=none; d=zohomail.com; s=zohoarc; b=Q8xDz1MhudrknDFMPGK91wLTPTX2sLoDYRTHWi5ltJhaUAGfhkP8zByudeh8NrWFZvDaDRTVqlPrRWZrnD1c5nR/RssLbdD5wZfEh859c60/g47eU8nSiycu/rhlImahPvloaJOkhO1gFK4Mz4vjh5paYjnX5ShhPf1P8tHXHhc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756452; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4Xjm+tgY5EvSnU5yqhPj0rcCcM7szS3mEd3kc0jDIts=; b=af/1BjAW4uBEhyfQzBCLR+/oQvOQHD4L/CE54WbseC60bY1yVsR7BItSymDvlnQY8pl/JZWOUrvub3nzolrWPpsjYDvSGprPBDAtcq+TCMqjNNqC+yaweerYoelEPq3WCdKkyw2aBJtxQMKUgHQtIUog4A6mXWlGJm+4ehi+Zmk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756452418733.2812656172636; Mon, 22 May 2023 04:54:12 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1448-0005Pf-FR; Mon, 22 May 2023 07:51:04 -0400 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 1q143Z-0005Ap-Fx for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:34 -0400 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 1q143T-0007TM-P1 for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:26 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-534-kOaMMHbvMsaaqiy1xghl5g-1; Mon, 22 May 2023 07:50:20 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 22C6D3C02B72; Mon, 22 May 2023 11:50:20 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1FC552166B26; Mon, 22 May 2023 11:50:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756221; 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=4Xjm+tgY5EvSnU5yqhPj0rcCcM7szS3mEd3kc0jDIts=; b=a4eQCp2I+TPpPRXKKqfM5Vw6bF9kYPtHaqCRTO/2P6xDLzjVR7MikF2JSaBEul/mi0hOJ6 quV6l3bjr6zf8DwpHLTwMGw6dY/CXco2iSxF8HQdPgh0NxdaX1OTF/i9YLKhOs+IIldan+ vDZTbi8RCuBinAV0IMLjYt2IFiyy1XQ= X-MC-Unique: kOaMMHbvMsaaqiy1xghl5g-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 03/20] hw: Move the default NIC machine class setting from the x86 to the generic one Date: Mon, 22 May 2023 13:49:57 +0200 Message-Id: <20230522115014.1110840-4-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756454239100001 Content-Type: text/plain; charset="utf-8" We are going to re-use this setting for other targets, so let's move this to the main MachineClass. Message-Id: <20230512124033.502654-4-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- include/hw/boards.h | 1 + include/hw/i386/pc.h | 1 - hw/i386/pc.c | 3 ++- hw/i386/pc_piix.c | 4 ++-- hw/i386/pc_q35.c | 6 ++---- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index f4117fdb9a..a385010909 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -253,6 +253,7 @@ struct MachineClass { const char *default_machine_opts; const char *default_boot_order; const char *default_display; + const char *default_nic; GPtrArray *compat_props; const char *hw_version; ram_addr_t default_ram_size; diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 79e755879d..c661e9cc80 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -93,7 +93,6 @@ struct PCMachineClass { /* Device configuration: */ bool pci_enabled; bool kvmclock_enabled; - const char *default_nic_model; =20 /* Compat options: */ =20 diff --git a/hw/i386/pc.c b/hw/i386/pc.c index b3d826a83a..bb62c994fa 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1364,12 +1364,13 @@ void pc_basic_device_init(struct PCMachineState *pc= ms, =20 void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bus, PCIBus *pci_bus) { + MachineClass *mc =3D MACHINE_CLASS(pcmc); int i; =20 rom_set_order_override(FW_CFG_ORDER_OVERRIDE_NIC); for (i =3D 0; i < nb_nics; i++) { NICInfo *nd =3D &nd_table[i]; - const char *model =3D nd->model ? nd->model : pcmc->default_nic_mo= del; + const char *model =3D nd->model ? nd->model : mc->default_nic; =20 if (g_str_equal(model, "ne2k_isa")) { pc_init_ne2k_isa(isa_bus, nd); diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 10070ea9a5..17892ad580 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -450,7 +450,6 @@ static void pc_xen_hvm_init(MachineState *machine) static void pc_i440fx_machine_options(MachineClass *m) { PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); - pcmc->default_nic_model =3D "e1000"; pcmc->pci_root_uid =3D 0; pcmc->default_cpu_version =3D 1; =20 @@ -458,6 +457,7 @@ static void pc_i440fx_machine_options(MachineClass *m) m->desc =3D "Standard PC (i440FX + PIIX, 1996)"; m->default_machine_opts =3D "firmware=3Dbios-256k.bin"; m->default_display =3D "std"; + m->default_nic =3D "e1000"; machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE); } @@ -884,7 +884,7 @@ static void isapc_machine_options(MachineClass *m) pcmc->gigabyte_align =3D false; pcmc->smbios_legacy_mode =3D true; pcmc->has_reserved_memory =3D false; - pcmc->default_nic_model =3D "ne2k_isa"; + m->default_nic =3D "ne2k_isa"; m->default_cpu_type =3D X86_CPU_TYPE_NAME("486"); } =20 diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 8030d53da6..7e0f354edd 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -356,7 +356,6 @@ static void pc_q35_init(MachineState *machine) static void pc_q35_machine_options(MachineClass *m) { PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); - pcmc->default_nic_model =3D "e1000e"; pcmc->pci_root_uid =3D 0; pcmc->default_cpu_version =3D 1; =20 @@ -365,6 +364,7 @@ static void pc_q35_machine_options(MachineClass *m) m->units_per_default_bus =3D 1; m->default_machine_opts =3D "firmware=3Dbios-256k.bin"; m->default_display =3D "std"; + m->default_nic =3D "e1000e"; m->default_kernel_irqchip_split =3D false; m->no_floppy =3D 1; machine_class_allow_dynamic_sysbus_dev(m, TYPE_AMD_IOMMU_DEVICE); @@ -577,10 +577,8 @@ DEFINE_Q35_MACHINE(v2_12, "pc-q35-2.12", NULL, =20 static void pc_q35_2_11_machine_options(MachineClass *m) { - PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); - pc_q35_2_12_machine_options(m); - pcmc->default_nic_model =3D "e1000"; + m->default_nic =3D "e1000"; compat_props_add(m->compat_props, hw_compat_2_11, hw_compat_2_11_len); compat_props_add(m->compat_props, pc_compat_2_11, pc_compat_2_11_len); } --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756313; cv=none; d=zohomail.com; s=zohoarc; b=aI2MlYKRFClQEEKaxcXt5wlR1cLW2MgnltMYtdT5LIj88eRP31tbax4rl/Uq1ErqGTO2nKFJUI/6OEdrjePZ0gRirYO/wR2dgw0qVFWryT/HrOIWGTcDk5wnbdPyBsPDTcK5JTRVBO78iTTYEG8a4iHs2sW+gMUsGC1VD58XgzY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756313; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FeS9PDazdw93oPnt1Z1wmuikBMsBZ3FARh431c5igA0=; b=Hahzti+cBva48tpJZqKvi5kjVPaUbkc2dnQcvMbpr9Ksqr/cUer+bF+pMk+5tt12TzZeciD4ETNq85HV7Oy4v9r7bFNxuKXtxJXctWJj156rkPK+5yFGrlcjh2iafDl1lfxP7EH8Uvch9kehxT8oeC24nzDJbD2g30FYcYKvBGI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756313033288.817561209661; Mon, 22 May 2023 04:51:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144A-0005SH-ME; Mon, 22 May 2023 07:51:06 -0400 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 1q143X-0005AB-3n for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50: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 1q143V-0007Wg-F5 for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:26 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-33-JwCek5vhPxCCpZc_4lMcSQ-1; Mon, 22 May 2023 07:50:21 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 479D2185A78E; Mon, 22 May 2023 11:50:21 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 830B32166B26; Mon, 22 May 2023 11:50:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756224; 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=FeS9PDazdw93oPnt1Z1wmuikBMsBZ3FARh431c5igA0=; b=Ye4bqbX1s3/exK+nIkMj716IIc4NYrcNH/GeVtDOT+sHjvRbeg3mPnX9Ofz+lPzlsugieD BO+teeGdDRelriW37sUME8Dy3iwrqJ45nI0Id1q8zC3JOGK5jvlAVHMF3x1dE3uaqVQWZq TG84dAseFrm0aQg5GqmXIKrKC2Uvcow= X-MC-Unique: JwCek5vhPxCCpZc_4lMcSQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 04/20] softmmu/vl.c: Disable default NIC if it has not been compiled into the binary Date: Mon, 22 May 2023 13:49:58 +0200 Message-Id: <20230522115014.1110840-5-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756313460100005 Content-Type: text/plain; charset="utf-8" Don't try to instantiate a default NIC if it is not available (since this will cause QEMU to abort). Emit a warning instead. Message-Id: <20230512124033.502654-5-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- softmmu/vl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/softmmu/vl.c b/softmmu/vl.c index 43d3b972da..b0b96f67fa 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -1294,6 +1294,13 @@ static void qemu_disable_default_devices(void) default_monitor =3D 0; default_net =3D 0; default_vga =3D 0; + } else { + if (default_net && machine_class->default_nic && + !module_object_class_by_name(machine_class->default_nic)) { + warn_report("Default NIC '%s' is not available in this binary", + machine_class->default_nic); + default_net =3D 0; + } } } =20 --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756414; cv=none; d=zohomail.com; s=zohoarc; b=GyUhPssEvYZ02jeJzr/H2Dil7b3h03FVSN+cFUF9JV2Xizzgeru+/wGG494PnivSqC+8ShJBuaFiEf0lGJQJNyqp0GosIRfmzID83abu9SjpDzzR9jQSrrIPPRzZBIm5m32UI2ATvMPgnnVbC3umZJkLoYqIY/oVLuxACtT3Ee8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756414; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=P9ZCTFF/NM2e1SLnCvV9JUPDKoXwZ90Q4A/ClJj8yBw=; b=P9lS/DptxsVl8rKkmPbdc/4UdOairws1KXqgsqMM4bGc9U4SvRVdPte0lXNH+JxOHUSCMiQtDDqOWoNaiLL5w+zQ+lILMlY7XSV2kahEUe1G2l3IsyQK0Ne5+a6tGJ8Fr4p5QvzKwCVqQZpjf6TQhgrjGzfLUKivkOG+a1DxcFo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756414968901.4337543012902; Mon, 22 May 2023 04:53:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144H-0005c1-0q; Mon, 22 May 2023 07:51:13 -0400 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 1q143b-0005BH-Eb for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:34 -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 1q143Z-0007YK-6S for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:30 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-489-X1wkD3fqNsWgble6pKNguw-1; Mon, 22 May 2023 07:50:23 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 91FBC800159; Mon, 22 May 2023 11:50:22 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 912B32166B26; Mon, 22 May 2023 11:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756226; 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=P9ZCTFF/NM2e1SLnCvV9JUPDKoXwZ90Q4A/ClJj8yBw=; b=TBLAiMDP/Oq4MNNAe0ZQzc8035kQy1WO7Gbf/epgXA4Z1E+Lssql1K8QdGA7uxsSRlF8bz 7B1daZ/vExqfX+/bjk76+fAqTPX4vdls+kMTcbIen0xg5mMaVSxPIYMWseh9DLnyrfGdoF 5QtMVRIHAYh9nfsInuAI5GLTFKTWFCk= X-MC-Unique: X1wkD3fqNsWgble6pKNguw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 05/20] hw/ppc: Use MachineClass->default_nic in the ppc machines Date: Mon, 22 May 2023 13:49:59 +0200 Message-Id: <20230522115014.1110840-6-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756415762100003 Content-Type: text/plain; charset="utf-8" Mark the default NIC via the new MachineClass->default_nic setting so that the machine-defaults code in vl.c can decide whether the default NIC is usable or not (for example when compiling with the "--without-default-devices" configure switch). Message-Id: <20230512124033.502654-6-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- hw/ppc/e500.c | 3 ++- hw/ppc/e500plat.c | 1 + hw/ppc/mac_newworld.c | 4 +++- hw/ppc/mac_oldworld.c | 4 +++- hw/ppc/mpc8544ds.c | 1 + hw/ppc/ppc440_bamboo.c | 4 +++- hw/ppc/prep.c | 4 +++- 7 files changed, 16 insertions(+), 5 deletions(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 117c9c08ed..b6eb599751 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -898,6 +898,7 @@ void ppce500_init(MachineState *machine) MemoryRegion *address_space_mem =3D get_system_memory(); PPCE500MachineState *pms =3D PPCE500_MACHINE(machine); const PPCE500MachineClass *pmc =3D PPCE500_MACHINE_GET_CLASS(machine); + MachineClass *mc =3D MACHINE_CLASS(pmc); PCIBus *pci_bus; CPUPPCState *env =3D NULL; uint64_t loadaddr; @@ -1073,7 +1074,7 @@ void ppce500_init(MachineState *machine) if (pci_bus) { /* Register network interfaces. */ for (i =3D 0; i < nb_nics; i++) { - pci_nic_init_nofail(&nd_table[i], pci_bus, "virtio-net-pci", N= ULL); + pci_nic_init_nofail(&nd_table[i], pci_bus, mc->default_nic, NU= LL); } } =20 diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c index 3032bd3f6d..7aa2f2107a 100644 --- a/hw/ppc/e500plat.c +++ b/hw/ppc/e500plat.c @@ -99,6 +99,7 @@ static void e500plat_machine_class_init(ObjectClass *oc, = void *data) mc->max_cpus =3D 32; mc->default_cpu_type =3D POWERPC_CPU_TYPE_NAME("e500v2_v30"); mc->default_ram_id =3D "mpc8544ds.ram"; + mc->default_nic =3D "virtio-net-pci"; machine_class_allow_dynamic_sysbus_dev(mc, TYPE_ETSEC_COMMON); } =20 diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index 460c14b5e3..535710314a 100644 --- a/hw/ppc/mac_newworld.c +++ b/hw/ppc/mac_newworld.c @@ -132,6 +132,7 @@ static void ppc_core99_reset(void *opaque) static void ppc_core99_init(MachineState *machine) { Core99MachineState *core99_machine =3D CORE99_MACHINE(machine); + MachineClass *mc =3D MACHINE_GET_CLASS(machine); PowerPCCPU *cpu =3D NULL; CPUPPCState *env =3D NULL; char *filename; @@ -444,7 +445,7 @@ static void ppc_core99_init(MachineState *machine) } =20 for (i =3D 0; i < nb_nics; i++) { - pci_nic_init_nofail(&nd_table[i], pci_bus, "sungem", NULL); + pci_nic_init_nofail(&nd_table[i], pci_bus, mc->default_nic, NULL); } =20 /* The NewWorld NVRAM is not located in the MacIO device */ @@ -577,6 +578,7 @@ static void core99_machine_class_init(ObjectClass *oc, = void *data) mc->max_cpus =3D 1; mc->default_boot_order =3D "cd"; mc->default_display =3D "std"; + mc->default_nic =3D "sungem"; mc->kvm_type =3D core99_kvm_type; #ifdef TARGET_PPC64 mc->default_cpu_type =3D POWERPC_CPU_TYPE_NAME("970fx_v3.1"); diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 2e4cc3fe0b..510ff0eaaf 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c @@ -87,6 +87,7 @@ static void ppc_heathrow_reset(void *opaque) static void ppc_heathrow_init(MachineState *machine) { const char *bios_name =3D machine->firmware ?: PROM_FILENAME; + MachineClass *mc =3D MACHINE_GET_CLASS(machine); PowerPCCPU *cpu =3D NULL; CPUPPCState *env =3D NULL; char *filename; @@ -276,7 +277,7 @@ static void ppc_heathrow_init(MachineState *machine) pci_vga_init(pci_bus); =20 for (i =3D 0; i < nb_nics; i++) { - pci_nic_init_nofail(&nd_table[i], pci_bus, "ne2k_pci", NULL); + pci_nic_init_nofail(&nd_table[i], pci_bus, mc->default_nic, NULL); } =20 /* MacIO IDE */ @@ -424,6 +425,7 @@ static void heathrow_class_init(ObjectClass *oc, void *= data) mc->kvm_type =3D heathrow_kvm_type; mc->default_cpu_type =3D POWERPC_CPU_TYPE_NAME("750_v3.1"); mc->default_display =3D "std"; + mc->default_nic =3D "ne2k_pci"; mc->ignore_boot_device_suffixes =3D true; mc->default_ram_id =3D "ppc_heathrow.ram"; fwc->get_dev_path =3D heathrow_fw_dev_path; diff --git a/hw/ppc/mpc8544ds.c b/hw/ppc/mpc8544ds.c index 7dd5219736..b7130903d6 100644 --- a/hw/ppc/mpc8544ds.c +++ b/hw/ppc/mpc8544ds.c @@ -61,6 +61,7 @@ static void mpc8544ds_machine_class_init(ObjectClass *oc,= void *data) mc->max_cpus =3D 15; mc->default_cpu_type =3D POWERPC_CPU_TYPE_NAME("e500v2_v30"); mc->default_ram_id =3D "mpc8544ds.ram"; + mc->default_nic =3D "virtio-net-pci"; } =20 #define TYPE_MPC8544DS_MACHINE MACHINE_TYPE_NAME("mpc8544ds") diff --git a/hw/ppc/ppc440_bamboo.c b/hw/ppc/ppc440_bamboo.c index 2880c81cb1..f969fa3c29 100644 --- a/hw/ppc/ppc440_bamboo.c +++ b/hw/ppc/ppc440_bamboo.c @@ -161,6 +161,7 @@ static void bamboo_init(MachineState *machine) { const char *kernel_filename =3D machine->kernel_filename; const char *initrd_filename =3D machine->initrd_filename; + MachineClass *mc =3D MACHINE_GET_CLASS(machine); unsigned int pci_irq_nrs[4] =3D { 28, 27, 26, 25 }; MemoryRegion *address_space_mem =3D get_system_memory(); MemoryRegion *isa =3D g_new(MemoryRegion, 1); @@ -246,7 +247,7 @@ static void bamboo_init(MachineState *machine) * There are no PCI NICs on the Bamboo board, but there are * PCI slots, so we can pick whatever default model we want. */ - pci_nic_init_nofail(&nd_table[i], pcibus, "e1000", NULL); + pci_nic_init_nofail(&nd_table[i], pcibus, mc->default_nic, NUL= L); } } =20 @@ -296,6 +297,7 @@ static void bamboo_machine_init(MachineClass *mc) mc->init =3D bamboo_init; mc->default_cpu_type =3D POWERPC_CPU_TYPE_NAME("440epb"); mc->default_ram_id =3D "ppc4xx.sdram"; + mc->default_nic =3D "e1000"; } =20 DEFINE_MACHINE("bamboo", bamboo_machine_init) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index d00280c0f8..4610abddbd 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -229,6 +229,7 @@ static int prep_set_cmos_checksum(DeviceState *dev, voi= d *opaque) static void ibm_40p_init(MachineState *machine) { const char *bios_name =3D machine->firmware ?: "openbios-ppc"; + MachineClass *mc =3D MACHINE_GET_CLASS(machine); CPUPPCState *env =3D NULL; uint16_t cmos_checksum; PowerPCCPU *cpu; @@ -323,7 +324,7 @@ static void ibm_40p_init(MachineState *machine) pci_vga_init(pci_bus); =20 for (i =3D 0; i < nb_nics; i++) { - pci_nic_init_nofail(&nd_table[i], pci_bus, "pcnet", + pci_nic_init_nofail(&nd_table[i], pci_bus, mc->default_nic, i =3D=3D 0 ? "3" : NULL); } } @@ -427,6 +428,7 @@ static void ibm_40p_machine_init(MachineClass *mc) mc->default_boot_order =3D "c"; mc->default_cpu_type =3D POWERPC_CPU_TYPE_NAME("604"); mc->default_display =3D "std"; + mc->default_nic =3D "pcnet"; } =20 DEFINE_MACHINE("40p", ibm_40p_machine_init) --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756322; cv=none; d=zohomail.com; s=zohoarc; b=R6VMk8H4Edzmk2MyjNdOw5vL7WWMGL/vLNvl3HEbpqe37LqSoR+WkhqNyD/OsBJP5TyrvDTA25B2kKFMWL8oDwFjpDrDinSOdw3X1Z1oxSzovCcA6JknFZKlBT2ytwwwK4BgyMQsOKY4YpZ4nza3HKzwCIxDyJxeF/ea0DXM4VU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756322; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TE5zfxcqmeCghrOeaYdiD2RkrXTSxKN/xuqGw6rH/eA=; b=aDDK5Dz7yL9EtWc+Ky4W7qu5pfMebJQV8v+f3lBMi4mF6CoEl7k2U4zr++mj4oQcnLM891DbPjW1knuriX6KdscazAfg9fp7nQEPSLfudzfexpTmTnrln8WX9lfvdNppNfESv1dkV7BwU9Wv7jB9JfUqiP7RTxiTquSmVe53rRc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756322700484.70974489703076; Mon, 22 May 2023 04:52:02 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1449-0005Rn-SD; Mon, 22 May 2023 07:51:05 -0400 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 1q143b-0005BM-Vn for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:36 -0400 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 1q143Z-0007Yw-8z for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:31 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-76-1G5B88i_NoizHGrs3jmB7g-1; Mon, 22 May 2023 07:50:24 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EA676802A55; Mon, 22 May 2023 11:50:23 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id E1CBA2166B26; Mon, 22 May 2023 11:50:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756227; 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=TE5zfxcqmeCghrOeaYdiD2RkrXTSxKN/xuqGw6rH/eA=; b=NtY7zFIPdoMwh9kFsSGRO98c7w6ilx9do+aYlVVHl+d0aiOYXyBfhN6vI+c2v5JDGIRL58 +G06GgfQNBaqyZyD2snYVuE6+9qa8Ya8vjHM9mGP5Opk+TQtvea0ZhYEmylQ1fiY8LZw2K AbE7mvx5DRz7RsGDsaXYNLbO4FVWCCE= X-MC-Unique: 1G5B88i_NoizHGrs3jmB7g-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 06/20] hw/s390x: Use MachineClass->default_nic in the s390x machine Date: Mon, 22 May 2023 13:50:00 +0200 Message-Id: <20230522115014.1110840-7-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756324879100002 Content-Type: text/plain; charset="utf-8" Mark the default NIC via the new MachineClass->default_nic setting so that the machine-defaults code in vl.c can decide whether the default NIC is usable or not (for example when compiling with the "--without-default-devices" configure switch). Message-Id: <20230512124033.502654-7-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- hw/s390x/s390-virtio-ccw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 2516b89b32..2dece8eab8 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -245,6 +245,7 @@ static void s390_create_sclpconsole(const char *type, C= hardev *chardev) =20 static void ccw_init(MachineState *machine) { + MachineClass *mc =3D MACHINE_GET_CLASS(machine); int ret; VirtualCssBus *css_bus; DeviceState *dev; @@ -292,7 +293,7 @@ static void ccw_init(MachineState *machine) } =20 /* Create VirtIO network adapters */ - s390_create_virtio_net(BUS(css_bus), "virtio-net-ccw"); + s390_create_virtio_net(BUS(css_bus), mc->default_nic); =20 /* init consoles */ if (serial_hd(0)) { @@ -746,6 +747,7 @@ static void ccw_machine_class_init(ObjectClass *oc, voi= d *data) hc->unplug_request =3D s390_machine_device_unplug_request; nc->nmi_monitor_handler =3D s390_nmi; mc->default_ram_id =3D "s390.ram"; + mc->default_nic =3D "virtio-net-ccw"; =20 object_class_property_add_bool(oc, "aes-key-wrap", machine_get_aes_key_wrap, --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756475; cv=none; d=zohomail.com; s=zohoarc; b=K8Uu19PDEyP5HutkMomyIywnQ2lyIoLMaZrkJ0N7QRDNp+iumSoeJqjPo6hclE4KpitlCvHD3zXFSlGcQiDWdlxTMcRO7R/1DlJSgAkR0lclpW10I4Oqs0DmH+/NdRVf6Q3u0FIUCnyIY3oaWtV32sPl/BSSarhvlxOM9QuyOVk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756475; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9TUBy2p4PDarpT0yz0zuGi964WBe9oJMbUcG1jrgHg4=; b=QQbDSesQM4Thmeoklf5szMxFJ3OkIAfJxK7bxr2VEgbr2QULus5zHXN1WLKb6qGQYf5XH7eYGOoH5Xv3zyiVBblzwbxiUl6bGd4gZwEDnSD0gpcqgY7Da2PCKYP3fIcsxuwDmMBf6BOPbgWlrF2XZBqu3Qxg5LHniSf7Ow9jHyQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756475209546.0835529744585; Mon, 22 May 2023 04:54:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1448-0005OQ-2T; Mon, 22 May 2023 07:51:04 -0400 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 1q143a-0005Ar-PC for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:34 -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 1q143Z-0007YM-6n for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:30 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-549-r8r8E_4ZPd2CEVGx4kjOow-1; Mon, 22 May 2023 07:50:25 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 134D7101A53B; Mon, 22 May 2023 11:50:25 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 36C1B2166B27; Mon, 22 May 2023 11:50:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756226; 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=9TUBy2p4PDarpT0yz0zuGi964WBe9oJMbUcG1jrgHg4=; b=TMRTk98eUb1iskds+GtyW6oSgpx51F9ZA/NOTdVXwREChbqK954Pz+7hglb48Ez2aHwho5 Stu6e1IgKoaBmCAAbWN29ACCf00g3RPtrARDthdX4DSWZT7fEo3FMHvVpF/WTMZOkqrrvj JxVd9DsAEYVzocuDh/i9HEEHv8V4agI= X-MC-Unique: r8r8E_4ZPd2CEVGx4kjOow-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 07/20] hw/sh4: Use MachineClass->default_nic in the sh4 r2d machine Date: Mon, 22 May 2023 13:50:01 +0200 Message-Id: <20230522115014.1110840-8-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756475455100007 Content-Type: text/plain; charset="utf-8" Mark the default NIC via the new MachineClass->default_nic setting so that the machine-defaults code in vl.c can decide whether the default NIC is usable or not (for example when compiling with the "--without-default-devices" configure switch). Message-Id: <20230512124033.502654-8-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- hw/sh4/r2d.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index 826a0a31b5..4944994e9c 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -232,6 +232,7 @@ static void r2d_init(MachineState *machine) const char *kernel_filename =3D machine->kernel_filename; const char *kernel_cmdline =3D machine->kernel_cmdline; const char *initrd_filename =3D machine->initrd_filename; + MachineClass *mc =3D MACHINE_GET_CLASS(machine); SuperHCPU *cpu; CPUSH4State *env; ResetData *reset_info; @@ -310,7 +311,7 @@ static void r2d_init(MachineState *machine) /* NIC: rtl8139 on-board, and 2 slots. */ for (i =3D 0; i < nb_nics; i++) pci_nic_init_nofail(&nd_table[i], pci_bus, - "rtl8139", i =3D=3D 0 ? "2" : NULL); + mc->default_nic, i =3D=3D 0 ? "2" : NULL); =20 /* USB keyboard */ usb_create_simple(usb_bus_find(-1), "usb-kbd"); @@ -375,6 +376,7 @@ static void r2d_machine_init(MachineClass *mc) mc->init =3D r2d_init; mc->block_default_type =3D IF_IDE; mc->default_cpu_type =3D TYPE_SH7751R_CPU; + mc->default_nic =3D "rtl8139"; } =20 DEFINE_MACHINE("r2d", r2d_machine_init) --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756434; cv=none; d=zohomail.com; s=zohoarc; b=XS7c604YkxnVt1c6BRP+xTSiWess4FeMhLpbsQER6Hqq9rT/5h5jG6quETxzXecjXGUO4s5IpkvS64+wF45kLMDXJV9hLNGZybFDuKQW3Hcup2asGdvw+b2ocTN8rI/T0fiPXwcZ/FAiN4L/J0q9sI6cwMINcCcR0POJPMeV4ok= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756434; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=45Wf+xoO7XxfgRD0/Mp9+RUqAmlm7wq0Z4K8ueM9fMo=; b=Y6GxTU54NcgLKOqJ0/lewrKSdPTi62sNZ7XnGWco6f1NrwCySFoyuzptzoeCrtPr1pnUjO5W2sbeIUmuapXj7cTpM72dEZc3bq7gPMnJGXQBRASIflM84Da9ctI1ByJ9GsAkCN5N38Q8eQV0kXTm6PhnYrXwpNIej7743xLULCA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756434426828.935595056936; Mon, 22 May 2023 04:53:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144E-0005Zk-He; Mon, 22 May 2023 07:51:10 -0400 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 1q143d-0005Bj-9x for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:36 -0400 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 1q143a-0007Zv-95 for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:31 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-522-pb-hM8mFOiuPwy7cDIJfGg-1; Mon, 22 May 2023 07:50:26 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 398318032F1; Mon, 22 May 2023 11:50:26 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 542EB2166B26; Mon, 22 May 2023 11:50:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756229; 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=45Wf+xoO7XxfgRD0/Mp9+RUqAmlm7wq0Z4K8ueM9fMo=; b=gj217I+4Ptq+Iyw4EP/n0DcLY3VBm7Hnrp+MIH+AIgs0tTcg9iIwdIof6qEUj/vn+63YEO zcZ6cJG5u02sqMAhdDmluove/inIvuwmF58HxU4hAG7N6FhhKigUYhTr4p9cyIVbvX5eCW GVis6qnH7ckEyCCs4sPLxp8CwAqk9NQ= X-MC-Unique: pb-hM8mFOiuPwy7cDIJfGg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 08/20] hw/char/parallel: Move TYPE_ISA_PARALLEL to the header file Date: Mon, 22 May 2023 13:50:02 +0200 Message-Id: <20230522115014.1110840-9-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756435723100003 Content-Type: text/plain; charset="utf-8" We are going to require the macro from other files, too, so move this #define to the header file. Message-Id: <20230512124033.502654-9-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- include/hw/char/parallel.h | 2 ++ hw/char/parallel-isa.c | 2 +- hw/char/parallel.c | 1 - hw/isa/isa-superio.c | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/hw/char/parallel.h b/include/hw/char/parallel.h index 0a23c0f57e..29d2876d00 100644 --- a/include/hw/char/parallel.h +++ b/include/hw/char/parallel.h @@ -4,6 +4,8 @@ #include "hw/isa/isa.h" #include "chardev/char.h" =20 +#define TYPE_ISA_PARALLEL "isa-parallel" + void parallel_hds_isa_init(ISABus *bus, int n); =20 bool parallel_mm_init(MemoryRegion *address_space, diff --git a/hw/char/parallel-isa.c b/hw/char/parallel-isa.c index 1ccbb96e70..547ae69304 100644 --- a/hw/char/parallel-isa.c +++ b/hw/char/parallel-isa.c @@ -21,7 +21,7 @@ static void parallel_init(ISABus *bus, int index, Chardev= *chr) DeviceState *dev; ISADevice *isadev; =20 - isadev =3D isa_new("isa-parallel"); + isadev =3D isa_new(TYPE_ISA_PARALLEL); dev =3D DEVICE(isadev); qdev_prop_set_uint32(dev, "index", index); qdev_prop_set_chr(dev, "chardev", chr); diff --git a/hw/char/parallel.c b/hw/char/parallel.c index af551e7864..3d32589bb3 100644 --- a/hw/char/parallel.c +++ b/hw/char/parallel.c @@ -93,7 +93,6 @@ typedef struct ParallelState { PortioList portio_list; } ParallelState; =20 -#define TYPE_ISA_PARALLEL "isa-parallel" OBJECT_DECLARE_SIMPLE_TYPE(ISAParallelState, ISA_PARALLEL) =20 struct ISAParallelState { diff --git a/hw/isa/isa-superio.c b/hw/isa/isa-superio.c index c81bfe58ef..9292ec3bcf 100644 --- a/hw/isa/isa-superio.c +++ b/hw/isa/isa-superio.c @@ -16,6 +16,7 @@ #include "qapi/error.h" #include "sysemu/blockdev.h" #include "chardev/char.h" +#include "hw/char/parallel.h" #include "hw/block/fdc.h" #include "hw/isa/superio.h" #include "hw/qdev-properties.h" @@ -51,7 +52,7 @@ static void isa_superio_realize(DeviceState *dev, Error *= *errp) } else { name =3D g_strdup_printf("parallel%d", i); } - isa =3D isa_new("isa-parallel"); + isa =3D isa_new(TYPE_ISA_PARALLEL); d =3D DEVICE(isa); qdev_prop_set_uint32(d, "index", i); if (k->parallel.get_iobase) { --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756294; cv=none; d=zohomail.com; s=zohoarc; b=mfvqmaAP/OkRSoJNOB5K5lW/9XHygyk2nMa7+0Y861NANJBdkXYJXkDsJW4aTDBWn9JQISizuva9h04HkiJwzhXuRgRhpMJKH8cs4ErNfR/sUYCH9k2Yfa18F4k/4COm9hgmf/QCYRb9XL7JX0uLCw/nQLYtUK9CGfybZ4xMjck= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756294; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8p0yTdOmJV24/CP57Pqp4VRWyFvcmAqGxBNcQQwP4Pg=; b=nDtLu85BbNzypq4HYxlb3aIqdeJkLjEJQoCK9rL1ii+udNZ9bDmbYKz01mk6M2ZtNxFqeGA3MwHgt/Kxg5/SYAVgPqx0NqqVjR9i9v/s88J1KaV1xskyolEqohJ6jXm5CpN6zfgFRyRlv1kZ8ZfvayZh/bpcOXDx0dYULUy6gLk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756294005431.72432752540544; Mon, 22 May 2023 04:51:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144A-0005SF-Lw; Mon, 22 May 2023 07:51:06 -0400 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 1q143d-0005Bo-Dc for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:36 -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 1q143b-0007aK-IV for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:33 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-379-EWwMCyumNkqGGalyNLWl1A-1; Mon, 22 May 2023 07:50:27 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3A155811E85; Mon, 22 May 2023 11:50:27 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 79E762166B26; Mon, 22 May 2023 11:50:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756231; 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=8p0yTdOmJV24/CP57Pqp4VRWyFvcmAqGxBNcQQwP4Pg=; b=SlGhN3JcS9CDEfp+XPO3UOakM8/WbJ+4Xazf8E+g0sb/zvFBWecpp7BR/qIeaQPooHT2Nf 0qHj2goB9yniCN1o3hDW0t0Dg79sZFi++dks5PN2C/5UNQkvRrJQiK92ta6t9pHESH9cap XObKcEoI1YspImqFSuAuGYKwKTeW9ak= X-MC-Unique: EWwMCyumNkqGGalyNLWl1A-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 09/20] hw/i386: Ignore the default parallel port if it has not been compiled into QEMU Date: Mon, 22 May 2023 13:50:03 +0200 Message-Id: <20230522115014.1110840-10-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756294582100004 Content-Type: text/plain; charset="utf-8" Don't try to instantiate the parallel port if it has not been enabled in the build configuration. Message-Id: <20230512124033.502654-10-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- hw/i386/pc_piix.c | 3 +++ hw/i386/pc_q35.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 17892ad580..d5b0dcd1fe 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -26,6 +26,7 @@ #include CONFIG_DEVICES =20 #include "qemu/units.h" +#include "hw/char/parallel.h" #include "hw/dma/i8257.h" #include "hw/loader.h" #include "hw/i386/x86.h" @@ -458,6 +459,7 @@ static void pc_i440fx_machine_options(MachineClass *m) m->default_machine_opts =3D "firmware=3Dbios-256k.bin"; m->default_display =3D "std"; m->default_nic =3D "e1000"; + m->no_parallel =3D !module_object_class_by_name(TYPE_ISA_PARALLEL); machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE); } @@ -886,6 +888,7 @@ static void isapc_machine_options(MachineClass *m) pcmc->has_reserved_memory =3D false; m->default_nic =3D "ne2k_isa"; m->default_cpu_type =3D X86_CPU_TYPE_NAME("486"); + m->no_parallel =3D !module_object_class_by_name(TYPE_ISA_PARALLEL); } =20 DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa, diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 7e0f354edd..6155427e48 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -30,6 +30,7 @@ =20 #include "qemu/osdep.h" #include "qemu/units.h" +#include "hw/char/parallel.h" #include "hw/loader.h" #include "hw/i2c/smbus_eeprom.h" #include "hw/rtc/mc146818rtc.h" @@ -367,6 +368,7 @@ static void pc_q35_machine_options(MachineClass *m) m->default_nic =3D "e1000e"; m->default_kernel_irqchip_split =3D false; m->no_floppy =3D 1; + m->no_parallel =3D !module_object_class_by_name(TYPE_ISA_PARALLEL); machine_class_allow_dynamic_sysbus_dev(m, TYPE_AMD_IOMMU_DEVICE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE); --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756282; cv=none; d=zohomail.com; s=zohoarc; b=jCpwC7jQSqfaGohc1DH1eYOh729W93NfQonNGcCFqi/JCecvv9ueDeUAeiPt+VqXmzZbe+8OKzcqdSb5VPsf2DJLQZaoBBMTNPvG3g3AG3MfRFL745zSyOmmFhc1b6VDAcwEO30oqHEr1tT9fM8m1988rsK7YeMeYpwtGP8NVYI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756282; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PVpzLWuuhBNxH18mPNaORIdlSEI8YVFhxzB54R2645g=; b=EjG2vWs6jfnQTVmtG98gsgu1WWVVaTRKcj6egjjyIxlAkiKwFMhaMA4DyZGY2XnMID0MLEuz5q1pXcRfAelDZBozPTI47hP3/bbnThQO36XjvDbJvS34bDsxBA4auY1GBceavA6k8b79Fl6KmlTChLZxDSV9OvzQbV0WkS3hwyI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756282001818.6729615147996; Mon, 22 May 2023 04:51:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144C-0005Xu-VT; Mon, 22 May 2023 07:51:09 -0400 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 1q143d-0005Bl-BW for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:36 -0400 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 1q143b-0007a3-7P for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:32 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-628-gvB0koXsM3qIgFziqi8y_w-1; Mon, 22 May 2023 07:50:28 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 56B1F3C02B70; Mon, 22 May 2023 11:50:28 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7D8E02166B26; Mon, 22 May 2023 11:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756230; 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=PVpzLWuuhBNxH18mPNaORIdlSEI8YVFhxzB54R2645g=; b=Gcrf3cxHIw/vz+Wx3eANhFS4V2qxEJV4T8RXkmYtJQDG6G7o5I8P9VZ0NA82eA32cLM7Sv tQ6B/iempGHXhayX5nBqzeGkzEBodVUlq+R1P4X7tv9xWatAgjkG+6XWQvXOs+RpFGvhJZ Pm78rC7DpI9G+me4AKFVKgawQ3BG5pE= X-MC-Unique: gvB0koXsM3qIgFziqi8y_w-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 10/20] hw/sparc64/sun4u: Use MachineClass->default_nic and MachineClass->no_parallel Date: Mon, 22 May 2023 13:50:04 +0200 Message-Id: <20230522115014.1110840-11-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756282604100003 Content-Type: text/plain; charset="utf-8" Announce the default NIC via MachineClass->default_nic and set up MachineClass->no_parallel according to the availability of the "isa-parallel" device, so that the Sun machines also work when QEMU has been configured with "--without-default-devices". Message-Id: <20230512124033.502654-11-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- hw/sparc64/sun4u.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index eae7589462..e2858a0331 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -553,6 +553,7 @@ static void sun4uv_init(MemoryRegion *address_space_mem, MachineState *machine, const struct hwdef *hwdef) { + MachineClass *mc =3D MACHINE_GET_CLASS(machine); SPARCCPU *cpu; Nvram *nvram; unsigned int i; @@ -645,15 +646,15 @@ static void sun4uv_init(MemoryRegion *address_space_m= em, PCIBus *bus; nd =3D &nd_table[i]; =20 - if (!nd->model || strcmp(nd->model, "sunhme") =3D=3D 0) { + if (!nd->model || strcmp(nd->model, mc->default_nic) =3D=3D 0) { if (!onboard_nic) { pci_dev =3D pci_new_multifunction(PCI_DEVFN(1, 1), - true, "sunhme"); + true, mc->default_nic); bus =3D pci_busA; memcpy(&macaddr, &nd->macaddr.a, sizeof(MACAddr)); onboard_nic =3D true; } else { - pci_dev =3D pci_new(-1, "sunhme"); + pci_dev =3D pci_new(-1, mc->default_nic); bus =3D pci_busB; } } else { @@ -816,6 +817,8 @@ static void sun4u_class_init(ObjectClass *oc, void *dat= a) mc->default_cpu_type =3D SPARC_CPU_TYPE_NAME("TI-UltraSparc-IIi"); mc->ignore_boot_device_suffixes =3D true; mc->default_display =3D "std"; + mc->default_nic =3D "sunhme"; + mc->no_parallel =3D !module_object_class_by_name(TYPE_ISA_PARALLEL); fwc->get_dev_path =3D sun4u_fw_dev_path; } =20 @@ -840,6 +843,8 @@ static void sun4v_class_init(ObjectClass *oc, void *dat= a) mc->default_boot_order =3D "c"; mc->default_cpu_type =3D SPARC_CPU_TYPE_NAME("Sun-UltraSparc-T1"); mc->default_display =3D "std"; + mc->default_nic =3D "sunhme"; + mc->no_parallel =3D !module_object_class_by_name(TYPE_ISA_PARALLEL); } =20 static const TypeInfo sun4v_type =3D { --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756281; cv=none; d=zohomail.com; s=zohoarc; b=W02tu3OfWSqQwuSSNea5UINNEo9/2wnlq0Uu+6ojTuCD5giOgRUacsEVVFQBf2SQKhdxVgFjCcT0BV6d3KO+Z+ddSA5MnPv2v11ZTB8NCqI4HR0xq99mgQe1S9IB3yRpDRveMqV4gy2hnwlBNeG+UMqFZ50z5bkIu+DpqWrVdhM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756281; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=2em7kWufVoiDT6zyEaWWxdszqSu3xXXgHp6YZGAfMrU=; b=lEz0IFBS09ct2EcWJNSU8ALGcrU/CGNGU9S2MdLwoEjK8ZMoajABqUbnj8QosIktB7ymfWo+5ZPpBr7Css4NvwWpzGitDb4ZwOxMMi8C5bGjm2whwUrGzxqcuQXzcriCS2kbKnceZKNdl5PiOTyW3V3TQyBUJs8c2zr9XHdq814= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756281970317.31163098233606; Mon, 22 May 2023 04:51:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144C-0005WU-F6; Mon, 22 May 2023 07:51:08 -0400 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 1q143f-0005C7-6K for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:37 -0400 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 1q143d-0007ao-2A for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:34 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-594--yR8R6GSNr-AuxgTqS8Ezw-1; Mon, 22 May 2023 07:50:29 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 960822A59546; Mon, 22 May 2023 11:50:29 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF9552166B27; Mon, 22 May 2023 11:50:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756232; 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=2em7kWufVoiDT6zyEaWWxdszqSu3xXXgHp6YZGAfMrU=; b=epSwUI+gH1c8CwpIjsWWQDy9LH7DVCGMFcy/gj9ijiGEpjHANfr8/7qX5mZObN5QMprwBi PBeWJT7TQeYpyQpvPvs5+2TXSvFxr36TYrsLCqPNeDlCh6KqwYeZcOr5Jf+WtBJSuv+hTD tuAZtRrt8qJXQNaVlj08Nswdw+T77es= X-MC-Unique: -yR8R6GSNr-AuxgTqS8Ezw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 11/20] tests/qtest/readconfig-test: Check for the availability of USB controllers Date: Mon, 22 May 2023 13:50:05 +0200 Message-Id: <20230522115014.1110840-12-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756282602100002 Content-Type: text/plain; charset="utf-8" The USB controllers might not be available in the QEMU binary (e.g. when using the "--without-default-devices" configure switch), so we have to check whether the devices can be used before running the related test. Message-Id: <20230512124033.502654-12-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- tests/qtest/readconfig-test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/qtest/readconfig-test.c b/tests/qtest/readconfig-test.c index 918d45684b..ac7242451b 100644 --- a/tests/qtest/readconfig-test.c +++ b/tests/qtest/readconfig-test.c @@ -207,7 +207,10 @@ int main(int argc, char *argv[]) if (g_str_equal(arch, "i386") || g_str_equal(arch, "x86_64")) { qtest_add_func("readconfig/x86/memdev", test_x86_memdev); - qtest_add_func("readconfig/x86/ich9-ehci-uhci", test_docs_config_i= ch9); + if (qtest_has_device("ich9-usb-ehci1") && + qtest_has_device("ich9-usb-uhci1")) { + qtest_add_func("readconfig/x86/ich9-ehci-uhci", test_docs_conf= ig_ich9); + } } #if defined(CONFIG_SPICE) && !defined(__FreeBSD__) qtest_add_func("readconfig/spice", test_spice); --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756474; cv=none; d=zohomail.com; s=zohoarc; b=HnI3EbLY0hQelLQr6cvPcVtulZv8mjyHreS0r/QkFfROieY+rXTRvUWCu05XWCKOZW1JsGXUmziqJhsgMPQ6cTqyFPkGDVQlMYiqleFjQqRyNziLUdNnkaZqzPM6N/efHZPu/HSBkLa+F7SVLuZrRWdi7GbS5zn0aHzu/GQ4TuE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756474; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mWN+12IWf/zj5AbaionYtYGdyUfi2QktvaTO4E1KFAM=; b=GCK1ax7KlOLcAN1spiQRIlQYnyv7f3SABHftHPHK3zDJdUPTZ6pixhbkJE4CNoo9Ke812rn/d1hjugqRi1b5MW64ZBlPuKkXHtgxbrNqD5hJWlP/yU+/bKvLEetNv75ODvIV+7GnCviIC7wMgDgTbO38D2xRHuKgfQVSk6Ybn1s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756474770521.5508999329136; Mon, 22 May 2023 04:54:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144p-0006Ux-RB; Mon, 22 May 2023 07:51:47 -0400 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 1q143g-0005CE-BJ for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:38 -0400 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 1q143e-0007au-Ca for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:36 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-634-ZB9O5LwSOFGCoqjnxdOaIA-1; Mon, 22 May 2023 07:50:31 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0704485A5BA; Mon, 22 May 2023 11:50:31 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id E6AAA2166B26; Mon, 22 May 2023 11:50:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756232; 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=mWN+12IWf/zj5AbaionYtYGdyUfi2QktvaTO4E1KFAM=; b=ik0eUKDyjzoKhc+kvwUrL9vcr6eAoIwQEgz9YlTD0F/iB+fOLaZviJU83zWbYql4Aud6Bq jL+sQkrONmou2CWh9IEGRIFl2IyxhxYFEqpflk/UPF/1auNkYWQQ+IVrayvaPAoj/kelKI ZDUMH3s/ytljTMFTf+kEvBhV23ZJxZU= X-MC-Unique: ZB9O5LwSOFGCoqjnxdOaIA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 12/20] tests/qtest/usb-hcd-uhci-test: Skip test if UHCI controller is not available Date: Mon, 22 May 2023 13:50:06 +0200 Message-Id: <20230522115014.1110840-13-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756475932100011 Content-Type: text/plain; charset="utf-8" The test is already fenced with CONFIG_USB_UHCI in meson.build, but in case we build the ppc or mips targets in parallel, this config switch is still set in "config_all_devices" and thus the test is still run. Thus we need an explicit additional check here before adding the tests to the test plan. Message-Id: <20230512124033.502654-13-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- tests/qtest/usb-hcd-uhci-test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/qtest/usb-hcd-uhci-test.c b/tests/qtest/usb-hcd-uhci-tes= t.c index f264d2bf73..84ac2f3c1a 100644 --- a/tests/qtest/usb-hcd-uhci-test.c +++ b/tests/qtest/usb-hcd-uhci-test.c @@ -66,6 +66,11 @@ int main(int argc, char **argv) =20 g_test_init(&argc, &argv, NULL); =20 + if (!qtest_has_device("piix3-usb-uhci")) { + g_debug("piix3-usb-uhci not available"); + return 0; + } + qtest_add_func("/uhci/pci/init", test_uhci_init); qtest_add_func("/uhci/pci/port1", test_port_1); qtest_add_func("/uhci/pci/hotplug", test_uhci_hotplug); --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756366; cv=none; d=zohomail.com; s=zohoarc; b=Ll/abYYLQGCmQodfcqcVK/6nXFp8Ayd7aztE3B4Gpio/1s0wiRP5RviNERHnff1mjzxhcJJA9wNgEFu2fiZhwOeS2qNICE1Iy5nrXJ4fjLGOnYbRIfKqg37NsYKycmuWB1lP50LzZFJaxQxKUZ4b+dIvPaMcVD/buSBXE7dibKw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756366; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KtyVBFc1fHyqJE7iYbiDrEuQQX0YRCX1xDBYjW/HC88=; b=Jej2PIygnpruEFNo8C0SWXK68Bb+xPh6VF7JCsS3Cz7ZpRYJVa6Z9/PcoEPqSAIc6rsfdY/c+4P/VxZKRI9G9VGtxfb/plkORu1oh6YTytZd+CEwCH0Kk7VWYOODBv6KP8rFEeVGzouaTJZTsBvA6qvfNPP2z/cBlG+fMcZ6hok= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756366520593.7046865297633; Mon, 22 May 2023 04:52:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144M-0005iL-Jo; Mon, 22 May 2023 07:51:18 -0400 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 1q143i-0005DH-Cg for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:38 -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 1q143g-0007ba-CQ for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:37 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-25-BAaVnvRaMjaMNLk2NH-XCg-1; Mon, 22 May 2023 07:50:32 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2C71D381D1E8; Mon, 22 May 2023 11:50:32 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 478562166B26; Mon, 22 May 2023 11:50:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756235; 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=KtyVBFc1fHyqJE7iYbiDrEuQQX0YRCX1xDBYjW/HC88=; b=QsKSuQmjbtaWdL/xzdJNxWPtFxlgc1tXyELT1Adobf50LPgO14PrCLU3ZLVFQ6xt2776n7 T7bWgbl8eiJ2v6Bxovx4WzrIhwLTcFJfzgPxJfg09+biFNHQJEH0SQXuUw7cqstdORSvt1 Pg1rK7RJdUpYhyQmxcN7+3mmOfXmSog= X-MC-Unique: BAaVnvRaMjaMNLk2NH-XCg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 13/20] tests/qtest/cdrom-test: Fix the test to also work without optional devices Date: Mon, 22 May 2023 13:50:07 +0200 Message-Id: <20230522115014.1110840-14-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756367333100001 Content-Type: text/plain; charset="utf-8" It's possible to disable virtio-scsi and virtio-blk in the binaries, so we must not run the corresponding tests if these devices are missing. Message-Id: <20230512124033.502654-14-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- tests/qtest/cdrom-test.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c index 2b7e10d920..d1cc375849 100644 --- a/tests/qtest/cdrom-test.c +++ b/tests/qtest/cdrom-test.c @@ -136,9 +136,12 @@ static void add_x86_tests(void) } =20 qtest_add_data_func("cdrom/boot/default", "-cdrom ", test_cdboot); - qtest_add_data_func("cdrom/boot/virtio-scsi", - "-device virtio-scsi -device scsi-cd,drive=3Dcdr " - "-blockdev file,node-name=3Dcdr,filename=3D", test= _cdboot); + if (qtest_has_device("virtio-scsi-ccw")) { + qtest_add_data_func("cdrom/boot/virtio-scsi", + "-device virtio-scsi -device scsi-cd,drive=3Dc= dr " + "-blockdev file,node-name=3Dcdr,filename=3D", + test_cdboot); + } /* * Unstable CI test under load * See https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg05509.= html @@ -183,10 +186,17 @@ static void add_s390x_tests(void) { if (!qtest_has_accel("tcg") && !qtest_has_accel("kvm")) { g_test_skip("No KVM or TCG accelerator available, skipping boot te= sts"); + } + if (!qtest_has_device("virtio-blk-ccw")) { return; } =20 qtest_add_data_func("cdrom/boot/default", "-cdrom ", test_cdboot); + + if (!qtest_has_device("virtio-scsi-ccw")) { + return; + } + qtest_add_data_func("cdrom/boot/virtio-scsi", "-device virtio-scsi -device scsi-cd,drive=3Dcdr " "-blockdev file,node-name=3Dcdr,filename=3D", test= _cdboot); --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756455; cv=none; d=zohomail.com; s=zohoarc; b=Ss6vpb9T6RsjmR9HBZUGSqQchdF5gDmuTb9qj30XMEHVJVcaeEBKFG8bMia4D9bFDat9O16HUag7ZEtLqLuDv9ZBpLOf9ldTTyu+eB04eFBUpg6wJy1QhBe14x3uDqm9PSZFrsdSZuSFlDZuj1BmUl5dpFfB5Gy4Ss/Jk3FMvUQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756455; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=a4XsKwUfXPmKnBfzMNnH3bQnQVKi8Pv/O1wySE7Ga+4=; b=E6Csvs/DD2Homa4xCEviCvQIRDLYzhflCfCtIEcOQW93FVgxR6whCGbpWAhzOE6akqqL1TJfwRDKc+oXBlvBPuSU6Tn5S5xxkKQpTn07+BPXN5a8c0wnOTEmGLi1B1qgnP1IbpqH3vCBTa3aGv1hABS7Agc/sO+bLrjiPhbR+qo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756455335378.3079688980298; Mon, 22 May 2023 04:54:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144I-0005gj-Tr; Mon, 22 May 2023 07:51:15 -0400 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 1q143n-0005GE-21 for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:48 -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 1q143k-0007d7-EV for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:42 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-461-Isw2-MHIOb-JPDxLVqscvw-1; Mon, 22 May 2023 07:50:33 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2FD2B1C00046; Mon, 22 May 2023 11:50:33 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6DE712166B26; Mon, 22 May 2023 11:50:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756239; 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=a4XsKwUfXPmKnBfzMNnH3bQnQVKi8Pv/O1wySE7Ga+4=; b=Mpps9daw6L8CV9BGq23VbHuMd/HUln/pVBPQdljqG8J0/OHYGlSRQu6kVfj/X3UnAx7Ch5 /BCbW3DXX9fVYXaHpMuTNLNDKWL6YGtLUNot+u3CpQKfIa/nZqVlU4+O8N48Mzc4XbC0uT ibBuXQjeounSXn5R3OSC2XGefQed9Io= X-MC-Unique: Isw2-MHIOb-JPDxLVqscvw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 14/20] tests/qtest/virtio-ccw-test: Remove superfluous tests Date: Mon, 22 May 2023 13:50:08 +0200 Message-Id: <20230522115014.1110840-15-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756455558100005 Content-Type: text/plain; charset="utf-8" virtio-balloon-ccw is already tested in the device-plug-test, virtio-blk-ccw is already tested in cdrom-test, and virtio-net-ccw is already tested in the pxe-test, so there is not much point in doing "nop" tests here again. Message-Id: <20230512124033.502654-15-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- tests/qtest/virtio-ccw-test.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/tests/qtest/virtio-ccw-test.c b/tests/qtest/virtio-ccw-test.c index 2de77bb6fe..c0790e3ba2 100644 --- a/tests/qtest/virtio-ccw-test.c +++ b/tests/qtest/virtio-ccw-test.c @@ -17,12 +17,6 @@ #include "libqtest-single.h" #include "libqos/virtio.h" =20 -static void virtio_balloon_nop(void) -{ - global_qtest =3D qtest_initf("-device virtio-balloon-ccw"); - qtest_end(); -} - static void virtconsole_nop(void) { global_qtest =3D qtest_initf("-device virtio-serial-ccw,id=3Dvser0 " @@ -53,20 +47,6 @@ static void virtio_serial_hotplug(void) qtest_quit(qts); } =20 -static void virtio_blk_nop(void) -{ - global_qtest =3D qtest_initf("-drive if=3Dnone,id=3Ddrv0,file=3Dnull-c= o://," - "file.read-zeroes=3Don,format=3Draw " - "-device virtio-blk-ccw,drive=3Ddrv0"); - qtest_end(); -} - -static void virtio_net_nop(void) -{ - global_qtest =3D qtest_initf("-device virtio-net-ccw"); - qtest_end(); -} - static void virtio_rng_nop(void) { global_qtest =3D qtest_initf("-device virtio-rng-ccw"); @@ -96,13 +76,10 @@ static void virtio_scsi_hotplug(void) int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); - qtest_add_func("/virtio/balloon/nop", virtio_balloon_nop); qtest_add_func("/virtio/console/nop", virtconsole_nop); qtest_add_func("/virtio/serialport/nop", virtserialport_nop); qtest_add_func("/virtio/serial/nop", virtio_serial_nop); qtest_add_func("/virtio/serial/hotplug", virtio_serial_hotplug); - qtest_add_func("/virtio/block/nop", virtio_blk_nop); - qtest_add_func("/virtio/net/nop", virtio_net_nop); qtest_add_func("/virtio/rng/nop", virtio_rng_nop); qtest_add_func("/virtio/scsi/nop", virtio_scsi_nop); qtest_add_func("/virtio/scsi/hotplug", virtio_scsi_hotplug); --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756343; cv=none; d=zohomail.com; s=zohoarc; b=dYsJ9jTlp5co3ziytTsz7xoXyV9hVi0jnWJqgQMXVR6DsH/yjo1P2T0v1MCth9Gt38+ygQVqwqJnsS1R2yQx5Mrep1YY4SfRMnZmngphM/p+1ZLyAQOPEeKN97p8F3ZHcppMuUpX+Fc9hNLJku/lWJv3iGOVKZQKrDe/29flq3o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756343; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=faucVfx02BhDgLQUqzpM5sp6Fe5MkDIVCztJjr7LOEU=; b=QoSvcH7MyMJV+awi+iIdrgaCnP+g9PVfiv8UW4mCQSv87TgZp7PxCxnnDVucUViZRJZvODdHCV41Meh8l0FESwguwlF4qxWt/KPhPBxc6kkZrXFi6kd/njtZHidfVFCVKNTt2jbwE9wjI6086ITW8dwPqwuuS93avxPAE+1uTPw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756343439126.64555407808837; Mon, 22 May 2023 04:52:23 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144r-0006iK-FA; Mon, 22 May 2023 07:51:49 -0400 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 1q143k-0005Fs-OM for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:44 -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 1q143i-0007cB-Pg for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:40 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-323-as-pKJB4N5u6wkm4SQEFQQ-1; Mon, 22 May 2023 07:50:34 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 368E6381D1E8; Mon, 22 May 2023 11:50:34 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E4252166B26; Mon, 22 May 2023 11:50:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756237; 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=faucVfx02BhDgLQUqzpM5sp6Fe5MkDIVCztJjr7LOEU=; b=ekR0g2rO1eqySxqHxNaAMnG0TblECrpHrBpVOlCbvKzjGZeqsba35I9FQBuN9qg8/YJfvU CCkFR5H9gZjVxPcDzi3V+LNQo7p3hctWFeDGMB0MgGa41AbU0tkJLM/77g66+RtO6SIEHW rEPbTWkmvs235/hcAEySJnWHm91DASw= X-MC-Unique: as-pKJB4N5u6wkm4SQEFQQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 15/20] tests/qtest: Check for the availability of virtio-ccw devices before using them Date: Mon, 22 May 2023 13:50:09 +0200 Message-Id: <20230522115014.1110840-16-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756345061100002 Content-Type: text/plain; charset="utf-8" The devices might not have been compiled into the QEMU binary, so we have to check before we can use them. Message-Id: <20230512124033.502654-16-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- tests/qtest/device-plug-test.c | 9 ++++++++- tests/qtest/virtio-ccw-test.c | 20 +++++++++++++------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index 01cecd6e20..abd544b70c 100644 --- a/tests/qtest/device-plug-test.c +++ b/tests/qtest/device-plug-test.c @@ -156,7 +156,14 @@ static void test_q35_pci_unplug_json_request(void) =20 static void test_ccw_unplug(void) { - QTestState *qtest =3D qtest_initf("-device virtio-balloon-ccw,id=3Ddev= 0"); + QTestState *qtest; + + if (!qtest_has_device("virtio-balloon-ccw")) { + g_test_skip("Device virtio-balloon-ccw not available"); + return; + } + + qtest =3D qtest_initf("-device virtio-balloon-ccw,id=3Ddev0"); =20 qtest_qmp_device_del_send(qtest, "dev0"); wait_device_deleted_event(qtest, "dev0"); diff --git a/tests/qtest/virtio-ccw-test.c b/tests/qtest/virtio-ccw-test.c index c0790e3ba2..f4f5858b84 100644 --- a/tests/qtest/virtio-ccw-test.c +++ b/tests/qtest/virtio-ccw-test.c @@ -76,13 +76,19 @@ static void virtio_scsi_hotplug(void) int main(int argc, char **argv) { g_test_init(&argc, &argv, NULL); - qtest_add_func("/virtio/console/nop", virtconsole_nop); - qtest_add_func("/virtio/serialport/nop", virtserialport_nop); - qtest_add_func("/virtio/serial/nop", virtio_serial_nop); - qtest_add_func("/virtio/serial/hotplug", virtio_serial_hotplug); - qtest_add_func("/virtio/rng/nop", virtio_rng_nop); - qtest_add_func("/virtio/scsi/nop", virtio_scsi_nop); - qtest_add_func("/virtio/scsi/hotplug", virtio_scsi_hotplug); + if (qtest_has_device("virtio-serial-ccw")) { + qtest_add_func("/virtio/console/nop", virtconsole_nop); + qtest_add_func("/virtio/serialport/nop", virtserialport_nop); + qtest_add_func("/virtio/serial/nop", virtio_serial_nop); + qtest_add_func("/virtio/serial/hotplug", virtio_serial_hotplug); + } + if (qtest_has_device("virtio-rng-ccw")) { + qtest_add_func("/virtio/rng/nop", virtio_rng_nop); + } + if (qtest_has_device("virtio-rng-ccw")) { + qtest_add_func("/virtio/scsi/nop", virtio_scsi_nop); + qtest_add_func("/virtio/scsi/hotplug", virtio_scsi_hotplug); + } =20 return g_test_run(); } --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756472; cv=none; d=zohomail.com; s=zohoarc; b=kucPTUKjoyNPB8128IGi9SvPOmV0oOb032S27nnO7Qqdsxr86HOnW5Xw9fGYk9jOpdhIzx7O7eVHGHuzY4tbviq4Fj7vIK4/deHYFfiUChK5bzFRveDBunRgZCQ5YlN5Kzn+dNJB+fiAfllZImkigVxEob+RkCGaWzwEHOjj6+Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756472; h=Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zf9D44r/0HhU06/EUF5GhbYgULRU1H7EmFZrtEZn/1c=; b=E5xhuyfSO5KU1OWrq6CK2RX+mT4FNLtGilHr7TA9hWt9Q3/iEkzkhnfCCer/pqHaSzFSqCprNxOL9kAD8Ezgjansd4FAELSDd6PFV/C8b91XRRLYlzc1OP4rxnWYubPUIWf8/saYi5pb1g9+7Ht/W36yigNLTVSdY9guUqZvN5A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756472635468.9226613624227; Mon, 22 May 2023 04:54:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144K-0005hR-1t; Mon, 22 May 2023 07:51:16 -0400 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 1q143m-0005GC-15 for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:48 -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 1q143k-0007cz-EI for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:41 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-135-V-F5jp47OxS77R4P_SS0fw-1; Mon, 22 May 2023 07:50:35 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 202B1381D1E4; Mon, 22 May 2023 11:50:35 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7DA992166B26; Mon, 22 May 2023 11:50:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zf9D44r/0HhU06/EUF5GhbYgULRU1H7EmFZrtEZn/1c=; b=F5FNrVR6X4L2QL0kJKfVVU/5Fb9BSxtoInDD499/3GfbVZLCJFMeQ+a7ffn4do84RsTXKz woSSCVoMkLhQI3mD/xnXvWIn25f1qKg7G5rwCpC9+N6pKkKBv953/BlWgLmC7tn60t+i/I NyXg51OdfgtvnBwgrPnsjM7UQJkTh3o= X-MC-Unique: V-F5jp47OxS77R4P_SS0fw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Subject: [PULL 16/20] tests/qtest/meson.build: Run the net filter tests only with default devices Date: Mon, 22 May 2023 13:50:10 +0200 Message-Id: <20230522115014.1110840-17-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756473935100003 Content-Type: text/plain; charset="utf-8" These tests rely on a default NIC to be available. Skip them if we used the "--without-default-devices" configure option. Message-Id: <20230512124033.502654-17-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/meson.build | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index ab422772d3..4c5585ac0f 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -34,10 +34,12 @@ qtests_pci =3D \ qtests_cxl =3D \ (config_all_devices.has_key('CONFIG_CXL') ? ['cxl-test'] : []) =20 +# FIXME: Get rid of get_option('default_devices') here and check +# for the availability of the default NICs in the tests qtests_filter =3D \ - (slirp.found() ? ['test-netfilter'] : []) + \ - (config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) + \ - (config_host.has_key('CONFIG_POSIX') ? ['test-filter-redirector'] : []) + (get_option('default_devices') and slirp.found() ? ['test-netfilter'] : = []) + \ + (get_option('default_devices') and config_host.has_key('CONFIG_POSIX') ?= ['test-filter-mirror'] : []) + \ + (get_option('default_devices') and config_host.has_key('CONFIG_POSIX') ?= ['test-filter-redirector'] : []) =20 qtests_i386 =3D \ (slirp.found() ? ['pxe-test'] : []) + \ @@ -221,9 +223,7 @@ qtests_aarch64 =3D \ 'migration-test'] =20 qtests_s390x =3D \ - (slirp.found() ? ['pxe-test', 'test-netfilter'] : []) + \ - (config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) + = \ - (config_host.has_key('CONFIG_POSIX') ? ['test-filter-redirector'] : []) = + \ + qtests_filter + \ ['boot-serial-test', 'drive_del-test', 'device-plug-test', --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756600; cv=none; d=zohomail.com; s=zohoarc; b=e/OhAzYglBdefoukeltRGxIXeKHJdwk0ogMwrhHNFGdoDvZ0efyzPuIU2grndvQVMLVsK7Bj2ikrUQOx1HeymiKyY8swg2UHgpJlalTZ9+pvQjKxMOhA4hVLP5ggRBpmyLFdSjilin8N2qRSRTOOWclxJ3fauIrOp7uO1rCg0IA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756600; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pH65POdmAMTXmtm1l3r/Pu5UVwWA+rhlac/kvN5jD0g=; b=b6zoo7HqapTKnCrIcNCdrgG6EN69VyPxUdg49l1A4J9FPKkiOQHmHV3sfEsP3z0dZfwBQHsHLAt2Hgn+yWZwYNpsRCsvLErAkGFz/VPmzOfSOPR0AnxXK7CVCkySd6AjQdyloi/HTJ8Il1WTnrw5GPl1TISdsBgl7Q5Oc5ESayQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756600248739.5161304247913; Mon, 22 May 2023 04:56:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144I-0005gO-KY; Mon, 22 May 2023 07:51:14 -0400 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 1q143k-0005Ft-Q8 for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:44 -0400 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 1q143i-0007c9-Oo for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:40 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-182-oZ29Rd9LOMyhfaek0HlCdA-1; Mon, 22 May 2023 07:50:36 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2056F2A59556; Mon, 22 May 2023 11:50:36 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 629AB2166B27; Mon, 22 May 2023 11:50:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756237; 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=pH65POdmAMTXmtm1l3r/Pu5UVwWA+rhlac/kvN5jD0g=; b=UfgteKv7/Z23nrhpbnR0lzE1binzjTClaJLyolctQYgqJKMFQovSB7DXefsZmsCANhkhYH AigRtXRnRZKykeLO0ZqejsjxnAM4cDPRb08MCG+RSuFWgmt+QG6o12Wtn5nRXLkVTOoco0 qFkWBdaMyiQigJ89BQQzo51Z61aGQVw= X-MC-Unique: oZ29Rd9LOMyhfaek0HlCdA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 17/20] tests/qemu-iotests/172: Run QEMU with -vga none and -nic none Date: Mon, 22 May 2023 13:50:11 +0200 Message-Id: <20230522115014.1110840-18-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756602312100003 Content-Type: text/plain; charset="utf-8" This way QEMU won't complain in case the VGA card or the NIC device are not available in the binary, thus it won't spoil the output and the test then passes with such QEMU binaries that have a limited configuration, too. Message-Id: <20230512124033.502654-18-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- tests/qemu-iotests/172 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/172 b/tests/qemu-iotests/172 index ff269ca7b5..4da0e0f2e2 100755 --- a/tests/qemu-iotests/172 +++ b/tests/qemu-iotests/172 @@ -56,7 +56,7 @@ do_run_qemu() done fi echo quit - ) | $QEMU -accel qtest -nographic -monitor stdio -serial none "$@" + ) | $QEMU -accel qtest -nographic -monitor stdio -serial none -vga non= e -nic none "$@" echo } =20 --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756292; cv=none; d=zohomail.com; s=zohoarc; b=W8RdJU+ZOa6ngh8hTSSOouR31KZhHxhCRFxmI/t1OeSDEHAbpJ2N6cdp4FQ7DETmTPgCTeSxOYax98u+8mQuVKAS1b7SIIosJHvHYCjpfSun/QWtFM5j9eisyBjNnE4utsUGfzBgIcviNgaaBc98lugeaNKVANAUXFLPTP7wRGs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756292; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hitrJqe+z/WFUUPtDgBsKkz9UeUd1fXKqgnzctdi1K4=; b=Ka3Zm+pm0fPMARi6hoWoB4A3giHeK2FHBb12Qvt9uja+tLELb5whrIjJNc8wF/C5S1XD2GXk4kcl9s9eROlioSZNGX2PWWHRTmXZTZMcpj4pqaPrsshYLcuRsKwVPtys60DP/hc5t69UkZzKpaqKGmN4nr2AE8yqR0964SUb/wQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756292772543.6849995514674; Mon, 22 May 2023 04:51:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144F-0005ar-L6; Mon, 22 May 2023 07:51:12 -0400 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 1q143n-0005GO-Di for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:48 -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 1q143l-0007dm-Fb for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:42 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-137-qyWdwoH8MJ2_4g02_9KiIw-1; Mon, 22 May 2023 07:50:37 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4D7698007D9; Mon, 22 May 2023 11:50:37 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6C8722166B26; Mon, 22 May 2023 11:50:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756240; 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=hitrJqe+z/WFUUPtDgBsKkz9UeUd1fXKqgnzctdi1K4=; b=SxMluUOf/crcNSkZf/pXzhpy/MT4HUz64z2wCU3527gGLPj4JWmOGHvM4luSQOWM54TG/3 rikQ0YP+LAdJxtOBGbBIBx2aADgFyLTst0P9fCVlbgCBuYdZs1NzRBHE0jK6+dJCfreOOU Wgbd1po2UfjT/vW+5hwXvyO09QdQ2MQ= X-MC-Unique: qyWdwoH8MJ2_4g02_9KiIw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Paolo Bonzini Subject: [PULL 18/20] .gitlab-ci.d/buildtest.yml: Run full "make check" with --without-default-devices Date: Mon, 22 May 2023 13:50:12 +0200 Message-Id: <20230522115014.1110840-19-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756293517100001 Content-Type: text/plain; charset="utf-8" Thanks to the fixes from the previous patches, we can now run the full set of "make check" with all targets here. Message-Id: <20230512124033.502654-19-thuth@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- .gitlab-ci.d/buildtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index 307cba1aab..0f1be14cb6 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -527,7 +527,7 @@ build-without-defaults: --disable-strip TARGETS: avr-softmmu mips64-softmmu s390x-softmmu sh4-softmmu sparc64-softmmu hexagon-linux-user i386-linux-user s390x-linux-user - MAKE_CHECK_ARGS: check-unit check-qtest-avr check-qtest-mips64 + MAKE_CHECK_ARGS: check =20 build-libvhost-user: extends: .base_job_template --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756459; cv=none; d=zohomail.com; s=zohoarc; b=KXHbgpv8q8FDFCczExHHat0/oQSqIq8kn76U6Gin56fTht3uhzspgn/gWYrhvURfs/TOi0hCYG4gsJ4ENEXeR6cUbZoS40vNqb/DrrIizNArGxx6qXkSgyQRzAMRjfakoyMT+mURASmMk7A0RViOtbZeviL+U1Lp73tBqWDoK0Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756459; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7RccDGRErIJs5vNwrUAogX4sU2ut3n2RLxqApFssBAg=; b=BBE539KgIXK0EzFTGwGmE5UzAchr87ZLTaLEUD4WyWwQsYYS1BVVH9HLnk6GXrw8uh8G67mn9q3bjfMqjav/qLtepOktRQyhS+yCrK+BzzDdwRzySEEgSSy8JPGE0MfHWxSsSZ6YYi6FZeFRN998HJEsFuvX9aZcd26glHs1vac= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 168475645934136.66297306881893; Mon, 22 May 2023 04:54:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144K-0005hQ-1Q; Mon, 22 May 2023 07:51:16 -0400 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 1q143n-0005GN-DS for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:48 -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 1q143k-0007dI-Nq for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:42 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-61-Y9qtrc5qOTmFwoPz_2DFpw-1; Mon, 22 May 2023 07:50:38 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7F99B185A791; Mon, 22 May 2023 11:50:38 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id A54782166B26; Mon, 22 May 2023 11:50:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756240; 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=7RccDGRErIJs5vNwrUAogX4sU2ut3n2RLxqApFssBAg=; b=JvoVTsV3BOU7PrkmobEdkip5YvMgdgIK3FhOcydTKONdD4V5ZnfaypgAn+eRU6p+xY03zA NSXirNjYTREjLht2prILrbDGgxHhzPtjBwgBKc5LtwB5r7H+mSFse4MecQH8pUIoIWGsW8 MKO/AHlz9lvd1tkjOrYIW98E2SEIJkE= X-MC-Unique: Y9qtrc5qOTmFwoPz_2DFpw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Ani Sinha Subject: [PULL 19/20] acpi/tests/avocado/bits: enable bios bits avocado tests on gitlab CI pipeline Date: Mon, 22 May 2023 13:50:13 +0200 Message-Id: <20230522115014.1110840-20-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756460237100003 Content-Type: text/plain; charset="utf-8" From: Ani Sinha Biosbits avocado tests on gitlab has thus far been disabled because some packages needed by this test was missing in the container images used by gi= tlab CI. These packages have now been added with the commit: da9000784c90d ("tests/lcitool: Add mtools and xorriso and remove genisoimag= e as dependencies") Therefore, this change enables bits avocado test on gitlab. At the same time, the bits cleanup code has also been made more robust with this change. Signed-off-by: Ani Sinha Message-Id: <20230517065357.5614-1-anisinha@redhat.com> Signed-off-by: Thomas Huth --- tests/avocado/acpi-bits.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/avocado/acpi-bits.py b/tests/avocado/acpi-bits.py index 14038fa3c4..3ed286dcbd 100644 --- a/tests/avocado/acpi-bits.py +++ b/tests/avocado/acpi-bits.py @@ -123,9 +123,9 @@ def base_args(self): """return the base argument to QEMU binary""" return self._base_args =20 -@skipIf(not supported_platform() or missing_deps() or os.getenv('GITLAB_CI= '), - 'incorrect platform or dependencies (%s) not installed ' \ - 'or running on GitLab' % ','.join(deps)) +@skipIf(not supported_platform() or missing_deps(), + 'unsupported platform or dependencies (%s) not installed' \ + % ','.join(deps)) class AcpiBitsTest(QemuBaseTest): #pylint: disable=3Dtoo-many-instance-att= ributes """ ACPI and SMBIOS tests using biosbits. @@ -356,7 +356,7 @@ def tearDown(self): """ if self._vm: self.assertFalse(not self._vm.is_running) - if not os.getenv('BITS_DEBUG'): + if not os.getenv('BITS_DEBUG') and self._workDir: self.logger.info('removing the work directory %s', self._workD= ir) shutil.rmtree(self._workDir) else: --=20 2.31.1 From nobody Sat May 18 20:15:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684756600; cv=none; d=zohomail.com; s=zohoarc; b=XJAkUjm0+HXYxipkwZNLDAXL7Jzdih5cbDThXP6QNq2dGKRZeFo856SCFkNmmGzTn3+RzCh5O9W7Pz84vLlQNbiYvJc76zHo00XBaT7xUcy9GzQ9rnb+RmdOVwNP1dzlSRXwA8e9TEaE7pzdmmfF+seXuPiSokqRXSk6ypAHBcc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684756600; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DwgFh/do0f62HJt3XKCIMv7RGuZHX3F/7ZyHMN+YpBE=; b=SrZivnMBnaXN4po2lLQEhB/lvLIv5DSjTpv78XPqnMBWFT8lViD72V61uEzGCIowlPDpst/zuspkvj+dFxno5a/0xX9tbrQ0T2gUEYB5VIK6VcJzIlBV/5784lFv4bONXrMtCuh7Lv0/LgX+pTgCGAzxJf9RaRbaQzRXfeF3VcE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684756600291376.0113032132083; Mon, 22 May 2023 04:56:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q144I-0005cZ-8k; Mon, 22 May 2023 07:51:14 -0400 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 1q143n-0005GP-Mn for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:48 -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 1q143m-0007dw-Ax for qemu-devel@nongnu.org; Mon, 22 May 2023 07:50:43 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-91-SxZ3qJ4qOIG-crKdY-6iNw-1; Mon, 22 May 2023 07:50:40 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EABD62A59543; Mon, 22 May 2023 11:50:39 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.33]) by smtp.corp.redhat.com (Postfix) with ESMTP id CEBA62166B26; Mon, 22 May 2023 11:50:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684756241; 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=DwgFh/do0f62HJt3XKCIMv7RGuZHX3F/7ZyHMN+YpBE=; b=Djrcf1U5p6mGNjnv63Gf4sOJlmZ1TPDxkU7Z1/gXcMny9MhoQmCsFsyKbdJiSuFKzT+WdS c9lTcVbdFlKoK852RyDhhZCUIY9rvshhfJrs3W7oqEztvjWl5qnA+MG1AIBtzHsC9zilmK XxZEdBrxbKQNIpCmaeLZV+UvM6cSphM= X-MC-Unique: SxZ3qJ4qOIG-crKdY-6iNw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson Cc: Alexander Bulekov , Darren Kenny Subject: [PULL 20/20] memory: stricter checks prior to unsetting engaged_in_io Date: Mon, 22 May 2023 13:50:14 +0200 Message-Id: <20230522115014.1110840-21-thuth@redhat.com> In-Reply-To: <20230522115014.1110840-1-thuth@redhat.com> References: <20230522115014.1110840-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684756602321100004 Content-Type: text/plain; charset="utf-8" From: Alexander Bulekov engaged_in_io could be unset by an MR with re-entrancy checks disabled. Ensure that only MRs that can set the engaged_in_io flag can unset it. Signed-off-by: Alexander Bulekov Message-Id: <20230516084002.3813836-1-alxndr@bu.edu> Reviewed-by: Darren Kenny Signed-off-by: Thomas Huth --- softmmu/memory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/softmmu/memory.c b/softmmu/memory.c index 342c121514..9ee4131d75 100644 --- a/softmmu/memory.c +++ b/softmmu/memory.c @@ -534,6 +534,7 @@ static MemTxResult access_with_adjusted_size(hwaddr add= r, unsigned access_size; unsigned i; MemTxResult r =3D MEMTX_OK; + bool reentrancy_guard_applied =3D false; =20 if (!access_size_min) { access_size_min =3D 1; @@ -552,6 +553,7 @@ static MemTxResult access_with_adjusted_size(hwaddr add= r, return MEMTX_ACCESS_ERROR; } mr->dev->mem_reentrancy_guard.engaged_in_io =3D true; + reentrancy_guard_applied =3D true; } =20 /* FIXME: support unaligned access? */ @@ -568,7 +570,7 @@ static MemTxResult access_with_adjusted_size(hwaddr add= r, access_mask, attrs); } } - if (mr->dev) { + if (mr->dev && reentrancy_guard_applied) { mr->dev->mem_reentrancy_guard.engaged_in_io =3D false; } return r; --=20 2.31.1