25 Star 65 Fork 168

openEuler / yocto-meta-openeuler

 / 详情

【23.09】qemu混合部署镜像启动client os

已验收
缺陷
创建于  
2023-09-15 22:27

【23.09】qemu混合部署镜像启动client os

一、缺陷信息

内核信息:

缺陷归属组件:

缺陷归属的版本:

缺陷简述:

【环境信息】
硬件信息

  • 裸机场景请提供问题的硬件信息
  • 虚拟机场景请提供虚拟机的XML文件或配置信息
    软件信息
  • OS版本及分支信息
  • 内核信息
  • 发现问题的组件版本信息
    网络信息
  • 如果有特殊组网,请提供网络拓扑信息

【问题复现步骤】,请描述具体的操作步骤

qemu-system-aarch64 -M virt,gic-version=3 -m 1G -cpu cortex-a57 -nographic \
-append 'maxcpus=3' -smp 4 \
-kernel zImage \
-initrd *.rootfs.cpio.gz \
-dtb qemu_mcs.dtb

####qemu中

echo "1 4 1 7" > /proc/sys/kernel/printk
modprobe mcs_km.ko
cat /proc/iomem
rpmsg_main -c 3 -t /lib/firmware/zephyr-image.bin -a 0x7a000000

【实际结果】,请描述出问题的结果和影响

qemu-aarch64 /home # cd ~
qemu-aarch64 ~ # echo "1 4 1 7" > /proc/sys/kernel/printk
qemu-aarch64 ~ # modprobe mcs_km.ko
qemu-aarch64 ~ # cat /proc/iomem
09000000-09000fff : pl011@9000000
  09000000-09000fff : 9000000.pl011 pl011@9000000
09010000-09010fff : pl031@9010000
  09010000-09010fff : rtc-pl031
09030000-09030fff : pl061@9030000
  09030000-09030fff : 9030000.pl061 pl061@9030000
0a003e00-0a003fff : a003e00.virtio_mmio virtio_mmio@a003e00
10000000-3efeffff : pcie@10000000
  10000000-1003ffff : 0000:00:01.0
  10040000-10040fff : 0000:00:01.0
40000000-6fffffff : System RAM
  40200000-409dffff : Kernel code
  409e0000-40a5ffff : reserved
  40a60000-40c3ffff : Kernel data
  48000000-490b8fff : reserved
  49200000-49209fff : reserved
70000000-700fffff : reserved
70100000-79ffffff : System RAM
7a000000-7dffffff : reserved
  7a000000-7dffffff : mcs_mem
7e000000-7fffffff : System RAM
  7e000000-7effffff : reserved
  7fdd0000-7ff74fff : reserved
  7ff75000-7ffe4fff : reserved
  7ffe7000-7ffe7fff : reserved
  7ffe8000-7ffeafff : reserved
  7ffeb000-7fff7fff : reserved
  7fff8000-7fffffff : reserved
4010000000-401fffffff : PCI ECAM
8000000000-ffffffffff : pcie@10000000
  8000000000-8000003fff : 0000:00:01.0
    8000000000-8000003fff : virtio-pci-modern
qemu-aarch64 ~ # rpmsg_main -c 3 -t /lib/firmware/zephyr-image.bin -a 0x7a000000
cpu:3, ld:7a000000, entry:7a000000, path:/lib/firmware/zephyr-image.bin
mmap failed: sh_mem_addr:0xffffffffffffffff
failed to init reserved mem
openamp init failed: -1

【其他相关附件信息】
比如系统message日志/组件日志、dump信息、图片等

qemu-aarch64 ~ # dmesg
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd070]
[    0.000000] Linux version 5.10.0-openeuler (oe-user@oe-host) (aarch64-openeuler-linux-gnu-gcc (crosstool-NG 1.25.0) 10.3.1, GNU ld (crosstool-NG 1.25.0) 2.37) #1 SMP PREEMPT Thu Sep 14 06:23:19 UTC 2023
[    0.000000] Machine model: linux,dummy-virt
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created DMA memory pool at 0x0000000070000000, size 1 MiB
[    0.000000] OF: reserved mem: initialized node client_os-dma-memory@70000000, compatible id shared-dma-pool
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x000000006fffffff]
[    0.000000]   node   0: [mem 0x0000000070000000-0x00000000700fffff]
[    0.000000]   node   0: [mem 0x0000000070100000-0x0000000079ffffff]
[    0.000000]   node   0: [mem 0x000000007a000000-0x000000007dffffff]
[    0.000000]   node   0: [mem 0x000000007e000000-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff]
[    0.000000] On node 0 totalpages: 262144
[    0.000000]   DMA zone: 4096 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 262144 pages, LIFO batch:63
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] percpu: Embedded 28 pages/cpu s77784 r8192 d28712 u114688
[    0.000000] pcpu-alloc: s77784 r8192 d28712 u114688 alloc=28*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[    0.000000] Detected PIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 832075
[    0.000000] CPU features: detected: GIC system register CPU interface
[    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000] CPU features: detected: Spectre-v2
[    0.000000] CPU features: detected: Spectre-v4
[    0.000000] CPU features: detected: ARM errata 1165522, 1319367, or 1530923
[    0.000000] CPU features: detected: Spectre-BHB
[    0.000000] CPU features: detected: ARM erratum 1742098
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 258048
[    0.000000] Kernel command line: maxcpus=3
[    0.000000] printk: log_buf_len individual max cpu contribution: 4096 bytes
[    0.000000] printk: log_buf_len total cpu_extra contributions: 12288 bytes
[    0.000000] printk: log_buf_len min size: 16384 bytes
[    0.000000] printk: log_buf_len: 32768 bytes
[    0.000000] printk: early log buf free: 13848(84%)
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 935748K/1048576K available (5824K kernel code, 800K rwdata, 2120K rodata, 512K init, 1067K bss, 112828K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] kmemleak: Kernel memory leak detector disabled
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GICv3: 224 SPIs implemented
[    0.000000] GICv3: 0 Extended SPIs implemented
[    0.000000] GICv3: Distributor has no Range Selector support
[    0.000000] GICv3: 16 PPIs implemented
[    0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000080a0000
[    0.000000] ITS [mem 0x08080000-0x0809ffff]
[    0.000000] ITS@0x0000000008080000: allocated 8192 Devices @410b0000 (indirect, esz 8, psz 64K, shr 1)
[    0.000000] ITS@0x0000000008080000: allocated 8192 Interrupt Collections @410c0000 (flat, esz 8, psz 64K, shr 1)
[    0.000000] GICv3: using LPI property table @0x00000000410d0000
[    0.000000] GICv3: CPU0: using allocated LPI pending table @0x00000000410e0000
[    0.000000] rcu:     Offload RCU callbacks from CPUs: (none).
[    0.000000] arch_timer: cp15 timer(s) running at 62.50MHz (virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0x1ffffffffffffff max_cycles: 0x1cd42e208c, max_idle_ns: 881590405314 ns
[    0.000489] sched_clock: 57 bits at 62MHz, resolution 16ns, wraps every 4398046511096ns
[    0.019710] Calibrating delay loop (skipped), value calculated using timer frequency.. 125.00 BogoMIPS (lpj=625000)
[    0.020136] pid_max: default: 32768 minimum: 301
[    0.026639] LSM: Security Framework initializing
[    0.028821] Yama: becoming mindful.
[    0.031267] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.031392] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.118097] /cpus/cpu-map: empty cluster
[    0.140069] rcu: Hierarchical SRCU implementation.
[    0.157202] Platform MSI: its@8080000 domain created
[    0.158370] PCI/MSI: /intc@8000000/its@8080000 domain created
[    0.161489] EFI services will not be available.
[    0.164866] smp: Bringing up secondary CPUs ...
[    0.175698] Detected PIPT I-cache on CPU1
[    0.177339] GICv3: CPU1: found redistributor 1 region 0:0x00000000080c0000
[    0.177677] GICv3: CPU1: using allocated LPI pending table @0x00000000410f0000
[    0.178479] CPU1: Booted secondary processor 0x0000000001 [0x411fd070]
[    0.193398] Detected PIPT I-cache on CPU2
[    0.193548] GICv3: CPU2: found redistributor 2 region 0:0x00000000080e0000
[    0.193843] GICv3: CPU2: using allocated LPI pending table @0x0000000041100000
[    0.194707] CPU2: Booted secondary processor 0x0000000002 [0x411fd070]
[    0.196023] smp: Brought up 1 node, 3 CPUs
[    0.196224] SMP: Total of 3 processors activated.
[    0.196327] CPU features: detected: 32-bit EL0 Support
[    0.196468] CPU features: detected: CRC32 instructions
[    0.208429] CPU: All CPU(s) started at EL1
[    0.209116] alternatives: patching kernel code
[    0.253532] devtmpfs: initialized
[    0.300727] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.301218] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.312561] pinctrl core: initialized pinctrl subsystem
[    0.317989] DMI not present or invalid.
[    0.324817] NET: Registered protocol family 16
[    0.340218] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.340703] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.341017] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.342106] audit: initializing netlink subsys (disabled)
[    0.346552] kworker/u8:0 (27) used greatest stack depth: 13216 bytes left
[    0.352989] audit: type=2000 audit(0.330:1): state=initialized audit_enabled=0 res=1
[    0.364986] cpuidle: using governor ladder
[    0.366497] cpuidle: using governor menu
[    0.370614] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.372898] ASID allocator initialised with 65536 entries
[    0.374405] Serial: AMBA PL011 UART driver
[    0.472374] 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 47, base_baud = 0) is a PL011 rev1
[    0.504700] printk: console [ttyAMA0] enabled
[    0.623812] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    0.624212] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[    0.624520] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.624820] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[    0.678645] NetLabel: Initializing
[    0.678897] NetLabel:  domain hash size = 128
[    0.679146] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.684252] NetLabel:  unlabeled traffic allowed by default
[    0.691752] clocksource: Switched to clocksource arch_sys_counter
[    0.887619] VFS: Disk quotas dquot_6.6.0
[    0.888422] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.908697] NET: Registered protocol family 2
[    0.912539] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.931856] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.932714] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.933672] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    0.934513] TCP: Hash tables configured (established 8192 bind 8192)
[    0.938851] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.939751] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.943980] NET: Registered protocol family 1
[    0.945885] PCI: CLS 0 bytes, default 64
[    0.956504] Trying to unpack rootfs image as initramfs...
[    4.248742] Freeing initrd memory: 17120K
[    4.259922] hw perfevents: enabled with armv8_pmuv3 PMU driver, 5 counters available
[    4.280313] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    4.348207] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    4.348904] 9p: Installing v9fs 9p2000 file system support
[    4.354830] NET: Registered protocol family 38
[    4.355963] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    4.374330] pl061_gpio 9030000.pl061: PL061 GPIO chip registered
[    4.380605] pci-host-generic 4010000000.pcie: host bridge /pcie@10000000 ranges:
[    4.383494] pci-host-generic 4010000000.pcie:       IO 0x003eff0000..0x003effffff -> 0x0000000000
[    4.385239] pci-host-generic 4010000000.pcie:      MEM 0x0010000000..0x003efeffff -> 0x0010000000
[    4.385730] pci-host-generic 4010000000.pcie:      MEM 0x8000000000..0xffffffffff -> 0x8000000000
[    4.388377] pci-host-generic 4010000000.pcie: ECAM at [mem 0x4010000000-0x401fffffff] for [bus 00-ff]
[    4.391954] pci-host-generic 4010000000.pcie: PCI host bridge to bus 0000:00
[    4.392826] pci_bus 0000:00: root bus resource [bus 00-ff]
[    4.393361] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[    4.393727] pci_bus 0000:00: root bus resource [mem 0x10000000-0x3efeffff]
[    4.394066] pci_bus 0000:00: root bus resource [mem 0x8000000000-0xffffffffff]
[    4.398596] pci 0000:00:00.0: [1b36:0008] type 00 class 0x060000
[    4.409093] pci 0000:00:01.0: [1af4:1000] type 00 class 0x020000
[    4.410187] pci 0000:00:01.0: reg 0x10: [io  0x0000-0x001f]
[    4.410531] pci 0000:00:01.0: reg 0x14: [mem 0x00000000-0x00000fff]
[    4.411021] pci 0000:00:01.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[    4.411817] pci 0000:00:01.0: reg 0x30: [mem 0x00000000-0x0003ffff pref]
[    4.422759] pci 0000:00:01.0: BAR 6: assigned [mem 0x10000000-0x1003ffff pref]
[    4.423932] pci 0000:00:01.0: BAR 4: assigned [mem 0x8000000000-0x8000003fff 64bit pref]
[    4.424565] pci 0000:00:01.0: BAR 1: assigned [mem 0x10040000-0x10040fff]
[    4.424962] pci 0000:00:01.0: BAR 0: assigned [io  0x1000-0x101f]
[    4.449403] virtio-pci 0000:00:01.0: enabling device (0000 -> 0003)
[    4.459379] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    4.585675] brd: module loaded
[    4.626762] loop: module loaded
[    4.683842] rtc-pl031 9010000.pl031: registered as rtc0
[    4.692972] 9pnet: Installing 9P2000 support
[    4.700430] registered taskstats version 1
[    4.816006] Freeing unused kernel memory: 512K
[    4.820204] Run /init as init process
[    4.820449]   with arguments:
[    4.820513]     /init
[    4.820577]   with environment:
[    4.820632]     HOME=/
[    4.820665]     TERM=linux
[    5.090743] mount (384) used greatest stack depth: 13168 bytes left
[    6.258955] rcS (398) used greatest stack depth: 13056 bytes left
[    6.570294] rcS (400) used greatest stack depth: 13008 bytes left
[   11.414530] 8021q: 802.1Q VLAN Support v1.8
[   11.716916] NET: Registered protocol family 17
[   12.146306] RPC: Registered named UNIX socket transport module.
[   12.146824] RPC: Registered udp transport module.
[   12.147056] RPC: Registered tcp transport module.
[   12.147305] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   12.192937] modprobe (454) used greatest stack depth: 12816 bytes left
[   13.378823] FS-Cache: Loaded
[   14.895222] NET: Registered protocol family 10
[   14.920804] Segment Routing with IPv6
[   14.946526] modprobe (531) used greatest stack depth: 12688 bytes left
[   16.469440] ipip: IPv4 and MPLS over IPv4 tunneling driver
[   16.485102] modprobe (580) used greatest stack depth: 12320 bytes left
[   21.849093] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   22.789705] SCSI subsystem initialized
[   23.666471] fuse: init (API version 7.33)
[   31.600182] random: dd: uninitialized urandom read (512 bytes read)
[   41.114157] ip (1020) used greatest stack depth: 12240 bytes left
[   42.114071] 8021q: adding VLAN 0 to HW filter on device eth0
[   48.681985] random: crng init done
[  132.561074] mcs_km: loading out-of-tree module taints kernel.
qemu-aarch64 ~ #

缺陷详情参考链接:

缺陷分析指导链接:
https:xxx

评论 (3)

saarloos 创建了缺陷

Hi saarloos, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: sig-Yocto, and any of the maintainers: @ilisimin , @fanglinxu , @Wayne Ren

openeuler-ci-bot 添加了
 
sig/sig-Yocto
标签
saarloos 负责人设置为fanglinxu

###运行:

  • step1:为qemu创建dtb文件
    首先,需要创建一份dtb文件,可以直接使用这个脚本:
    https://gitee.com/openeuler/mcs/blob/master/tools/create_dtb.sh

    执行 ./create_dtb.sh qemu-a53
    之后,可以创建出来 qemu.dtb

  • step2:运行qemu
    创建 /etc/qemu-ifup_openeuler:

    #!/bin/bash
    ifconfig $1 192.168.10.1 up
    

    执行以下命令运行qemu:

    qemu-system-aarch64 -machine virt,gic-version=3 \
       -cpu cortex-a53 -nographic -smp 4 -m 2G  \
       -device virtio-net-device,netdev=tap0 -netdev tap,id=tap0,script=/etc/qemu-ifup_openeuler \
       -append "maxcpus=3" \
       -kernel zImage \
       -initrd openeuler-image-mcs-qemu-aarch64-*.rootfs.cpio.gz \
       -dtb qemu.dtb
    

之后按照之前的步骤跑 rpmsg_main 即可

已测试,可开启,资料更新后关闭

hanzongcheng 通过openeuler/yocto-meta-openeuler Pull Request !1373任务状态待办的 修改为已完成
saarloos 任务状态已完成 修改为已验收

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
5329419 openeuler ci bot 1632792936 8134054 hzc04 1676617208
1
https://gitee.com/openeuler/yocto-meta-openeuler.git
git@gitee.com:openeuler/yocto-meta-openeuler.git
openeuler
yocto-meta-openeuler
yocto-meta-openeuler

搜索帮助