qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Cam Macdonell <cam@cs.ualberta.ca>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Avi Kivity <avi@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] Re: Unusual physical address when using 64-bit BAR
Date: Tue, 13 Jul 2010 16:48:19 -0600	[thread overview]
Message-ID: <AANLkTileIhU5wSChUV5VBA_uMEkGeTSq1bzpTMaFq9ws@mail.gmail.com> (raw)
In-Reply-To: <20100713204157.GI31689@valinux.co.jp>

On Tue, Jul 13, 2010 at 2:41 PM, Isaku Yamahata <yamahata@valinux.co.jp> wrote:
> On Tue, Jul 13, 2010 at 02:05:51PM -0600, Cam Macdonell wrote:
>> >> > Seabios completely ignore the 64-bitness of the BAR. ?Looks like it also
>> >> > thinks the second half of the BAR is an I/O region instead of memory (hence
>> >> > the c200, that's part of the pci portio region.
>> >
>> > I've sent the patches to address it. But they haven't been merged yet.
>> > seabios doesn't map BARs beyond 4GB.
>> > If bar is mapped beyond 4GB, guest BIOS does it.
>>
>> Have those patches been merged yet?
>
> They have been merged into seabios upstream now.
> qemu seabios fork hasn't pulled for a while, though.
>
>
>> > To see how seabios works, it would help to increase CONFIG_DEBUG_LEVEL
>> > in config.h of seabios
>>
>> Where does the output from seabios end up?  Inside dmesg?
>
> It outputs them to the serial console which qemu emulates.
> seabios is out of kernel control, so dmesg doesn't show it.
>
>
>> >> pci_read_config: (val) 0x0 <- 0x1c (addr)
>> >> pci_write_config: (val) 0x0 -> 0x1c (addr)
>> >> pci_read_config: (val) 0xffffffff <- 0x1c (addr)
>> >> pci_write_config: (val) 0x0 -> 0x1c (addr)
>> >> pci_read_config: (val) 0x0 <- 0x1c (addr)
>> >> pci_write_config: (val) 0x0 -> 0x1c (addr)
>> >
>> > seabios BAR3. Not sure how it is mapped from this
>> > message.
>>
>> Isn't the BAR3 from the fact that a 64-bit BAR would use both BAR2 and
>> BAR3 to store all 64-bits?
>
> Yes. Seabios misbehaves. 64bit bar is(was) a missing feature.
> --
> yamahata
>
>

With the latest seabios git passed via -bios, I no longer see the
48-bit address, but instead a 32-bit address and then
ffffffff00000000.  This guest has 1gb of RAM so the address isn't be
mapped beyond 4g.

IVSHMEM: guest pci addr = e0000000, guest h/w addr = 1090912256, size = 20000000
IVSHMEM: guest pci addr = ffffffff00000000, guest h/w addr =
1090912256, size = 20000000

However, booting fails when I use a 64-bit BAR.  Booting is fine with
a 32-bit BAR.

HPET: 1 timers in total, 0 timers will be used for per-cpu timer
divide error: 0000 [#1] SMP last sysfs file:
CPU 0
Modules linked in:

Pid: 1, comm: swapper Not tainted 2.6.35-rc1 #280 /Bochs
RIP: 0010:[<ffffffff812a801b>]  [<ffffffff812a801b>] hpet_alloc+0x12c/0x35b
RSP: 0018:ffff88003e61fd80  EFLAGS: 00010246
RAX: 00038d7ea4c68000 RBX: ffff88003e6efd80 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff817b8520
RBP: ffff88003e61fdc0 R08: 00000000000080d0 R09: ffffc90000000000
R10: ffff88003f9ac600 R11: 0000000000000000 R12: ffff88003e61fdd0
R13: ffffc90000000000 R14: 0000000000000000 R15: ffffffff817a00a9
FS:  0000000000000000(0000) GS:ffff880002000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 0000000001a42000 CR4: 00000000000006f0DR0:
0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 1, threadinfo ffff88003e61e000, task ffff88003e620000)
Stack:
 ffff88003f43ab90 ffff88003f43ab90 ffffffff81ca3174 ffffffff81b1d596
<0> 0000000000000000 0000000000000100 0000000000000100 0000000000000000
<0> ffff88003e61fe80 ffffffff8102945d 00000000fed00000 ffffc90000000000
Call Trace:
 [<ffffffff81b1d596>] ? hpet_late_init+0x0/0xea
 [<ffffffff8102945d>] hpet_reserve_platform_timers+0x10b/0x115
 [<ffffffff81b1d596>] ? hpet_late_init+0x0/0xea
 [<ffffffff81b1d601>] hpet_late_init+0x6b/0xea
 [<ffffffff81b1d596>] ? hpet_late_init+0x0/0xea
 [<ffffffff81002069>] do_one_initcall+0x5e/0x159
 [<ffffffff81b0b71e>] kernel_init+0x18e/0x21c
 [<ffffffff8100aa24>] kernel_thread_helper+0x4/0x10
 [<ffffffff81b0b590>] ? kernel_init+0x0/0x21c
 [<ffffffff8100aa20>] ? kernel_thread_helper+0x0/0x10
Code: 89 1d 8a 92 b3 00 48 c1 ea 21 8b 73 34 49 c7 c7 a9 00 7a 81 48
8d 04 02 4c 89 f2 48 c7 c7 20 85 7b 81 48 c1 ea 20 48 89 d1 31 d2 <48>
f7 f1 83 7b 30 01 48
c7 c1 cd fa 7c 81 49 0f 46 cf 48 89 43
RIP  [<ffffffff812a801b>] hpet_alloc+0x12c/0x35b
 RSP <ffff88003e61fd80>
---[ end trace a7919e7f17c0a725 ]---
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: swapper Tainted: G      D     2.6.35-rc1 #280
Call Trace:
 [<ffffffff8145b870>] panic+0x8b/0x10b
 [<ffffffff81056a93>] ? exit_ptrace+0x38/0x121
 [<ffffffff8104f9e8>] do_exit+0x7a/0x722
 [<ffffffff8104c3bd>] ? spin_unlock_irqrestore+0xe/0x10
 [<ffffffff8104cfd8>] ? kmsg_dump+0x12b/0x145
 [<ffffffff8145eaa9>] oops_end+0xbf/0xc7
 [<ffffffff8100d299>] die+0x5a/0x63
 [<ffffffff8145e4b3>] do_trap+0x121/0x130
 [<ffffffff8100b560>] do_divide_error+0x96/0x9f
 [<ffffffff812a801b>] ? hpet_alloc+0x12c/0x35b
 [<ffffffff8100a83b>] divide_error+0x1b/0x20
 [<ffffffff812a801b>] ? hpet_alloc+0x12c/0x35b
 [<ffffffff81b1d596>] ? hpet_late_init+0x0/0xea
 [<ffffffff8102945d>] hpet_reserve_platform_timers+0x10b/0x115
 [<ffffffff81b1d596>] ? hpet_late_init+0x0/0xea
 [<ffffffff81b1d601>] hpet_late_init+0x6b/0xea
 [<ffffffff81b1d596>] ? hpet_late_init+0x0/0xea
 [<ffffffff81002069>] do_one_initcall+0x5e/0x159
 [<ffffffff81b0b71e>] kernel_init+0x18e/0x21c
 [<ffffffff8100aa24>] kernel_thread_helper+0x4/0x10
 [<ffffffff81b0b590>] ? kernel_init+0x0/0x21c
 [<ffffffff8100aa20>] ? kernel_thread_helper+0x0/0x10

  reply	other threads:[~2010-07-13 22:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-19 16:41 [Qemu-devel] Unusual physical address when using 64-bit BAR Cam Macdonell
2010-06-11 17:31 ` [Qemu-devel] " Cam Macdonell
2010-06-15 11:04   ` Avi Kivity
2010-06-24 21:51     ` Cam Macdonell
2010-06-27  8:39       ` Avi Kivity
2010-06-28 20:38         ` Cam Macdonell
2010-06-29  6:50           ` Avi Kivity
2010-06-29 17:48             ` Cam Macdonell
2010-06-30  3:29               ` Isaku Yamahata
2010-07-13 20:05                 ` Cam Macdonell
2010-07-13 20:41                   ` Isaku Yamahata
2010-07-13 22:48                     ` Cam Macdonell [this message]
2010-07-14  2:52                       ` Isaku Yamahata
2010-07-14 15:10                         ` Cam Macdonell
2010-07-20  9:52                           ` Isaku Yamahata
2010-07-21  3:31                             ` Michael S. Tsirkin
2010-07-21  3:49                               ` Isaku Yamahata
2010-08-24 16:52                                 ` Cam Macdonell
2010-08-25  2:21                                   ` Isaku Yamahata
2010-08-27 19:35                                     ` Cam Macdonell
2010-08-30  2:36                                       ` Isaku Yamahata

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=AANLkTileIhU5wSChUV5VBA_uMEkGeTSq1bzpTMaFq9ws@mail.gmail.com \
    --to=cam@cs.ualberta.ca \
    --cc=avi@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yamahata@valinux.co.jp \
    /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).