From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941438AbcIHNTq (ORCPT ); Thu, 8 Sep 2016 09:19:46 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:44263 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932307AbcIHNTp (ORCPT ); Thu, 8 Sep 2016 09:19:45 -0400 Date: Thu, 8 Sep 2016 15:17:00 +0200 (CEST) From: Thomas Gleixner To: Fenghua Yu cc: "H. Peter Anvin" , Ingo Molnar , Tony Luck , Peter Zijlstra , Tejun Heo , Borislav Petkov , Stephane Eranian , Marcelo Tosatti , David Carrillo-Cisneros , Shaohua Li , Ravi V Shankar , Vikas Shivappa , Sai Prakhya , linux-kernel , x86 Subject: Re: [PATCH v2 07/33] x86/intel_rdt: Add support for Cache Allocation detection In-Reply-To: <1473328647-33116-8-git-send-email-fenghua.yu@intel.com> Message-ID: References: <1473328647-33116-1-git-send-email-fenghua.yu@intel.com> <1473328647-33116-8-git-send-email-fenghua.yu@intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 8 Sep 2016, Fenghua Yu wrote: > + cpuid_count(0x00000010, 1, &eax, &ebx, &ecx, &edx); > + c->x86_l3_max_closid = edx + 1; > + c->x86_l3_max_cbm_len = eax + 1; According to the SDM: EAX Bits 4:0: Length of the capacity bit mask for the corresponding ResID. Bits 31:05: Reserved EDX Bits 15:0: Highest COS number supported for this ResID. Bits 31:16: Reserved So why are we assuming that bits 31-5 of EAX and 16-31 of EDX are going to be zero forever and if not that they are just extending the existing bits? If that's the case then we don't need to mask out the upper bits, but the code wants a proper comment about this. Thanks, tglx