All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: linux-kselftest@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] kselftest: kvm/arm64: Skip tests if we can't create a vgic-v3
Date: Wed, 26 Jan 2022 13:05:01 +0000	[thread overview]
Message-ID: <87czke7ima.wl-maz@kernel.org> (raw)
In-Reply-To: <YfFEBlsUH+dMxmku@sirena.org.uk>

On Wed, 26 Jan 2022 12:52:22 +0000,
Mark Brown <broonie@kernel.org> wrote:
> 
> On Wed, Jan 26, 2022 at 09:07:48AM +0000, Marc Zyngier wrote:
> > Mark Brown <broonie@kernel.org> wrote:
> 
> > >  	/* Distributor setup */
> > > -	gic_fd = kvm_create_device(vm, KVM_DEV_TYPE_ARM_VGIC_V3, false);
> > > +	gic_fd = kvm_create_device(vm, KVM_DEV_TYPE_ARM_VGIC_V3, true);
> 
> > 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().

	M.

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

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>, James Morse <james.morse@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] kselftest: kvm/arm64: Skip tests if we can't create a vgic-v3
Date: Wed, 26 Jan 2022 13:05:01 +0000	[thread overview]
Message-ID: <87czke7ima.wl-maz@kernel.org> (raw)
In-Reply-To: <YfFEBlsUH+dMxmku@sirena.org.uk>

On Wed, 26 Jan 2022 12:52:22 +0000,
Mark Brown <broonie@kernel.org> wrote:
> 
> On Wed, Jan 26, 2022 at 09:07:48AM +0000, Marc Zyngier wrote:
> > Mark Brown <broonie@kernel.org> wrote:
> 
> > >  	/* Distributor setup */
> > > -	gic_fd = kvm_create_device(vm, KVM_DEV_TYPE_ARM_VGIC_V3, false);
> > > +	gic_fd = kvm_create_device(vm, KVM_DEV_TYPE_ARM_VGIC_V3, true);
> 
> > 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().

	M.

-- 
Without deviation from the norm, progress is not possible.

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>, James Morse <james.morse@arm.com>,
	Alexandru Elisei <alexandru.elisei@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	linux-arm-kernel@lists.infradead.org,
	kvmarm@lists.cs.columbia.edu, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH] kselftest: kvm/arm64: Skip tests if we can't create a vgic-v3
Date: Wed, 26 Jan 2022 13:05:01 +0000	[thread overview]
Message-ID: <87czke7ima.wl-maz@kernel.org> (raw)
In-Reply-To: <YfFEBlsUH+dMxmku@sirena.org.uk>

On Wed, 26 Jan 2022 12:52:22 +0000,
Mark Brown <broonie@kernel.org> wrote:
> 
> On Wed, Jan 26, 2022 at 09:07:48AM +0000, Marc Zyngier wrote:
> > Mark Brown <broonie@kernel.org> wrote:
> 
> > >  	/* Distributor setup */
> > > -	gic_fd = kvm_create_device(vm, KVM_DEV_TYPE_ARM_VGIC_V3, false);
> > > +	gic_fd = kvm_create_device(vm, KVM_DEV_TYPE_ARM_VGIC_V3, true);
> 
> > 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().

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-01-26 13:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25 19:28 [PATCH] kselftest: kvm/arm64: Skip tests if we can't create a vgic-v3 Mark Brown
2022-01-25 19:28 ` Mark Brown
2022-01-25 19:28 ` Mark Brown
2022-01-25 19:48 ` Shuah Khan
2022-01-25 19:48   ` Shuah Khan
2022-01-25 19:48   ` Shuah Khan
2022-01-26  1:23 ` Ricardo Koller
2022-01-26  1:23   ` Ricardo Koller
2022-01-26  1:23   ` Ricardo Koller
2022-01-26  9:07 ` Marc Zyngier
2022-01-26  9:07   ` Marc Zyngier
2022-01-26  9:07   ` Marc Zyngier
2022-01-26 12:52   ` Mark Brown
2022-01-26 12:52     ` Mark Brown
2022-01-26 12:52     ` Mark Brown
2022-01-26 13:05     ` Marc Zyngier [this message]
2022-01-26 13:05       ` Marc Zyngier
2022-01-26 13:05       ` Marc Zyngier
2022-01-26 13:21       ` Mark Brown
2022-01-26 13:21         ` Mark Brown
2022-01-26 13:21         ` Mark Brown
2022-01-26 13:32         ` Marc Zyngier
2022-01-26 13:32           ` Marc Zyngier
2022-01-26 13:32           ` Marc Zyngier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czke7ima.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=broonie@kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.