From: David Woodhouse <dwmw2@infradead.org>
To: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Mushahid Hussain <hmushi@amazon.co.uk>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>,
Joerg Roedel <joro@8bytes.org>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Mingwei Zhang <mizhang@google.com>,
Maxim Levitsky <mlevitsk@redhat.com>
Subject: Re: [PATCH v2] KVM: Move gfn_to_pfn_cache invalidation to invalidate_range_end hook
Date: Wed, 21 Aug 2024 21:24:41 +0100 [thread overview]
Message-ID: <eef46894ede0abac119be1f5b80cdcd387554750.camel@infradead.org> (raw)
In-Reply-To: <ZsUOR2Sf2A07U6ox@google.com>
[-- Attachment #1: Type: text/plain, Size: 1250 bytes --]
On Tue, 2024-08-20 at 14:44 -0700, Sean Christopherson wrote:
>
> Please split this into 3 patches:
>
> 1. Add range-based GPC retry
> 2. Add the wait mechanism.
> 3. Add the needs_invalidation logic.
>
> #1 and #2 make sense to me, but I'm struggling to understanding why #3 is needed.
> KVM absolutely must not touch the memory after .invalidate_range_start(), so I
> don't see what is gained by deferring invalidation to invalidate_range_end().
Hm, I can't see how to do that without the ->needs_invalidation part,
so I've put that on its own as the first patch. But I *can* put the
patch which moves the invalidation to the 'end' hook last.
I very much dislike what is now patch 2 of the series. It's much more
complex than it needs to be, and I think the fourth patch is a
worthwhile cleanup.
David Woodhouse (4):
KVM: pfncache: Add needs_invalidation flag to gfn_to_pfn_cache
KVM: pfncache: Implement range-based invalidation check for hva_to_pfn_retry()
KVM: pfncache: Wait for pending invalidations instead of spinning
KVM: pfncache: Move invalidation to invalidate_range_end hook
Sean Christopherson (1):
DO NOT MERGE: Hack-a-test to verify gpc invalidation+refresh
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]
prev parent reply other threads:[~2024-08-21 20:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 20:34 David Woodhouse
2024-08-20 21:44 ` Sean Christopherson
2024-08-21 6:57 ` David Woodhouse
2024-08-21 20:24 ` David Woodhouse [this message]
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=eef46894ede0abac119be1f5b80cdcd387554750.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=hmushi@amazon.co.uk \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mizhang@google.com \
--cc=mlevitsk@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®