From nobody Sun Nov 24 00:01:40 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=1730754524; cv=none; d=zohomail.com; s=zohoarc; b=hPnra6ijSFrkNHj7vCVanTh4Te5OS+WO8O/xlat9rRdZL41ifY6jn3c6sr/YTfr3+3Wi8UIOvc4CTgxzqmA+DMLd1R3o2pQtTkcZEYkQ8gKo1Nze1wPfNh8TOHkLBcTi4DGdEykHF4/hcMXfUDs/TPUaRudkuA8h3aaAAAD/Vjk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730754524; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=HT4p44lGhUJLiZNcVVDhq7UK1RgS21i7OPit+tLHM+w=; b=GQHiLbG6nB0aEyFFUegBQjOqJBWwxKaGMFiqpZ7lfKy/IOT4+E5UA2F/qXbPVvFubax7s0G/6MMBfbElK680Ijx82ZnuTwYpE/n6fxhdGUlv0gJjrLRS6bT9BLoKczcs/dBa7Ja1U+TPuN9DwCqX6WhrwkOnGT4WZsjbencgBQI= 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 1730754524142361.9798365884434; Mon, 4 Nov 2024 13:08:44 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t84HX-0005BC-Jf; Mon, 04 Nov 2024 16:06:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t84HV-000548-Qr for qemu-devel@nongnu.org; Mon, 04 Nov 2024 16:06:38 -0500 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 1t84HU-0005KP-DQ for qemu-devel@nongnu.org; Mon, 04 Nov 2024 16:06:37 -0500 Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-609-mLO1yNvdNz6CK4M4SIi5iA-1; Mon, 04 Nov 2024 16:06:34 -0500 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37d533a484aso2900116f8f.0 for ; Mon, 04 Nov 2024 13:06:34 -0800 (PST) Received: from redhat.com ([2.52.14.134]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5e8915sm164244265e9.27.2024.11.04.13.06.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2024 13:06:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730754395; 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=HT4p44lGhUJLiZNcVVDhq7UK1RgS21i7OPit+tLHM+w=; b=I3vPxiRIVXLG8uYlDP8e3/nBdEnsRA6VsfmK23WKxOdXnkx7xkxY02lafjo3bH1t75Z18r Ms6wOIk58r2RIxX23ODCzYzWd0M7N282wiwwS7CkhwYSY76/pgwz66AJeDDLtGCgWODIi1 ejHlcZxCSXzh12333nwggYlIeqEEI5Y= X-MC-Unique: mLO1yNvdNz6CK4M4SIi5iA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730754393; x=1731359193; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=HT4p44lGhUJLiZNcVVDhq7UK1RgS21i7OPit+tLHM+w=; b=Zc9/DL3Fb9qkQVj3pfw4ul1XlvXrFAnDnrrWl6z/zqm8X1xcq+xLSsljmMq6nmObjT zdqTKlId7KsQFU/UU+7JIutzQ2E9WgB22aVDy4J5dZXJQnvjiY2eevssbM5JZCkbliLZ ghKz3/RB4NZs+CVEXeUVKOwsXs5umIEnfI8fZWa0H3ZweK0bOldMlSE2VQ0Mb9l78LET /uVVXhzG7x3XjOtbtPRldCIKX4jGuMq4C8I/Hvfu24UT+jnbYYvI17X4cVYUT8jxTV6f kiXJwZZwsw07jJIy3IGXh7zRjOSe4OvX1VkSXcLHpgHssb/JTUiQzJLArDJorbnul/FZ yjXg== X-Gm-Message-State: AOJu0YwksL13n7t3Svd1fI0MZ3G2OF62iwz8rL7eL5f0se79MWEjOvBC 0IuwcNl2reZsNOQiFQ3hijrsp8uF2TMyJGJUFiuN/nTQJl6BKdR0Y1B9ynjwgwdfTrsdCcpblQa 4pvyvI9aTO+gUeablFv81wp6sDUdf8OuLo3eUdEiAP+WFQpZ1lWuNvYTe6PVdcHq1yEzMPLoBBx CbMHtuAzDgqCf+oqXZedhAOcuNM9DmfQ== X-Received: by 2002:a05:600c:3d8a:b0:431:7ccd:ff8a with SMTP id 5b1f17b1804b1-4327dac773dmr132311235e9.14.1730754392854; Mon, 04 Nov 2024 13:06:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHvvO5PPBjV10Kv8z7u+BWa79l2PlmKjn6ASM2It+p19Xst/nk1YGA/irgAlzXrlgakYDU82Q== X-Received: by 2002:a05:600c:3d8a:b0:431:7ccd:ff8a with SMTP id 5b1f17b1804b1-4327dac773dmr132311055e9.14.1730754392354; Mon, 04 Nov 2024 13:06:32 -0800 (PST) Date: Mon, 4 Nov 2024 16:06:28 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Jonathan Cameron , Fan Ni , Marcel Apfelbaum Subject: [PULL 15/65] hw/pci-bridge/cxl_root_port: Provide x-speed and x-width properties. Message-ID: <1478b5609022ed4331bff83d06cefed983df82ac.1730754238.git.mst@redhat.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.34, 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_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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.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: 1730754525667116600 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Jonathan Cameron Approach copied from gen_pcie_root_port.c Previously the link defaulted to a maximum of 2.5GT/s and 1x. Enable setti= ng it's maximum values. The actual value after 'training' will depend on the downstream device configuration. Signed-off-by: Jonathan Cameron Message-Id: <20240916173518.1843023-2-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Fan Ni --- hw/pci-bridge/cxl_root_port.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/pci-bridge/cxl_root_port.c b/hw/pci-bridge/cxl_root_port.c index 2dd10239bd..5e2156d7ba 100644 --- a/hw/pci-bridge/cxl_root_port.c +++ b/hw/pci-bridge/cxl_root_port.c @@ -24,6 +24,7 @@ #include "hw/pci/pcie_port.h" #include "hw/pci/msi.h" #include "hw/qdev-properties.h" +#include "hw/qdev-properties-system.h" #include "hw/sysbus.h" #include "qapi/error.h" #include "hw/cxl/cxl.h" @@ -206,6 +207,10 @@ static Property gen_rp_props[] =3D { -1), DEFINE_PROP_SIZE("pref64-reserve", CXLRootPort, res_reserve.mem_pref_6= 4, -1), + DEFINE_PROP_PCIE_LINK_SPEED("x-speed", PCIESlot, + speed, PCIE_LINK_SPEED_64), + DEFINE_PROP_PCIE_LINK_WIDTH("x-width", PCIESlot, + width, PCIE_LINK_WIDTH_32), DEFINE_PROP_END_OF_LIST() }; =20 --=20 MST