linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Zenghui Yu <yuzenghui@huawei.com>
Cc: <kvmarm@lists.linux.dev>, <linux-arm-kernel@lists.infradead.org>,
	<oliver.upton@linux.dev>, <james.morse@arm.com>,
	<suzuki.poulose@arm.com>, <ricarkol@google.com>,
	<wanghaibin.wang@huawei.com>
Subject: Re: [PATCH 2/2] KVM: arm64: selftest: Perform ISB before reading PAR_EL1
Date: Sat, 07 Oct 2023 17:06:37 +0100	[thread overview]
Message-ID: <875y3imn76.wl-maz@kernel.org> (raw)
In-Reply-To: <20231007124043.626-2-yuzenghui@huawei.com>

On Sat, 07 Oct 2023 13:40:43 +0100,
Zenghui Yu <yuzenghui@huawei.com> wrote:
> 
> It looks like a mistake to issue ISB *after* reading PAR_EL1, we should
> instead perform it between the AT instruction and the reads of PAR_EL1.
> 
> As according to DDI0487J.a IJTYVP,
> 
> "When an address translation instruction is executed, explicit
>  synchronization is required to guarantee the result is visible to
>  subsequent direct reads of PAR_EL1."
> 
> Otherwise all guest_at testcases fail on my box with
> 
> ==== Test Assertion Failure ====
>   aarch64/page_fault_test.c:142: par & 1 == 0
>   pid=1355864 tid=1355864 errno=4 - Interrupted system call
>      1	0x0000000000402853: vcpu_run_loop at page_fault_test.c:681
>      2	0x0000000000402cdb: run_test at page_fault_test.c:730
>      3	0x0000000000403897: for_each_guest_mode at guest_modes.c:100
>      4	0x00000000004019f3: for_each_test_and_guest_mode at page_fault_test.c:1105
>      5	 (inlined by) main at page_fault_test.c:1131
>      6	0x0000ffffb153c03b: ?? ??:0
>      7	0x0000ffffb153c113: ?? ??:0
>      8	0x0000000000401aaf: _start at ??:?
>   0x1 != 0x0 (par & 1 != 0)
> 
> Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>

Acked-by: Marc Zyngier <maz@kernel.org>

	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:[~2023-10-07 16:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-07 12:40 [PATCH 1/2] KVM: arm64: selftest: Add the missing .guest_prepare() Zenghui Yu
2023-10-07 12:40 ` [PATCH 2/2] KVM: arm64: selftest: Perform ISB before reading PAR_EL1 Zenghui Yu
2023-10-07 16:06   ` Marc Zyngier [this message]
2023-10-07 16:05 ` [PATCH 1/2] KVM: arm64: selftest: Add the missing .guest_prepare() Marc Zyngier
2023-10-07 16:50 ` Oliver Upton

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=875y3imn76.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=oliver.upton@linux.dev \
    --cc=ricarkol@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=wanghaibin.wang@huawei.com \
    --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;
as well as URLs for NNTP newsgroup(s).