lkml.org 
[lkml]   [2024]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/3] KVM: Explicitly disallow activatating a gfn_to_pfn_cache with INVALID_GPA
From
Date
On Tue, 2024-03-19 at 17:15 -0700, Sean Christopherson wrote:
> Explicit disallow activating a gfn_to_pfn_cache with an error gpa, i.e.
> INVALID_GPA, to ensure that KVM doesn't mistake a GPA-based cache for an
> HVA-based cache (KVM uses INVALID_GPA as a magic value to differentiate
> between GPA-based and HVA-based caches).
>
> WARN if KVM attempts to activate a cache with INVALID_GPA, purely so that
> new caches need to at least consider what to do with a "bad" GPA, as all
> existing usage of kvm_gpc_activate() guarantees gpa != INVALID_GPA.  I.e.
> removing the WARN in the future is completely reasonable if doing so would
> yield cleaner/better code overall.
>
> Signed-off-by: Sean Christopherson <seanjc@google.com>


Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>

[unhandled content-type:application/pkcs7-signature]
\
 
 \ /
  Last update: 2024-05-27 15:55    [W:0.163 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site