lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <eef46894ede0abac119be1f5b80cdcd387554750.camel@infradead.org>
Date: Wed, 21 Aug 2024 21:24:41 +0100
From: David Woodhouse <dwmw2@...radead.org>
To: Sean Christopherson <seanjc@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, Mushahid Hussain
 <hmushi@...zon.co.uk>,  Vitaly Kuznetsov <vkuznets@...hat.com>, Wanpeng Li
 <wanpengli@...cent.com>, Jim Mattson <jmattson@...gle.com>,  Joerg Roedel
 <joro@...tes.org>, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
 Mingwei Zhang <mizhang@...gle.com>, Maxim Levitsky <mlevitsk@...hat.com>
Subject: Re: [PATCH v2] KVM: Move gfn_to_pfn_cache invalidation to
 invalidate_range_end hook

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



Download attachment "smime.p7s" of type "application/pkcs7-signature" (5965 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