Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1833651imu; Thu, 10 Jan 2019 03:56:43 -0800 (PST) X-Google-Smtp-Source: ALg8bN4XMx9Kl/2jZFKewCrrOzRMrCjsdNihs6Z+Rs1B2TauzbKZR95BgE//3FYhCsIoMpv9WWV3 X-Received: by 2002:a63:8c6:: with SMTP id 189mr9135954pgi.322.1547121403397; Thu, 10 Jan 2019 03:56:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547121403; cv=none; d=google.com; s=arc-20160816; b=KWL6OR1mnWvqesNWNFIm+A8P2n8lm4ruQ6YaZQvOwkuc8UXtSHiNvsfFsAf+sDXUcb Sfm5dAKxKZOCDlfE7/omTM7P0WXCypjUqIT5emNTN/nUI5BAGsTB758b/MpqzML1ynCC rRtyTtgm1j/Fy5+UrQvhVPPiDw93RBhC/Pena4p5uELMGKwEHbY8YxRbxKtEedpAmt/O 7v66m5xVd5UIfytQ769+x1eUtyJg5kr2WOxonNvhlG12wIaEqoe6EGkGc1tpQxopKV5e ec5UlTkHcj2dfPy8VTDGVhPo7GXKsD46LGmpKejD1AM5ZZ7n5ZicxosmxUu8Izt4FB02 OpPw== 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:dkim-signature; bh=UOHGl8Mr2k3j9sC85+ioN0Bx8EmFViP29gcUbCjXs3Y=; b=DshJyMksXklimS0M30tWh6o6aj1IkMH70Yr5fp1PICIw/5vAKs4DpaddbWO0m7SptD cDRcx57L4PJ5KukK8rQi8DKT/wmKGcSwjrV4t+LVurb591O6XTUeJeS8NynrU0qqsmtF Lqq8gfHCOpwfoBPZXLXk34cRAGyqLb01Aesm/pjiT7iNElhRRUo0cNduCEt+fPRB8kjm qkx/1NuIpF0C3vi/gkuRXQeCzw4kVOAxBfjTlfygT8fzjrARZ0BS88v3pSMjF2hmo1/C hoKR1ETyeWh3HGJIJYLyMTcJvXyf38iVOeDisu9laFYwvjDVjZW/YqD+OTdAXCjnw+QI nQeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=rCfqXSJn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j28si33353355pgm.160.2019.01.10.03.56.27; Thu, 10 Jan 2019 03:56:43 -0800 (PST) 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; dkim=pass header.i=@alien8.de header.s=dkim header.b=rCfqXSJn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727883AbfAJKxt (ORCPT + 99 others); Thu, 10 Jan 2019 05:53:49 -0500 Received: from mail.skyhub.de ([5.9.137.197]:33774 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726925AbfAJKxt (ORCPT ); Thu, 10 Jan 2019 05:53:49 -0500 Received: from zn.tnic (p200300EC2BC5CF00E0BB3AAFA35C49DB.dip0.t-ipconnect.de [IPv6:2003:ec:2bc5:cf00:e0bb:3aaf:a35c:49db]) (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 76E881EC047F; Thu, 10 Jan 2019 11:53:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1547117627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=UOHGl8Mr2k3j9sC85+ioN0Bx8EmFViP29gcUbCjXs3Y=; b=rCfqXSJnh+YBRBY7+isBTAvr7GVZzU7SHW07FgWrI4TDR9Gh/OhksSjSxklB0Gv6UkCg47 D9F/w+urUF4YbVpPkLVuQ//XQhkq7fwyXwN/9PxjkEz1c0xscF0YSozgzubZQs0faS0jN/ Lgvqu/mi9w1yya1UDHLEkgkb2cvjIMY= Date: Thu, 10 Jan 2019 11:53:39 +0100 From: Borislav Petkov To: Vitaly Kuznetsov Cc: Tony Luck , Reinette Chatre , Babu Moger , X86-ML , Linux Kernel Mailing List , Fenghua Yu , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Jan =?utf-8?Q?H=2E_Sch=C3=B6nherr?= , David Duncan Subject: Re: [PATCH] x86/intel_rdt: use rdmsr_safe() to workaround AWS host issue Message-ID: <20190110105339.GC17621@zn.tnic> References: <20181220134046.7916-1-vkuznets@redhat.com> <20181220161722.GD31403@zn.tnic> <51dcb13a-4751-47f5-1e01-f6731a2c6f3c@intel.com> <20521afe-09af-7acf-6f32-3f6e9a971091@intel.com> <20190109113915.GB15665@zn.tnic> <87bm4qoww4.fsf@vitty.brq.redhat.com> <20190109121445.GC15665@zn.tnic> <87woncol9s.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87woncol9s.fsf@vitty.brq.redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 10, 2019 at 11:32:47AM +0100, Vitaly Kuznetsov wrote: > The other thing is: how can we be sure that there's no hypervisor > exposing these feature already? Even if open-source hypervisors like > KVM/Xen don't do it it doesn't prove anything: there are numerous > proprietary hypervisors and who knows what they do. Well, we have this thing called CPUID which enumerates features - regardless of running on baremetal or on a hypervisor. But apparently some Intel CPUs dropped the ball there. Which caused the f*ckup we are in right now. If you really want to not foreclose that feature for guests - and it sounds like you do - the other thing I can think of is an early quirk *setting* those feature bits for those Intel CPUs which "forgot" to set them and then changing the resctrl code to test CPUID bits first. This way, the kernel is presented with a unified view on what is supported by the underlying machine - and that machine can be a HV or baremetal - kernel doesn't care. > The original issue which triggered the discussion was discovered on > AWS Xen where the host is buggy and I suggested a simple short-term > workaround And I'm sick'n'tired of simple-short term workarounds and band-aids and the kernel always bending because people dropped the ball and those being perpetuated, because, sure, we'll add one more "fix" on the pile, who cares... :-\ If AWS xen is broken, then that should be fixed - not the kernel. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.