From patchwork Wed Sep 30 08:36:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 1374209 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: 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: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fZ8cgsbl; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C1V4G1lV6z9sSJ for ; Wed, 30 Sep 2020 18:37:18 +1000 (AEST) Received: from localhost ([::1]:44920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kNXbw-0005v8-8n for incoming@patchwork.ozlabs.org; Wed, 30 Sep 2020 04:37:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kNXbM-0005ta-Sv for qemu-devel@nongnu.org; Wed, 30 Sep 2020 04:36:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:32434) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kNXbL-0007WJ-1W for qemu-devel@nongnu.org; Wed, 30 Sep 2020 04:36:40 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601454998; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VVmqK64uABz+05Xdl7V48YSMnA9B7XyJbRYRTv6ln4A=; b=fZ8cgsblm1WXiTJht/xbE/1HAiy7DaD4l/tVOZJ75ThdTUtEdUajr5T+h3D9nZHP6ZERy0 nWfHuPRJoeODtmWr3BMFDTL3lcMHtjBa7BMUuZfdXfB39Z8DqCeVlNaLVCbcIU/j8wkut8 yauvC7ZtczqnnA18D+mGC1vC4/03YdU= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-133-6SVMN3xbMGuQvGnOm7FCxg-1; Wed, 30 Sep 2020 04:36:35 -0400 X-MC-Unique: 6SVMN3xbMGuQvGnOm7FCxg-1 Received: by mail-wr1-f69.google.com with SMTP id a2so336961wrp.8 for ; Wed, 30 Sep 2020 01:36:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=VVmqK64uABz+05Xdl7V48YSMnA9B7XyJbRYRTv6ln4A=; b=dIhaNlOyDo9ZHx5b0Sl4ff5UMbXuYHg5qkV7/HAt0IzIKBdVvEmJAIXLx4gGN00IPX s678xixdyfIv99i5yRu2KYQwzYiXXP64ksmX9aYEmGVENdtK9azdcYV0V9R3sjQQPTVH MdIizyElrONtboPJkI+RDaouBrADsaekW/3GHINKKUJFf9mVWtun5XeYpgjTXp/bzP3j ON0nVafzcyEaPzlJ4rIUxbiYZfrBdlU7I2T2XsP9SIPzX2NoDwuHYG65DRlb+PiUEWuQ OkDS8vA9sxq/H7j13MjVZThyQQGcdELVuyycE5F/BDm5fFRKABGNN9x+etgXpqEF2ufp IC0w== X-Gm-Message-State: AOAM533tN3o4eZw9vDJo/PslGvzyhFvTGXs8Bd5d1QXFlfI7lr3o8aH7 bvHmTk5/oFTM+P66w6XxiehPe+CLRb3KX3B60vbYyOFp5dGs4rcy1VqIWX5bxZthBVNu4meyWv4 gJe5guHpwMVDxDvg= X-Received: by 2002:a1c:9695:: with SMTP id y143mr1636453wmd.146.1601454994137; Wed, 30 Sep 2020 01:36:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlsrbgzQJPnJn6K6BKMYRatVLYrcOtaSFpCAL/zHEYspuCVDqRiK1EkXpEKl3EdD3NngX18Q== X-Received: by 2002:a1c:9695:: with SMTP id y143mr1636437wmd.146.1601454993956; Wed, 30 Sep 2020 01:36:33 -0700 (PDT) Received: from redhat.com (bzq-79-179-71-128.red.bezeqint.net. [79.179.71.128]) by smtp.gmail.com with ESMTPSA id 9sm1446002wmf.7.2020.09.30.01.36.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2020 01:36:33 -0700 (PDT) Date: Wed, 30 Sep 2020 04:36:31 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 1/2] tests/acpi: unit test exercising global pci hotplug off for i440fx Message-ID: <20200930083552.506733-2-mst@redhat.com> References: <20200930083552.506733-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20200930083552.506733-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Received-SPF: pass client-ip=216.205.24.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/30 00:26:33 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.687, 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Peter Maydell , Thomas Huth , Igor Mammedov , Ani Sinha , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Ani Sinha This change adds a unit test to exercise the case when hotplug is disabled both for pci root bus and the pci bridges by passing the following two switches to qemu: -global PIIX4_PM.acpi-root-pci-hotplug=off -global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off bios-tables-test-allowed-diff.h documents the fact that a new DSDT acpi gold master binary blob we need to be added to test this. We will do the actual addition in the next patch in the series. Signed-off-by: Ani Sinha Reviewed-by: Igor Mammedov Message-Id: <20200929123011.31836-2-ani@anisinha.ca> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + tests/qtest/bios-tables-test.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..dea61d94f1 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/pc/DSDT.hpbrroot", diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 3c09b844f9..b514b70b62 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -770,6 +770,21 @@ static void test_acpi_piix4_no_bridge_hotplug(void) free_test_data(&data); } +static void test_acpi_piix4_no_acpi_pci_hotplug(void) +{ + test_data data; + + memset(&data, 0, sizeof(data)); + data.machine = MACHINE_PC; + data.variant = ".hpbrroot"; + data.required_struct_types = base_required_struct_types; + data.required_struct_types_len = ARRAY_SIZE(base_required_struct_types); + test_acpi_one("-global PIIX4_PM.acpi-root-pci-hotplug=off " + "-global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off " + "-device pci-bridge,chassis_nr=1", &data); + free_test_data(&data); +} + static void test_acpi_q35_tcg(void) { test_data data; @@ -1192,6 +1207,8 @@ int main(int argc, char *argv[]) test_acpi_piix4_no_root_hotplug); qtest_add_func("acpi/piix4/pci-hotplug/no_bridge_hotplug", test_acpi_piix4_no_bridge_hotplug); + qtest_add_func("acpi/piix4/pci-hotplug/off", + test_acpi_piix4_no_acpi_pci_hotplug); qtest_add_func("acpi/q35", test_acpi_q35_tcg); qtest_add_func("acpi/q35/bridge", test_acpi_q35_tcg_bridge); qtest_add_func("acpi/q35/mmio64", test_acpi_q35_tcg_mmio64);