From nobody Thu May 9 22:26:50 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=1688558457; cv=none; d=zohomail.com; s=zohoarc; b=lA2DSh/VJ1ie8G5Kn0tZtnBl/SgHcitqOPLj03sx64jv0f/h1SIleZY4Dztg/ZGH6MTm+uJsBU/1O7Uq79OtmPBfK83ek37eftXzq56ha3GqumkZdXJ8mMi3T6po+8GKWZ191SvQifeZwswCRVT0Mj4DqUXcoAq4snYxhTVafhA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688558457; 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=XEZcgPReFyzDcO9cLJl1A0SSdm0joHIvq6RFVgYxRzg=; b=ilRuG+VnJsvstHBD427ZtC2HIUL42vvkcsA2+6iD8oHKPtpYzdUJzQ/OSXZ/OEhYLkzS3AfQg9ZMnk7jJinI6NEZiJWitYr9fa7trt3RmNJL6d4phvMIROXGdi6ptkqtJejZrLOULZZTp8Va/+LwOo8JmhjG2/ntaP7z+xtNqi8= 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 1688558457782527.663224184358; Wed, 5 Jul 2023 05:00:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH1Ac-0006Ic-S1; Wed, 05 Jul 2023 07:59:42 -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 1qH1Ab-0006Hm-8Z for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:41 -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 1qH1AZ-00010g-RJ for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:41 -0400 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-397-FPM3KGiwOGuSqPapKLyZOA-1; Wed, 05 Jul 2023 07:59:38 -0400 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1b89712d613so33360355ad.2 for ; Wed, 05 Jul 2023 04:59:38 -0700 (PDT) Received: from localhost.localdomain ([115.96.119.220]) by smtp.googlemail.com with ESMTPSA id v3-20020a1709028d8300b001b89c313185sm4878852plo.205.2023.07.05.04.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688558379; 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=AFU2JpwaHcsNA7qqEfjJPzVtYZEVtIJEFyeYOIn4mH7Ar07RG5G0jRhN5MPg2J+zafbknS wuMIDm0MPsuvw/QhUNTrfAUzNHc0q1Xg/1t9p4XZ3h7eAD6qejxrDA6A/lyw+of1tlt8E3 nHI/j6HPQHnU4JJvNf8aUOiDgIVRW3I= X-MC-Unique: FPM3KGiwOGuSqPapKLyZOA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688558376; x=1691150376; 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=Umv6ZmFs0RLBerdfiStclkWpIhzEU/XCo9mtxSlPg4XhWO3O7P0QsCQ/jOMmMDASXV WR/KQXBgbwtiRvk361C9cLUGYlp6ji9H+pSmDzWrMun68zicb9cH1eFhvWA9m2LMDBx4 hav5nBesjdvLAsAvmuzPIFwXOMGIp/NxbTKjkyvZQfkBaoNgH4jgBAY3KdJIrOtuMOxg m797aJKQe7gfTEJXAEjFbmSGIfXXTIHHgN+BS3TXPEJFC+RMuSiEEYtc5p1o9sJyCur8 2uAq7Xcmss+wtJJfvk4B3qJIrKoalgkMWGwWcpyaP6Le12X8F3eIrPkXEI+1ufzKkfPJ 11sA== X-Gm-Message-State: ABy/qLYwFUcurDzlwHhtNXWrdKUtMoiCxEgfqKzLWSs6zJ3ubEaIcdcH op7/kqgn1kspRpS0rrI6gqKcQaOcPICfqJfBEISJxIMaMcirBfw4S/2lgLOooSmsb44jTVcXHgK nQx/ZS8D0I42NvxXlSAGX0eSga8rzA/CNnMufYCs7qOqhQwRudq83ETuAmFomhfisyW00+pogcx Y= X-Received: by 2002:a17:903:2281:b0:1b6:6b90:7c2f with SMTP id b1-20020a170903228100b001b66b907c2fmr15351437plh.55.1688558376757; Wed, 05 Jul 2023 04:59:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlFqNPeRxwQRorYyOuloaBImu1hFVLOVDeILmBd27kd3xsyFG4r69WClLDBsq2Fm9MXHEBhsgQ== X-Received: by 2002:a17:903:2281:b0:1b6:6b90:7c2f with SMTP id b1-20020a170903228100b001b66b907c2fmr15351421plh.55.1688558376411; Wed, 05 Jul 2023 04:59:36 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v8 1/6] tests/acpi: allow changes in DSDT.noacpihp table blob Date: Wed, 5 Jul 2023 17:29:19 +0530 Message-Id: <20230705115925.5339-2-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230705115925.5339-1-anisinha@redhat.com> References: <20230705115925.5339-1-anisinha@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1688558460325100003 Content-Type: text/plain; charset="utf-8" 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", --=20 2.39.1 From nobody Thu May 9 22:26:50 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=1688558433; cv=none; d=zohomail.com; s=zohoarc; b=F8egbj34EB3eZRB7chC47wMDjGpYo+9FIUD/AMT3+BGg7AdMEnhZx3fQa0NU9R5skyccq7uV5VErXoGBcYlVZi2YkJtKnkCZViG9Sm3TAK+W1KrwURKC7XLg9xJ3aLW4FjEVrn+kHwbvAHp0oumzpSkEIg428O8zO5ZIwyEPlrU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688558433; 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=YQi5DNpBee1TXBxFEGyYLPk0MTnw7h1zNgmbfk3WRkU=; b=YItjAVkda7eAIW7jrMFiisEzJY2Nppqx0ajifjg4LVYJmWwO7unbYyYlWHDu6v1WJ2z4L/zQrp/P+iMclrho+RGh3AxC4Jv5FGilNf4KfevE0yopezt8vowQ9omRZmwWeHS13EeNNedDEyWMRcR+Z1T1WEv0l9ZMGsvRWCuwFlM= 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 16885584338161019.6437489142158; Wed, 5 Jul 2023 05:00:33 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH1Af-0006J0-JQ; Wed, 05 Jul 2023 07:59:45 -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 1qH1Ad-0006Ii-W7 for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59: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 1qH1Ac-000112-Hz for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:43 -0400 Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-447-QpmOocZiMTGXWPZ7xfgvBg-1; Wed, 05 Jul 2023 07:59:40 -0400 Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-1b88dee40ecso54399205ad.3 for ; Wed, 05 Jul 2023 04:59:40 -0700 (PDT) Received: from localhost.localdomain ([115.96.119.220]) by smtp.googlemail.com with ESMTPSA id v3-20020a1709028d8300b001b89c313185sm4878852plo.205.2023.07.05.04.59.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:59:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688558381; 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=AqVobUrt2bKAVaRrdoYF4ULri5gocM5Xv5X5rvNNuW32u0LmMrrnaSkABRoZNJNxfBuJZp OdRW/eGcUUU3tSG7W8HirzW++ei2AKUZvtPERniOLSU+jvrGgUP1IwLYPFwiScrccJZdR4 2VJShBHVzFPp0ANr+uBqT/mZFw+X0yo= X-MC-Unique: QpmOocZiMTGXWPZ7xfgvBg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688558379; x=1691150379; 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=QqIJgBG8bCL5jZ6aAJDhKg+rG+PngzF7snbBX3+bWw7mBjANmGVQRWy8VWxLdsYAD3 UKxf9CMYn0D5584k0ZR8VCHBZGVwXNrK6m6yuaFwQMz3j683eg42F5mDE2falx18Vt5h +sHRFNtfofkxdcZd7l/EHhVM/Qydea54gOYsCNXgogYooW9A84RRYxDQKKbpb3/GF7L2 /hKhoG8swk4us0IWlvTRkEMnlozE4Be7h9Psu+FLzEtqRsDFl+J9fUR2tso7w5/I5/gj CuVVE2HbGRbyTzIdADvEtcxRnOpiKghlk5mYIGHOpvMqKzGa6jkYrKRplE698osvrsJV UncQ== X-Gm-Message-State: ABy/qLZQ/w48hKNtAB0Vojju5Hah3u40lqX4t+BrPnhE32wSjyPXQNXZ In63VZBKIv1sq6adZlkgGPvEGNinxrCQDqmuTaah/gRLj2gQOdE6SgFxHZNAH9Aj7MwEsdn3tvG dDbwA8AC+NKyp58jhqJtuhxeoRy9YiZ944kMjXOPFjzgka2u6ZYHuVxrh6m2a9OGLh9ycy+Lfa5 s= X-Received: by 2002:a17:902:f683:b0:1b6:9954:2037 with SMTP id l3-20020a170902f68300b001b699542037mr18711678plg.4.1688558379387; Wed, 05 Jul 2023 04:59:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlGLm782gRhw5jXqMo0NAncYjOwj4W7FsOyHtBotzWNY2154GTo/JuVsoHE2sFymeoLn43IhIA== X-Received: by 2002:a17:902:f683:b0:1b6:9954:2037 with SMTP id l3-20020a170902f68300b001b699542037mr18711654plg.4.1688558378985; Wed, 05 Jul 2023 04:59:38 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v8 2/6] tests/acpi/bios-tables-test: use the correct slot on the pcie-root-port Date: Wed, 5 Jul 2023 17:29:20 +0530 Message-Id: <20230705115925.5339-3-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230705115925.5339-1-anisinha@redhat.com> References: <20230705115925.5339-1-anisinha@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1688558435814100003 Content-Type: text/plain; charset="utf-8" PCIE ports only have one slot, slot 0. Hence, non-zero slots are not availa= ble 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=3Dnohprp,acpi-index=3D501" " -device pcie-root-port,id=3Dnohprpint,port=3D0x0,chassis=3D3,hot= plug=3Doff," "multifunction=3Don,addr=3D8.0" - " -device pci-testdev,bus=3Dnohprpint,acpi-index=3D601,addr=3D8.1" + " -device pci-testdev,bus=3Dnohprpint,acpi-index=3D601,addr=3D0.1" " -device pcie-root-port,id=3Dhprp2,port=3D0x0,chassis=3D4,bus=3Dn= ohprpint," - "addr=3D9.0" + "addr=3D0.2" " -device pci-testdev,bus=3Dhprp2,acpi-index=3D602" , &data); free_test_data(&data); --=20 2.39.1 From nobody Thu May 9 22:26:50 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=1688558494; cv=none; d=zohomail.com; s=zohoarc; b=EdMveENzKbaTQIcPX+iqPUI+esN7fbkJNyOJxLjWlAF7ikjM4Szoslmv+4A3Dc34s+pyoaoX8wpbIWzDMMvpa2nnwy1lIty9g4TqxcvMKF0OS2NahQ4B6pfH+rcXHpAsxruFU/D/MUe8yIfIPC2HoxOsaI5++yi6Y7Tos9eY+d8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688558494; 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=UVrMQo5OTuj/Z/ArUoRLIJdd/O7g0cHC9ea86NhATqc=; b=Th2RUHS1LqVjeAkYnPJ3+/cO0JKO2Tu6/xpHqYu16cIJ+QNz/rwPoft5sHNhBQZYwddDljiJkSOvj+y3ow2dvo3boJSFYIB6ot/frEenTF4rqCOxwrshgy2SKSG4QHEavti+/fhdZzYJTYJuUaffCYOcCM50/MB+ZMtfHDZCQdU= 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 1688558494702856.4266303418868; Wed, 5 Jul 2023 05:01:34 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH1Ai-0006Jj-F2; Wed, 05 Jul 2023 07:59:48 -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 1qH1Ag-0006JI-My for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:46 -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 1qH1Af-00011X-44 for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:46 -0400 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-552-FGhnpGScOIm98bwhWYhTOA-1; Wed, 05 Jul 2023 07:59:43 -0400 Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-55bd0daca15so1316901a12.0 for ; Wed, 05 Jul 2023 04:59:43 -0700 (PDT) Received: from localhost.localdomain ([115.96.119.220]) by smtp.googlemail.com with ESMTPSA id v3-20020a1709028d8300b001b89c313185sm4878852plo.205.2023.07.05.04.59.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:59:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688558384; 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=GzZkNRAGZuQbAIYsPgg9AZNaUC1yo969BS4J3qcoSjd0Ngi8RuYzY7JM0hwmGrw83+HG4O MPp6OYH9zoaTa2qX68MCdfeE0IlQ8QMHmWo7xWGNbUuAm0pIaI+25CV1y4iz3zmtrNNEc5 FEBAtG2DVl1z3FL8mexpNirc6kg36FE= X-MC-Unique: FGhnpGScOIm98bwhWYhTOA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688558382; x=1691150382; 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=gZ72RqGhPALQAi3shU+u1Z+X6g1VuXjycaNCcl/vTi9dfuZVjyWz7U2rIUTwRpw1Pc +oZtdUF/cq3FOKm3K456bvMPmc03RwHoRwSZEa1jsZCgcsLnRTk7GOKsKRUF2vDMLG+Q NqLfj/5RUz4PU3aiuCVIgOyEiO1Lwek7P6kqYD+blp5I4JjiKv5rvii9LuxwUCOepnOS QnFZ/69jcl3yHI73rLpZRgI+14Z59jChuLE8wVe2P53CQPU4aAgjYY6mXtBlBnfCSHhE Iwj7TF1BcHx78YsCgZHXLs+4tWHf+EJpHvBH9a5UibvaC5jakCJ+7azbnnr7CwMSny0S Vtfg== X-Gm-Message-State: ABy/qLaGQFKQoAb40x/NxvbmQFo4LLIk/ARWD00P8CYo9EfxAW028v5y ErfBHliQOFlPS0eFo4wi+BSEzHtdp+bh9gNuDzRAHxipoDwYyNyynL5nGey06YvruEYJIBGVTzv zZV5zSIDnWBGgARypvBDagZxzLoACt8s/QPQTOpejAF1vNTxobZDeViM++qGdPRPyK4pfL2Wrhd 8= X-Received: by 2002:a05:6a21:340a:b0:12d:4b00:fb07 with SMTP id yn10-20020a056a21340a00b0012d4b00fb07mr13636148pzb.39.1688558381878; Wed, 05 Jul 2023 04:59:41 -0700 (PDT) X-Google-Smtp-Source: APBJJlFR4CQCfq3P0HlJE7grax0HCVTzK+IgbtLmsPJ0yKc5KLzK8qugovYr/tldKmT7JrzEL3hrDw== X-Received: by 2002:a05:6a21:340a:b0:12d:4b00:fb07 with SMTP id yn10-20020a056a21340a00b0012d4b00fb07mr13636136pzb.39.1688558381532; Wed, 05 Jul 2023 04:59:41 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Subject: [PATCH v8 3/6] tests/acpi/bios-tables-test: update acpi blob q35/DSDT.noacpihp Date: Wed, 5 Jul 2023 17:29:21 +0530 Message-Id: <20230705115925.5339-4-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230705115925.5339-1-anisinha@redhat.com> References: <20230705115925.5339-1-anisinha@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1688558496915100003 Content-Type: text/plain; charset="utf-8" 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 2= 023 + * 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 =3D 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 =3D 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.n= oacpihp index 6ab1f0e52543fcb7f84a7fd1327fe5aa42010565..8cab2f8eb9ae94e0165f3f17857= ec7d080fb0e13 100644 GIT binary patch delta 109 zcmdntu+f3bCDi)r&-xoSoL DyqFtK delta 94 zcmdn!u)~4NCD (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 16885584896811011.9948055884195; Wed, 5 Jul 2023 05:01:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH1BY-0006wP-OE; Wed, 05 Jul 2023 08:00:40 -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 1qH1BF-0006c6-Gx for qemu-devel@nongnu.org; Wed, 05 Jul 2023 08:00: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 1qH1BD-0001Nx-Re for qemu-devel@nongnu.org; Wed, 05 Jul 2023 08:00:21 -0400 Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-537-v1i_HbBiP127zbvP0iCYwA-1; Wed, 05 Jul 2023 08:00:07 -0400 Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-55b9ed8275aso3142642a12.1 for ; Wed, 05 Jul 2023 04:59:59 -0700 (PDT) Received: from localhost.localdomain ([115.96.119.220]) by smtp.googlemail.com with ESMTPSA id v3-20020a1709028d8300b001b89c313185sm4878852plo.205.2023.07.05.04.59.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:59:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688558419; 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=FtML/0+Jqrlw45Ie0B0fPwQHb82833E+rGQn0423mcGjKuBG/pF3cTWVW2hsZOgSIcIPKq 4nj340+Q5BAZT0KMSUCom/TqPPfjAej/H76inotX9zOf/74UyZWWrNJa4KtafvJgo2eUuN br5X9Wfhie6kEaiXZ9hdNXeA0eq6fMs= X-MC-Unique: v1i_HbBiP127zbvP0iCYwA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688558385; x=1691150385; 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=KRg/gz73VxX8Tvoyv05JYHsnTd5C5T7Tk3laDmqQ9PIbl//5XfNMPhIcODPqpAeJKr 85mnuTE7LZrpzm5WaA3cGcm/u5Ll/D/2wKMv0HLT35XfZsyUGwwMBPd8GXpvlJwGDfhQ aYdH5s/Zbu3MibNHnREHiFIx9H/4QSKoGMP4DTgGSlg9M6jYiUAZ4Ei4e9Qv1FY6ahVE HiKkdoGVYbjgTaqzFaz1vKemK8BNb8Tv8B/Yj47gmGJMqSdjde9+ss4IGsdH9v23yjPZ JekPOeULLTPNGsb/3uIyAM/ahFcBJZrFKl30ix1dvLZk039G3nNfz93EPHR6QqkD+leK AWrw== X-Gm-Message-State: ABy/qLZd4if+jC/igRcWaDvwgOZwwZLCWm+807KP/oeD9boxb42ZAYo7 +GWoExo+6ZEFKLzT3Oc6bL0i+aAFjG5e0ScXSBsB4IMFTIzQxjncSmGgmuk9WsO8Gs45MnpAydM pSV0ootrfuLOw6rPjEkkZpj3WY+84P1Xzouc9dlokC09YoryovGzy0d6FUK5O8IF0XRIak0OKAr 4= X-Received: by 2002:a05:6a20:a5a8:b0:12e:ab62:c94 with SMTP id bc40-20020a056a20a5a800b0012eab620c94mr5211697pzb.49.1688558385465; Wed, 05 Jul 2023 04:59:45 -0700 (PDT) X-Google-Smtp-Source: APBJJlE/ZStnEwHOscSISZVvl414hGCzJ5pQ2nVe/+3BpMLf8vvZ1l+QCX0VqsQO6m87exoCgsVPVQ== X-Received: by 2002:a05:6a20:a5a8:b0:12e:ab62:c94 with SMTP id bc40-20020a056a20a5a800b0012eab620c94mr5211681pzb.49.1688558385017; Wed, 05 Jul 2023 04:59:45 -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 v8 4/6] tests/qtest/hd-geo-test: fix incorrect pcie-root-port usage and simplify test Date: Wed, 5 Jul 2023 17:29:22 +0530 Message-Id: <20230705115925.5339-5-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230705115925.5339-1-anisinha@redhat.com> References: <20230705115925.5339-1-anisinha@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1688558492046100003 Content-Type: text/plain; charset="utf-8" The test attaches a SCSI controller to a non-zero slot and a pcie-to-pci br= idge on slot 0 on the same pcie-root-port. Since a downstream device can be atta= ched to a pcie-root-port only on slot 0, the above test configuration is not all= owed. 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); } =20 -static void setup_pci_bridge(TestArgs *args, const char *id, const char *r= ootid) +static void setup_pci_bridge(TestArgs *args, const char *id) { =20 - char *root, *br; - root =3D g_strdup_printf("-device pcie-root-port,id=3D%s", rootid); - br =3D g_strdup_printf("-device pcie-pci-bridge,bus=3D%s,id=3D%s", roo= tid, id); + char *br; + br =3D g_strdup_printf("-device pcie-pci-bridge,bus=3Dpcie.0,id=3D%s",= id); =20 - args->argc =3D append_arg(args->argc, args->argv, ARGV_SIZE, root); args->argc =3D append_arg(args->argc, args->argv, ARGV_SIZE, br); } =20 @@ -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); } =20 --=20 2.39.1 From nobody Thu May 9 22:26:50 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=1688558424; cv=none; d=zohomail.com; s=zohoarc; b=CvNI3pefQJ21Z1tdg05esJFl+vU+9hvmKEJCUpA3fe+TODbNBwvtj76daYNgVXu5hr9+dR+OvPMqoFh1bYXqoEISDzUceR+d9DTHHRO0jkWiLVt4o6A15k9ewoGzqriA9MVqn+U0oC36LsUbkk6PxGBr/7UInZdGka00dXqVfHw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688558424; 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=3mpYxydYLCCyJPDsQ/wBoNchM063w/3npouA7+lTogQ=; b=Wu/m23b+/ey/E52NjcJvw3IkgEUC7wAKMTek5fix2btppQsl0qC3KsMp4JTRwwTSdpfra/DzSd/fYdwNLWrmg5irwKbLE/8T1uklcf8Jp5hMdPACQvxFZ2p8g0UEg+wfQU3O9tD0Da4uwI1/dxKSDSHGpo0PAPYKQ18mcJ4Z82g= 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 1688558424571328.1007027564385; Wed, 5 Jul 2023 05:00:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH1Ap-0006Kv-FZ; Wed, 05 Jul 2023 07:59:55 -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 1qH1An-0006KL-QW for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:53 -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 1qH1Am-00012L-7Y for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:53 -0400 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-640-60iBBCjCMyqpkkhIy_n9QQ-1; Wed, 05 Jul 2023 07:59:50 -0400 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1b81ec07321so71607215ad.3 for ; Wed, 05 Jul 2023 04:59:49 -0700 (PDT) Received: from localhost.localdomain ([115.96.119.220]) by smtp.googlemail.com with ESMTPSA id v3-20020a1709028d8300b001b89c313185sm4878852plo.205.2023.07.05.04.59.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:59:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688558391; 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=3mpYxydYLCCyJPDsQ/wBoNchM063w/3npouA7+lTogQ=; b=RdvUCyHJx9I9xLySLbgK4Ek5hSoaqfRdel5sLplRa5uU9pxYBF7SbNQCbmCoNlnXIriT5g HpEqapc+HjBtcy1nQ7OgJ9HZPqehCN7zDwl4o37vGZ51yQCTnOfMvvpD2bwaKcc79yIjTH 5UzdiuxQIaCjxRAgXGg8A2v6Jtx/5S8= X-MC-Unique: 60iBBCjCMyqpkkhIy_n9QQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688558388; x=1691150388; 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=3mpYxydYLCCyJPDsQ/wBoNchM063w/3npouA7+lTogQ=; b=Q2ImK1Z862YTzacakvsOoizdPiCZUnQOHrPi2E9UPvj9Qxkl0Wuj6MlLWgDLNW7EN+ RngejAjw1vcvpQWvwZOcQEC7c52dTU3rG76uD8cx+8Tx7vBpVwocRDOCDfnqUeMrBeP1 OJbqc5oJ7Rphuz3+ZV3RFIbY3aLOt8ixAuFYCK1sn42dUb5FbvvxZva2wDgFk9Yrd6Fi 7qLkjx7ut5/hCvNYRvBR/pWriRHy9luRaE3Y0QcqY+CMJmArRx14E3E9OWAVlWLKQWvT FgzFyyTRJzUx3aWkbDwWqg4tobmv6zQ8VrJ1d1zUq0+eueOjAIQY2xrV+GqRWrHXRXQ9 oUmQ== X-Gm-Message-State: ABy/qLb9M00h7PmyKJ1iu79DoXKxC78m9OU3H/I3Byd5cCoVn9RSTcZO 1UAjsrLSHMHFldAW7XAwSCjCcJerYuhEncvu6gODVSe6jaLid5yQURc3guJznc9LirEr3vjMNwP 9wp9u5LIEC9/ppIj3wiFPdfB4FQeNCHvNYOvo/+q1pqCfBqAdWH959gq7SfdcCJbWP5Ld9r9Wgk s= X-Received: by 2002:a17:903:2441:b0:1b7:f443:c7f8 with SMTP id l1-20020a170903244100b001b7f443c7f8mr16057548pls.15.1688558388657; Wed, 05 Jul 2023 04:59:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlGv7me6t21A6XYhI2KaOoRbn2pdHHaG9XEmruPfxQ52MCK1aoHInPHbbphB506yjd4VtreRug== X-Received: by 2002:a17:903:2441:b0:1b7:f443:c7f8 with SMTP id l1-20020a170903244100b001b7f443c7f8mr16057523pls.15.1688558388309; Wed, 05 Jul 2023 04:59:48 -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 v8 5/6] hw/pci: warn when PCIe device is plugged into non-zero slot of downstream port Date: Wed, 5 Jul 2023 17:29:23 +0530 Message-Id: <20230705115925.5339-6-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230705115925.5339-1-anisinha@redhat.com> References: <20230705115925.5339-1-anisinha@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1688558426420100011 Content-Type: text/plain; charset="utf-8" PCIe downstream ports only have a single device 0, so PCI Express devices c= an 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 l= ater once we get more clarity on whether we are introducing a bad regression for users currently 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 igb device supports). The vfs are instantiated correctly and are seen to have non-zero device/slot numbers in the conventional PCI B= DF 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=3D2128929 Signed-off-by: Ani Sinha Reviewed-by: Julia Suvorova Reviewed-by: Akihiko Odaki --- hw/pci/pci.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index e2eb4c3b4a..62b393dfb7 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -65,6 +65,7 @@ bool pci_available =3D 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); =20 static Property pci_props[] =3D { DEFINE_PROP_PCI_DEVFN("addr", PCIDevice, devfn, -1), @@ -2121,6 +2122,25 @@ static void pci_qdev_realize(DeviceState *qdev, Erro= r **errp) } } =20 + /* + * A PCIe Downstream Port that do not have ARI Forwarding enabled must + * associate only Device 0 with the device attached to the bus + * representing the Link from the Port (PCIe base spec rev 4.0 ver 0.3, + * sec 7.3.1). + * With ARI, PCI_SLOT() can return non-zero value as the traditional + * 5-bit Device Number and 3-bit Function Number fields in its associa= ted + * Routing IDs, Requester IDs and Completer IDs are interpreted as a + * single 8-bit Function Number. Hence, ignore ARI capable devices. + */ + 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 " --=20 2.39.1 From nobody Thu May 9 22:26:50 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=1688558495; cv=none; d=zohomail.com; s=zohoarc; b=WvTqk6AKSB13p79cwCO1DOBsYFt3RybZHbWcIrxSXVDd+UCsbW5ohLHvbkniSHw6rSYJsPWM3eIYAaRQ1Zj9g75HB26xptmk+MdMYeo19Dq8fV023Y7bnCkmtkKRBLRl5gGNP9RgfIY19IUgbM8waZvfAZCRHMZMVHrIPz0rUZI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688558495; 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=OXw8vJ2Z6H1k/M0qb77qhRA9FHdNbZ/XkMQEvdiJIkU=; b=ZjJWxMsxq6IMdIWpEuhudslZ44r35AmjRjFaOOfMzo1doKK+PzMQYxF8oY2T1qRBl/FXHnOyHOjKRKeZ/H1o+Ru8g86cbgOR2np7QcSGnjlQ3alksXIO0Jc/CFP/8Q4w0jbVGeUQ4IiktvGZJPaQx/3ALwZIf7GDdxf2Xc3tCvw= 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 168855849535373.89925565583792; Wed, 5 Jul 2023 05:01:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH1Ar-0006M5-7i; Wed, 05 Jul 2023 07:59:57 -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 1qH1Aq-0006Kz-2u for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:56 -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 1qH1Ao-00012m-Mm for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:55 -0400 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-44-Uj5ccGEBN7SmH3UKQdbOVQ-1; Wed, 05 Jul 2023 07:59:52 -0400 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1b8071502d2so90818785ad.2 for ; Wed, 05 Jul 2023 04:59:52 -0700 (PDT) Received: from localhost.localdomain ([115.96.119.220]) by smtp.googlemail.com with ESMTPSA id v3-20020a1709028d8300b001b89c313185sm4878852plo.205.2023.07.05.04.59.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688558394; 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=OXw8vJ2Z6H1k/M0qb77qhRA9FHdNbZ/XkMQEvdiJIkU=; b=E2Sg+T0wqNiGucfksrF0doAkNkuIW6ZwEGNs6qIvN8IVitJW3cu01CeqlEIl30VEIJUl9z OryWrngxPCbcWiwzJGh0giZdInTri8u+dKDWMUMWu+z9JYUVxcDTI5IY6pl3o/qak4q5uQ I4gg77qK2J+cOc+KV9f7pvRCq/UfzYY= X-MC-Unique: Uj5ccGEBN7SmH3UKQdbOVQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688558391; x=1691150391; 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=OXw8vJ2Z6H1k/M0qb77qhRA9FHdNbZ/XkMQEvdiJIkU=; b=k9XQcmqtwC8zmsIGFOOUSfeplxV688qRV6OMsfzPL1J6GJkSsLuOfp6eozcYYeJgQd sdjsSUNHqB9V4jakSnqwUWFiHutxnCKu75Hq8JG+5pS40B4sMfjVMxWI/zq67pO4AShY t+OhnmZ+ZJl0PtHld225REslolcLfeGDI0Oi+kmbDmiq7x2HXMNfNkXpv/GT/8pMUHzF 7tLerRcb8HQZhxv4LYhCEXpKUUF+ct++x/s2uixZlFnv1lk09aXaeZfJQVgLbfBqu8Ob V58QRcNK02hNTOIcIshj6Ha+0+FcWbYv7iB80Vz3yijt3cJ8J3uVpWByxQCaXE67Pq5u DDvw== X-Gm-Message-State: ABy/qLbj3+BFVepy9a+stDsHwnK97ZzUOLkzqTTo+dgFF5pSxHqflelo bP84TyZdXXdnn15KafuSVS7Z0rFhCJ6iCwZz8f02q+2V8oUIeMPAAO6BHn8Uxk+fmtoZtdjVjlv RJFbfl+LG0WgiiX2SL63VTrFKNdB8XA3DfF5Jr4eqBDdopJdqLmiG4CAtRUlzf2iMlQBzi6aAyV Y= X-Received: by 2002:a17:902:d703:b0:1b8:9046:4bfb with SMTP id w3-20020a170902d70300b001b890464bfbmr10384019ply.9.1688558391066; Wed, 05 Jul 2023 04:59:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlH1jnHKy+vnoLw9dA9Y94ZZYnarbOZroNOlLESN9cNXok6Sw/jea4+vuPnddjfd9ZXP6n9LUg== X-Received: by 2002:a17:902:d703:b0:1b8:9046:4bfb with SMTP id w3-20020a170902d70300b001b890464bfbmr10384003ply.9.1688558390777; Wed, 05 Jul 2023 04:59:50 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Marcel Apfelbaum Cc: Ani Sinha Subject: [PATCH v8 6/6] hw/pci: add comment explaining the reason for checking function 0 in hotplug Date: Wed, 5 Jul 2023 17:29:24 +0530 Message-Id: <20230705115925.5339-7-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230705115925.5339-1-anisinha@redhat.com> References: <20230705115925.5339-1-anisinha@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1688558497606100005 Content-Type: text/plain; charset="utf-8" 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 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 62b393dfb7..7aee3a7f12 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1181,9 +1181,14 @@ 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. + */ + 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), --=20 2.39.1 From nobody Thu May 9 22:26:50 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=1688558424; cv=none; d=zohomail.com; s=zohoarc; b=nJ43cWs9vuaLO4At5lABmPVyaHfzM7v41Y/3lIFcP3vzyTDPLnbRE2Xt7cZfTYUQIoB1C24JHMSqFJ462ZgvyU+4qSB3vySQJ+VXy01Aiw60eynckw5z9Y7xNb8ZAeMUum3LQC2EsctD7PAXA+mAItCwms3NydLZ1VHU61iT9jE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688558424; 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=OXw8vJ2Z6H1k/M0qb77qhRA9FHdNbZ/XkMQEvdiJIkU=; b=fFb6Md8FnwHXKfd5exJUpRF2wSYfuPsQIl2GVUPNhiryErJ15QVqBdCxzT3S+21yYiCgah2ucOvxEc3mKh/gx8wf9GBqiu9njfBYvRCUSHEFnVSY6DWQ/h7XYLsJE0t/2F0eEc9CiP0ev6sKkXEistchoEpitn0e+O9osMzZVFs= 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 1688558424508669.879828008655; Wed, 5 Jul 2023 05:00:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qH1At-0006MY-Pl; Wed, 05 Jul 2023 07:59:59 -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 1qH1As-0006MM-Cu for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:58 -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 1qH1Aq-000138-Us for qemu-devel@nongnu.org; Wed, 05 Jul 2023 07:59:58 -0400 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-657-EXaI0TePNUGT0hBfLIMonA-1; Wed, 05 Jul 2023 07:59:55 -0400 Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-5578082558eso6318146a12.1 for ; Wed, 05 Jul 2023 04:59:54 -0700 (PDT) Received: from localhost.localdomain ([115.96.119.220]) by smtp.googlemail.com with ESMTPSA id v3-20020a1709028d8300b001b89c313185sm4878852plo.205.2023.07.05.04.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 04:59:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688558396; 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=OXw8vJ2Z6H1k/M0qb77qhRA9FHdNbZ/XkMQEvdiJIkU=; b=XfOB253vSoRQ0tOrr7OMvZ0iX9iPY836HyJeCWbX88wT6IaC70kSAFhBPNWl8+gboxkf/2 0SXI+PnJMOX+PBi69sXldbaKGZTtmrCxvmxPqc2ZpZDZ/xaVeGJM5BrfmcWP2v7HHAfHF4 a5c95qvILd5JL5sVHfytdcxedPLDNgg= X-MC-Unique: EXaI0TePNUGT0hBfLIMonA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688558393; x=1691150393; 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=OXw8vJ2Z6H1k/M0qb77qhRA9FHdNbZ/XkMQEvdiJIkU=; b=C8IPWpSkoKztTXH9nZl/aBWy42OqbKfuRcPAithvEQCbBqCTNDEKoHw3IIHp9dePU5 OfAyAj7bknKzSRY+IA7YNbfz+wmXpZDU+ayUNWF3Qfvqe2SNAmq9VmqWr3Bm0xW4KtbD C2YcOBzzmM3LarNqxVHN3jhgOsjq0TJfUR4MLqyBi5Lon6Gh+AXu70gqcF8B0h9LPHNE Xbw2pdBmoiDlyoIHI3ZDZF0eLkc9Sf78Tr8c7m9eN3QWbaEgMGEBjC+2h7MfV4BLQxeK oRQv13vyQQ+yCjAhMseXzR6fXeCeJneKqE/vKCTRPCSy1FLPDcOl+kKexyWjDsJsWfUc dCrA== X-Gm-Message-State: ABy/qLZn+lztJfvzj0EM4zBxwI9EeIqw57kh++0iTLzE/oAObUPeurFj vGL8YcYHQ6/KiBzEOqIMp/wwItZgDqVEohgM9s7kwkIn2YllvecGyFnUaWYe7rrXvaH7X7/zzc0 f3U3+o2S6NJkYCwIvZaMFua2XEzgcOmSXpNCZC1SaPi84YyhzMljJX8SV2pCuv6vyc+UJt0+wXP k= X-Received: by 2002:a17:902:e808:b0:1b8:b46d:91b7 with SMTP id u8-20020a170902e80800b001b8b46d91b7mr420346plg.45.1688558393597; Wed, 05 Jul 2023 04:59:53 -0700 (PDT) X-Google-Smtp-Source: APBJJlFMYO/DrpoJnJ6AHxKRs8ctEPV/TxH6d0wDxQJ/4px4GAoCOVRYdn6E8D78Hvlm6vZ0j9w1qA== X-Received: by 2002:a17:902:e808:b0:1b8:b46d:91b7 with SMTP id u8-20020a170902e80800b001b8b46d91b7mr420334plg.45.1688558393267; Wed, 05 Jul 2023 04:59:53 -0700 (PDT) From: Ani Sinha To: qemu-devel@nongnu.org, "Michael S. Tsirkin" , Marcel Apfelbaum Cc: Ani Sinha Subject: [PATCH v8 6/6] hw/pci: add comment to explain checking for available function 0 in pci hotplug Date: Wed, 5 Jul 2023 17:29:25 +0530 Message-Id: <20230705115925.5339-8-anisinha@redhat.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230705115925.5339-1-anisinha@redhat.com> References: <20230705115925.5339-1-anisinha@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1688558425826100009 Content-Type: text/plain; charset="utf-8" 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 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 62b393dfb7..7aee3a7f12 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1181,9 +1181,14 @@ 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. + */ + 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), --=20 2.39.1