public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Vijaya Kumar K <vkilari@codeaurora.org>
To: kvmarm@lists.cs.columbia.edu, eric.auger@redhat.com,
	marc.zyngier@arm.com, cdall@linaro.org, andre.przywara@arm.com
Cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org,
	shankerd@codeaurora.org, vvenkat@codeaurora.org,
	Vijaya Kumar K <vkilari@codeaurora.org>
Subject: [PATCH] KVM: arm64: vgic-its: Fix wrong return value check in vgic_its_restore_device_tables
Date: Wed,  6 Sep 2017 10:56:05 +0530	[thread overview]
Message-ID: <1504675565-13641-1-git-send-email-vkilari@codeaurora.org> (raw)

scan_its_table() return 1 on success. In the function vgic_its_restore_device_tables()
the return value of scan_its_table() is checked against success value
and returns -EINVAL. Hence migration fails for VM with ITS.

With this patch the failure return value is checked while returning
-EINVAL.

Signed-off-by: Vijaya Kumar K <vkilari@codeaurora.org>

diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
index aa6b68d..63f8ac3 100644
--- a/virt/kvm/arm/vgic/vgic-its.c
+++ b/virt/kvm/arm/vgic/vgic-its.c
@@ -2142,7 +2142,7 @@ static int vgic_its_restore_device_tables(struct vgic_its *its)
 				     vgic_its_restore_dte, NULL);
 	}
 
-	if (ret > 0)
+	if (ret <= 0)
 		ret = -EINVAL;
 
 	return ret;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project

             reply	other threads:[~2017-09-06  5:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-06  5:26 Vijaya Kumar K [this message]
2017-09-06  7:22 ` [PATCH] KVM: arm64: vgic-its: Fix wrong return value check in vgic_its_restore_device_tables Auger Eric
2017-09-17  8:10   ` vkilari
2017-09-19  8:17     ` 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=1504675565-13641-1-git-send-email-vkilari@codeaurora.org \
    --to=vkilari@codeaurora.org \
    --cc=andre.przywara@arm.com \
    --cc=cdall@linaro.org \
    --cc=eric.auger@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=marc.zyngier@arm.com \
    --cc=shankerd@codeaurora.org \
    --cc=vvenkat@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox