From: Andrew Jones <drjones@redhat.com>
To: Pavel Fedin <p.fedin@samsung.com>
Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org,
"'Marc Zyngier'" <marc.zyngier@arm.com>
Subject: Re: [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers
Date: Mon, 7 Dec 2015 15:58:11 -0600 [thread overview]
Message-ID: <20151207215811.GH4402@hawk.localdomain> (raw)
In-Reply-To: <013501d130d4$635722f0$2a0568d0$@samsung.com>
On Mon, Dec 07, 2015 at 12:48:12PM +0300, Pavel Fedin wrote:
> Hello!
>
> > FYI, I tried writing test cases for this issue with kvm-unit-tests. The
> > issue didn't reproduce for me. It's quite possible my test cases are
> > flawed
>
> Indeed they are, a very little thing fell through again... :)
> It's not just SP, it's SP_EL0. And you never initialize it to anything because your code always runs in kernel mode, so it's just
> zero, so you get your zero.
> But if you add a little thing in the beginning of your main():
>
> asm volatile("msr sp_el0, %0" : : "r" (0xDEADC0DE0BADC0DE));
Ah! Thanks for this. The mmio test does now fail for me too. The sysreg
test still doesn't fail for me (even though I'm doing the above on the
vcpu I use for that too). Maybe there's something weird with which reg
I'm using, and whether or not my attempt to get trapping enabled on it
is working the way I expected. I'll play with it some more.
>
> then you have it:
> --- cut ---
> [root@thunderx-2 kvm-unit-tests]# ./arm-run arm/xzr-test.flat -smp 2
> qemu-system-aarch64 -machine virt,accel=kvm:tcg,gic-version=host -cpu host -device virtio-serial-device -device
> virtconsole,chardev=ctd -chardev testdev,id=ctd -display none -serial stdio -kernel arm/xzr-test.flat -smp 2
> PASS: mmio: sanity check: read 0x55555555
> FAIL: mmio: 'str wzr' check: read 0x0badc0de
> vm_setup_vq: virtqueue 0 already setup! base=0xa003e00
> chr_testdev_init: chr-testdev: can't init virtqueues
> --- cut ---
>
> Here i run only MMIO test, because i could not compile sysreg one, so i simply commented it out.
>
> P.S. Could you also apply something like the following to arm/run:
> --- cut ---
> arm/run | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/arm/run b/arm/run
> index 662a856..3890c8c 100755
> --- a/arm/run
> +++ b/arm/run
> @@ -33,7 +33,11 @@ if $qemu $M -chardev testdev,id=id -initrd . 2>&1 \
> exit 2
> fi
>
> -M='-machine virt,accel=kvm:tcg'
> +if $qemu $M,? 2>&1 | grep gic-version > /dev/null; then
> + GIC='gic-version=host,'
> +fi
> +
> +M="-machine virt,${GIC}accel=kvm:tcg"
> chr_testdev='-device virtio-serial-device'
> chr_testdev+=' -device virtconsole,chardev=ctd -chardev testdev,id=ctd'
> --- cut ---
Yes, I'll send a patch for this soon. I actually have something similar to this
in my local tree already, I just hadn't bothered sending it as I didn't think
anybody else needed it yet.
>
> Without it qemu does not work on GICv3-only hardware, like my board, because it defaults to gic-version=2. I don't post the patch
> on the mailing lists, because in order to be able to post this 5-liner i'll need to go through the formal approval procedure at my
> company, and i just don't want to bother for a single small fix. :) Will do as a "Reported-by:".
It'd be nice if you could go through the procedure. You've been sending
patches to KVM, and ideally we'll start trying to send kvm-unit-tests
patches along with feature patches.
Thanks,
drew
next prev parent reply other threads:[~2015-12-07 21:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-04 12:03 [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers Pavel Fedin
2015-12-04 12:03 ` [PATCH v4 1/4] KVM: arm64: Correctly handle zero register during MMIO Pavel Fedin
2015-12-04 15:33 ` Marc Zyngier
2015-12-04 12:03 ` [PATCH v4 2/4] KVM: arm64: Remove const from struct sys_reg_params Pavel Fedin
2015-12-04 13:00 ` Marc Zyngier
2015-12-04 12:03 ` [PATCH v4 3/4] KVM: arm64: Correctly handle zero register in system register accesses Pavel Fedin
2015-12-04 12:03 ` [PATCH v4 4/4] KVM: arm64: Get rid of old vcpu_reg() Pavel Fedin
2015-12-05 0:33 ` [PATCH v4 0/4] KVM: arm64: BUG FIX: Correctly handle zero register transfers Andrew Jones
2015-12-07 8:36 ` Pavel Fedin
2015-12-07 22:36 ` Andrew Jones
2015-12-07 23:45 ` Andrew Jones
2015-12-08 6:57 ` Pavel Fedin
2015-12-08 14:48 ` Andrew Jones
2015-12-07 8:47 ` Pavel Fedin
2015-12-07 21:50 ` Andrew Jones
2015-12-07 9:48 ` Pavel Fedin
2015-12-07 21:58 ` Andrew Jones [this message]
2015-12-07 22:25 ` Andrew Jones
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=20151207215811.GH4402@hawk.localdomain \
--to=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=marc.zyngier@arm.com \
--cc=p.fedin@samsung.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