QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [Qemu-devel] [PULL 0/1] target/alpha queue
@ 2019-08-25 19:37 Richard Henderson
  2019-08-25 19:37 ` [Qemu-devel] [PULL 1/1] target/alpha: fix tlb_fill trap_arg2 value for instruction fetch Richard Henderson
  2019-08-27 10:04 ` [Qemu-devel] [PULL 0/1] target/alpha queue Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Henderson @ 2019-08-25 19:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell

The following changes since commit 586f3dced9f2b354480c140c070a3d02a0c66a1e:

  Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190822' into staging (2019-08-23 15:15:44 +0100)

are available in the Git repository at:

  https://github.com/rth7680/qemu.git tags/pull-axp-20190825

for you to fetch changes up to cb1de55a83eaca9ee32be9c959dca99e11f2fea8:

  target/alpha: fix tlb_fill trap_arg2 value for instruction fetch (2019-08-25 12:30:48 -0700)

----------------------------------------------------------------
Fix for alpha_cpu_tlb_fill

----------------------------------------------------------------
Aurelien Jarno (1):
      target/alpha: fix tlb_fill trap_arg2 value for instruction fetch

 target/alpha/helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PULL 1/1] target/alpha: fix tlb_fill trap_arg2 value for instruction fetch
  2019-08-25 19:37 [Qemu-devel] [PULL 0/1] target/alpha queue Richard Henderson
@ 2019-08-25 19:37 ` Richard Henderson
  2019-08-27 10:04 ` [Qemu-devel] [PULL 0/1] target/alpha queue Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2019-08-25 19:37 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, qemu-stable, Aurelien Jarno

From: Aurelien Jarno <aurelien@aurel32.net>

Commit e41c94529740cc26 ("target/alpha: Convert to CPUClass::tlb_fill")
slightly changed the way the trap_arg2 value is computed in case of TLB
fill. The type of the variable used in the ternary operator has been
changed from an int to an enum. This causes the -1 value to not be
sign-extended to 64-bit in case of an instruction fetch. The trap_arg2
ends up with 0xffffffff instead of 0xffffffffffffffff. Fix that by
changing the -1 into -1LL.

This fixes the execution of user space processes in qemu-system-alpha.

Fixes: e41c94529740cc26
Cc: qemu-stable@nongnu.org
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
[rth: Test MMU_DATA_LOAD and MMU_DATA_STORE instead of implying them.]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/alpha/helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/alpha/helper.c b/target/alpha/helper.c
index c6998348df..19cda0a2db 100644
--- a/target/alpha/helper.c
+++ b/target/alpha/helper.c
@@ -283,7 +283,9 @@ bool alpha_cpu_tlb_fill(CPUState *cs, vaddr addr, int size,
         cs->exception_index = EXCP_MMFAULT;
         env->trap_arg0 = addr;
         env->trap_arg1 = fail;
-        env->trap_arg2 = (access_type == MMU_INST_FETCH ? -1 : access_type);
+        env->trap_arg2 = (access_type == MMU_DATA_LOAD ? 0ull :
+                          access_type == MMU_DATA_STORE ? 1ull :
+                          /* access_type == MMU_INST_FETCH */ -1ull);
         cpu_loop_exit_restore(cs, retaddr);
     }
 
-- 
2.17.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PULL 0/1] target/alpha queue
  2019-08-25 19:37 [Qemu-devel] [PULL 0/1] target/alpha queue Richard Henderson
  2019-08-25 19:37 ` [Qemu-devel] [PULL 1/1] target/alpha: fix tlb_fill trap_arg2 value for instruction fetch Richard Henderson
@ 2019-08-27 10:04 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2019-08-27 10:04 UTC (permalink / raw)
  To: Richard Henderson; +Cc: QEMU Developers

On Sun, 25 Aug 2019 at 20:37, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> The following changes since commit 586f3dced9f2b354480c140c070a3d02a0c66a1e:
>
>   Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190822' into staging (2019-08-23 15:15:44 +0100)
>
> are available in the Git repository at:
>
>   https://github.com/rth7680/qemu.git tags/pull-axp-20190825
>
> for you to fetch changes up to cb1de55a83eaca9ee32be9c959dca99e11f2fea8:
>
>   target/alpha: fix tlb_fill trap_arg2 value for instruction fetch (2019-08-25 12:30:48 -0700)
>
> ----------------------------------------------------------------
> Fix for alpha_cpu_tlb_fill
>
> ----------------------------------------------------------------
> Aurelien Jarno (1):
>       target/alpha: fix tlb_fill trap_arg2 value for instruction fetch
>
>  target/alpha/helper.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.2
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-25 19:37 [Qemu-devel] [PULL 0/1] target/alpha queue Richard Henderson
2019-08-25 19:37 ` [Qemu-devel] [PULL 1/1] target/alpha: fix tlb_fill trap_arg2 value for instruction fetch Richard Henderson
2019-08-27 10:04 ` [Qemu-devel] [PULL 0/1] target/alpha queue Peter Maydell

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org qemu-devel@archiver.kernel.org
	public-inbox-index qemu-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox