Remove hardcoded virtio mmio base address and reduce device size
authorGan Shun <ganshun@gmail.com>
Wed, 1 Jun 2016 20:22:34 +0000 (13:22 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 1 Jun 2016 22:19:17 +0000 (18:19 -0400)
commit840012689b63d5aabe19701577b7ccd6042db02d
tree4ed59bd307cc01938ba4329af90c920cfaf8273d
parentf083c63e874cb3b9670c54751fd4123403ac445a
Remove hardcoded virtio mmio base address and reduce device size

Each virtio mmio device page is only 0x100 in size, not counting the
config space. The config space is pretty small and I've seen other
examples use either 1K or 0x200, which should be more than enough.
Also made the commandline parameter take in its address from the device
struct instead of a fixed string value. The virtio_devices start from
the next 512 GB boundary to shortcut the page table walk and fault
faster.

Bug: 29003537
Fixes: #5, b/29003537
Tested: Ran and booted a linux guest.

Signed-off-by: Gan Shun <ganshun@gmail.com>
Change-Id: I8391efe930fe5b3f7bd29fd37ff7ae572778d25c
[minor formatting]
Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
tests/vmm/vmrunkernel.c