From patchwork Tue Jul 4 11:25:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 1803153 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=SEd3LWXJ; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QwL8j26Pkz20Pf for ; Tue, 4 Jul 2023 21:26:29 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGeAf-0001mx-Bx; Tue, 04 Jul 2023 07:26: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 1qGeAd-0001mE-Cw for qemu-devel@nongnu.org; Tue, 04 Jul 2023 07:26:11 -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 1qGeAb-0002Bg-Vr for qemu-devel@nongnu.org; Tue, 04 Jul 2023 07:26:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688469969; 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=XEZcgPReFyzDcO9cLJl1A0SSdm0joHIvq6RFVgYxRzg=; b=SEd3LWXJ2TRbcXIjL4ItQ96DyHz4pELBSvKselbMfyYtz0BQtnHG4WiYpyZXc1xxLskL3O F8Jm7HTPAJQhuzLrbJEbxq9A7iuXOzgzAe1HfNgd5ykrhdugj5HSvWLTJP69dUSh/8B1E0 4gxcZEpZ9PJ/nsbTDP8JANLrWc5goGg= Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-612-E9bigWHLPrquSM77pWRcqg-1; Tue, 04 Jul 2023 07:26:08 -0400 X-MC-Unique: E9bigWHLPrquSM77pWRcqg-1 Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-55ac8fcc887so5665640a12.0 for ; Tue, 04 Jul 2023 04:26:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688469967; x=1691061967; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XEZcgPReFyzDcO9cLJl1A0SSdm0joHIvq6RFVgYxRzg=; b=UvK5CZsWfkp01AB9QxIqGMIv7us89+gl0iwIkzujlCGX0GMzd5AgQAFsJsIbx+aKmR XcwpuiR3wlJ4+dsf4yjLGSsSZOoYlX2sYsOFAWRPCs9v1CgCYWjt49UcV0m+q+PieZDp Up9Umak4UdKClo5yylWadbkPi9iBJjN5qLJWiDcrAiD6aRc3BsW1B+ICcAz6v1VIVCCI QKdITfpAQoTJrq8MvuNb6TiKVn7eT6M+pq4AlpsmFbgu6z7Fmx614oDkTYSVNVOl909S oRcoJ4eWrpD/gu9ibjvEIoD8i9SeXJgcOP/k7jwg/FclnEK+6dmm3lOwekRi49ddKMhj 13Ag== X-Gm-Message-State: ABy/qLbrJsjIZyftqz7AdpdvKgpWF4Mw8+qWlpHGYUfZL5O37kj3Nqb5 0nb5unggSNU6STYFNcnc2byDvrgccw/8Svt5pbgZ1ThcGhiFjXvE0o1dF0V1s+ZBdlj5rpf4dh8 LzVm2lBsMniczBatLOygmbwoYpNOFOZlZnRET+Lh29n+9+aaTxhs7SJJtmvCeQ3u6UwFJ7Q1kfg U= X-Received: by 2002:a17:902:ea06:b0:1b8:9b17:f63d with SMTP id s6-20020a170902ea0600b001b89b17f63dmr4278628plg.23.1688469966847; Tue, 04 Jul 2023 04:26:06 -0700 (PDT) X-Google-Smtp-Source: APBJJlGJrKgF6k21A0KUI7xTGSiXKohqrIIpDLphcGEH6Pui76qK72oYrhrcYf4Y/IW9d74NwqSsmA== X-Received: by 2002:a17:902:ea06:b0:1b8:9b17:f63d with SMTP id s6-20020a170902ea0600b001b89b17f63dmr4278606plg.23.1688469966370; Tue, 04 Jul 2023 04:26:06 -0700 (PDT) Received: from localhost.localdomain ([115.96.131.170]) by smtp.googlemail.com with ESMTPSA id o7-20020a170902bcc700b001b8a897cd26sm780608pls.195.2023.07.04.04.26.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 04:26:06 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v7 1/6] tests/acpi: allow changes in DSDT.noacpihp table blob Date: Tue, 4 Jul 2023 16:55:50 +0530 Message-Id: <20230704112555.5629-2-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230704112555.5629-1-anisinha@redhat.com> References: <20230704112555.5629-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=anisinha@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_H4=0.001, RCVD_IN_MSPIKE_WL=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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We are going to fix bio-tables-test in the next patch and hence need to make sure the acpi tests continue to pass. Signed-off-by: Ani Sinha Acked-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..31df9c6187 100644 --- a/tests/qtest/bios-tables-test-allowed-diff.h +++ b/tests/qtest/bios-tables-test-allowed-diff.h @@ -1 +1,2 @@ /* List of comma-separated changed AML files to ignore */ +"tests/data/acpi/q35/DSDT.noacpihp", From patchwork Tue Jul 4 11:25:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 1803155 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=g+tK0V5V; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QwL9R689lz20Pf for ; Tue, 4 Jul 2023 21:27:07 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGeAq-0001oP-7X; Tue, 04 Jul 2023 07:26:24 -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 1qGeAg-0001n0-1c for qemu-devel@nongnu.org; Tue, 04 Jul 2023 07:26:17 -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 1qGeAe-0002CF-J8 for qemu-devel@nongnu.org; Tue, 04 Jul 2023 07:26:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688469972; 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=YQi5DNpBee1TXBxFEGyYLPk0MTnw7h1zNgmbfk3WRkU=; b=g+tK0V5VCkerESuVIrdkSSiQ3Z5QtA5qTorGmWWVQVgdOGor18FivGls/6BKplU49ltlm+ tUKKS5hnHG8fOtVG82DBprDjdB+MggTzc90GzuW7TLYMnvYwy1ZLhafnMP0bi2x7rWNgnR KMChPW8kG0b1lesb1HgR/uqXHo/t5E4= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-503-cbwrhBsGPky6A88eP6UfNg-1; Tue, 04 Jul 2023 07:26:10 -0400 X-MC-Unique: cbwrhBsGPky6A88eP6UfNg-1 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1b8a4e947a1so8873945ad.1 for ; Tue, 04 Jul 2023 04:26:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688469969; x=1691061969; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YQi5DNpBee1TXBxFEGyYLPk0MTnw7h1zNgmbfk3WRkU=; b=Kq80rxCpnbJNjzPzzoq3X9eijFI1mOjGW/QBKv1YX/pHhfq68LXnItIM2aLleQqmTo MJGM6Rp1Atf92rBjdE0wwCeWzog7y1MYPm27ZyPzhHihK2KmOLFXXQuuSUMnaJkYkbJA +JcTTzJkUa8Ch00ro4OKFvnxjC7ja+YiwYPdOSya5vtbHUXERqs2fLPeDiucUqzaw/ri 4taVlD4SeFkTijoyb2RCYivHFnDfMkGpjC7TU8g/pdrm09eiQG4FuBJ2DPklL5PTrTE+ zHnPh1j2NFpPRUfnlgOBxNpQtii52vzSkYhqJL7RUGO2NJjs/Z5LHvd6mWTMILWLUWlG dLtQ== X-Gm-Message-State: ABy/qLYsp4620bj5cxtVhdfYpt+fp5DdxRkZUsv22980a5gOQtPTqYYr fF+E6O2+Su6uH/bvC9zf/+4uC4sj1XClfftIocU3g4QXnkBvRqaEo2ZkzNpRhNzNLLzWGdqUrBT Mxp4Pgg2pISsdEuLchxcFwq4fwQCdl8v3nYjHouVfClOk/CGUsuSTiyiHiv2GT+fszvxQ5zVivl o= X-Received: by 2002:a17:902:cec9:b0:1b8:6952:5381 with SMTP id d9-20020a170902cec900b001b869525381mr20532702plg.9.1688469969298; Tue, 04 Jul 2023 04:26:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlH3ZNdNpiO4KfPDBHRqf3YlW7js6k+nBgIfvBCqOSw/BPrRic1+fKAogZGVNXrRP6pYct7vBA== X-Received: by 2002:a17:902:cec9:b0:1b8:6952:5381 with SMTP id d9-20020a170902cec900b001b869525381mr20532670plg.9.1688469968856; Tue, 04 Jul 2023 04:26:08 -0700 (PDT) Received: from localhost.localdomain ([115.96.131.170]) by smtp.googlemail.com with ESMTPSA id o7-20020a170902bcc700b001b8a897cd26sm780608pls.195.2023.07.04.04.26.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 04:26:08 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v7 2/6] tests/acpi/bios-tables-test: use the correct slot on the pcie-root-port Date: Tue, 4 Jul 2023 16:55:51 +0530 Message-Id: <20230704112555.5629-3-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230704112555.5629-1-anisinha@redhat.com> References: <20230704112555.5629-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=anisinha@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_H4=0.001, RCVD_IN_MSPIKE_WL=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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org PCIE ports only have one slot, slot 0. Hence, non-zero slots are not available for PCIE devices on PCIE root ports. Fix test_acpi_q35_tcg_no_acpi_hotplug() so that the test does not use them. Signed-off-by: Ani Sinha Reviewed-by: Igor Mammedov --- tests/qtest/bios-tables-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index ed1c69cf01..47ba20b957 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1020,9 +1020,9 @@ static void test_acpi_q35_tcg_no_acpi_hotplug(void) " -device pci-testdev,bus=nohprp,acpi-index=501" " -device pcie-root-port,id=nohprpint,port=0x0,chassis=3,hotplug=off," "multifunction=on,addr=8.0" - " -device pci-testdev,bus=nohprpint,acpi-index=601,addr=8.1" + " -device pci-testdev,bus=nohprpint,acpi-index=601,addr=0.1" " -device pcie-root-port,id=hprp2,port=0x0,chassis=4,bus=nohprpint," - "addr=9.0" + "addr=0.2" " -device pci-testdev,bus=hprp2,acpi-index=602" , &data); free_test_data(&data); From patchwork Tue Jul 4 11:25:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 1803158 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=JR/BqFzS; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QwL9x4LVJz20Pf for ; Tue, 4 Jul 2023 21:27:33 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGeAy-0001rq-2j; Tue, 04 Jul 2023 07:26:32 -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 1qGeAi-0001nF-QM for qemu-devel@nongnu.org; Tue, 04 Jul 2023 07:26:18 -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 1qGeAh-0002CX-8P for qemu-devel@nongnu.org; Tue, 04 Jul 2023 07:26:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688469974; 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=UVrMQo5OTuj/Z/ArUoRLIJdd/O7g0cHC9ea86NhATqc=; b=JR/BqFzSMduL/MO9Kwrn/+hCeY3OJ2A4vuI54qPxUJDORvHQ+Jnny/i63FNWV7Ai7GdAOy YFKePFaElJMDACb/LPE9HDukWQ51ss/aErS5S0tSGXvA003QUeKz+TUMcqJoIy1fXpHl/2 G+tzD+DqzRRH5jwAl5O18WV2Jau7+VM= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-335-Q28dVenAOZC0usHzTvu7Eg-1; Tue, 04 Jul 2023 07:26:13 -0400 X-MC-Unique: Q28dVenAOZC0usHzTvu7Eg-1 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1b895a9f4ccso21909405ad.2 for ; Tue, 04 Jul 2023 04:26:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688469972; x=1691061972; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UVrMQo5OTuj/Z/ArUoRLIJdd/O7g0cHC9ea86NhATqc=; b=InidPLZADTDnGDqK9d3yz+KF4f3p9xnurHRSM0/kpLKjEn1hfuv+XBKn2lV0Y2hbOO ZWY4KfglNA5HGKvQJcY+Jp6+MrhuMUW0RapEs/yhH1IMAUlteXNwnpaXp4HZhwhXcTpk iYhhvQTrdNi33p0vfHgAD0dWA6Ut2OSqwtSosFbMgrxvylUkA8iDZfZg27SOK8QyXbI1 eHAIifuLIUE8RVO+roulmiY6YSMF1g4UDCu+1af1a3GaR9mu2W7SlKD+KQ5klKLhK1ND AtR/c212J5E4gH7nL36UskvFNwXjBUq4NQxW7JepEaCDfyA2ffcixSJhhpTf7GaTt3hY 4gIw== X-Gm-Message-State: ABy/qLa921ydNOQBIlHtuyyR089BswPIdu6Arpugbn73CogyQ7UmzCAJ hXV4V/yZ1Br8Vo5rEppq6RyzbJ+I35iRItyyhYbnSuAZ3I/uCClMu7RGPKqCzcdiHi5aUwAmm2z TnT1II95RopA+drZsQQkkVWkhW4oswy3bDXVu1GL0j6Mx+8wyqOvSAhUqjVq7GB4gC42X3/b8yf M= X-Received: by 2002:a17:903:1c5:b0:1b8:560a:aa18 with SMTP id e5-20020a17090301c500b001b8560aaa18mr12357795plh.16.1688469971710; Tue, 04 Jul 2023 04:26:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlHDcP6SLGCrDFC+g8SKF8jx2k6Wpj4qk1E4heDc38a3inDC0v4MfxfS4iBbb+G2tG89TNVLMw== X-Received: by 2002:a17:903:1c5:b0:1b8:560a:aa18 with SMTP id e5-20020a17090301c500b001b8560aaa18mr12357775plh.16.1688469971302; Tue, 04 Jul 2023 04:26:11 -0700 (PDT) Received: from localhost.localdomain ([115.96.131.170]) by smtp.googlemail.com with ESMTPSA id o7-20020a170902bcc700b001b8a897cd26sm780608pls.195.2023.07.04.04.26.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 04:26:10 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v7 3/6] tests/acpi/bios-tables-test: update acpi blob q35/DSDT.noacpihp Date: Tue, 4 Jul 2023 16:55:52 +0530 Message-Id: <20230704112555.5629-4-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230704112555.5629-1-anisinha@redhat.com> References: <20230704112555.5629-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.129.124; envelope-from=anisinha@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_H4=0.001, RCVD_IN_MSPIKE_WL=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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Some fixes were committed in bios-tables-test in the previous commit. Update the acpi blob and clear bios-tables-test-allowed-diff.h so that the test continues to pass with the changes in the bios-tables-test. Following is the asl diff between the old and the newly updated blob: @@ -1,30 +1,30 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassembler version 20210604 (64-bit version) * Copyright (c) 2000 - 2021 Intel Corporation * * Disassembling to symbolic ASL+ operators * - * Disassembly of tests/data/acpi/q35/DSDT.noacpihp, Wed Jun 21 18:26:52 2023 + * Disassembly of /tmp/aml-O8SU61, Wed Jun 21 18:26:52 2023 * * Original Table Header: * Signature "DSDT" - * Length 0x00002038 (8248) + * Length 0x00002031 (8241) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0x4A + * Checksum 0x89 * OEM ID "BOCHS " * OEM Table ID "BXPC " * OEM Revision 0x00000001 (1) * Compiler ID "BXPC" * Compiler Version 0x00000001 (1) */ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC ", 0x00000001) { Scope (\) { OperationRegion (DBG, SystemIO, 0x0402, One) Field (DBG, ByteAcc, NoLock, Preserve) { DBGB, 8 } @@ -3148,48 +3148,48 @@ { Name (_ADR, Zero) // _ADR: Address Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method { Local0 = Package (0x01) { 0x01F5 } Return (EDSM (Arg0, Arg1, Arg2, Arg3, Local0)) } } } Device (S40) { Name (_ADR, 0x00080000) // _ADR: Address - Device (S41) + Device (S01) { - Name (_ADR, 0x00080001) // _ADR: Address + Name (_ADR, One) // _ADR: Address Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method { Local0 = Package (0x01) { 0x0259 } Return (EDSM (Arg0, Arg1, Arg2, Arg3, Local0)) } } - Device (S48) + Device (S02) { - Name (_ADR, 0x00090000) // _ADR: Address + Name (_ADR, 0x02) // _ADR: Address Device (S00) { Name (_ADR, Zero) // _ADR: Address } } } Device (SF8) { Name (_ADR, 0x001F0000) // _ADR: Address OperationRegion (PIRQ, PCI_Config, 0x60, 0x0C) Scope (\_SB) { Field (PCI0.SF8.PIRQ, ByteAcc, NoLock, Preserve) { PRQA, 8, Signed-off-by: Ani Sinha Acked-by: Igor Mammedov --- tests/data/acpi/q35/DSDT.noacpihp | Bin 8248 -> 8241 bytes tests/qtest/bios-tables-test-allowed-diff.h | 1 - 2 files changed, 1 deletion(-) diff --git a/tests/data/acpi/q35/DSDT.noacpihp b/tests/data/acpi/q35/DSDT.noacpihp index 6ab1f0e52543fcb7f84a7fd1327fe5aa42010565..8cab2f8eb9ae94e0165f3f17857ec7d080fb0e13 100644 GIT binary patch delta 109 zcmdntu+f3bCDi)r&-xoSoL DyqFtK delta 94 zcmdn!u)~4NCD X-Patchwork-Id: 1803157 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=i/s+xwz2; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QwL9w0ntcz20Pf for ; Tue, 4 Jul 2023 21:27:32 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGeAy-0001su-Ka; Tue, 04 Jul 2023 07:26:32 -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 1qGeAp-0001oQ-Vk for qemu-devel@nongnu.org; Tue, 04 Jul 2023 07:26:24 -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 1qGeAk-0002Cy-H1 for qemu-devel@nongnu.org; Tue, 04 Jul 2023 07:26:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688469977; 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=uCCjtwSbbFETTKSsmt5af6YgxkBnyGQ+Ywb1vZBrF3g=; b=i/s+xwz2cwtXpp4FuhFqv6u5zvAp4yL1gnWIDbX436yleeACHZg/J0zNiFQ1RZeyuZsYGh cZLsOCn/OSvQraAp0aQgZdIt4h+pD58acNiWR63A7br/EVRzQ/hlsSF1Bf6qIDNbqxa/39 dQMvy5AJyKKQnDi1ydsO77VcYT4mzAE= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-582-69kNRdwKOeOrDO7FmuLYUQ-1; Tue, 04 Jul 2023 07:26:16 -0400 X-MC-Unique: 69kNRdwKOeOrDO7FmuLYUQ-1 Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-262d505f44cso5505182a91.1 for ; Tue, 04 Jul 2023 04:26:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688469975; x=1691061975; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uCCjtwSbbFETTKSsmt5af6YgxkBnyGQ+Ywb1vZBrF3g=; b=er924zq13+ztXIoi1HYk0q9RFPgz6tww5qsQamKLVO0odu6Z+xqC3jJe2y2rksyUC+ oBBoERK9sGFeiMn8sOD+1EyeNPHCgPm6xBv9Uek+N8czZgLYLJ2TxpTiVdTM+2o9cPS5 MK5UeRdpmotcwH9p8vDiaUvhnWaVOH408f9Kw0vRTJT6mcCGKuudzS2bTWGvgHtnNCQG RjrYR4FUmAAs99LcJvvv6M4NJxa+NbGWdIi4cPQxklpQScVI0sOQ++dYNum58ae5MniB aFJHXgkkNSEOJCX+OU3JKBqLzD7K083TMdrM7hIPyLIqEBER596LuGFTK9+A4TEEw1gn KGLw== X-Gm-Message-State: ABy/qLb4gamlCjG0D7YAANpJX4zsKOaiQ7x8V+BVI21JABWT/NFU3t5b kPX1Y+dh5ONk91Qjiu3ZqUnuekOzsI28b0atsjIQcrCj+/SuM4ML2mCddVZQjzZ0rYE6zHVnxaB cfG/H4b9jf0pirNYX95qlTNpho8hU87VF4FxL843Pr4ZsfPVhuI2tjZKXeFvrCYEZWWrg4QBhaU Y= X-Received: by 2002:a05:6a20:9189:b0:12f:6a58:9b44 with SMTP id v9-20020a056a20918900b0012f6a589b44mr195884pzd.37.1688469975116; Tue, 04 Jul 2023 04:26:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlGwbLg9L1bHCacNvrPY9fswSKrYfX+180sEnOSfzlXX/Bhk5McQM9/gofU/sWNOWBZSLn0S8Q== X-Received: by 2002:a05:6a20:9189:b0:12f:6a58:9b44 with SMTP id v9-20020a056a20918900b0012f6a589b44mr195860pzd.37.1688469974729; Tue, 04 Jul 2023 04:26:14 -0700 (PDT) Received: from localhost.localdomain ([115.96.131.170]) by smtp.googlemail.com with ESMTPSA id o7-20020a170902bcc700b001b8a897cd26sm780608pls.195.2023.07.04.04.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 04:26:14 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, Thomas Huth , Laurent Vivier , Paolo Bonzini Cc: Ani Sinha , mst@redhat.com, imammedo@redhat.com, Michael Labiuk Subject: [PATCH v7 4/6] tests/qtest/hd-geo-test: fix incorrect pcie-root-port usage and simplify test Date: Tue, 4 Jul 2023 16:55:53 +0530 Message-Id: <20230704112555.5629-5-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230704112555.5629-1-anisinha@redhat.com> References: <20230704112555.5629-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=anisinha@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_H4=0.001, RCVD_IN_MSPIKE_WL=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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The test attaches a SCSI controller to a non-zero slot and a pcie-to-pci bridge on slot 0 on the same pcie-root-port. Since a downstream device can be attached to a pcie-root-port only on slot 0, the above test configuration is not allowed. Additionally using pcie.0 as id for pcie-to-pci bridge is incorrect as that id is reserved only for the root bus. In the test scenario, there is no need to attach a pcie-root-port to the root complex. A SCSI controller can be attached to a pcie-to-pci bridge which can then be directly attached to the root bus (pcie.0). Fix the test and simplify it. CC: mst@redhat.com CC: imammedo@redhat.com CC: Michael Labiuk Acked-by: Thomas Huth Reviewed-by: Igor Mammedov Signed-off-by: Ani Sinha --- tests/qtest/hd-geo-test.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 5aa258a2b3..d08bffad91 100644 --- a/tests/qtest/hd-geo-test.c +++ b/tests/qtest/hd-geo-test.c @@ -784,14 +784,12 @@ static void test_override_scsi(void) test_override(args, "pc", expected); } -static void setup_pci_bridge(TestArgs *args, const char *id, const char *rootid) +static void setup_pci_bridge(TestArgs *args, const char *id) { - char *root, *br; - root = g_strdup_printf("-device pcie-root-port,id=%s", rootid); - br = g_strdup_printf("-device pcie-pci-bridge,bus=%s,id=%s", rootid, id); + char *br; + br = g_strdup_printf("-device pcie-pci-bridge,bus=pcie.0,id=%s", id); - args->argc = append_arg(args->argc, args->argv, ARGV_SIZE, root); args->argc = append_arg(args->argc, args->argv, ARGV_SIZE, br); } @@ -811,8 +809,8 @@ static void test_override_scsi_q35(void) add_drive_with_mbr(args, empty_mbr, 1); add_drive_with_mbr(args, empty_mbr, 1); add_drive_with_mbr(args, empty_mbr, 1); - setup_pci_bridge(args, "pcie.0", "br"); - add_scsi_controller(args, "lsi53c895a", "br", 3); + setup_pci_bridge(args, "pcie-pci-br"); + add_scsi_controller(args, "lsi53c895a", "pcie-pci-br", 3); add_scsi_disk(args, 0, 0, 0, 0, 0, 10000, 120, 30); add_scsi_disk(args, 1, 0, 0, 1, 0, 9000, 120, 30); add_scsi_disk(args, 2, 0, 0, 2, 0, 1, 0, 0); @@ -868,9 +866,9 @@ static void test_override_virtio_blk_q35(void) }; add_drive_with_mbr(args, empty_mbr, 1); add_drive_with_mbr(args, empty_mbr, 1); - setup_pci_bridge(args, "pcie.0", "br"); - add_virtio_disk(args, 0, "br", 3, 10000, 120, 30); - add_virtio_disk(args, 1, "br", 4, 9000, 120, 30); + setup_pci_bridge(args, "pcie-pci-br"); + add_virtio_disk(args, 0, "pcie-pci-br", 3, 10000, 120, 30); + add_virtio_disk(args, 1, "pcie-pci-br", 4, 9000, 120, 30); test_override(args, "q35", expected); } From patchwork Tue Jul 4 11:25:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 1803156 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=NMzBtJSH; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QwL9h6l8Vz20Pf for ; Tue, 4 Jul 2023 21:27:20 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGeAz-0001tO-Iw; Tue, 04 Jul 2023 07:26:33 -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 1qGeAr-0001oq-8d for qemu-devel@nongnu.org; Tue, 04 Jul 2023 07:26:30 -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 1qGeAo-0002EV-4Y for qemu-devel@nongnu.org; Tue, 04 Jul 2023 07:26:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688469981; 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=Euko7EPBlQ+qipY8fQMzafVw5ZALKBrq7a4gmRGSUmc=; b=NMzBtJSHecktIOwGxvzXy900vRG5KGraTwWDFwyILXTVzEWtv/pwmPk2urx4L73G47cZPG VpIARPQCGWk9muRGn4ifGO9ICuML8wjMGh+wIz5IAePvpd0x3U/w38m6ntbfYJVURg28GP zKkI9G2BT5eGFu4naSKQYmcMbpBTb7s= Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-636-Kiwek8S4O1atTf-EruRcKA-1; Tue, 04 Jul 2023 07:26:19 -0400 X-MC-Unique: Kiwek8S4O1atTf-EruRcKA-1 Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-1b8071502d2so75953195ad.2 for ; Tue, 04 Jul 2023 04:26:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688469978; x=1691061978; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Euko7EPBlQ+qipY8fQMzafVw5ZALKBrq7a4gmRGSUmc=; b=CAacJ4LG/gP0JHONLxMRlChAnWtE/twgOAUC+oiUvWO34iC9awu6dXN7MOxlUPNHjF aKO7jIAKInf7phei7wzTdgspraT2R0lrqNpoDtzRNOLEfyHplW11YWbsRZJDy15CL+Iv aX45eINr0RcBe5O7pbdiByCdsUc8CTy85eE5ERst3E8ypk3SGK3VZTQWFVm/aqno7OoG P56PDHc3UYE2d6tEqfnyhY8hivaTDExXU82+RcVTh5lQp+fU2B2aPAyM235IM8lQa1TP P36rb0teJ9nU7ryor6nKd0qxO0i6qmGq4jpKzGJgZROj91+WJNNByJr5/fsVhn5j21Dc 24ug== X-Gm-Message-State: ABy/qLYjbhr9D5JPAULr0vCyME7LVu3ODchD8aX39iqonFh+8JWiPm4/ l00y8V/8ZgkZ9cdXd5O0D5uZMYTCXtO4soDJl6bdf/MZKkiIhtbsf36T9fG7Vx9ExOK7Foo+72G zDK2BJ15hjcO81yVFFjqAGCbfpJcCT7GxU63I2YH8jZbr/iMYBjJ9UzLoPm4ankSbmfaRwm1cH9 I= X-Received: by 2002:a17:902:c407:b0:1ac:5717:fd5 with SMTP id k7-20020a170902c40700b001ac57170fd5mr15689856plk.60.1688469978303; Tue, 04 Jul 2023 04:26:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlEUIDmicEIWbeakyTb2nTXKg1nPXsFChPp6SSc8qyx6g/HLVqR8vgbvmQDU6v5jv4RZDzCZiQ== X-Received: by 2002:a17:902:c407:b0:1ac:5717:fd5 with SMTP id k7-20020a170902c40700b001ac57170fd5mr15689832plk.60.1688469977969; Tue, 04 Jul 2023 04:26:17 -0700 (PDT) Received: from localhost.localdomain ([115.96.131.170]) by smtp.googlemail.com with ESMTPSA id o7-20020a170902bcc700b001b8a897cd26sm780608pls.195.2023.07.04.04.26.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 04:26:17 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Marcel Apfelbaum Cc: Ani Sinha , jusual@redhat.com, imammedo@redhat.com, akihiko.odaki@daynix.com Subject: [PATCH v7 5/6] hw/pci: ensure PCIE devices are plugged into only slot 0 of PCIE port Date: Tue, 4 Jul 2023 16:55:54 +0530 Message-Id: <20230704112555.5629-6-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230704112555.5629-1-anisinha@redhat.com> References: <20230704112555.5629-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=anisinha@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_H4=0.001, RCVD_IN_MSPIKE_WL=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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org PCI Express ports only have one slot, so PCI Express devices can only be plugged into slot 0 on a PCIE port. Add a warning to let users know when the invalid configuration is used. We may enforce this more strongly later on once we get more clarity on whether we are introducing a bad regression for users currenly using the wrong configuration. The change has been tested to not break or alter behaviors of ARI capable devices by instantiating seven vfs on an emulated igb device (the maximum number of vfs the linux igb driver supports). The vfs instantiated correctly and are seen to have non-zero device/slot numbers in the conventional PCI BDF representation. CC: jusual@redhat.com CC: imammedo@redhat.com CC: mst@redhat.com CC: akihiko.odaki@daynix.com Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2128929 Signed-off-by: Ani Sinha Reviewed-by: Julia Suvorova --- hw/pci/pci.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index e2eb4c3b4a..47517ba3db 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -65,6 +65,7 @@ bool pci_available = true; static char *pcibus_get_dev_path(DeviceState *dev); static char *pcibus_get_fw_dev_path(DeviceState *dev); static void pcibus_reset(BusState *qbus); +static bool pcie_has_upstream_port(PCIDevice *dev); static Property pci_props[] = { DEFINE_PROP_PCI_DEVFN("addr", PCIDevice, devfn, -1), @@ -2121,6 +2122,20 @@ static void pci_qdev_realize(DeviceState *qdev, Error **errp) } } + /* + * With SRIOV and ARI, vfs can have non-zero slot in the conventional + * PCI interpretation as all five bits reserved for slot addresses are + * also used for function bits for the various vfs. Ignore that case. + */ + if (pci_is_express(pci_dev) && + !pcie_find_capability(pci_dev, PCI_EXT_CAP_ID_ARI) && + pcie_has_upstream_port(pci_dev) && + PCI_SLOT(pci_dev->devfn)) { + warn_report("PCI: slot %d is not valid for %s," + " parent device only allows plugging into slot 0.", + PCI_SLOT(pci_dev->devfn), pci_dev->name); + } + if (pci_dev->failover_pair_id) { if (!pci_bus_is_express(pci_get_bus(pci_dev))) { error_setg(errp, "failover primary device must be on " From patchwork Tue Jul 4 11:25:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ani Sinha X-Patchwork-Id: 1803159 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=R6OZGgGt; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QwLB35BjQz20Pf for ; Tue, 4 Jul 2023 21:27:39 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGeAy-0001sv-LW; Tue, 04 Jul 2023 07:26:32 -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 1qGeAr-0001or-NH for qemu-devel@nongnu.org; Tue, 04 Jul 2023 07:26:30 -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 1qGeAq-0002F2-66 for qemu-devel@nongnu.org; Tue, 04 Jul 2023 07:26:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688469983; 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=9Zva16AFX23AuJr9BkFuIQY+13JDh1icsCuMLWKwd7I=; b=R6OZGgGtePg+2gzn2Ra71ZekCJtQNQ1OzrI6ANW0gMKO8RATQPXE47SaCVc4SAn2ekMmD3 A+XRoBVw2NfXdZcMAFvdmySUl/quukIla49orHgYtsu+lo9D8SEiAK+IBz5YAePk4Eb+2j BaJ2QO2ZnVVS0zKdHuLy7zC8AbJMLAA= Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-664-za4slk2jNLSgrrXU7g_JKQ-1; Tue, 04 Jul 2023 07:26:22 -0400 X-MC-Unique: za4slk2jNLSgrrXU7g_JKQ-1 Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-682abcb2fdeso337817b3a.3 for ; Tue, 04 Jul 2023 04:26:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688469981; x=1691061981; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9Zva16AFX23AuJr9BkFuIQY+13JDh1icsCuMLWKwd7I=; b=J1G1rZ0Qw6HhxSRmf5/luWnr3lydOIf7jbg3o7Ws4bVGCuQHOqIzheevwywxAozfqs 32q7ePEdqHuE92MThjyNurG1uZcIXsIBP83idw2ukwCvJ0Y0veP3UKFfqjKrdguQyLh4 TqYlji5W2Q2wfr9eZrb0cf3wf314n14Uee96cw7kTNag9w0hRQToMG/XrF4xauUm3gkv O5VBROtHBwCEWwSU0PKMpDXHqOyZOn5NXnvbFystID8k+Fxf021MAShkovbMVqvMW1+y d0DQP8mosOG8yAN+3DeJ7E7G3ED03qL77EnAfLAgElm3AE8H+qmPeNn9Co47sqP33CJ1 RaLg== X-Gm-Message-State: ABy/qLZRS7OTg5Vdbt5fsN7vSlLA1vdyRRJlde2mj1y9jq2Ahaql6hLv 2UuguL6DkZ6d+mSWrkFSfzjbS9zW5Ct5ZgzXqDOvVKtnfWx6zzV1TyKQRNNqhUYA7mswNU+qm/A EH8w1akqfrmlhEbU12nqAf93aIjhUYVrxX0BoQWb3UvHsSnoVghFdOVe1G7A8xjTj+PJb0RG7Q9 Y= X-Received: by 2002:a05:6a20:4327:b0:12e:6e0f:535 with SMTP id h39-20020a056a20432700b0012e6e0f0535mr7821752pzk.34.1688469980893; Tue, 04 Jul 2023 04:26:20 -0700 (PDT) X-Google-Smtp-Source: APBJJlH+zTOzrB4rE574Az2iPZjcCxKLbJO8pXN1lHUc/oQ68DAuPlFP7kmtGDk3mEP117woR1fBYw== X-Received: by 2002:a05:6a20:4327:b0:12e:6e0f:535 with SMTP id h39-20020a056a20432700b0012e6e0f0535mr7821729pzk.34.1688469980527; Tue, 04 Jul 2023 04:26:20 -0700 (PDT) Received: from localhost.localdomain ([115.96.131.170]) by smtp.googlemail.com with ESMTPSA id o7-20020a170902bcc700b001b8a897cd26sm780608pls.195.2023.07.04.04.26.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 04:26:20 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Marcel Apfelbaum Cc: Ani Sinha Subject: [PATCH v7 6/6] hw/pci: add comment explaining the reason for checking function 0 in hotplug Date: Tue, 4 Jul 2023 16:55:55 +0530 Message-Id: <20230704112555.5629-7-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230704112555.5629-1-anisinha@redhat.com> References: <20230704112555.5629-1-anisinha@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=170.10.133.124; envelope-from=anisinha@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_H4=0.001, RCVD_IN_MSPIKE_WL=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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This change is cosmetic. A comment is added explaining why we need to check for the availability of function 0 when we hotplug a device. CC: mst@redhat.com Signed-off-by: Ani Sinha --- hw/pci/pci.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 47517ba3db..e3ff3808b6 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1181,9 +1181,15 @@ static PCIDevice *do_pci_register_device(PCIDevice *pci_dev, PCI_SLOT(devfn), PCI_FUNC(devfn), name, bus->devices[devfn]->name, bus->devices[devfn]->qdev.id); return NULL; - } else if (dev->hotplugged && - !pci_is_vf(pci_dev) && - pci_get_function_0(pci_dev)) { + } /* + * Populating function 0 triggers a scan from the guest that + * exposes other non-zero functions. Hence we need to ensure that + * function 0 wasn't added yet. With SRIOV and with or without ARI + * the PF must be hotplugged into function 0 for it to be detected. + */ + else if (dev->hotplugged && + !pci_is_vf(pci_dev) && + pci_get_function_0(pci_dev)) { error_setg(errp, "PCI: slot %d function 0 already occupied by %s," " new func %s cannot be exposed to guest.", PCI_SLOT(pci_get_function_0(pci_dev)->devfn),