From patchwork Wed Sep 22 04:58:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Stevens X-Patchwork-Id: 12509465 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=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham 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 23B0AC433EF for ; Wed, 22 Sep 2021 04:59:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0578A60F9D for ; Wed, 22 Sep 2021 04:59:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231802AbhIVFAj (ORCPT ); Wed, 22 Sep 2021 01:00:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231734AbhIVFAj (ORCPT ); Wed, 22 Sep 2021 01:00:39 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3962C061575 for ; Tue, 21 Sep 2021 21:59:09 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id l6so939091plh.9 for ; Tue, 21 Sep 2021 21:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gqSb6j4QRhVbcfEJejcSoBsQvuv4/cNZIL9rAN4Q0hA=; b=mt/9jHsDCA1xTg0Mio6XFFkBY6kanMnDTiik24deES2GxH2eBfIxjyTrw3wjYpohT/ 2XjAV3srDZ1wH65KAXKgIGA/G11CdTopvJJDjGvzpy5+WS92lTKTeeIqwq/CLFWaXttG pjXUQ9qqlnRpjg7Jk0wi8qGljiTsUdrPEu7LQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gqSb6j4QRhVbcfEJejcSoBsQvuv4/cNZIL9rAN4Q0hA=; b=U0PluNDHhZbBFIom2U/ocu8o7QjZECXFD1SD9mEfscnh9IiWMOh8q0eYSbL3kCT/BT xJyYZmuSmi9x4vUpR140+6Hcd2KoW8oVjnjrgFjC5U0pMgNb5GoUV8uvIARGPDjUtxCc PX0zSx0wD6vBQqM3j9hcXxDl3pQ9cZc4GSQs3fO1vqr3DZbiGZq036mp6tcMLa+nbtEk RSqmsQ9zzTDzmTwbwhoeQPicLKuJ4aCCyNei7sRUA7fAcDXovz56QoUey+wf9RGgOFO7 B3gF8q90Q4SWtxsQZveYSomeOLR4HlN2NNM9e6cW0dxbskcaeXCw02W+KOj7dwrho2Vl CDFw== X-Gm-Message-State: AOAM531bumD2pabKxNRn7Z2a/pvQXAg6iXaZ2I/s1+FG/dMDxPMrAF3Y S20oVU9aAdF9yLCVTV8cguphDg== X-Google-Smtp-Source: ABdhPJx5Td2464n+D2Ic7uFsDSlCR+7CTyMGJFroTLZE5Pi2ikM1KBsAsBpyc3VCQnBcFmm6AFfZjg== X-Received: by 2002:a17:90a:8505:: with SMTP id l5mr9285899pjn.173.1632286749291; Tue, 21 Sep 2021 21:59:09 -0700 (PDT) Received: from localhost ([2401:fa00:8f:203:9a20:20f1:af4d:610c]) by smtp.gmail.com with UTF8SMTPSA id fr17sm688940pjb.17.2021.09.21.21.59.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Sep 2021 21:59:09 -0700 (PDT) From: David Stevens X-Google-Original-From: David Stevens To: Paolo Bonzini Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, David Stevens Subject: [PATCH v2 1/2] KVM: x86: add config for non-kvm users of page tracking Date: Wed, 22 Sep 2021 13:58:58 +0900 Message-Id: <20210922045859.2011227-2-stevensd@google.com> X-Mailer: git-send-email 2.33.0.464.g1972c5931b-goog In-Reply-To: <20210922045859.2011227-1-stevensd@google.com> References: <20210922045859.2011227-1-stevensd@google.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: David Stevens Add a config option that allows kvm to determine whether or not there are any external users of page tracking. Signed-off-by: David Stevens --- arch/x86/kvm/Kconfig | 3 +++ drivers/gpu/drm/i915/Kconfig | 1 + 2 files changed, 4 insertions(+) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index ac69894eab88..619186138176 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -129,4 +129,7 @@ config KVM_MMU_AUDIT This option adds a R/W kVM module parameter 'mmu_audit', which allows auditing of KVM MMU events at runtime. +config KVM_EXTERNAL_WRITE_TRACKING + bool + endif # VIRTUALIZATION diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig index f960f5d7664e..107762427648 100644 --- a/drivers/gpu/drm/i915/Kconfig +++ b/drivers/gpu/drm/i915/Kconfig @@ -126,6 +126,7 @@ config DRM_I915_GVT_KVMGT depends on DRM_I915_GVT depends on KVM depends on VFIO_MDEV + select KVM_EXTERNAL_WRITE_TRACKING default n help Choose this option if you want to enable KVMGT support for