qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 796202] [NEW] Doing a 64 bit load from a 32 bit local APIC register is allowed
@ 2011-06-12 13:03 Robert Uhl
  2011-06-13 20:32 ` Blue Swirl
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Robert Uhl @ 2011-06-12 13:03 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Doing

u64 lapic_idregister = (u64) fix_to_virt(FIX_APIC_BASE) + 0x20;

and later in an interrupt handler

movq (lapic_idregister), %rcx
movq (%rcx), %rcx

in a linux kernel module works in qemu 0.13.91 but not on real hardware (it simply reboots).
On real hardware only

movl (%rcx), %ecx

works (also in qemu).

Commandline:
qemu-system-x86_64 \
		-kernel $LINUXDIR/arch/x86_64/boot/bzImage \
		-hda $BUILDROOTDIR/output/images/rootfs.ext2 \
		-append "root=/dev/sda rw rootfstype=ext2 maxcpus=4" \
		-cpu phenom \
		-smp 4 \
		-gdb tcp::1234 \
		-net nic -net user

Guest:
Vanilla Linux Kernel 2.6.37.6 64-bit with buildroot

Mikael Pettersson from the linux kernel mailinglist told me it's an
accepts-invalid bug in qemu.

** Affects: qemu
     Importance: Undecided
         Status: New

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

Title:
  Doing a 64 bit load from a 32 bit local APIC register is allowed

Status in QEMU:
  New

Bug description:
  Doing

  u64 lapic_idregister = (u64) fix_to_virt(FIX_APIC_BASE) + 0x20;

  and later in an interrupt handler

  movq (lapic_idregister), %rcx
  movq (%rcx), %rcx

  in a linux kernel module works in qemu 0.13.91 but not on real hardware (it simply reboots).
  On real hardware only

  movl (%rcx), %ecx

  works (also in qemu).

  Commandline:
  qemu-system-x86_64 \
  		-kernel $LINUXDIR/arch/x86_64/boot/bzImage \
  		-hda $BUILDROOTDIR/output/images/rootfs.ext2 \
  		-append "root=/dev/sda rw rootfstype=ext2 maxcpus=4" \
  		-cpu phenom \
  		-smp 4 \
  		-gdb tcp::1234 \
  		-net nic -net user

  Guest:
  Vanilla Linux Kernel 2.6.37.6 64-bit with buildroot

  Mikael Pettersson from the linux kernel mailinglist told me it's an
  accepts-invalid bug in qemu.

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

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

* Re: [Qemu-devel] [Bug 796202] [NEW] Doing a 64 bit load from a 32 bit local APIC register is allowed
  2011-06-12 13:03 [Qemu-devel] [Bug 796202] [NEW] Doing a 64 bit load from a 32 bit local APIC register is allowed Robert Uhl
@ 2011-06-13 20:32 ` Blue Swirl
  2017-05-19 19:44 ` [Qemu-devel] [Bug 796202] " Thomas Huth
  2017-07-19  4:17 ` Launchpad Bug Tracker
  2 siblings, 0 replies; 4+ messages in thread
From: Blue Swirl @ 2011-06-13 20:32 UTC (permalink / raw)
  To: Bug 796202; +Cc: qemu-devel

On Sun, Jun 12, 2011 at 4:03 PM, Robert Uhl <796202@bugs.launchpad.net> wrote:
> Public bug reported:
>
> Doing
>
> u64 lapic_idregister = (u64) fix_to_virt(FIX_APIC_BASE) + 0x20;
>
> and later in an interrupt handler
>
> movq (lapic_idregister), %rcx
> movq (%rcx), %rcx
>
> in a linux kernel module works in qemu 0.13.91 but not on real hardware (it simply reboots).
> On real hardware only
>
> movl (%rcx), %ecx
>
> works (also in qemu).

Thank you for the report. Currently QEMU devices only provide access
methods up to 32 bits, a 64 bit access is emulated with two 32 bit
accesses. So it is not possible to handle a 32 bit access differently
from a 64 bit one for now.

So far this hasn't been considered to be a problem for x86, though it
is clearly not correct for Sparc and Alpha. This report shows that it
is necessary to add 64 bit access methods (or otherwise handle 64 bit
accesses more realistically) since x86 is also affected.

Adding the 64 bit method would be a major refactoring though and there
are other designs possible.

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

