From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA3CFC433EF for ; Mon, 27 Sep 2021 12:54:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4B9A61052 for ; Mon, 27 Sep 2021 12:54:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234436AbhI0Mzx (ORCPT ); Mon, 27 Sep 2021 08:55:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:30130 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234396AbhI0Mzv (ORCPT ); Mon, 27 Sep 2021 08:55:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1632747253; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vqmCLZUE/RvdZRryhurm8ZYGJCB6f4ZHjcfNNE4aW4s=; b=PODrkc9JYKOdWTwOBmSdo36BCDjrhdMqFxZ5pNXzZUOLF77M0BMSVk+mWHEV/sJu5eUVuK 2R5+BbQ0e6jq15fdYM31pyztzC7yy91B+2PWwr+BgMLerjWEYhnKZIJCYgg7gRrkN8crmz 5fKJ4kR73rEMxbG9Bfa02P8XX4DdUgk= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-561-3EJklWZwM7uPvmc8DPY3HA-1; Mon, 27 Sep 2021 08:54:12 -0400 X-MC-Unique: 3EJklWZwM7uPvmc8DPY3HA-1 Received: by mail-ed1-f70.google.com with SMTP id h15-20020aa7de0f000000b003d02f9592d6so17609429edv.17 for ; Mon, 27 Sep 2021 05:54:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=vqmCLZUE/RvdZRryhurm8ZYGJCB6f4ZHjcfNNE4aW4s=; b=wlUPdU9nXfVZ2uP+paAzDbQ/N+bTlkDhceSCQl7IwaWgbN4Ow2iO6wpkbtCQ/m/IpV wmBUc3AvSHtHNQT5SY56SbfHmf19gvAVPC3xxdA/lW8/aiy776d1NmoGB2LBZAW6DaHp bCqbJcS+SMpYExbJ+Hqbnp1Fn6IrVKwrCpmf9HW5YzG6oVqPjugVzFD0RyCXSCCsep1v Io52hTMN5KPWoB/1eeoF45Ta7qBnF046Fp+hjrhOWzwtUhrdQWIBNK/Bxssa3yofJcRk oeN4503HMJaWnSJWEvhwtzE4X9z+2LECXrmYpndyTFMV8fgKTSiPvhWRNabx2IaIJiNj XyqA== X-Gm-Message-State: AOAM532kuTakbWx3gVNuxFqEvIgeH8+TgAGB/iuBA0RSCUiipxTlIz0G eaEsmLiYCIQAaixhYyrlv9mjJkMqgYX0PBHxqBwtZrIeRhbk6BwyZ4MAzcxKsyA/cufklXAtpWR 3ICdZ8G1euRmeIGy+eDnmTrXO X-Received: by 2002:a05:6402:336:: with SMTP id q22mr23230111edw.53.1632747251022; Mon, 27 Sep 2021 05:54:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwh2KYg0dnn8JVSWbgyFbmkyYWSZ1VqCAk6GrPkabmD/MjIijY41QSlBI2wv4H6jHN8FyRGNw== X-Received: by 2002:a05:6402:336:: with SMTP id q22mr23230070edw.53.1632747250829; Mon, 27 Sep 2021 05:54:10 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id j6sm8611436ejk.114.2021.09.27.05.54.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Sep 2021 05:54:10 -0700 (PDT) Message-ID: Date: Mon, 27 Sep 2021 14:54:08 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: [PATCH] KVM: x86: Expose Predictive Store Forwarding Disable Content-Language: en-US To: Borislav Petkov Cc: Babu Moger , tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, hpa@zytor.com, seanjc@google.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, tony.luck@intel.com, peterz@infradead.org, kyung.min.park@intel.com, wei.huang2@amd.com, jgross@suse.com, andrew.cooper3@citrix.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <163244601049.30292.5855870305350227855.stgit@bmoger-ubuntu> From: Paolo Bonzini In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/09/21 14:28, Borislav Petkov wrote: > On Mon, Sep 27, 2021 at 02:14:52PM +0200, Paolo Bonzini wrote: >> Right, not which MSR to write but which value to write. It doesn't know >> that the PSF disable bit is valid unless the corresponding CPUID bit is set. > > There's no need for the separate PSF CPUID bit yet. We have decided for > now to not control PSF separately but disable it through SSB. Please > follow this thread: There are other guests than Linux. This patch is just telling userspace that KVM knows what the PSFD bit is. It is also possible to expose the bit in KVM without having any #define in cpufeatures.h or without the kernel using it. For example KVM had been exposing FSGSBASE long before Linux supported it. That said, the patch is incomplete because it should also add the new CPUID bit to guest_has_spec_ctrl_msr (what KVM *really* cares about is not the individual bits, only whether SPEC_CTRL exists at all). Paolo