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 767B1C6FD1D for ; Mon, 20 Mar 2023 17:00:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233157AbjCTRAu (ORCPT ); Mon, 20 Mar 2023 13:00:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233450AbjCTRAM (ORCPT ); Mon, 20 Mar 2023 13:00:12 -0400 Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 404A57DA2 for ; Mon, 20 Mar 2023 09:53:53 -0700 (PDT) Received: by mail-oi1-x22c.google.com with SMTP id y184so9166503oiy.8 for ; Mon, 20 Mar 2023 09:53:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1679331168; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1e5Rkc1xXZveL9YUdD5abhg2y+JLZGAXin0mZccVnf4=; b=gnrwM3rvK6ih7m2hFKr6/1HS4fFHd+7OczbqHtTjdR+JtNAAXC3z4igtpKPqyzQ9a9 /trz7ALGddy8zPVv6jGjZOHsKSwiA2ApBybwwu8oElO2uSgu3gA/l4F8gfPfaRM3r8FO 3xwMU04R9iIyQCLsPBsFxYtFQbjTk60+b8yObejJG+eW8aFemnsaWigr6yLs06pgGCR6 4Js2WeqnD4viBqbTecDW3U/0x/KyK7ykP6iXNkJGnlI5gK6i5lGU38mIqSzXWz/5NJoL k2t6Szw3YaFqOfyTEXrJDxAehDmIu+VRpZyeEA2GG+WWbbnJ7QW9S9jwcNpOiot7jtpP QQFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679331168; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1e5Rkc1xXZveL9YUdD5abhg2y+JLZGAXin0mZccVnf4=; b=TlqmfInqeF6lHectd9Kz1JpJJdEiyamq4Z/jJQqhNWPn4LwJ39rQhQD0NIIxqNNlKv 8FsuaE5TShOpSP46PZE/Dw0JIuZchNLK63GN5bUPJZzY/zyWu9cPaV2/P6Tb00PrH4mc ShU40x3o/ZSLhBwmzc3WmPZkwzXTHXIOC8OCLeumdFLZNwx/BD8gwKhsmMu0AGOX+Ewi J0R1YLOCzr1VXPB4uwT88N9OMgMucM/Tzf31D+Xv/jdmhi2nTflU/FNEQhxnxrQVCUJb gpEZuAl/H/N8QJyNrFs1WNbkApcDaloPr/uTf5G8MaSAfyvCAJv/CJTAkKA5Y6V5LTng X0Ow== X-Gm-Message-State: AO0yUKVru8WLC/BHI3Do4tHdHtlvn7Jy6VFdX+yvYXXIhuPBSDMgSWEU v69A7apAtPgnFnObulAu9Jc5FzG7JpsLjPnmdD512g== X-Google-Smtp-Source: AK7set8/xrKGP6VMJRGxUiZj3oCNJdRO+eVrkzyh8Cbf4EwHf1wuzOrN2vO5hdvEeEmad7EPGQ3SjWkVqUDaseF2zpI= X-Received: by 2002:aca:2b16:0:b0:384:27f0:bd0a with SMTP id i22-20020aca2b16000000b0038427f0bd0amr139057oik.9.1679331166593; Mon, 20 Mar 2023 09:52:46 -0700 (PDT) MIME-Version: 1.0 References: <20230201132905.549148-1-eesposit@redhat.com> In-Reply-To: <20230201132905.549148-1-eesposit@redhat.com> From: Jim Mattson Date: Mon, 20 Mar 2023 09:52:35 -0700 Message-ID: Subject: Re: [PATCH 0/3] KVM: support the cpu feature FLUSH_L1D To: Emanuele Giuseppe Esposito Cc: kvm@vger.kernel.org, Ben Serebrin , Peter Shier , Sean Christopherson , Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Maxim Levitsky , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 1, 2023 at 5:29=E2=80=AFAM Emanuele Giuseppe Esposito wrote: > > As the title suggest, if the host cpu supports flush_l1d flag and > QEMU/userspace wants to boot a VM with the same flag (or emulate same > host features), KVM should be able to do so. > > Patch 3 is the main fix, because if flush_l1d is not advertised by > KVM, a linux VM will erroneously mark > /sys/devices/system/cpu/vulnerabilities/mmio_stale_data > as vulnerable, even though it isn't since the host has the feature > and takes care of this. Not sure what would happen in the nested case tho= ugh. > > Patch 1 and 2 are just taken and refactored from Jim Mattison's serie tha= t it > seems was lost a while ago: > https://patchwork.kernel.org/project/kvm/patch/20180814173049.21756-1-jma= ttson@google.com/ > > I thought it was worth re-posting them. What has changed since the patches were originally posted, and Konrad dissed them?