From nobody Mon Feb 9 22:03:55 2026 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=1652737337; cv=none; d=zohomail.com; s=zohoarc; b=Fp3VAmrPBAHCZCN7q1R2lEwDnpDHbhteATrXkFZx7f21VXXI69FDMEsgascVThMp1osdlEylPCDEgNp88hoxDTSfl4ZyVgXKPoJloS4DZHXStsZpgSqZeol+H+zxoa4JKP46aL1t4BeNVFeMw+pQ8WKJoHR/cQrtNy23e1flUD4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652737337; h=Content-Type: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=hmAqjrNwcz/n9dDfLQEkci2IFR8H57pNgW0hXHwtPIo=; b=YDi75ALPoVvE+u3E3nj7zUF4LVTCjBiQJRn4qGIfa9Jwwm2rPnFmkg1l8hLQ9+SjmQ5fvfV0kFBC7Wks1XxzWI9ooMlZTezgXKnezpiz05gC5rId+ojHfYLL7UOhJcXWKm9gUg2AH5e0TiSUaBD+32N3An9/p9kpvHP4yFIWGG8= 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 165273733772852.5515779600031; Mon, 16 May 2022 14:42:17 -0700 (PDT) Received: from localhost ([::1]:37736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nqiTn-00069D-Nz for importer@patchew.org; Mon, 16 May 2022 17:42:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqhi5-00079S-QX for qemu-devel@nongnu.org; Mon, 16 May 2022 16:52:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:27496) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqhi4-0006a2-6j for qemu-devel@nongnu.org; Mon, 16 May 2022 16:52:57 -0400 Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-645-uJ0HbXspM0q4ImhJYZKBGw-1; Mon, 16 May 2022 16:52:54 -0400 Received: by mail-ed1-f69.google.com with SMTP id q12-20020a056402040c00b0042a84f9939dso4548544edv.7 for ; Mon, 16 May 2022 13:52:54 -0700 (PDT) Received: from redhat.com ([2.55.131.38]) by smtp.gmail.com with ESMTPSA id s3-20020a170906778300b006f3ef214dd5sm174481ejm.59.2022.05.16.13.52.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 13:52:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652734375; 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=hmAqjrNwcz/n9dDfLQEkci2IFR8H57pNgW0hXHwtPIo=; b=eARXNjAGOBmhLKHY7eFgZ3AcWVVLJlqfY/W4zgpxiskutLn1QgO0q38nArXdRrgFP1t0i6 ynMKlPfSELFtT6HAE2Lx2dKdhOhx8Ua2c6Eg2UWnHuVaRu4pFAJbuxtdNT2uZC/FzkEYXY wFMJxA6DwlAvRowiZEsAkUnxE9wCUO8= X-MC-Unique: uJ0HbXspM0q4ImhJYZKBGw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=hmAqjrNwcz/n9dDfLQEkci2IFR8H57pNgW0hXHwtPIo=; b=sZsW5muneo58/P2N76jM+QOCNFonjaiV+eRIdV0YZ36v2wC3Q+TbQpxzYNBsiLYXXk FMoK+DyrfOl2K6hJxYSI1jXGGaXn98Ty0aZ8XFfhaQFbc10yQpfW+e/df/9dH9TsxLUf EiO1nN87U+e58UftUF0Pj27T4CRLD5lpVTIaC64G7hZoTqFiLR90tBK6VQJWd2zCWDn1 XRjdXHVAoWAayUDb5qJnMkQzjGo8g6IB4dUVanoZ5OhMiGAMmmtuSX7X4Cz2TWkbYqUW Eki5dTqyjkTXkK/FmzfE+Mw4QmxeP4Oaew8HrrP4xM+88P+3RZ7TJcZv7HF54XADDPDx 1SqA== X-Gm-Message-State: AOAM531MiuKXVGKqP+Q/4eXU7GU6lk6ig4CZm8lnDVcjOgqI5guu+t6p tafWiV55yPolefIjnmG8h+yD7KNrRyhc4e0Hgnr4/XqZT77mb7PI+LOXU9hqsclRIBVV2zs9zY8 KS2zJk2ayDUgA0wVu+ySbNczdd3mlLw75wuC8POY0wXVjP7D2JQ1CDy8AdP9x X-Received: by 2002:a17:907:969f:b0:6f3:dede:f2d2 with SMTP id hd31-20020a170907969f00b006f3dedef2d2mr16412694ejc.511.1652734372864; Mon, 16 May 2022 13:52:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmmM/MVF7s2rEMrrWv24lCwWvGFpYBTBUKn3SS1vKcU5cx841P51C+Ja7N6aKdkngRg5k1og== X-Received: by 2002:a17:907:969f:b0:6f3:dede:f2d2 with SMTP id hd31-20020a170907969f00b006f3dedef2d2mr16412676ejc.511.1652734372525; Mon, 16 May 2022 13:52:52 -0700 (PDT) Date: Mon, 16 May 2022 16:52:49 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Jonathan Cameron , Igor Mammedov , Ani Sinha Subject: [PULL v2 39/86] qtests/bios-tables-test: Add a test for CXL emulation. Message-ID: <20220516204913.542894-40-mst@redhat.com> References: <20220516204913.542894-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220516204913.542894-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent 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=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1652737339608100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Jonathan Cameron The DSDT includes several CXL specific elements and the CEDT table is only present if we enable CXL. The test exercises all current functionality with several CFMWS, CHBS structures in CEDT and ACPI0016/ACPI00017 and _OSC entries in DSDT. Signed-off-by: Jonathan Cameron Message-Id: <20220429144110.25167-38-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 5dddedabcd..a4a46e97f0 100644 --- a/tests/qtest/bios-tables-test.c +++ b/tests/qtest/bios-tables-test.c @@ -1536,6 +1536,49 @@ static void test_acpi_q35_viot(void) free_test_data(&data); } =20 +static void test_acpi_q35_cxl(void) +{ + gchar *tmp_path =3D g_dir_make_tmp("qemu-test-cxl.XXXXXX", NULL); + gchar *params; + + test_data data =3D { + .machine =3D MACHINE_Q35, + .variant =3D ".cxl", + }; + /* + * A complex CXL setup. + */ + params =3D g_strdup_printf(" -machine cxl=3Don" + " -object memory-backend-file,id=3Dcxl-mem1,m= em-path=3D%s,size=3D256M" + " -object memory-backend-file,id=3Dcxl-mem2,m= em-path=3D%s,size=3D256M" + " -object memory-backend-file,id=3Dcxl-mem3,m= em-path=3D%s,size=3D256M" + " -object memory-backend-file,id=3Dcxl-mem4,m= em-path=3D%s,size=3D256M" + " -object memory-backend-file,id=3Dlsa1,mem-p= ath=3D%s,size=3D256M" + " -object memory-backend-file,id=3Dlsa2,mem-p= ath=3D%s,size=3D256M" + " -object memory-backend-file,id=3Dlsa3,mem-p= ath=3D%s,size=3D256M" + " -object memory-backend-file,id=3Dlsa4,mem-p= ath=3D%s,size=3D256M" + " -device pxb-cxl,bus_nr=3D12,bus=3Dpcie.0,id= =3Dcxl.1" + " -device pxb-cxl,bus_nr=3D222,bus=3Dpcie.0,i= d=3Dcxl.2" + " -device cxl-rp,port=3D0,bus=3Dcxl.1,id=3Drp= 1,chassis=3D0,slot=3D2" + " -device cxl-type3,bus=3Drp1,memdev=3Dcxl-me= m1,lsa=3Dlsa1" + " -device cxl-rp,port=3D1,bus=3Dcxl.1,id=3Drp= 2,chassis=3D0,slot=3D3" + " -device cxl-type3,bus=3Drp2,memdev=3Dcxl-me= m2,lsa=3Dlsa2" + " -device cxl-rp,port=3D0,bus=3Dcxl.2,id=3Drp= 3,chassis=3D0,slot=3D5" + " -device cxl-type3,bus=3Drp3,memdev=3Dcxl-me= m3,lsa=3Dlsa3" + " -device cxl-rp,port=3D1,bus=3Dcxl.2,id=3Drp= 4,chassis=3D0,slot=3D6" + " -device cxl-type3,bus=3Drp4,memdev=3Dcxl-me= m4,lsa=3Dlsa4" + " -cxl-fixed-memory-window targets.0=3Dcxl.1,= size=3D4G,interleave-granularity=3D8k" + " -cxl-fixed-memory-window targets.0=3Dcxl.1,= targets.1=3Dcxl.2,size=3D4G,interleave-granularity=3D8k", + tmp_path, tmp_path, tmp_path, tmp_path, + tmp_path, tmp_path, tmp_path, tmp_path); + test_acpi_one(params, &data); + + g_free(params); + g_assert(g_rmdir(tmp_path) =3D=3D 0); + g_free(tmp_path); + free_test_data(&data); +} + static void test_acpi_virt_viot(void) { test_data data =3D { @@ -1741,6 +1784,7 @@ int main(int argc, char *argv[]) qtest_add_func("acpi/q35/kvm/dmar", test_acpi_q35_kvm_dmar); } qtest_add_func("acpi/q35/viot", test_acpi_q35_viot); + qtest_add_func("acpi/q35/cxl", test_acpi_q35_cxl); qtest_add_func("acpi/q35/slic", test_acpi_q35_slic); } else if (strcmp(arch, "aarch64") =3D=3D 0) { if (has_tcg) { --=20 MST