All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Yan Zhao <yan.y.zhao@intel.com>
Cc: kvm@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, Ben Gardon <bgardon@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	intel-gvt-dev@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 00/27] drm/i915/gvt: KVM: KVMGT fixes and page-track cleanups
Date: Wed, 4 Jan 2023 01:01:13 +0000	[thread overview]
Message-ID: <Y7TP2R01VAbmmfcT@google.com> (raw)
In-Reply-To: <Y6VvVrYURd/an3Zp@yzhao56-desk.sh.intel.com>

On Fri, Dec 23, 2022, Yan Zhao wrote:
> On Fri, Dec 23, 2022 at 12:57:12AM +0000, Sean Christopherson wrote:
> > Fix a variety of found-by-inspection 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.  That said, I think the cleanup itself is worthwhile,
> > e.g. KVMGT really shouldn't be touching kvm->mmu_lock.
> > 
> > Note!  The KVMGT changes are compile tested only as I don't have the
> > necessary hardware (AFAIK).  Testing, and lots of it, on the KVMGT side
> > of things is needed and any help on that front would be much appreciated.
> hi Sean,
> Thanks for the patch!
> Could you also provide the commit id that this series is based on?

The commit ID is provided in the cover letter:

  base-commit: 9d75a3251adfbcf444681474511b58042a364863

Though you might have a hard time finding that commit as it's from an old
version of kvm/queue that's probably since been force pushed.

> I applied them on top of latest master branch (6.1.0+,
> 8395ae05cb5a2e31d36106e8c85efa11cda849be) in repo
> https://github.com/torvalds/linux.git, yet met some conflicts and I
> fixed them manually. (patch 11 and patch 25).
> 
> A rough test shows that below mutex_init is missing.
> But even with this fix, I still met guest hang during guest boots up.
> Will look into it and have a detailed review next week.

Thanks again for the reviews and testing!  I'll get a v2 out in the next week or
so (catching up from holidays) and will be more explicit in documenting the base
version.

WARNING: multiple messages have this Message-ID (diff)
From: Sean Christopherson <seanjc@google.com>
To: Yan Zhao <yan.y.zhao@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Zhenyu Wang <zhenyuw@linux.intel.com>,
	Zhi Wang <zhi.a.wang@intel.com>,
	kvm@vger.kernel.org, intel-gvt-dev@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Ben Gardon <bgardon@google.com>
Subject: Re: [PATCH 00/27] drm/i915/gvt: KVM: KVMGT fixes and page-track cleanups
Date: Wed, 4 Jan 2023 01:01:13 +0000	[thread overview]
Message-ID: <Y7TP2R01VAbmmfcT@google.com> (raw)
In-Reply-To: <Y6VvVrYURd/an3Zp@yzhao56-desk.sh.intel.com>

On Fri, Dec 23, 2022, Yan Zhao wrote:
> On Fri, Dec 23, 2022 at 12:57:12AM +0000, Sean Christopherson wrote:
> > Fix a variety of found-by-inspection 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.  That said, I think the cleanup itself is worthwhile,
> > e.g. KVMGT really shouldn't be touching kvm->mmu_lock.
> > 
> > Note!  The KVMGT changes are compile tested only as I don't have the
> > necessary hardware (AFAIK).  Testing, and lots of it, on the KVMGT side
> > of things is needed and any help on that front would be much appreciated.
> hi Sean,
> Thanks for the patch!
> Could you also provide the commit id that this series is based on?

The commit ID is provided in the cover letter:

  base-commit: 9d75a3251adfbcf444681474511b58042a364863

Though you might have a hard time finding that commit as it's from an old
version of kvm/queue that's probably since been force pushed.

> I applied them on top of latest master branch (6.1.0+,
> 8395ae05cb5a2e31d36106e8c85efa11cda849be) in repo
> https://github.com/torvalds/linux.git, yet met some conflicts and I
> fixed them manually. (patch 11 and patch 25).
> 
> A rough test shows that below mutex_init is missing.
> But even with this fix, I still met guest hang during guest boots up.
> Will look into it and have a detailed review next week.

