Re: [RFC PATCH v11 08/29] KVM: Introduce per-page memory attributes

From: Xu Yilun
Date: Wed Jul 26 2023 - 23:27:40 EST


On 2023-07-26 at 08:59:53 -0700, Sean Christopherson wrote:
> On Mon, Jul 24, 2023, Xu Yilun wrote:
> > On 2023-07-18 at 16:44:51 -0700, Sean Christopherson wrote:
> > > + if (WARN_ON_ONCE(start == end))
> > > + return -EINVAL;
> >
> > Also, is this check possible to be hit? Maybe remove it?
>
> It should be impossible to, hence the WARN. I added the check for two reasons:
> (1) to help document that end is exclusive, and (2) to guard against future bugs.

Understood. I'm good to it.