[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZS_15SGIhtpzJ8Gr@google.com>
Date: Wed, 18 Oct 2023 08:12:37 -0700
From: Sean Christopherson <seanjc@...gle.com>
To: Xiaoyao Li <xiaoyao.li@...el.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH] KVM: x86: Use the correct size of struct
kvm_vcpu_pv_apf_data and fix the documentation
On Wed, Oct 18, 2023, Xiaoyao Li wrote:
> On 10/18/2023 1:28 AM, Sean Christopherson wrote:
> > On Fri, Oct 13, 2023, Xiaoyao Li wrote:
> > > Fix the kvm_gfn_to_hva_cache_init() to use the correct size though KVM
> > > only touches fist 8 bytes.
> >
> > This isn't a fix. There's actually meaningful value in precisely initializing the
> > cache as it guards against KVM writing into the padding, e.g. this WARN would fire:
> >
> > if (WARN_ON_ONCE(len + offset > ghc->len))
> > return -EINVAL;
> >
> > So it's a bit odd, but I would prefer to keep the current behavior of mapping only
> > the first 8 bytes.
> >
> > Here's what I'm thinking to clean up the enabled field (compile tested only,
> > haven't touched the docs other than the obvious removal):
>
> It looks better.
>
> Will you send out a formal patch yourself? or leave it to me?
Your call, I don't have a preference. Just let me know which option you choose.
Powered by blists - more mailing lists