Re: [PATCH v8 03/14] KVM: X86: Don't track dirty for KVM_SET_[TSS_ADDR|IDENTITY_MAP_ADDR]

From: Peter Xu
Date: Tue Apr 28 2020 - 16:22:37 EST


On Mon, Apr 27, 2020 at 11:10:54AM -0700, Sean Christopherson wrote:

[...]

> > It will "return (0xdeadull << 48)" as you proposed in abbed4fa94f6? :-)
> >
> > Frankly speaking I always preferred zero but that's just not true any more
> > after above change. This also reminded me that maybe we should also return the
> > same thing at [1] below.
>
> Ah, I was looking at this code:
>
> if (!slot || !slot->npages)
> return 0;
>
> That means deletion returns different success values for "deletion was a
> nop" and "deletion was successful". The nop path should probably return
> (or fill in) "(unsigned long)(0xdeadull << 48)" as well.

Yep. Since I touched the line here after all, I'll directly squash this small
fix into this patch too when I repost. Thanks,

[...]

> > >
> > > > } else {
> > > > if (!slot || !slot->npages)
> > > > - return 0;
> > > > + return ERR_PTR_USR(0);
> >
> > [1]

--
Peter Xu