Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 909ECC64EC4 for ; Tue, 28 Feb 2023 22:50:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229806AbjB1WuW (ORCPT ); Tue, 28 Feb 2023 17:50:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbjB1WuT (ORCPT ); Tue, 28 Feb 2023 17:50:19 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60A90360A5; Tue, 28 Feb 2023 14:50:16 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (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 D503C1EC04DA; Tue, 28 Feb 2023 23:50:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1677624613; 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=sf2h3hi220E781ncSCCtEipOWUHmkqQMWL7hGDGs3OU=; b=LEYXMPAFbAW4NWRuAf3pW92Ggky+YFQ2w/c6gX6ukaNNjIMfuSn6VUMA8o3A8TsM4MMja1 5h6UewXSwWZL6AffZ+tL3vrX+Z/nkmqybH6gqm7KoIGCahS9S6452n0QJhxqsWu4tvKGnl PlEt0VoBxw2lgPsNdSK6iAF0Ca00DiI= Date: Tue, 28 Feb 2023 23:50:09 +0100 From: Borislav Petkov To: Takahiro Itazuri Cc: dave.hansen@linux.intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com, pbonzini@redhat.com, seanjc@google.com, tglx@linutronix.de, x86@kernel.org, zulinx86@gmail.com Subject: Re: [PATCH 0/2] KVM: x86: Propagate AMD-specific IBRS bits to guests Message-ID: References: <20230228222416.61484-1-itazur@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230228222416.61484-1-itazur@amazon.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 28, 2023 at 10:24:16PM +0000, Takahiro Itazuri wrote: > I'm still a kernel newbie and I don't have a strong opinion for that. > I just thought it would be helpful if the KVM_GET_SUPPORTED_CPUID API > returns the same security information as the host, as long as it is > harmless. Not harmless - cpufeatures.h should contain flags which the kernel uses and not *every* CPUID bit out there. If you want to advertize flags to guests, see arch/x86/kvm/reverse_cpuid.h and the KVM-only feature flags. You can add them there. > https://documentation.suse.com/sles/15-SP1/html/SLES-all/cha-spectre.html Well, I was against adding that to the documentation when I was at SUSE but ... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette