[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190829092233.si7kuqu6436ttiaz@kamzik.brq.redhat.com>
Date: Thu, 29 Aug 2019 11:22:33 +0200
From: Andrew Jones <drjones@...hat.com>
To: Peter Xu <peterx@...hat.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
Paolo Bonzini <pbonzini@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Radim Krčmář <rkrcmar@...hat.com>,
Thomas Huth <thuth@...hat.com>
Subject: Re: [PATCH 4/4] KVM: selftests: Remove duplicate guest mode handling
On Thu, Aug 29, 2019 at 10:09:35AM +0800, Peter Xu wrote:
> On Wed, Aug 28, 2019 at 01:46:13PM +0200, Andrew Jones wrote:
>
> [...]
>
> > > +unsigned int vm_get_page_size(struct kvm_vm *vm)
> > > +{
> > > + return vm->page_size;
> > > +}
> > > +
> > > +unsigned int vm_get_page_shift(struct kvm_vm *vm)
> > > +{
> > > + return vm->page_shift;
> > > +}
> >
> > We could get by with just one of the above two, but whatever
>
> Right... and imho if we export kvm_vm struct we don't even any
> helpers. :) But I didn't touch that.
yeah, I'm starting to wonder if there's much value in keeping the vm and
vcpu structures private. I've already had a couple cases where I wanted
to write a quick+dirty test that needed the vcpu_fd, so I cheated and
included the internal header to get to it.
Thanks,
drew
>
> > > +
> > > +unsigned int vm_get_max_gfn(struct kvm_vm *vm)
> > > +{
> > > + return vm->max_gfn;
> > > +}
> > > --
> > > 2.21.0
> > >
> >
> > Reviewed-by: Andrew Jones <drjones@...hat.com>
>
> Thanks!
>
> --
> Peter Xu
Powered by blists - more mailing lists