QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [Bug 1924669] [NEW] VFP code cannot see CPACR write in the same TB
@ 2021-04-16  3:41 Hansni Bu
  2021-04-21  8:07 ` [Bug 1924669] " Hansni Bu
  0 siblings, 1 reply; 2+ messages in thread
From: Hansni Bu @ 2021-04-16  3:41 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

If FPU is enabled by writing to CPACR, and the code is in the same
translation block as the following VFP code, qemu generates "v7M NOCP
UsageFault".

This can be reproduced with git HEAD (commit
8fe9f1f891eff4e37f82622b7480ee748bf4af74).

The target binary is attached. The qemu command is:
qemu-system-arm -nographic -monitor null -serial null -semihosting -machine mps2-an505 -cpu cortex-m33 -kernel cpacr_vfp.elf -d in_asm,int,exec,cpu,cpu_reset,unimp,guest_errors,nochain -D log

If the code is changed a little, so that they are not in the same block,
VFP code can see the effect of CPACR, or -singlestep of qemu has the
same result.

** Affects: qemu
     Importance: Undecided
         Status: New


** Tags: arm vfp

** Attachment added: "cpacr_vfp.elf"
   https://bugs.launchpad.net/bugs/1924669/+attachment/5488612/+files/cpacr_vfp.elf

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1924669

Title:
  VFP code cannot see CPACR write in the same TB

Status in QEMU:
  New

Bug description:
  If FPU is enabled by writing to CPACR, and the code is in the same
  translation block as the following VFP code, qemu generates "v7M NOCP
  UsageFault".

  This can be reproduced with git HEAD (commit
  8fe9f1f891eff4e37f82622b7480ee748bf4af74).

  The target binary is attached. The qemu command is:
  qemu-system-arm -nographic -monitor null -serial null -semihosting -machine mps2-an505 -cpu cortex-m33 -kernel cpacr_vfp.elf -d in_asm,int,exec,cpu,cpu_reset,unimp,guest_errors,nochain -D log

  If the code is changed a little, so that they are not in the same
  block, VFP code can see the effect of CPACR, or -singlestep of qemu
  has the same result.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1924669/+subscriptions


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

* [Bug 1924669] Re: VFP code cannot see CPACR write in the same TB
  2021-04-16  3:41 [Bug 1924669] [NEW] VFP code cannot see CPACR write in the same TB Hansni Bu
@ 2021-04-21  8:07 ` Hansni Bu
  0 siblings, 0 replies; 2+ messages in thread
From: Hansni Bu @ 2021-04-21  8:07 UTC (permalink / raw)
  To: qemu-devel

Sorry, it's because a "ISB" is missing after CPACR is changed. Not bug
of qemu.

** Changed in: qemu
       Status: New => Invalid

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1924669

Title:
  VFP code cannot see CPACR write in the same TB

Status in QEMU:
  Invalid

Bug description:
  If FPU is enabled by writing to CPACR, and the code is in the same
  translation block as the following VFP code, qemu generates "v7M NOCP
  UsageFault".

  This can be reproduced with git HEAD (commit
  8fe9f1f891eff4e37f82622b7480ee748bf4af74).

  The target binary is attached. The qemu command is:
  qemu-system-arm -nographic -monitor null -serial null -semihosting -machine mps2-an505 -cpu cortex-m33 -kernel cpacr_vfp.elf -d in_asm,int,exec,cpu,cpu_reset,unimp,guest_errors,nochain -D log

  If the code is changed a little, so that they are not in the same
  block, VFP code can see the effect of CPACR, or -singlestep of qemu
  has the same result.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1924669/+subscriptions


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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16  3:41 [Bug 1924669] [NEW] VFP code cannot see CPACR write in the same TB Hansni Bu
2021-04-21  8:07 ` [Bug 1924669] " Hansni Bu

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
	git clone --mirror https://lore.kernel.org/qemu-devel/2 qemu-devel/git/2.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
	public-inbox-index qemu-devel

Example config snippet for mirrors

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.git