* [Qemu-devel] [Bug 796202] Re: Doing a 64 bit load from a 32 bit local APIC register is allowed
  2011-06-12 13:03 [Qemu-devel] [Bug 796202] [NEW] Doing a 64 bit load from a 32 bit local APIC register is allowed Robert Uhl
  2011-06-13 20:32 ` Blue Swirl
@ 2017-05-19 19:44 ` Thomas Huth
  2017-07-19  4:17 ` Launchpad Bug Tracker
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2017-05-19 19:44 UTC (permalink / raw)
  To: qemu-devel

Triaging old bug tickets ... can you somehow still reproduce this
problem with the latest version of QEMU (currently v2.9), or could we
close this ticket nowadays?

** Changed in: qemu
       Status: Confirmed => Incomplete

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

Title:
  Doing a 64 bit load from a 32 bit local APIC register is allowed

Status in QEMU:
  Incomplete

Bug description:
  Doing

  u64 lapic_idregister = (u64) fix_to_virt(FIX_APIC_BASE) + 0x20;

  and later in an interrupt handler

  movq (lapic_idregister), %rcx
  movq (%rcx), %rcx

  in a linux kernel module works in qemu 0.13.91 but not on real hardware (it simply reboots).
  On real hardware only

  movl (%rcx), %ecx

  works (also in qemu).

  Commandline:
  qemu-system-x86_64 \
  		-kernel $LINUXDIR/arch/x86_64/boot/bzImage \
  		-hda $BUILDROOTDIR/output/images/rootfs.ext2 \
  		-append "root=/dev/sda rw rootfstype=ext2 maxcpus=4" \
  		-cpu phenom \
  		-smp 4 \
  		-gdb tcp::1234 \
  		-net nic -net user

  Guest:
  Vanilla Linux Kernel 2.6.37.6 64-bit with buildroot

  Mikael Pettersson from the linux kernel mailinglist told me it's an
  accepts-invalid bug in qemu.

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

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

* [Qemu-devel] [Bug 796202] Re: Doing a 64 bit load from a 32 bit local APIC register is allowed
  2011-06-12 13:03 [Qemu-devel] [Bug 796202] [NEW] Doing a 64 bit load from a 32 bit local APIC register is allowed Robert Uhl
  2011-06-13 20:32 ` Blue Swirl
  2017-05-19 19:44 ` [Qemu-devel] [Bug 796202] " Thomas Huth
@ 2017-07-19  4:17 ` Launchpad Bug Tracker
  2 siblings, 0 replies; 4+ messages in thread
From: Launchpad Bug Tracker @ 2017-07-19  4:17 UTC (permalink / raw)
  To: qemu-devel

[Expired for QEMU because there has been no activity for 60 days.]

** Changed in: qemu
       Status: Incomplete => Expired

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

Title:
  Doing a 64 bit load from a 32 bit local APIC register is allowed

Status in QEMU:
  Expired

Bug description:
  Doing

  u64 lapic_idregister = (u64) fix_to_virt(FIX_APIC_BASE) + 0x20;

  and later in an interrupt handler

  movq (lapic_idregister), %rcx
  movq (%rcx), %rcx

  in a linux kernel module works in qemu 0.13.91 but not on real hardware (it simply reboots).
  On real hardware only

  movl (%rcx), %ecx

  works (also in qemu).

  Commandline:
  qemu-system-x86_64 \
  		-kernel $LINUXDIR/arch/x86_64/boot/bzImage \
  		-hda $BUILDROOTDIR/output/images/rootfs.ext2 \
  		-append "root=/dev/sda rw rootfstype=ext2 maxcpus=4" \
  		-cpu phenom \
  		-smp 4 \
  		-gdb tcp::1234 \
  		-net nic -net user

  Guest:
  Vanilla Linux Kernel 2.6.37.6 64-bit with buildroot

  Mikael Pettersson from the linux kernel mailinglist told me it's an
  accepts-invalid bug in qemu.

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

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

end of thread, other threads:[~2017-07-19  4:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-12 13:03 [Qemu-devel] [Bug 796202] [NEW] Doing a 64 bit load from a 32 bit local APIC register is allowed Robert Uhl
2011-06-13 20:32 ` Blue Swirl
2017-05-19 19:44 ` [Qemu-devel] [Bug 796202] " Thomas Huth
2017-07-19  4:17 ` Launchpad Bug Tracker

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