Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1125540imm; Wed, 13 Jun 2018 13:52:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ4ngyG38xrsXpC8oURJ4cZbucddNuO97RmJxw+wvyNmok8Vo1DZY1merW72FXMVr8ofz7d X-Received: by 2002:a17:902:3281:: with SMTP id z1-v6mr6842802plb.226.1528923139271; Wed, 13 Jun 2018 13:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528923139; cv=none; d=google.com; s=arc-20160816; b=wPuAyQDjLXw2BRXdAULMnwsldXdY7SzRaQc+iOIlHOX3ZketsKTmPllglMK7QJq58v fsyBHgzPu8e2ALlwbmJvbFflLpbenfpXy+kAiYqRZMMK4C60K+EqxedwHm1jbT/G0ohp qpz1qgz0GvLGzoFw+wffks7mwl3V1haTTi9ylsnSwEzqMNX8t8EBx/A9mg7+SqQBpm90 SPttGSfyeav23cyGOC6dA678UhHAuv3LZVfgxbpNhx7w2GBNeaqk6GZ6fWyYDzy2XDNd KgaOLhGEWkg4anWa6VjMPXWy9JEqUTolEHwCYA9+N3dtmqruohMX/aqfgMgIwtTSnVIl GIaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=EWLNMHzBrQ5zVYAVEeHGZyve/mTjw2fbE772fJg9JXw=; b=lg7sKaOpyzc28iDQM4Pov7x/z69cC5mZjESuFkczjCbc9ca8f9EJH6skgP32Td3SQC Jr/2K2tPvfyXBjJrAoUGrLLn6ScLMItHu011YkmG4uhuqckF0LsCzDSK0JxTuNg/IBAA gDbiN8FRha+zp2d9oXmFZ9lgPEd1eb+L+M4M0tnjPYtMo6MrNtiF3YXdT15vMde4L/M5 9/ovw9BfxZ2qjtZSI71PFIyG47IVomhD9ptds47bwiZZKp5NPVHeLgNnggQZoIF2l1ch i17joH2x7yLR21Rz/pk/SDfv6bV539dixSFTDW8dF5/4jRf1dTwarMvNx1XPtTIjX/X4 W3eQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p9-v6si1440915pgn.245.2018.06.13.13.52.03; Wed, 13 Jun 2018 13:52:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935734AbeFMUvk (ORCPT + 99 others); Wed, 13 Jun 2018 16:51:40 -0400 Received: from mail.skyhub.de ([5.9.137.197]:39816 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935497AbeFMUvf (ORCPT ); Wed, 13 Jun 2018 16:51:35 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id WGD23EABBIgY; Wed, 13 Jun 2018 22:51:33 +0200 (CEST) Received: from zn.tnic (p200300EC2BD12400329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2bd1:2400:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 499801EC0346; Wed, 13 Jun 2018 22:51:33 +0200 (CEST) Date: Wed, 13 Jun 2018 22:51:29 +0200 From: Borislav Petkov To: Pu Wen Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, thomas.lendacky@amd.com, peterz@infradead.org, tony.luck@intel.com, pbonzini@redhat.com, rkrcmar@redhat.com, boris.ostrovsky@oracle.com, jgross@suse.com, rjw@rjwysocki.net, lenb@kernel.org, viresh.kumar@linaro.org, mchehab@kernel.org, trenn@suse.com, shuah@kernel.org, zhangpanyong@hygon.cn, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-x86_64@vger.kernel.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-edac@vger.kernel.org, linux-pm@vger.kernel.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org Subject: Re: [PATCH 00/11] Add support for Hygon's Dhyana Family 18h processor Message-ID: <20180613205129.GD26375@zn.tnic> References: <1528550410-28080-1-git-send-email-puwen@hygon.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1528550410-28080-1-git-send-email-puwen@hygon.cn> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 09, 2018 at 09:20:10PM +0800, Pu Wen wrote: > As a new x86 CPU Vendor, Chengdu Haiguang IC Design Co., Ltd (Hygon) > is a Joint Venture between AMD and Haiguang Information Technology Co., > Ltd., and aims at providing high performance x86 processor for China > server market. > > The first generation Hygon's processor(Dhyana) originates from AMD > technology and shares most of the architecture with AMD's family 17h, > but with different CPU Vendor ID("HygonGenuine")/PCIE Device Vendor ID > (0x1D94)/Family series number(Family 18h). > > To enable the support of Linux kernel to Hygon's CPU, we added a new > vendor type (X86_VENDOR_HYGON, with value of 9) in arch/x86/include/ > asm/processor.h, and shared most of kernel support codes with AMD > family 17h. > > These patches have been applied and tested successfully in Hygon's > Dhyana SoC silicon. Also tested on AMD's EPYC (Family 17h) processor > works fine and makes no harm to existing codes. Well, I don't like this diffstat: 37 files changed, 183 insertions(+), 56 deletions(-) which adds a lot of code checking this new vendor. But then it adds in the AMD paths and I don't see it being any different from an AMD CPU. So it does the same a Zen does but then it is Hygon. So I'd prefer to *not* sprinkle those X86_VENDOR_HYGON checks everywhere but simply have the vendor be X86_VENDOR_AMD and only the user-visible reporting to show that it is Hygon. Because to the kernel it is an AMD CPU - only the superficial attributes are something else. Oh well, and PCI device IDs but that's like another CPU revision. Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.