From patchwork Wed Mar 27 16:16:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 783131 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2286895wrt; Wed, 27 Mar 2024 09:17:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWwlPGSm2Yz62KjzUZ2xofpkQO0E5lBxU8Rlpq5lC11SFeqCx0zQBqssK0hqNtYPT7LQ1RV7+AhsUUWkxd1CVmL X-Google-Smtp-Source: AGHT+IENUNzNkW3FkuyMwvcVKta5murIch48b7e3i5p60Ax8WYEAVDCDrextjVG4ZlVJV+AfMixG X-Received: by 2002:a05:622a:486:b0:430:d175:5a80 with SMTP id p6-20020a05622a048600b00430d1755a80mr169726qtx.14.1711556276707; Wed, 27 Mar 2024 09:17:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1711556276; cv=none; d=google.com; s=arc-20160816; b=KIl8z4vvWROfNdFB240ylLrsohedSQS1cif+GB/1TsCHuXnpZ3cQ0p1ClGWtZGTzO7 WDfG/gj8JDPPoQUX3mHeNpOYPU9kQLHSbHFXEEG8hrcbrZiLv+MEayopfMQyI500Y0ps JBEcewJmGz+XuVckD4JVUjg24L+Zd9ktPL2Goq6xl0jWybvuBXWIGHQ02j1/9yH1ypOS ZL40AMbjywnRoBsrpNrSo4WUvOZw3MjlFMpi3tdYqa1OhNi7TWlDOIn2NxncDUPjYqSo 9Ow88k7IytqCllFU/S1mm0QcOMoFURDJChdmYIM2JyqE/vrcuwofyxB5Lwhktm4vRPns DseA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=bAqfmPHU6eSgDittaGCcO2PKWOLIbl5GKHge5h2c9B8=; fh=zWipHN5qhADaoDEitOBzijnNwtzGLC0Ubx0jr0MC73A=; b=vWUjJqgtYrmX759Y2yyuJFE9/9UJZCqnPXPaACXm8BcaJfwEDRkWqyHIJo0ndNm4uq pmckU5wIgz39B96POq0fZOlONVaWMMsGhKc4i80B/rfcRBiUhxgeGErfiFtSwv5amJbE zCJjgebohs77tzpBprwVLzHLaZgAGWlhFVfphPgUM4h53dVshiSXRPQbq7W5F7xC8/Ax Kt9qlomIQjqogd2vYAQPgpthMuKPQvDS+ePnYkSgOC/UA2KSbhxd/0ckN4Gm92+tsn4l K0prwfmLvuepfg6KDfdXU52vudktnp59TSxOYDaEgCtxBCO/gYevOq4y+Dz3iI6zfZtJ P+JQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mxYYFUHW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f3-20020ac87f03000000b004315f0aa54esi5959996qtk.366.2024.03.27.09.17.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2024 09:17:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mxYYFUHW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpVxW-0005j1-Lr; Wed, 27 Mar 2024 12:17:02 -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 1rpVxK-0005ig-Cd for qemu-devel@nongnu.org; Wed, 27 Mar 2024 12:16:51 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpVxI-0001Cj-Gm for qemu-devel@nongnu.org; Wed, 27 Mar 2024 12:16:50 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a44665605f3so826202666b.2 for ; Wed, 27 Mar 2024 09:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711556206; x=1712161006; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=bAqfmPHU6eSgDittaGCcO2PKWOLIbl5GKHge5h2c9B8=; b=mxYYFUHWhbRdtlbbfbdu4ubQhtzTSiYLbCrVVLTMqMTgggZiawPv7Jm32k2tQcQAn1 J5/Y39TUReVVhmgMQGheMlqcEX9xBG9iCQAnWgoLIEyc9Ih6jAySKRj3f7h08b/FhxOS clncU/e9C2m+bKgE+XOzVtZ/TziPYXLEKoeDn7PqB4FFp3Om/iImNVGGLR5EagMhj4zt LPFkD+ON0M+WjOQtIpYbTbkOsCQ06JchE1VGH0jSiAMHCPt3S4Hows5KBcXqnDWNjfIp fg8OqKtSBwaRVF/8jtqLrzXcNNIQIvHmhT7iGFNaxe/wzb8NH9o/+JDLqZE2fmhP7N3m Jhag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711556206; x=1712161006; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bAqfmPHU6eSgDittaGCcO2PKWOLIbl5GKHge5h2c9B8=; b=AEThr1xJrOWo3XVTQvwlJukDLQFHMWFrJlC5V5EQbqxChBKPihKd6EzAChWFQ5LU1i tCcZw6rg0KOKRi3uZc/K+ISqYOLRZmD5r/krWURrbhlTqS0Wew8bt7e0DNdI6M2kI/GS XTd6e15zIuPJVd//cyxOENz479OLMiKLb5j6jh4MP2lsDdcWHaSgOiozjrr9Tdyo3wvr Olt3fTd4amBDY79kOwYD7gLoM2p4/FI4ok2IW9U0UfFCY5ok5f42AVAQUvA00Z7er3k4 v+QhZ9NyIGuOo6F8hMIMnEKQ9pn4/9cdmSTksr01h/buUW2wnCq5d7eOk+16uRKWJzzG HsiA== X-Gm-Message-State: AOJu0YxLSPmVA2iRsZ4c3bO0ck33utQbUOSEP8Dz9KwOcEXsroiB6MyX PwhIfWoPi7lIxHEXT6rdyfCNWDIipcCDcRUkeYX38lsZqX9tJvbhmjmHx3S80Ifq7c2OlS5ZPHW 8 X-Received: by 2002:a17:906:fac5:b0:a4e:30d:ee7d with SMTP id lu5-20020a170906fac500b00a4e030dee7dmr1426206ejb.12.1711556206076; Wed, 27 Mar 2024 09:16:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.205.175]) by smtp.gmail.com with ESMTPSA id e25-20020a170906845900b00a4673706b4dsm5631061ejy.78.2024.03.27.09.16.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 27 Mar 2024 09:16:45 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Jonathan Cameron Cc: Marcel Apfelbaum , Paolo Bonzini , Richard Henderson , Fan Ni , "Michael S. Tsirkin" , Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH-for-9.0] hw/i386/pc: Restrict CXL to PCI-based machines Date: Wed, 27 Mar 2024 17:16:42 +0100 Message-ID: <20240327161642.33574-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=philmd@linaro.org; helo=mail-ej1-x636.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org CXL is based on PCIe. In is pointless to initialize its context on non-PCI machines. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Jonathan Cameron --- hw/i386/pc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index e80f02bef4..5c21b0c4db 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1738,7 +1738,9 @@ static void pc_machine_initfn(Object *obj) pcms->pcspk = isa_new(TYPE_PC_SPEAKER); object_property_add_alias(OBJECT(pcms), "pcspk-audiodev", OBJECT(pcms->pcspk), "audiodev"); - cxl_machine_init(obj, &pcms->cxl_devices_state); + if (pcmc->pci_enabled) { + cxl_machine_init(obj, &pcms->cxl_devices_state); + } pcms->machine_done.notify = pc_machine_done; qemu_add_machine_init_done_notifier(&pcms->machine_done);