[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v1 1/2] x86/intel: optional build of intel.c


  • To: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Sergiy Kibrik <sergiy_kibrik@xxxxxxxx>
  • Date: Mon, 12 Aug 2024 17:14:27 +0300
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=URL71CPaVialNbQgQW35MG+PHRVPVVtw31gkEZNVtMM=; b=By7k7f4LYFN7NupmCIwV/En7m+DEZbpyovjXFfOKIZSmpHTtJ5ZG1pGxpivJNqfV3EQjTuyx/lL86uR/acvkEhbYbwhmd0/wC41+PUNMhcyinyFbG7DDQ1+rl4eAgRiqVVhd22Szo+C+oCEKhoUZzdc8qUgAMNm0rgMwhcurcIGNngcpe2exL2v9rOGQBXu9GqGCUVtg1sCGgSiZ3MGdi/TzSAnWK6da/3K15bj3R4ywJ+rnleEgyf7FQIPQ25XCBKwDLEf7iGsUq2lR7UW59wRj0yptk8k3JdtWRUhU6CCCQgjQLfA76glJq9mf3ALyrCyUeqSMbv7MMSGCUx5kUA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mTFU++3ejtlWaXmS/6di9yOKeJsGFSMBHb1ydz5uZjzaBO7n5B3LuLBbIojBmmI7+QTZicMU6JR6n26h6YCE21qDZORru4FRwQBJD2han/nGkuKd5dMug9lKBuOTBggyC8Irgu4yY+utxxuWl4oCMx3y6pYCkIOt3cc7cYuuP5cEv4uQ4+d6c0m5eTPmGcBFxYS+LemNmVrlIOUtAsBKNoR7ruz1mBLKp+DEGqLpJF1KVEb6CwzjcbZ/ThK1C4jIgtIofFWBU6aTTb35aYxvl2N9E7LQhP4W6ihzZf/KiH47NePdIVQ9XQLdKYya5onF7nNAI8JpFuVVh+7OEGdlJw==
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Mon, 12 Aug 2024 14:14:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

12.08.24 15:24, Alejandro Vallejo:
On Mon Aug 12, 2024 at 10:58 AM BST, Jan Beulich wrote:
On 12.08.2024 11:40, Sergiy Kibrik wrote:
09.08.24 13:36, Alejandro Vallejo:
On Fri Aug 9, 2024 at 11:09 AM BST, Sergiy Kibrik wrote:
--- a/xen/arch/x86/cpu/Makefile
+++ b/xen/arch/x86/cpu/Makefile
@@ -6,10 +6,10 @@ obj-y += amd.o
   obj-y += centaur.o
   obj-y += common.o
   obj-y += hygon.o
-obj-y += intel.o
-obj-y += intel_cacheinfo.o
+obj-$(CONFIG_INTEL) += intel.o
+obj-$(CONFIG_INTEL) += intel_cacheinfo.o
   obj-y += mwait-idle.o
-obj-y += shanghai.o
+obj-$(CONFIG_INTEL) += shanghai.o

Why pick this one too? It's based on VIA IP, aiui.

shanghai.c and intel.c both use init_intel_cacheinfo() routine, so
there's build dependency on Intel code.

My point is that the use of Intel functions on Shanghai and not Centaur is
accidental. If shanghai goes under Intel so should Centaur (imo).


Yet Shanghai isn't as directly a clone of Intel CPUs as Hygon ones are
for AMD. So at the very least you want to justify your choice in the
description. After all there's also the alternative of having a separate
SHANGHAI Kconfig setting, which would merely have "select INTEL" or
"depends on INTEL".

Jan

That's one option, another is for the Kconfig options to explicitly state which
vendors they apply to. I'd be fine with either. It's less fine for CONFIG_INTEL
to cover a VIA derivative and not the other.


I think I'll go with separate kconfig options -- for Centaur, Shanghai & Hygon, as we already got a separate submenu for CPUs & everything.
Also this way it's more up to the task of config tuning.

Thanks for clarification!

   -Sergiy



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.