Re: qemu status on ARM

2013-12-30 Thread Tim Fletcher

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


Thanks for the help Riku, I've got this work reliably now. The only 
thing I had to change was the network setup, I have openvswitch running 
on the Cubietruck (it makes things easier) so I had to add these lines:


-net 
tap,ifname=linaro-test,script=/root/bin/ovs-ifup,downscript=/root/bin/ovs-ifdown 



and

-net nic,model=lan9118,id=linaro-test

The scripts just add and remove the ports from the internal vswitch.

--
Tim Fletcher t...@night-shade.org.uk


--
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/52c1c348.7060...@night-shade.org.uk



Re: qemu status on ARM

2013-12-14 Thread Tim Fletcher

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 

Re: qemu status on ARM

2013-12-14 Thread Luke Kenneth Casson Leighton
tim i'm sure i saw some patches which add one of the other CPU types,
not just A15, a couple months back.  the work was, if i vaguely
remember, done by someone with an @redhat.com email address.

the clue that you're operating in emulated (non-VM) mode is this:

 kvm [1]: HYP mode not available

so it'll be slow until you find out what's going on here.

l.


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/capweedxluoj4a54fde8s-w1p5bbjegz3v08jtzobh7s9sg8...@mail.gmail.com



Re: qemu status on ARM

2013-12-14 Thread Tim Fletcher

On 14/12/13 12:51, Luke Kenneth Casson Leighton wrote:

tim i'm sure i saw some patches which add one of the other CPU types,
not just A15, a couple months back.  the work was, if i vaguely
remember, done by someone with an @redhat.com email address.


There are a few references to this error, I'll track them down and see 
what the gist of them is. The big win here is that there is now an 
affordable KVM capable arm device that Debian supports fairly cleanly.



the clue that you're operating in emulated (non-VM) mode is this:


kvm [1]: HYP mode not available


so it'll be slow until you find out what's going on here.


The boot log was from the VM booting, so that would be expected?

http://www.spinics.net/lists/kvm-arm/msg02582.html

--
Tim Fletcher t...@night-shade.org.uk


--
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/52ac8c79.2080...@night-shade.org.uk



Re: qemu status on ARM

2013-12-14 Thread Luke Kenneth Casson Leighton
On Sat, Dec 14, 2013 at 4:51 PM, Tim Fletcher t...@night-shade.org.uk wrote:

 The boot log was from the VM booting, so that would be expected?

 http://www.spinics.net/lists/kvm-arm/msg02582.html

 right.  ok.  thought it was the host.  don't know why!

 --
 Tim Fletcher t...@night-shade.org.uk


-- 
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/capweedx1viz1r_84qox0ovm22c93fh3sfnw5k1aroj+cogx...@mail.gmail.com



qemu status on ARM

2013-12-10 Thread Tim Fletcher

Evening all,

I now have a Cubietruck with an upstream kernel that includes 
virtualisation extensions, thanks to the work of some of the Fedora people.


dmesg log of the boot

[0.004790] CPU: Testing write buffer coherency: ok
[0.041405] CPU0: thread -1, cpu 0, socket 0, mpidr 8000
[0.049933] CPU1: Booted secondary processor
[0.049981] CPU1: thread -1, cpu 1, socket 0, mpidr 8001
[0.050126] Brought up 2 CPUs
[0.050155] CPU: All CPU(s) started in HYP mode.
[0.050160] CPU: Virtualization extensions available.

I want to test out qemu on debian arm but I'm not sure what the state of 
qemu on debian arm is. I've installed the packages and qemu starts but I 
don't know how to tell if it's using the CPU extensions. I've not had 
time to actually build a VM to try and boot it but I will later this week.


--
Tim Fletcher t...@night-shade.org.uk


--
To UNSUBSCRIBE, email to debian-arm-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/52a7a90d.6080...@night-shade.org.uk