From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH v5 10/16] x86/mce: enable Hygon support to MCE infrastructure Date: Thu, 6 Sep 2018 14:29:56 +0200 Message-ID: <20180906122956.GF10768@zn.tnic> References: <20180905092234.GC2237@zn.tnic> <01604799-b993-e530-817c-ad097d343fc4@hygon.cn> <20180905131427.GI2237@zn.tnic> <20180906083924.GB10768@zn.tnic> <634f371e-1a2d-5b23-c9b0-5f32a8ee4cee@hygon.cn> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <634f371e-1a2d-5b23-c9b0-5f32a8ee4cee@hygon.cn> Sender: linux-kernel-owner@vger.kernel.org To: Pu Wen Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, thomas.lendacky@amd.com, pbonzini@redhat.com, tony.luck@intel.com, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-edac@vger.kernel.org List-Id: linux-arch.vger.kernel.org On Thu, Sep 06, 2018 at 07:40:52PM +0800, Pu Wen wrote: > The first is the compilation test. Test the kernel with both MCE selected > and unselected to see if is the compiling process successful or not. This is a kernel compile test - it has nothing to do with actual machine testing. > The other test is functionality test. For example, during the MCE BIOS > development, to see if the MCE functions OK, it may need to select and > unselect MCE in kernel for double checking. Say what now?! What testing do you do if you boot a kernel which doesn't even use the functionality you're testing?! > Actually in normal use scenario and in real product the MCE should be > always selected. It better be! > To ensure this, I think there are two ways as below: > - Select X86_MCE_AMD in CPU_SUP_HYGON config entry, it also cater to the > first test scenario, but meanwhile lacks flexibility. > - The linux distros(Ubuntu, CentOS, etc) ensure that X86_MCE_AMD is > selected to the default config file, and indeed they do. > Which way is better? The first way but change that dependency to CPU_SUP_AMD because there are people building their own kernels and don't run distro configs. And you need CPU_SUP_AMD because you're using their code. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply. From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Subject: [v5,10/16] x86/mce: enable Hygon support to MCE infrastructure From: Borislav Petkov Message-Id: <20180906122956.GF10768@zn.tnic> Date: Thu, 6 Sep 2018 14:29:56 +0200 To: Pu Wen Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, thomas.lendacky@amd.com, pbonzini@redhat.com, tony.luck@intel.com, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-edac@vger.kernel.org List-ID: T24gVGh1LCBTZXAgMDYsIDIwMTggYXQgMDc6NDA6NTJQTSArMDgwMCwgUHUgV2VuIHdyb3RlOgo+ IFRoZSBmaXJzdCBpcyB0aGUgY29tcGlsYXRpb24gdGVzdC4gVGVzdCB0aGUga2VybmVsIHdpdGgg Ym90aCBNQ0Ugc2VsZWN0ZWQKPiBhbmQgdW5zZWxlY3RlZCB0byBzZWUgaWYgaXMgdGhlIGNvbXBp bGluZyBwcm9jZXNzIHN1Y2Nlc3NmdWwgb3Igbm90LgoKVGhpcyBpcyBhIGtlcm5lbCBjb21waWxl IHRlc3QgLSBpdCBoYXMgbm90aGluZyB0byBkbyB3aXRoIGFjdHVhbCBtYWNoaW5lCnRlc3Rpbmcu Cgo+IFRoZSBvdGhlciB0ZXN0IGlzIGZ1bmN0aW9uYWxpdHkgdGVzdC4gRm9yIGV4YW1wbGUsIGR1 cmluZyB0aGUgTUNFIEJJT1MKPiBkZXZlbG9wbWVudCwgdG8gc2VlIGlmIHRoZSBNQ0UgZnVuY3Rp b25zIE9LLCBpdCBtYXkgbmVlZCB0byBzZWxlY3QgYW5kCj4gdW5zZWxlY3QgTUNFIGluIGtlcm5l bCBmb3IgZG91YmxlIGNoZWNraW5nLgoKU2F5IHdoYXQgbm93PyEgV2hhdCB0ZXN0aW5nIGRvIHlv dSBkbyBpZiB5b3UgYm9vdCBhIGtlcm5lbCB3aGljaCBkb2Vzbid0CmV2ZW4gdXNlIHRoZSBmdW5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