Re: [PATCH] kselftest: kvm/arm64: Skip tests if we can't create a vgic-v3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



aOn Wed, 26 Jan 2022 13:21:17 +0000,
Mark Brown <broonie@xxxxxxxxxx> wrote:
> 
> [1  <text/plain; us-ascii (7bit)>]
> On Wed, Jan 26, 2022 at 01:05:01PM +0000, Marc Zyngier wrote:
> > Mark Brown <broonie@xxxxxxxxxx> wrote:
> 
> > > > So you now only test whether it is possible to create a virtual GICv3,
> > > > but don't actually create it. How does this work?
> 
> > > Oh, that's rather obscure in the API - so the file descriptor returned
> > > if the test flag is specified can't actually be used?
> 
> > No file descriptor is returned at all from the kernel, so you should
> > always get -1 as populated by kvm_create_device().
> 
> > See virt/kvm/kvm_main.c::kvm_ioctl_create_device().
> 
> Ugh, right - the descriptor is returned separately to the return code
> but is then mapped onto the return code by the library since the library
> just aborts on error in the non-test case and in the test case the kernel
> returns an inverted boolean which gets passed straight through.  Like I
> say the API seems a bit confusing here.

That's a very... "kind" way of putting it.

	M.

-- 
Without deviation from the norm, progress is not possible.
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux