From owner-freebsd-virtualization@freebsd.org Fri Jun 19 00:23:33 2020 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CFBA43397A7 for ; Fri, 19 Jun 2020 00:23:33 +0000 (UTC) (envelope-from kiri@truefc.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 49p0046PRKz4JFL for ; Fri, 19 Jun 2020 00:23:32 +0000 (UTC) (envelope-from kiri@truefc.org) Received: by mailman.nyi.freebsd.org (Postfix) id DA07C33980D; Fri, 19 Jun 2020 00:23:32 +0000 (UTC) Delivered-To: virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D9CE8338F74 for ; Fri, 19 Jun 2020 00:23:32 +0000 (UTC) (envelope-from kiri@truefc.org) Received: from kx.truefc.org (1.212.52.36.ap.yournet.ne.jp [36.52.212.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp", Issuer "smtp" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49p0030H8Pz4J5b for ; Fri, 19 Jun 2020 00:23:30 +0000 (UTC) (envelope-from kiri@truefc.org) Received: from kx.truefc.org (kx.truefc.org [36.52.212.1]) by kx.truefc.org (8.15.2/8.15.2) with ESMTP id 05J0NKcM095750; Fri, 19 Jun 2020 09:23:20 +0900 (JST) (envelope-from kiri@kx.truefc.org) Message-Id: <202006190023.05J0NKcM095750@kx.truefc.org> Date: Fri, 19 Jun 2020 09:23:20 +0900 From: KIRIYAMA Kazuhiko To: "freebsd-virtualization@freebsd.org" Cc: kiri@truefc.org Subject: Can't system_powerdown in qemu-system-aarch64 monitor User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 MULE XEmacs/21.4 (patch 24) (Standard C) (amd64--freebsd) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 49p0030H8Pz4J5b X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of kiri@truefc.org has no SPF policy when checking 36.52.212.1) smtp.mailfrom=kiri@truefc.org X-Spamd-Result: default: False [2.18 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[truefc.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.67)[0.668]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.46)[-0.465]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(0.88)[0.879]; RCVD_COUNT_ONE(0.00)[1]; R_SPF_NA(0.00)[no SPF record]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:10013, ipnet:36.52.208.0/21, country:JP]; ONCE_RECEIVED(0.10)[] X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2020 00:23:33 -0000 Hi, all I'm wondering why system_powerdown can not be worked but system_reset can work on qemu-system-aarch64. I set up FreeBSD 13.0-CURRENT-arm64-aarch66 as follows: root@vm:~ # uname -a FreeBSD vm.truefc.org 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r353025: Thu Oct 3 19:38:47 JST 2019 admin@vm.truefc.org:/ds/obj/current/13.0/r353025/ds/src/current/13.0/r353025/amd64.amd64/sys/GENERIC amd64 root@vm:~ # qemu-system-aarch64 -version QEMU emulator version 4.1.0 Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers root@vm:~ # ifconfig igb0: flags=8943 metric 0 mtu 9000 options=4a520b9 ether 0c:c4:7a:b3:cf:d4 inet 36.52.212.2 netmask 0xfffffff8 broadcast 36.52.212.7 media: Ethernet autoselect (1000baseT ) status: active nd6 options=29 igb1: flags=8943 metric 0 mtu 9000 options=4e523bb ether 0c:c4:7a:b3:cf:d5 inet 192.168.1.17 netmask 0xffffff00 broadcast 192.168.1.255 media: Ethernet autoselect (1000baseT ) status: active nd6 options=29 lo0: flags=8049 metric 0 mtu 16384 options=680003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=21 vm-public: flags=8843 metric 0 mtu 9000 ether 9e:58:86:f8:e7:11 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: tap0 flags=143 ifmaxaddr 0 port 6 priority 128 path cost 2000000 member: igb0 flags=143 ifmaxaddr 0 port 1 priority 128 path cost 20000 groups: bridge vm-switch viid-4c918@ nd6 options=1 vm-local: flags=8843 metric 0 mtu 9000 ether d6:e6:99:60:b6:a5 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: igb1 flags=143 ifmaxaddr 0 port 2 priority 128 path cost 20000 groups: bridge vm-switch viid-f5dda@ nd6 options=1 tap0: flags=8943 metric 0 mtu 9000 description: vmnet-mftpkx-0-public options=80000 ether 58:9c:fc:10:ff:df groups: tap vm-port media: Ethernet autoselect status: active nd6 options=29 Opened by PID 1427 root@vm:~ # ifconfig tap create tap1 root@vm:~ # ifconfig tap1 mtu 9000 root@vm:~ # ifconfig vm-local addm tap1 root@vm:~ # ifconfig tap1 up root@vm:~ # ifconfig igb0: flags=8943 metric 0 mtu 9000 options=4a520b9 ether 0c:c4:7a:b3:cf:d4 inet 36.52.212.2 netmask 0xfffffff8 broadcast 36.52.212.7 media: Ethernet autoselect (1000baseT ) status: active nd6 options=29 igb1: flags=8943 metric 0 mtu 9000 options=4a520b9 ether 0c:c4:7a:b3:cf:d5 inet 192.168.1.17 netmask 0xffffff00 broadcast 192.168.1.255 media: Ethernet autoselect (1000baseT ) status: active nd6 options=29 lo0: flags=8049 metric 0 mtu 16384 options=680003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=21 vm-public: flags=8843 metric 0 mtu 9000 ether 9e:58:86:f8:e7:11 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: tap0 flags=143 ifmaxaddr 0 port 6 priority 128 path cost 2000000 member: igb0 flags=143 ifmaxaddr 0 port 1 priority 128 path cost 20000 groups: bridge vm-switch viid-4c918@ nd6 options=1 vm-local: flags=8843 metric 0 mtu 9000 ether d6:e6:99:60:b6:a5 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: tap1 flags=143 ifmaxaddr 0 port 7 priority 128 path cost 2000000 member: igb1 flags=143 ifmaxaddr 0 port 2 priority 128 path cost 20000 groups: bridge vm-switch viid-f5dda@ nd6 options=1 tap0: flags=8943 metric 0 mtu 9000 description: vmnet-mftpkx-0-public options=80000 ether 58:9c:fc:10:ff:df groups: tap vm-port media: Ethernet autoselect status: active nd6 options=29 Opened by PID 1427 tap1: flags=8903 metric 0 mtu 9000 options=80000 ether 58:9c:fc:10:86:31 groups: tap media: Ethernet autoselect status: no carrier nd6 options=29 root@vm:~ # qemu-system-aarch64 -machine virt -cpu cortex-a57 -m 8G -name tbedafc -uuid d83448d8-a537-11ea-b7ba-0cc47ab3cfd4 -device virtio-blk-device,drive=hd0 -drive if=none,format=raw,file=/vm/tbedafc/disk0.img,id=hd0 -hdc /vm/.iso/FreeBSD-13.0-CURRENT-arm64-aarch64-20200514-r361019-memstick.img -nographic -netdev tap,id=net0,ifname=tap1 -device virtio-net-device,netdev=net0,mac=58:9c:fc:0a:be:3a -serial telnet::4444,server,nowait,nodelay -monitor telnet::4445,server,nowait,nodelay -watchdog i6300esb -watchdog-action poweroff -bios /vm/.config/QEMU_EFI.fd WARNING: Image format was not specified for '/vm/.iso/FreeBSD-13.0-CURRENT-arm64-aarch64-20200514-r361019-memstick.img' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. And then connected FreeBSD guest and confirmed PCI connection of 6300ESB Watchdog Timer as follows: root@vm:~ # telnet localhost 4444 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. FreeBSD/arm64 (Amnesiac) (ttyu0) login: root Last login: Thu Jun 18 16:55:02 on ttyu0 FreeBSD 13.0-CURRENT (GENERIC) #0 r361019: Thu May 14 03:59:37 UTC 2020 Welcome to FreeBSD! Release Notes, Errata: https://www.FreeBSD.org/releases/ Security Advisories: https://www.FreeBSD.org/security/ FreeBSD Handbook: https://www.FreeBSD.org/handbook/ FreeBSD FAQ: https://www.FreeBSD.org/faq/ Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/ FreeBSD Forums: https://forums.FreeBSD.org/ Documents installed with the system are in the /usr/local/share/doc/freebsd/ directory, or can be installed later with: pkg install en-freebsd-doc For other languages, replace "en" with a language code like de or fr. Show the version of FreeBSD installed: freebsd-version ; uname -a Please include that output and any error messages when posting questions. Introduction to manual pages: man man FreeBSD directory layout: man hier Edit /etc/motd.template to change this login announcement. root@:~ # uname -a FreeBSD 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r361019: Thu May 14 03:59:37 UTC 2020 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64 root@:~ # pciconf -lv hostb0@pci0:0:0:0: class=0x060000 rev=0x00 hdr=0x00 vendor=0x1b36 device=0x0008 subvendor=0x1af4 subdevice=0x1100 vendor = 'Red Hat, Inc.' device = 'QEMU PCIe Host bridge' class = bridge subclass = HOST-PCI virtio_pci0@pci0:0:1:0: class=0x010000 rev=0x00 hdr=0x00 vendor=0x1af4 device=0x1001 subvendor=0x1af4 subdevice=0x0002 vendor = 'Red Hat, Inc.' device = 'Virtio block device' class = mass storage subclass = SCSI none0@pci0:0:2:0: class=0x088000 rev=0x00 hdr=0x00 vendor=0x8086 device=0x25ab subvendor=0x1af4 subdevice=0x1100 vendor = 'Intel Corporation' device = '6300ESB Watchdog Timer' class = base peripheral root@:~ # Then connected to monitor and test system_powerdown but nothing happened but system_reset guest immediately rebooted: root@vm:~ # telnet localhost 4445 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. QEMU 4.1.0 monitor - type 'help' for more information (qemu) system_powerdown (qemu) watchdog_action poweroff (qemu) system_powerdown (qemu) watchdog_action shutdown (qemu) system_powerdown (qemu) system_reset (qemu) What's wrong ? With Regards --- Kazuhiko Kiriyama