From nobody Sat Nov 29 10:48:49 2025 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=reject dis=none) header.from=google.com ARC-Seal: i=1; a=rsa-sha256; t=1764202433; cv=none; d=zohomail.com; s=zohoarc; b=F7afmL+iI3oub/4Qs+9W8UxkKPOcyrSiklVh5tXEcBHKY2Qq365a5U4u0Ek39O41vbYxxauqySlhTY+mqIddXHVnoW7X6Zu77FnYaogSfqSr+L9Hjl+wLzaCdT6WRgvhZnbD0hYFmmCrTdiIWiHd2cSkGRaCWC0uZbjtpDl5Tv0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764202433; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=LnAzc27LiQK6IQy24x9xB/i64MPHYZS7/qEEHPh3edU=; b=YmtC5tc9012va8OMcMH+Z5i4kXpFM6YjqeBOLDPvBr58Udu3hIP8HYA1HYADmk6vfvSyXRgHLz+VT0Ud7h5nvZdxFZL2bBOyR4N3b/y1/6vbIe+1PX22/AtM0rCUnh+KFlwkZpIt3qhBbpTOC6WGuucYXEVTmMGDU/ZJpsQrMO8= 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=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1764202433570425.5804541724608; Wed, 26 Nov 2025 16:13:53 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vOPdF-0002pb-8Q; Wed, 26 Nov 2025 19:13:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3j5cnaQcKCqwZMhUPQYSaaSXQ.OaYcQYg-PQhQXZaZSZg.adS@flex--navidem.bounces.google.com>) id 1vOPdD-0002p7-K9 for qemu-devel@nongnu.org; Wed, 26 Nov 2025 19:13:07 -0500 Received: from mail-pl1-x649.google.com ([2607:f8b0:4864:20::649]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3j5cnaQcKCqwZMhUPQYSaaSXQ.OaYcQYg-PQhQXZaZSZg.adS@flex--navidem.bounces.google.com>) id 1vOPdC-000603-5j for qemu-devel@nongnu.org; Wed, 26 Nov 2025 19:13:07 -0500 Received: by mail-pl1-x649.google.com with SMTP id d9443c01a7336-295952a4dd6so15220695ad.1 for ; Wed, 26 Nov 2025 16:13:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764202384; x=1764807184; darn=nongnu.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=LnAzc27LiQK6IQy24x9xB/i64MPHYZS7/qEEHPh3edU=; b=L/zProrqlU19m4I8RnkBhqPEPHHRg37iI/A+Wz9BDv9NyqouvGG0lbAj0lN9Y7GhEd UurWry5PENrrqrzu5xOf2T11zoncMo2DVhjVJiCSIZnhWamA09NJRQEQdWoCsoNefJ5r 46eYKEmiddrhvYkNbL5Mgh+TDqnL37+1NCVr0LosxgFk3b7cMnVy4vYCrz9nWoQ9yk3F Y+H6jCKfMLVCBw69C31S7EfP6WPb46hjTJPGScWKu0WRziigqtwEuwf+j+V80CT4BvSh uzrIJDvLQuoKDDWFrB45cHOoptcACyJvxZe3KB+25vNLGTqo3FMduljhzSXCRw/t6A01 uHXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764202384; x=1764807184; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=LnAzc27LiQK6IQy24x9xB/i64MPHYZS7/qEEHPh3edU=; b=wiS57moinfG0EGBzA/DiNlBNi/eMcT0YKZH5NXFcAPXGFVMSYvfuyw7KxB1EWuTOBj /h1yIT65q+wNQQtxxbrAcDQwSo7iqhjB/LXLPSAFDaDmr93QWRU7atB5Ew1EgeWMS0Ua MOzOqbelIDFZX9CeFPYocaPrs5BMDE/YKDZbkoRWqS2eOXbvg66saI2mcRpLbGdswnmf 86GD90w0rMnSRajH+O4YgL0B0hct1GG/WM+IFvKe2Jw/hS9Sp0PJK/QZ7cswCoJPJ9R9 RSpcTqxvmnPx1QJMtbbN6M9sFKuMmJA4JQ4rnxKOh6L2WJwqG1HGqa90gmr16diBpxZP BCXw== X-Gm-Message-State: AOJu0YwJZfhS7FzuBDHAM4rSG9gsjSTiKoJ/YsQSkttMkkvAkOJwTOZW ZR9J0ZPkQopSTsMROidfFUUJ8PUP15bezkBUTcECHHjHT9z4Rb5jvHpOoeZkMTp9SbI2MFjQtCe 8KwsHlTAGTtGNuk4HN1Ka1N35EX/+CNVCdKQwLXoAXjNlmadUdXlgNsdDgj6Br1jr0AuGo7ftbv CgTSvJed7JgGJJOr0sza6JHZf8SoB810/XhCo+tl47 X-Google-Smtp-Source: AGHT+IFm+oWf3dffHZsfWphXzUQs2N2I4E5TDGLT2J5JnQVFZuawANcaOzo3brKAWVtpTTEceEwW2+bCMhGY X-Received: from pjnm17.prod.google.com ([2002:a17:90a:8591:b0:340:a5c6:acc3]) (user=navidem job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:fc48:b0:297:e897:6f6d with SMTP id d9443c01a7336-29b5e2f794amr274934625ad.9.1764202383896; Wed, 26 Nov 2025 16:13:03 -0800 (PST) Date: Thu, 27 Nov 2025 00:12:47 +0000 In-Reply-To: <20251127001247.1672873-1-navidem@google.com> Mime-Version: 1.0 References: <20251127001247.1672873-1-navidem@google.com> X-Mailer: git-send-email 2.52.0.158.g65b55ccf14-goog Message-ID: <20251127001247.1672873-6-navidem@google.com> Subject: [PATCH v2 5/5] tests/qtest/fuzz: Add generic fuzzer for pcie-pci-bridge From: Navid Emamdoost To: qemu-devel@nongnu.org, peter.maydell@linaro.org Cc: farosas@suse.de, lvivier@redhat.com, pbonzini@redhat.com, zsm@google.com, alxndr@bu.edu, Navid Emamdoost , Bandan Das , Stefan Hajnoczi , Darren Kenny , Qiuhao Li 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=2607:f8b0:4864:20::649; envelope-from=3j5cnaQcKCqwZMhUPQYSaaSXQ.OaYcQYg-PQhQXZaZSZg.adS@flex--navidem.bounces.google.com; helo=mail-pl1-x649.google.com X-Spam_score_int: -95 X-Spam_score: -9.6 X-Spam_bar: --------- X-Spam_report: (-9.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 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 @google.com) X-ZM-MESSAGEID: 1764202435911019200 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add a new generic fuzz target for the 'pcie-pci-bridge' device. This target uses a Q35 machine with a multi-level PCI hierarchy to exercise the bridge's functionality. This is made possible by the preceding change to handle unimplemented BARs during fuzzing. --- This new target significantly improves code coverage for the pcie-pci-bridge implementation. The baseline coverage shown below was generated by running all existing fuzz targets with the oss-fuzz corpus. =3D=3D=3D Component: hw/pci =3D=3D=3D ---------------------------------------------------------------------------= ---- File New Target Baseline Ch= ange ---------------------------------------------------------------------------= ---- shpc.c 359/511 (70.3%) 0/511 (0.0%) +3= 59 pci_bridge.c 255/304 (83.9%) 12/304 (3.9%) +2= 43 pcie.c 390/774 (50.4%) 160/774 (20.7%) +2= 30 pcie_aer.c 119/524 (22.7%) 38/524 (7.3%) +81 pci.c 1154/2069 (55.8%) 1084/2069 (52.4%) +70 pcie_port.c 58/119 (48.7%) 17/119 (14.3%) +41 pci.h 86/132 (65.2%) 81/132 (61.4%) +5 =3D=3D=3D Component: hw/pci-bridge =3D=3D=3D ---------------------------------------------------------------------------= ---- File New Target Baseline Ch= ange ---------------------------------------------------------------------------= ---- pcie_root_port.c 86/127 (67.7%) 13/127 (10.2%) +73 pcie_pci_bridge.c 62/94 (66.0%) 20/94 (21.3%) +42 gen_pcie_root_port.c 45/66 (68.2%) 19/66 (28.8%) +26 Signed-off-by: Navid Emamdoost --- tests/qtest/fuzz/generic_fuzz_configs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/qtest/fuzz/generic_fuzz_configs.h b/tests/qtest/fuzz/gen= eric_fuzz_configs.h index ef0ad95712..e025f57a3e 100644 --- a/tests/qtest/fuzz/generic_fuzz_configs.h +++ b/tests/qtest/fuzz/generic_fuzz_configs.h @@ -247,6 +247,14 @@ const generic_fuzz_config predefined_configs[] =3D { .args =3D "-machine q35 -nodefaults " "-parallel file:/dev/null", .objects =3D "parallel*", + },{ + .name =3D "pcie-pci-bridge", + .args =3D "-machine q35 -nodefaults " + "-device pcie-root-port,port=3D0x10,chassis=3D1,id=3Dpci.1,bus=3Dp= cie.0,multifunction=3Dtrue,addr=3D0x2 " + "-device pcie-pci-bridge,id=3Dpci.2,bus=3Dpci.1,addr=3D0x0 " + "-netdev user,id=3Dnet0 " + "-device e1000,netdev=3Dnet0,id=3Dnic0,bus=3Dpci.2,addr=3D0x3", + .objects =3D "pci* shpc*" } }; =20 --=20 2.52.0.158.g65b55ccf14-goog