On 13/12/13 12:43, Riku Voipio wrote:
On Tue, Dec 10, 2013 at 11:51:41PM +, Tim Fletcher wrote:
To use kvm, you need to pass -enable-kvm to qemu-system-arm command
line. For example, if you want to try prebuilt linaro guest image from:
https://snapshots.linaro.org/ubuntu/images/kvm/263
You would run the following command:
qemu-system-arm -smp 2 -m 1024 -cpu cortex-a15 -M vexpress-a15 \
-kernel ./zImage -dtb ./vexpress-v2p-ca15-tc1.dtb \
-append 'root=/dev/mmcblk0p2 rw rootwait mem=1024M
console=ttyAMA0,38400n8' \
-drive if=sd,cache=writeback,file=kvm.qcow2 \
-nographic -enable-kvm
If kvm kernel support is not available, qemu will refuse to start with
-enable-kvm.
After some more tinkering I have now managed to boot this VM with KVM
enabled, I have to use qemu 1.7.5 from git and change the cpu to be host
rather than the a15 you suggested.
If I used the a15 you suggested I got the error:
kvm_init_vcpu failed: Invalid argument
bootlog from the VM boot included here for reference.
Virtual kernel memory layout:
vector : 0x - 0x1000 ( 4 kB)
fixmap : 0xfff0 - 0xfffe ( 896 kB)
vmalloc : 0xf000 - 0xff00 ( 240 MB)
lowmem : 0xc000 - 0xef80 ( 760 MB)
pkmap : 0xbfe0 - 0xc000 ( 2 MB)
modules : 0xbf00 - 0xbfe0 ( 14 MB)
.text : 0xc0008000 - 0xc053ee9c (5340 kB)
.init : 0xc053f000 - 0xc0574c40 ( 216 kB)
.data : 0xc0576000 - 0xc05a3820 ( 183 kB)
.bss : 0xc05a3828 - 0xc05cbe3c ( 162 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Hierarchical RCU implementation.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
NR_IRQS:16 nr_irqs:16 16
Architected cp15 timer(s) running at 24.00MHz (virt).
Switching to timer-based delay loop
sched_clock: ARM arch timer 56 bits at 24000kHz, resolution 41ns
sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 4294967ms
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer
freCuency.. 48.00 BogoMIPS (lpj=24)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
/cpus/cpu@0 missing clock-frequency property
/cpus/cpu@1 missing clock-frequency property
CPU0: thread -1, cpu 0, socket 0, mpidr 8000
Setting up static identity map for 0xc03f5008 - 0xcC3f5060
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 8001
Brought up 2 CPUs
SMP: Total of 2 processors activated.
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 4
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
of_amba_device_create(): amba_device_add() failed (-19) for
/memory-controller@2b0a
of_amba_device_create(): amba_device_add() failed (-19) for
/memory-controller@7ffd
of_amba_device_create(): amba_device_add() failed (-19) for /dma@7ffb
of_amba_device_create(): amba_device_add() failed (-19) for
/smb/motherboard/iofpga@3,/sysctl@02
of_amba_device_create(): amba_device_add() failed (-19) for
/smb/motherboard/iofpga@3,/wdt@0f
hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 8 bytes.
Serial: AMBA PL011 UART driver
1c09.uart: ttyAMA0 at MMIO 0x1c09 (irq = 37, base_baud = 0) is a
PL011 rev1
console [ttyAMA0] enabled
1c0a.uart: ttyAMA1 at MMIO 0x1c0a (irq = 38, base_baud = 0) is a
PL011 rev1
1c0b.uart: ttyAMA2 at MMIO 0x1c0b (irq = 39, base_baud = 0) is a
PL011 rev1
1c0c.uart: ttyAMA3 at MMIO 0x1c0c (irq = 40, base_baud = 0) is a
PL011 rev1
bio: create slab bio-0 at 0
3V3: 3300 mV
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Advanced Linux Sound Architecture Driver Initialized.
Switched to clocksource arch_sys_counter
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP: reno registered
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
kvm [1]: HYP mode not available
hw perfevents: enabled with ARMv7 Cortex-A15 PMU driver, 1 counters
available
bounce pool size: 64 pages
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 1490
io scheduler