Overall Concept
Memory Layout
- qemu-system-x86_64 -device ivshmem,size=4,shm=abc
system
0000000000000000-ffffffffffffffff (prio 0, RW): system
0000000000000000-000000003fffffff (prio 0, RW): alias ram-below-4g @pc.ram 0000000000000000-000000003fffffff
0000000000000000-ffffffffffffffff (prio -1, RW): pci
00000000000a0000-00000000000bffff (prio 1, RW): cirrus-lowmem-container
00000000000a0000-00000000000bffff (prio 0, RW): cirrus-low-memory
00000000000c0000-00000000000dffff (prio 1, RW): pc.rom
00000000000e0000-00000000000fffff (prio 1, R-): alias isa-bios @pc.bios 0000000000020000-000000000003ffff
00000000fc000000-00000000fdffffff (prio 1, RW): cirrus-pci-bar0
00000000fc000000-00000000fc7fffff (prio 1, RW): vga.vram
00000000fc000000-00000000fc7fffff (prio 0, RW): cirrus-linear-io
00000000fd000000-00000000fd3fffff (prio 0, RW): cirrus-bitblt-mmio
00000000fe000000-00000000fe3fffff (prio 1, RW): ivshmem-bar2-container
00000000fe000000-00000000fe3fffff (prio 0, RW): ivshmem.bar2 (real shared memory=4M)
00000000febc0000-00000000febdffff (prio 1, RW): e1000-mmio
00000000febf0000-00000000febf0fff (prio 1, RW): cirrus-mmio
00000000febf1000-00000000febf10ff (prio 1, RW): ivshmem-mmio (Conf. space = 256Bytes)
(monitor) info qtree
bus: pci.0
type PCI
dev: ivshmem, id ""
chardev = ""
size = "4"
vectors = 1 (0x1)
ioeventfd = false
msi = true
shm = "abc"
role = ""
use64 = 1 (0x1)
addr = 04.0
romfile = ""
rombar = 1 (0x1)
multifunction = false
command_serr_enable = true
class RAM controller, addr 00:04.0, pci id 1af4:1110 (sub 1af4:1100)
bar 0: mem at 0xfebf1000 [0xfebf10ff]
bar 2: mem at 0xfe000000 [0xfe3fffff]
lspci shows
00:04.0 RAM memory: Red Hat, Inc Device 1110
In a host, start memnic-host-sim application to configure mac address and NIC status.
root@choonho:~/opensource/memnic/host-sim# ./memnic-host-sim /dev/shm/abc
References:
http://www.linux-kvm.org/wiki/images/c/cc/2011-forum-nahanni.v5.for.public.pdf
http://lwn.net/Articles/380869/
Setting Shared Memory : https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Tuning_and_Optimizing_Red_Hat_Enterprise_Linux_for_Oracle_9i_and_10g_Databases/chap-Oracle_9i_and_10g_Tuning_Guide-Setting_Shared_Memory.html
System Address Map Initialization in x86/x64 : http://resources.infosecinstitute.com/system-address-map-initialization-x86x64-architecture-part-2-pci-express-based-systems/