Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp2963530rwo; Thu, 3 Aug 2023 19:04:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGlqlv+1EN7JQ//kE57XXJlC2hi2Oo3Z8bbdyKR16Q44TRi9zFlmkZJ1mDw+MA4L/QcPcA/ X-Received: by 2002:a2e:9c55:0:b0:2b9:eb8b:eeb1 with SMTP id t21-20020a2e9c55000000b002b9eb8beeb1mr310501ljj.37.1691114675113; Thu, 03 Aug 2023 19:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691114675; cv=none; d=google.com; s=arc-20160816; b=M72CK1g3bDO5RlvmLYJxKu58FEuyDuUoDW4Z7ENyTf8ZTw9Pb/nzvXmvFj54YUvJfr QFLIHWEKdM7cr+4mj9+xKTVdeaYVBnGSEj6y8M5GIooG1nsV4zoITW+8gnfMrJyJoQiF ukPdk+FuaEZLDeSn41cvJS9HlJJkY8BWfdeb3BSL2MD7Cf0KamPHCWxpsmo1lNJtRiJU CIAs8PbAaYZZ8jSuDekEEmDX+N2t6CW4o4G/o129atfb5td/GEcO0UvLUL5vb9Vl/d6x BDR017HxCwmqSGD+OQi6ZlxUJ+pX6F4UNJtGzm8KAmecBKTSwr733XCl6r95Ytjiv6FK Yd9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=T8aNKw/UNLB3LBKBzpaH6yDKHK0q+kXasr0Syu6S3ng=; fh=J37Q4aKtoxdyy+p3BpF2uV3z0maXFfn3A5M61jlSlO0=; b=ymcdwwjM++foWZa/CwnwaiYhwLOWxtg3z0yyanLln5iqi1fIwrWt/yewuKDlTqVSgn D4nnTXx+48jIoOloULoUejcuxLEBs6JSefYq7vu8aroMuF7Ro2bbeaCc4sASvMw1loAK L929myXgIPPMIVx698sAXGOQKgyntdbAFDbkcaUM0b12Q9zzIUEL7mq5XOisiES9eT/+ 8Fp355CmmFZXAXGitF973mms9cA2A8sJRsoQ8ZVl3w5JXg/DacE7kLpML267EkyqJc0L GqWFKWiN1C/QFZ+M8NWxnSy/Iq78ANr1nh6OnT3v//91F1hK21n6QkWLSl0pVZ+WFKDs mgbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=IGVVR7zM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk27-20020a170907767b00b00987b0a5f325si149181ejc.1043.2023.08.03.19.04.05; Thu, 03 Aug 2023 19:04:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=IGVVR7zM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232462AbjHDAlq (ORCPT + 99 others); Thu, 3 Aug 2023 20:41:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232585AbjHDAla (ORCPT ); Thu, 3 Aug 2023 20:41:30 -0400 Received: from mail-pl1-x649.google.com (mail-pl1-x649.google.com [IPv6:2607:f8b0:4864:20::649]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25E1C46A3 for ; Thu, 3 Aug 2023 17:41:17 -0700 (PDT) Received: by mail-pl1-x649.google.com with SMTP id d9443c01a7336-1bc49d0cb4aso4360845ad.2 for ; Thu, 03 Aug 2023 17:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1691109676; x=1691714476; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=T8aNKw/UNLB3LBKBzpaH6yDKHK0q+kXasr0Syu6S3ng=; b=IGVVR7zM3y9+tESfP6t1H4ZALLY2Wtbifu0cxbQ9+0uvIo75P26BdxrmD4eav6le4X q/ZltMU4nAe3ANaieqIZw1YtB7mE2gpW7pvEMK08+cnXLEAPUyF2a1MXZ4YfvYaSL7FE UnFMcBOt2Zm1kDNOjOcVF8K8kokwquIhOeF11je+DTr9Z4gg9Rvc82+k60GE4tVgYqq/ vsqHfUmWoBY2UoQy7/JcVfLgywNJQSnBKbFSMhr6Smi/M22QiiXXqk0eJAQb2i1tVWCU ktjqBHAQwRft7gejjJyWVvUkMxRUtsrPw+eGKhtxRtXoc/RdW5JrSvnbAJwvw2YtjtQi 6qwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691109676; x=1691714476; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=T8aNKw/UNLB3LBKBzpaH6yDKHK0q+kXasr0Syu6S3ng=; b=A/96tlvYh9ghaJx8FFf6P3MxxCr6v1jkMIte9DbifNxGkAwIrBt018FFYLxcpjrUwO /KLT/T/8Rz6Kz3tik4r0wHbr/kN15Ff2AxaeyjaFOD1uQm9ro8YUQHjkWE+aYa1snpfa wysTNHn2ZCf92JDPJ9EoPClrWwYxoYefl6CVoAlQ+0VQEf+VHDwh7rpqZ+YETEDGIHYY VwmnoSGbALinLkGhk9mtxMBdrhf2YQAcTj+m8FvfXMbErsoYwr//sBDe84y87iGO10nZ qtvHJUl3Cimi7ALWZGpzRJtwIy01bMZywaDEMinRi+zbnv9ZP/1GeF4vqBIBCP3cymwl YBzQ== X-Gm-Message-State: AOJu0YyCpRFTA1YhTFdWsnZrPOmDjn786jSAlTGlFIVVoXARFF6hoX7F uChiv1MwA6dhconaydUNUQqfDDAmumc= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:902:c40b:b0:1bc:2547:b184 with SMTP id k11-20020a170902c40b00b001bc2547b184mr1208plk.1.1691109676363; Thu, 03 Aug 2023 17:41:16 -0700 (PDT) Date: Thu, 3 Aug 2023 17:41:06 -0700 In-Reply-To: <20230729013535.1070024-1-seanjc@google.com> Mime-Version: 1.0 References: <20230729013535.1070024-1-seanjc@google.com> X-Mailer: git-send-email 2.41.0.585.gd2178a4bd4-goog Message-ID: <169110211029.1965858.14581735700060429373.b4-ty@google.com> Subject: Re: [PATCH v4 00/29] drm/i915/gvt: KVM: KVMGT fixes and page-track cleanups From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini , Zhenyu Wang , Zhi Wang Cc: kvm@vger.kernel.org, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Yan Zhao , Yongwei Ma , Ben Gardon Content-Type: text/plain; charset="utf-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 28 Jul 2023 18:35:06 -0700, Sean Christopherson wrote: > Fix a handful of minor bugs in KVMGT, and overhaul KVM's page-track APIs > to provide a leaner and cleaner interface. The motivation for this > series is to (significantly) reduce the number of KVM APIs that KVMGT > uses, with a long-term goal of making all kvm_host.h headers KVM-internal. > > If there are no objections or issues, my plan is to take this through the > KVM tree for 6.6 (I had it ready early last week, and then forgot to actually > post v4, /facepalm). > > [...] Applied to kvm-x86 mmu, thanks! [01/29] drm/i915/gvt: Verify pfn is "valid" before dereferencing "struct page" https://github.com/kvm-x86/linux/commit/865327865164 [02/29] drm/i915/gvt: remove interface intel_gvt_is_valid_gfn https://github.com/kvm-x86/linux/commit/823ab2ea8429 [03/29] drm/i915/gvt: Verify hugepages are contiguous in physical address space https://github.com/kvm-x86/linux/commit/e27395fb1b87 [04/29] drm/i915/gvt: Don't try to unpin an empty page range https://github.com/kvm-x86/linux/commit/6a718c54c2ee [05/29] drm/i915/gvt: Put the page reference obtained by KVM's gfn_to_pfn() https://github.com/kvm-x86/linux/commit/f969ecabe30b [06/29] drm/i915/gvt: Explicitly check that vGPU is attached before shadowing https://github.com/kvm-x86/linux/commit/537eef32e720 [07/29] drm/i915/gvt: Error out on an attempt to shadowing an unknown GTT entry type https://github.com/kvm-x86/linux/commit/c94811471997 [08/29] drm/i915/gvt: Don't rely on KVM's gfn_to_pfn() to query possible 2M GTT https://github.com/kvm-x86/linux/commit/f018c319cc2f [09/29] drm/i915/gvt: Use an "unsigned long" to iterate over memslot gfns https://github.com/kvm-x86/linux/commit/4879a4370304 [10/29] drm/i915/gvt: Drop unused helper intel_vgpu_reset_gtt() https://github.com/kvm-x86/linux/commit/ac5e77621712 [11/29] drm/i915/gvt: Protect gfn hash table with vgpu_lock https://github.com/kvm-x86/linux/commit/49a83e190b5b [12/29] KVM: x86/mmu: Move kvm_arch_flush_shadow_{all,memslot}() to mmu.c https://github.com/kvm-x86/linux/commit/2f502998b046 [13/29] KVM: x86/mmu: Don't rely on page-track mechanism to flush on memslot change https://github.com/kvm-x86/linux/commit/e2fe84fb5eae [14/29] KVM: x86/mmu: Don't bounce through page-track mechanism for guest PTEs https://github.com/kvm-x86/linux/commit/f1c58cdb8e04 [15/29] KVM: drm/i915/gvt: Drop @vcpu from KVM's ->track_write() hook https://github.com/kvm-x86/linux/commit/3f8eb1d7d3ee [16/29] KVM: x86: Reject memslot MOVE operations if KVMGT is attached https://github.com/kvm-x86/linux/commit/aa611a99adb4 [17/29] drm/i915/gvt: Don't bother removing write-protection on to-be-deleted slot https://github.com/kvm-x86/linux/commit/a41e34b05da7 [18/29] KVM: x86: Add a new page-track hook to handle memslot deletion https://github.com/kvm-x86/linux/commit/cc49e12d8d3b [19/29] drm/i915/gvt: switch from ->track_flush_slot() to ->track_remove_region() https://github.com/kvm-x86/linux/commit/b9ae8a09f357 [20/29] KVM: x86: Remove the unused page-track hook track_flush_slot() https://github.com/kvm-x86/linux/commit/1265fb534fa1 [21/29] KVM: x86/mmu: Move KVM-only page-track declarations to internal header https://github.com/kvm-x86/linux/commit/c87966b313cc [22/29] KVM: x86/mmu: Use page-track notifiers iff there are external users https://github.com/kvm-x86/linux/commit/b5e33f265acd [23/29] KVM: x86/mmu: Drop infrastructure for multiple page-track modes https://github.com/kvm-x86/linux/commit/2431c9ab231a [24/29] KVM: x86/mmu: Rename page-track APIs to reflect the new reality https://github.com/kvm-x86/linux/commit/4b42f39917c1 [25/29] KVM: x86/mmu: Assert that correct locks are held for page write-tracking https://github.com/kvm-x86/linux/commit/21e0e1efd880 [26/29] KVM: x86/mmu: Bug the VM if write-tracking is used but not enabled https://github.com/kvm-x86/linux/commit/6d6ff9e6db15 [27/29] KVM: x86/mmu: Drop @slot param from exported/external page-track APIs https://github.com/kvm-x86/linux/commit/ca181aa50724 [28/29] KVM: x86/mmu: Handle KVM bookkeeping in page-track APIs, not callers https://github.com/kvm-x86/linux/commit/eae2d71635a1 [29/29] drm/i915/gvt: Drop final dependencies on KVM internal details https://github.com/kvm-x86/linux/commit/2d28b1230c1c -- https://github.com/kvm-x86/linux/tree/next https://github.com/kvm-x86/linux/tree/fixes