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 X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 752EEC48BE5 for ; Tue, 15 Jun 2021 22:26:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 61E96600EF for ; Tue, 15 Jun 2021 22:26:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230137AbhFOW2w (ORCPT ); Tue, 15 Jun 2021 18:28:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229898AbhFOW2t (ORCPT ); Tue, 15 Jun 2021 18:28:49 -0400 Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A262C06175F for ; Tue, 15 Jun 2021 15:26:43 -0700 (PDT) Received: by mail-ot1-x32a.google.com with SMTP id 5-20020a9d01050000b02903c700c45721so497907otu.6 for ; Tue, 15 Jun 2021 15:26:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FsiIJ6gH+cU3t60sFGR1DbzvdELnSg+yPMk5670wQXo=; b=Q0ofkRTFT3ZDOnLZVY81r3O4q6S/NA+MJPZJyS+9u2Wmk/gMwjefLFQD9jzG1+EAWG ASYilro20kQ3DTU+4XhNFViaqKSfYHL3FXGLFRx251gh3kWGW6BXVsOXavgVUpCt5gLR 5O9czH5I8/sb0SEohtAVK4oUTERJ3TRpyPuO/SezbrnelMyRJIqagkavgRo3ir1SoqUq CmFcQkffAZfuWktrzyof5vcrUN7Br7c8Z4FgERElv36W1u3VzvTgAHCzzAldcmp93pwl Or3pN7A5ispeSPdvHYooDwj4ifekDi2EUOwE3dR2GWqU+owXzqzqmh+FIGBpMWhhlfla PgdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FsiIJ6gH+cU3t60sFGR1DbzvdELnSg+yPMk5670wQXo=; b=PTNSPwLa+/Ia2P/XTK2SsYnPrVncteSXK5Aqj/vUwPD/uvSR5ecG9JdosalPvDUuPi ITgOtCLEJ31ukfXhEYi28djeKJdNtCkJPzb8kEiWoA0bulujIwEydQW6MBG0eH273qc7 CVnRXKio2FcjR9qwNcPCeCp0RZyNQLu3NvbBl+SEHwX0OJSdssSF6R/HNS1IKHOjM9E8 MvyNOl/rhlnHFyL7HEmmgAnm/9gWnDFXwyDDN/buUlnSkXUeRQgSsp/ZnXbzHnKQCo+X r2TJvcWaIvnWIIkLihX0IhS9hD+04Fy9Y6QADo9apR9s7AO2nVvADpYcJ6Xwp7E81QTh CasA== X-Gm-Message-State: AOAM532BRaG8yPhkXU2bwawJ9SDdkaX95hSUaaCZqgaFGEKsLg2gkxWb CxJw+eyxFdk8YZqrWjwSHSB4peq+D+Bt+zac69mJ9A== X-Google-Smtp-Source: ABdhPJxjzOP1d/z0YZzl/rWoWGhPgD57DFtqJMJ9o7bNgqRLegLC4LRLdyYe7A4Hx7rgPx1ytOs2uhlPmRKSDxHtpZs= X-Received: by 2002:a05:6830:2011:: with SMTP id e17mr1143000otp.295.1623796002490; Tue, 15 Jun 2021 15:26:42 -0700 (PDT) MIME-Version: 1.0 References: <20210615164535.2146172-1-seanjc@google.com> <20210615164535.2146172-2-seanjc@google.com> In-Reply-To: <20210615164535.2146172-2-seanjc@google.com> From: Jim Mattson Date: Tue, 15 Jun 2021 15:26:31 -0700 Message-ID: Subject: Re: [PATCH 1/4] KVM: VMX: Refuse to load kvm_intel if EPT and NX are disabled To: Sean Christopherson Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , kvm list , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 15, 2021 at 9:45 AM Sean Christopherson wrote: > > Refuse to load KVM if NX support is not available and EPT is not enabled. > Shadow paging has assumed NX support since commit 9167ab799362 ("KVM: > vmx, svm: always run with EFER.NXE=1 when shadow paging is active"), so > for all intents and purposes this has been a de facto requirement for > over a year. > > Do not require NX support if EPT is enabled purely because Intel CPUs let > firmware disable NX support via MSR_IA32_MISC_ENABLES. If not for that, > VMX (and KVM as a whole) could require NX support with minimal risk to > breaking userspace. > > Fixes: 9167ab799362 ("KVM: vmx, svm: always run with EFER.NXE=1 when shadow paging is active") > Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson