public inbox for kvmarm@lists.cs.columbia.edu
 help / color / mirror / Atom feed
From: Auger Eric <eric.auger@redhat.com>
To: Christoffer Dall <cdall@linaro.org>,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org
Cc: Marc Zyngier <marc.zyngier@arm.com>, kvm@vger.kernel.org
Subject: Re: [PATCH v2 08/11] KVM: arm/arm64: Get rid of its->initialized field
Date: Tue, 9 May 2017 11:45:53 +0200	[thread overview]
Message-ID: <dcaa5e9f-4c07-7c63-4e4f-fe8814a70c97@redhat.com> (raw)
In-Reply-To: <20170509085618.28311-9-cdall@linaro.org>

Hi,

On 09/05/2017 10:56, Christoffer Dall wrote:
> From: Marc Zyngier <marc.zyngier@arm.com>
> 
> The its->initialized doesn't bring much to the table, and creates
> unnecessary ordering between setting the address and initializing it
> (which amounts to exactly nothing).
> 
> Let's kill it altogether, making KVM_DEV_ARM_VGIC_CTRL_INIT the no-op
> it deserves to be.
> 
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> Signed-off-by: Christoffer Dall <cdall@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>

Eric
> ---
>  include/kvm/arm_vgic.h       | 1 -
>  virt/kvm/arm/vgic/vgic-its.c | 7 +------
>  2 files changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
> index 4ff65ef..bfde6fb 100644
> --- a/include/kvm/arm_vgic.h
> +++ b/include/kvm/arm_vgic.h
> @@ -148,7 +148,6 @@ struct vgic_its {
>  	gpa_t			vgic_its_base;
>  
>  	bool			enabled;
> -	bool			initialized;
>  	struct vgic_io_device	iodev;
>  	struct kvm_device	*dev;
>  
> diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
> index 9f7105c..18318c6 100644
> --- a/virt/kvm/arm/vgic/vgic-its.c
> +++ b/virt/kvm/arm/vgic/vgic-its.c
> @@ -1545,9 +1545,6 @@ static int vgic_register_its_iodev(struct kvm *kvm, struct vgic_its *its)
>  	struct vgic_io_device *iodev = &its->iodev;
>  	int ret;
>  
> -	if (!its->initialized)
> -		return -EBUSY;
> -
>  	if (IS_VGIC_ADDR_UNDEF(its->vgic_its_base))
>  		return -ENXIO;
>  
> @@ -1597,7 +1594,6 @@ static int vgic_its_create(struct kvm_device *dev, u32 type)
>  	INIT_LIST_HEAD(&its->collection_list);
>  
>  	dev->kvm->arch.vgic.has_its = true;
> -	its->initialized = false;
>  	its->enabled = false;
>  	its->dev = dev;
>  
> @@ -2397,8 +2393,7 @@ static int vgic_its_set_attr(struct kvm_device *dev,
>  
>  		switch (attr->attr) {
>  		case KVM_DEV_ARM_VGIC_CTRL_INIT:
> -			its->initialized = true;
> -
> +			/* Nothing to do */
>  			return 0;
>  		case KVM_DEV_ARM_ITS_SAVE_TABLES:
>  			return abi->save_tables(its);
> 

  reply	other threads:[~2017-05-09  9:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-09  8:56 [PATCH v2 00/11] Fixes to v7 of the vITS save/restore series Christoffer Dall
2017-05-09  8:56 ` [PATCH v2 01/11] KVM: arm/arm64: Clarification and relaxation to ITS save/restore ABI Christoffer Dall
2017-05-09  8:56 ` [PATCH v2 02/11] KVM: arm/arm64: vgic: Rename kvm_vgic_vcpu_init to kvm_vgic_vcpu_enable Christoffer Dall
2017-05-09  8:56 ` [PATCH v2 03/11] KVM: Add kvm_vcpu_get_idx to get vcpu index in kvm->vcpus Christoffer Dall
2017-05-09  9:44   ` Auger Eric
2017-05-09  8:56 ` [PATCH v2 04/11] KVM: arm/arm64: Refactor vgic_register_redist_iodevs Christoffer Dall
2017-05-09  9:44   ` Auger Eric
2017-05-09  8:56 ` [PATCH v2 05/11] KVM: arm/arm64: Make vgic_v3_check_base more broadly usable Christoffer Dall
2017-05-09  9:45   ` Auger Eric
2017-05-09  8:56 ` [PATCH v2 06/11] KVM: arm/arm64: Slightly rework kvm_vgic_addr Christoffer Dall
2017-05-09  8:56 ` [PATCH v2 07/11] KVM: arm/arm64: Register iodevs when setting redist base and creating VCPUs Christoffer Dall
2017-05-16 11:23   ` Jean-Philippe Brucker
2017-05-16 12:39     ` Auger Eric
2017-05-16 20:31       ` Christoffer Dall
2017-05-17 11:18     ` Christoffer Dall
2017-05-17 12:28       ` Jean-Philippe Brucker
2017-05-17 13:19       ` Auger Eric
2017-05-09  8:56 ` [PATCH v2 08/11] KVM: arm/arm64: Get rid of its->initialized field Christoffer Dall
2017-05-09  9:45   ` Auger Eric [this message]
2017-05-09  8:56 ` [PATCH v2 09/11] KVM: arm/arm64: Register ITS iodev when setting base address Christoffer Dall
2017-05-09  9:53   ` Auger Eric
2017-05-09  8:56 ` [PATCH v2 10/11] KVM: arm/arm64: Don't call map_resources when restoring ITS tables Christoffer Dall
2017-05-09  8:56 ` [PATCH v2 11/11] KVM: arm/arm64: vgic-its: Cleanup after failed ITT restore Christoffer Dall
2017-05-09  9:54 ` [PATCH v2 00/11] Fixes to v7 of the vITS save/restore series Auger Eric

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=dcaa5e9f-4c07-7c63-4e4f-fe8814a70c97@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=cdall@linaro.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marc.zyngier@arm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox