Re: KVM on arm64 with kvm tools

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27/02/13 09:44, Alexey Smirnov wrote:
> Hi Marc,
> 
> 
>     To debug that kind of thing, I pass "earlyprintk=smh" to the guest
>     kernel. 
> 
>     This causes the early kernel output to be printed by the model using
>     semi-hosting, until the guest enables its virtio console.
> 
> 
> 
> I tried enabling early console by adding -p "earlyprintk=smh" to lkvm
> command, but this did not enable it. After guest boots I can see from
> "dmesg" that the guest kernel indeed received this option. Is there
> anything I should do on the host OS side to enable semi-hosting? Why I
> cannot see the early console output?

Weird. Here's how I run my Foundation model, and you can see the output
of a guest booting up:

~/Work$ ./Foundation_v8pkg/Foundation_v8 --network=nat --network-nat-ports=8022=22 --image=linux-system.axf 
terminal_0: Listening for serial connection on port 5000
terminal_1: Listening for serial connection on port 5001
terminal_2: Listening for serial connection on port 5002
terminal_3: Listening for serial connection on port 5003
Simulation is started
Initializing cgroup subsys cpu
Linux version 3.8.0-rc6+ (maz@e102391-lin) (gcc version 4.7.1 (0.11.114) ) #802 SMP PREEMPT Tue Feb 5 13:19:06 GMT 2013
CPU: AArch64 Processor [410fd000] revision 0
Machine: linux,dummy-virt
bootconsole [earlycon0] enabled
psci: probing function IDs from device-tree
CPU 0: missing enable-method property
PERCPU: Embedded 11 pages/cpu @ffffffc00ffed000 s15168 r8192 d21696 u45056
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64640
Kernel command line: earlyprintk=smh root=/dev/root rw rootflags=rw,trans=virtio,version=9p2000.L rootfstype=9p init=/virt/init  ip=dhcp
PID hash table entries: 1024 (order: 1, 8192 bytes)
Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
software IO TLB [mem 0x8b000000-0x8f000000] (64MB) mapped at [ffffffc00b000000-ffffffc00effffff]
Memory: 256MB = 256MB total
Memory: 176048k/176048k available, 86096k reserved
Virtual kernel memory layout:
    vmalloc : 0xffffff8000000000 - 0xffffffbbffff0000   (245759 MB)
    vmemmap : 0xffffffbc01c00000 - 0xffffffbc01f80000   (     3 MB)
    modules : 0xffffffbffc000000 - 0xffffffc000000000   (    64 MB)
    memory  : 0xffffffc000000000 - 0xffffffc010000000   (   256 MB)
      .init : 0xffffffc000506000 - 0xffffffc00052eb40   (   163 kB)
      .text : 0xffffffc000080000 - 0xffffffc000506000   (  4632 kB)
      .data : 0xffffffc000530000 - 0xffffffc00056fa30   (   255 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
NR_IRQS:64 nr_irqs:64 0
Architected local timer running at 25.16MHz (virt).
Calibrating delay loop (skipped), value calculated using timer frequency.. 50.33 BogoMIPS (lpj=251658)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 256
hw perfevents: enabled with arm/armv8-pmuv3 PMU driver, 1 counters available
Brought up 1 CPUs
SMP: Total of 1 processors activated (50.33 BogoMIPS).
devtmpfs: initialized
atomic64 test passed
NET: Registered protocol family 16
vdso: 2 pages (1 code, 1 data) at base ffffffc000571000
hw-breakpoint: found 16 breakpoint and 16 watchpoint registers.
Serial: AMBA PL011 UART driver
bio: create slab <bio-0> at 0
SCSI subsystem initialized
Switching to clocksource arch_sys_counter
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 3, 32768 bytes)
TCP bind hash table entries: 2048 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP: reno registered
UDP hash table entries: 256 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 256 (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
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
fuse init (API version 7.20)
9p: Installing v9fs 9p2000 file system support
msgmni has been set to 343
io scheduler noop registered
io scheduler cfq registered (default)
Serial: AMBA driver
console [hvc0] enabled, bootconsole disabled

On the host side, I run:

root@hot-poop:~# ./lkvm run -c1 --console virtio -p "earlyprintk=smh" -k Image
  # lkvm run -k Image -m 256 -c 1 --name guest-450
  Warning: Image is not a bzImage. Trying to load it as a flat binary...
  Info: Loaded kernel to 0x80080000 (5185572 bytes)
  Info: Placing fdt at 0x8fe00000 - 0x8fffffff
  Warning: Ignoring invalid GIC IRQ 4
  Warning: Ignoring invalid GIC IRQ 3
  Warning: Ignoring invalid GIC IRQ 4
  Warning: Ignoring invalid GIC IRQ 3
  Info: virtio-mmio.devices=0x200@0x0:32

  Info: virtio-mmio.devices=0x200@0x200:33

  Info: virtio-mmio.devices=0x200@0x400:35

TCP: cubic registered
NET: Registered protocol family 17
9pnet: Installing 9P2000 support
Key type dns_resolver registered
VFS: Mounted root (9p filesystem) on device 0:12.
devtmpfs: mounted
Freeing init memory: 160K
Mounting...
sh-4.2# 

Semihosting should be enable by default on the model. You can also
try passing --semihost to your model to see if it changes anything.

	M.
-- 
Jazz is not dead. It just smells funny...


_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux