Linux KVM/arm64 development list
 help / color / mirror / Atom feed
From: Auger Eric <eric.auger@redhat.com>
To: Zenghui Yu <yuzenghui@huawei.com>, maz@kernel.org
Cc: andre.przywara@arm.com, kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: arm/arm64: vgic-its: Check hopefully the last DISCARD command error
Date: Fri, 10 Jan 2020 09:37:17 +0100	[thread overview]
Message-ID: <f9997198-c990-d638-24d0-41d6280a9d8a@redhat.com> (raw)
In-Reply-To: <20191225133014.1825-1-yuzenghui@huawei.com>

Hi Zenghui,

On 12/25/19 2:30 PM, Zenghui Yu wrote:
> DISCARD command error occurs if any of the following apply:
> 
>  - [ ... (those which we have already handled) ]
nit: I would remove the above and simply say the discard is supposed to
fail if the collection is not mapped to any target redistributor. If an
ITE exists then the ite->collection is non NULL. What needs to be
checked is its_is_collection_mapped().

By the way update_affinity_collection() also tests ite->collection. I
think this is useless or do I miss something?

Reviewed-by: Eric Auger <eric.auger@redhat.com>

Thanks

Eric

>  - The EventID for the device is mapped to a collection that
>    has not been mapped to an RDbase using MAPC.
> 
> Let's take the unmapped collection case into account and report
> a DISCARD command error if it really happens.
> 
> Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
> ---
>  virt/kvm/arm/vgic/vgic-its.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
> index 17920d1b350a..d53d34a33e35 100644
> --- a/virt/kvm/arm/vgic/vgic-its.c
> +++ b/virt/kvm/arm/vgic/vgic-its.c
> @@ -839,9 +839,8 @@ static int vgic_its_cmd_handle_discard(struct kvm *kvm, struct vgic_its *its,
>  	u32 event_id = its_cmd_get_id(its_cmd);
>  	struct its_ite *ite;
>  
> -
>  	ite = find_ite(its, device_id, event_id);
> -	if (ite && ite->collection) {
> +	if (ite && its_is_collection_mapped(ite->collection)) {
>  		/*
>  		 * Though the spec talks about removing the pending state, we
>  		 * don't bother here since we clear the ITTE anyway and the
> 

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

  reply	other threads:[~2020-01-10  8:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-25 13:30 [PATCH] KVM: arm/arm64: vgic-its: Check hopefully the last DISCARD command error Zenghui Yu
2020-01-10  8:37 ` Auger Eric [this message]
2020-01-14  7:10   ` Zenghui Yu
2020-01-14  8:20     ` 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=f9997198-c990-d638-24d0-41d6280a9d8a@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=andre.przywara@arm.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=yuzenghui@huawei.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