Thanks again for the reviews and testing!  I'll get a v2 out in the next week or
so (catching up from holidays) and will be more explicit in documenting the base
version.

  reply	other threads:[~2023-01-04  1:01 UTC|newest]

Thread overview: 126+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-23  0:57 [Intel-gfx] [PATCH 00/27] drm/i915/gvt: KVM: KVMGT fixes and page-track cleanups Sean Christopherson
2022-12-23  0:57 ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 01/27] drm/i915/gvt: Verify pfn is "valid" before dereferencing "struct page" Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 02/27] KVM: x86/mmu: Factor out helper to get max mapping size of a memslot Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 03/27] drm/i915/gvt: Incorporate KVM memslot info into check for 2MiB GTT entry Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-28  5:42   ` [Intel-gfx] " Yan Zhao
2022-12-28  5:42     ` Yan Zhao
2023-01-03 21:13     ` [Intel-gfx] " Sean Christopherson
2023-01-03 21:13       ` Sean Christopherson
2023-01-05  3:07       ` [Intel-gfx] " Yan Zhao
2023-01-05  3:07         ` Yan Zhao
2023-01-05 17:40         ` [Intel-gfx] " Sean Christopherson
2023-01-05 17:40           ` Sean Christopherson
2023-01-06  5:56           ` [Intel-gfx] " Yan Zhao
2023-01-06  5:56             ` Yan Zhao
2023-01-06 23:01             ` [Intel-gfx] " Sean Christopherson
2023-01-06 23:01               ` Sean Christopherson
2023-01-09  9:58               ` [Intel-gfx] " Yan Zhao
2023-01-09  9:58                 ` Yan Zhao
2023-01-11 17:55                 ` [Intel-gfx] " Sean Christopherson
2023-01-11 17:55                   ` Sean Christopherson
2023-01-19  2:58                   ` [Intel-gfx] " Zhenyu Wang
2023-01-19  2:58                     ` Zhenyu Wang
2023-01-19  5:26                     ` [Intel-gfx] " Yan Zhao
2023-01-19  5:26                       ` Yan Zhao
2023-02-23 20:41                       ` [Intel-gfx] " Sean Christopherson
2023-02-23 20:41                         ` Sean Christopherson
2023-02-24  5:09                         ` [Intel-gfx] " Yan Zhao
2023-02-24  5:09                           ` Yan Zhao
2023-01-12  8:31         ` [Intel-gfx] " Yan Zhao
2023-01-12  8:31           ` Yan Zhao
2022-12-23  0:57 ` [Intel-gfx] [PATCH 04/27] drm/i915/gvt: Verify VFIO-pinned page is THP when shadowing 2M gtt entry Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 05/27] drm/i915/gvt: Put the page reference obtained by KVM's gfn_to_pfn() Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 06/27] drm/i915/gvt: Don't rely on KVM's gfn_to_pfn() to query possible 2M GTT Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 07/27] drm/i915/gvt: Use an "unsigned long" to iterate over memslot gfns Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 08/27] drm/i915/gvt: Hoist acquisition of vgpu_lock out to kvmgt_page_track_write() Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 09/27] drm/i915/gvt: Protect gfn hash table with dedicated mutex Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-28  5:03   ` [Intel-gfx] " Yan Zhao
2022-12-28  5:03     ` Yan Zhao
2023-01-03 20:43     ` [Intel-gfx] " Sean Christopherson
2023-01-03 20:43       ` Sean Christopherson
2023-01-05  0:51       ` [Intel-gfx] " Yan Zhao
2023-01-05  0:51         ` Yan Zhao
2022-12-23  0:57 ` [Intel-gfx] [PATCH 10/27] KVM: x86/mmu: Don't rely on page-track mechanism to flush on memslot change Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 11/27] KVM: x86/mmu: Don't bounce through page-track mechanism for guest PTEs Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 12/27] KVM: drm/i915/gvt: Drop @vcpu from KVM's ->track_write() hook Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 13/27] KVM: x86: Reject memslot MOVE operations if KVMGT is attached Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 14/27] drm/i915/gvt: Don't bother removing write-protection on to-be-deleted slot Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 15/27] KVM: x86: Add a new page-track hook to handle memslot deletion Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 16/27] drm/i915/gvt: switch from ->track_flush_slot() to ->track_remove_region() Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 17/27] KVM: x86: Remove the unused page-track hook track_flush_slot() Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 18/27] KVM: x86/mmu: Move KVM-only page-track declarations to internal header Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 19/27] KVM: x86/mmu: Use page-track notifiers iff there are external users Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-28  6:56   ` [Intel-gfx] " Yan Zhao
2022-12-28  6:56     ` Yan Zhao
2023-01-04  0:50     ` [Intel-gfx] " Sean Christopherson
2023-01-04  0:50       ` Sean Christopherson
2023-08-07 12:01   ` [Intel-gfx] " Like Xu
2023-08-07 12:01     ` Like Xu
2023-08-07 17:19     ` [Intel-gfx] " Sean Christopherson
2023-08-07 17:19       ` Sean Christopherson
2023-08-09  1:02       ` [Intel-gfx] " Yan Zhao
2023-08-09  1:02         ` Yan Zhao
2023-08-09 14:33         ` [Intel-gfx] " Sean Christopherson
2023-08-09 14:33           ` Sean Christopherson
2023-08-09 23:21           ` [Intel-gfx] " Yan Zhao
2023-08-09 23:21             ` Yan Zhao
2023-08-10  3:02             ` [Intel-gfx] " Yan Zhao
2023-08-10  3:02               ` Yan Zhao
2023-08-10 15:41               ` [Intel-gfx] " Sean Christopherson
2023-08-10 15:41                 ` Sean Christopherson
2023-08-11  5:57                 ` [Intel-gfx] " Yan Zhao
2023-08-11  5:57                   ` Yan Zhao
2022-12-23  0:57 ` [Intel-gfx] [PATCH 20/27] KVM: x86/mmu: Drop infrastructure for multiple page-track modes Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 21/27] KVM: x86/mmu: Rename page-track APIs to reflect the new reality Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 22/27] KVM: x86/mmu: Assert that correct locks are held for page write-tracking Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 23/27] KVM: x86/mmu: Bug the VM if write-tracking is used but not enabled Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 24/27] KVM: x86/mmu: Drop @slot param from exported/external page-track APIs Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 25/27] KVM: x86/mmu: Handle KVM bookkeeping in page-track APIs, not callers Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 26/27] KVM: x86/mmu: Add page-track API to query if a gfn is valid Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-28  7:57   ` [Intel-gfx] " Yan Zhao
2022-12-28  7:57     ` Yan Zhao
2023-01-03 21:19     ` [Intel-gfx] " Sean Christopherson
2023-01-03 21:19       ` Sean Christopherson
2023-01-05  3:12       ` [Intel-gfx] " Yan Zhao
2023-01-05  3:12         ` Yan Zhao
2023-01-05 17:53         ` [Intel-gfx] " Sean Christopherson
2023-01-05 17:53           ` Sean Christopherson
2022-12-23  0:57 ` [Intel-gfx] [PATCH 27/27] drm/i915/gvt: Drop final dependencies on KVM internal details Sean Christopherson
2022-12-23  0:57   ` Sean Christopherson
2022-12-23  1:28 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gvt: KVM: KVMGT fixes and page-track cleanups Patchwork
2022-12-23  9:05 ` [Intel-gfx] [PATCH 00/27] " Yan Zhao
2022-12-23  9:05   ` Yan Zhao
2023-01-04  1:01   ` Sean Christopherson [this message]
2023-01-04  1:01     ` Sean Christopherson
2023-01-05  3:13     ` [Intel-gfx] " Yan Zhao
2023-01-05  3:13       ` Yan Zhao
2022-12-28  5:28 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gvt: KVM: KVMGT fixes and page-track cleanups (rev2) Patchwork
2023-01-06  6:25 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gvt: KVM: KVMGT fixes and page-track cleanups (rev3) Patchwork
2023-01-19  9:01 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gvt: KVM: KVMGT fixes and page-track cleanups (rev4) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y7TP2R01VAbmmfcT@google.com \
    --to=seanjc@google.com \
    --cc=bgardon@google.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=yan.y.zhao@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.