All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Dietmar Maurer <dietmar@proxmox.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] problems with freeBSD
Date: Wed, 06 Mar 2013 16:56:09 +0100	[thread overview]
Message-ID: <51376719.50602@redhat.com> (raw)
In-Reply-To: <24E144B8C0207547AD09C467A8259F7557B2BE14@lisa.maurer-it.com>

On 03/06/13 09:21, Dietmar Maurer wrote:
> Using qemu 1.4.0:
> 
>  
> 
> # qemu -hda test.raw -m 512 -cdrom
> pfSense-LiveCD-2.0.2-RELEASE-amd64-20121207-2239.iso
> 
>  
> 
> Results in:
> 
>  
> 
> trap 12: page fault while in kernel mode
> 
> …
> 
> stopped at x86bios_emu_rdw+0x2f: movzwl (%rbx),%eax
> 
>  
> 
> Any ideas? Can somebody reproduce that?

I found this on the web:

351	static uint16_t
352	x86bios_emu_rdw(struct x86emu *emu, uint32_t addr)
353	{
354		uint16_t *va;
355	
356		va = x86bios_get_pages(addr, sizeof(*va));
357		if (va == NULL)
358			x86bios_set_fault(emu, addr);
359	
360	#ifndef __NO_STRICT_ALIGNMENT
361		if ((addr & 1) != 0)
362			return (le16dec(va));
363		else
364	#endif
365		return (le16toh(*va));
366	}

"movzwl (%rbx),%eax" reads the 16-bit word at %rbx, copies it into the
low 16 bits of %eax, and clears the rest of the bits in %eax.

This probably corresponds to the *va dereference at the end of the
function. (le16toh() is compiled out if the platform is little endian.)
Either x86bios_get_pages() returns garbage, or "addr" is garbage on input.

You'll have to trace back the callpath from x86bios_emu_rdw(), possibly
instrumenting it with printk()s (or whatever it's called in FreeBSD).

Laszlo

  parent reply	other threads:[~2013-03-06 15:54 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06  8:21 [Qemu-devel] problems with freeBSD Dietmar Maurer
2013-03-06 12:41 ` Alexandre DERUMIER
2013-03-06 14:38   ` Dietmar Maurer
2013-03-06 15:56 ` Laszlo Ersek [this message]
2013-03-06 23:12 ` Aurelien Jarno
2013-03-07  0:53   ` Kevin O'Connor
2013-03-07  1:28     ` Laszlo Ersek
2013-03-07  1:58       ` [Qemu-devel] [SeaBIOS] " Peter Stuge
2013-03-07  6:12         ` [Qemu-devel] [Qemu-stable] " Doug Goldstein
2013-03-07  6:32           ` Peter Maydell
2013-03-07  7:17           ` Michael Tokarev
2013-03-07 11:56             ` Gerd Hoffmann
2013-03-07 13:06               ` Michael Tokarev
2013-03-07 15:03               ` Peter Maydell
2013-03-07 15:56                 ` Gerd Hoffmann
2013-03-07 16:03                   ` Peter Maydell
2013-03-07 16:21                     ` Aurelien Jarno
2013-03-07 18:57                       ` [Qemu-devel] [SeaBIOS] [Qemu-stable] " Peter Stuge
2013-03-08  7:50                       ` [Qemu-devel] " Paolo Bonzini
2013-03-08 13:52                     ` [Qemu-devel] [Qemu-stable] [SeaBIOS] " Kevin O'Connor
2013-03-08 14:57                       ` [Qemu-devel] [SeaBIOS] [Qemu-stable] " Peter Stuge
2013-03-07 20:24                   ` David Woodhouse
2013-03-08  7:47                     ` Paolo Bonzini
2013-03-08  7:54                       ` David Woodhouse
2013-03-08  8:20                       ` Gerd Hoffmann
2013-03-08  8:33                         ` Paolo Bonzini
2013-03-08  9:58                           ` Gerd Hoffmann
2013-03-07 16:33                 ` [Qemu-devel] [Qemu-stable] [SeaBIOS] " Dietmar Maurer
2013-03-07 11:17       ` [Qemu-devel] " Gerd Hoffmann
2013-03-07  8:43     ` Aurelien Jarno
2013-03-07 12:16       ` Laszlo Ersek
2013-03-07 13:48         ` Aurelien Jarno
2013-03-07 13:02       ` Don Slutz
2013-03-07 14:00         ` Don Slutz
2013-03-07 16:05           ` Paolo Bonzini
2013-03-07 13:57       ` Kevin O'Connor
2013-03-07 14:09         ` [Qemu-devel] [SeaBIOS] " Don Slutz
2013-03-07 16:15         ` [Qemu-devel] " Aurelien Jarno
2013-03-08  3:35       ` Kevin O'Connor
2013-03-08 11:30         ` [Qemu-devel] [SeaBIOS] " Laszlo Ersek

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=51376719.50602@redhat.com \
    --to=lersek@redhat.com \
    --cc=dietmar@proxmox.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.