From nobody Thu Oct 27 14:55:56 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mypdz4YXXz4gFGY for ; Thu, 27 Oct 2022 14:56:07 +0000 (UTC) (envelope-from bT.ipjkc5oc30=vrvu8ivouwde=fx59ey4y21@em790814.fubar.geek.nz) Received: from e2i251.smtp2go.com (e2i251.smtp2go.com [103.2.140.251]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mypdy04ZZz3Zrn for ; Thu, 27 Oct 2022 14:56:04 +0000 (UTC) (envelope-from bT.ipjkc5oc30=vrvu8ivouwde=fx59ey4y21@em790814.fubar.geek.nz) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpservice.net; s=mgy720.a1-4.dyn; x=1666883464; h=Feedback-ID: X-Smtpcorp-Track:To:Message-Id:Date:From:Subject:Reply-To:Sender: List-Unsubscribe; bh=mnPMCB/G7XWWly6CU0Ertp2LAt4YT1q3XTqVRVGBTV0=; b=3Yzokwlp NsqozLXWCDhZzkdsXGMBEv6+El4WLkzMhlYCSqB4AVxA22e93EywBtXd5HZTGbRZj+cORg22SFS1C 9pVrh4Q6f3BlR6MXaO5QaUhVyKtRlPDY/6LNGKPwgCeo4i89UNvRzd0+BePcdolrjKLVryRyi5fok jZvz9yb7EUulcJ9jiXc/aHP8oZBsBZOucUn+4SNbXdZ2qugFDoQU+oPcY0C4PgWYZFl+TUmaeWLRU vfZKTjWJDeGFoNobmHJ/mzxjcmoLnnn105X7iysPYqndmKxedlFOQQe9HOj2ka2uqS9pGRqjl0wZl s3kIo0WWVaWF/FqvEy4bxEmHmg==; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fubar.geek.nz; i=@fubar.geek.nz; q=dns/txt; s=s790814; t=1666882564; h=from : subject : to : message-id : date; bh=mnPMCB/G7XWWly6CU0Ertp2LAt4YT1q3XTqVRVGBTV0=; b=l9g7s132zH0l2495zaIrYimvX22rT/UGyZ2kxbDJuPk0HwLrq99bxguM5LIFooXSBH0Ow dUh5yeUBsEuDAmwWvl2LgQRDQO0++YcPnWvhceYDCTbvSqUmCvzEl5FBDmJEJ010QQhonkI xVeyhjXXTEej8qXiJJR+2zIuq2xTJhwyQc/7lc9NWbb34q7ei/G+EtsV3opvtwuiBs39FPv NEs/XauhS0ZUpGxqE56TvQlSf0sMPriBtyzgBKhb4RiI++3zbclZPrEZe4fzyVhobRMOpv3 PrSOQfRHncijfopAmWID+8DZBexoH3yANzC9VslDZ9odGO99AiMBsmYd0s4g== Received: from [10.139.162.187] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2-S2G) (envelope-from ) id 1oo4Ib-Y8PLV5-Nb; Thu, 27 Oct 2022 14:56:01 +0000 Received: from [10.162.55.164] (helo=morbo.fubar.geek.nz) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96-S2G) (envelope-from ) id 1oo4Ib-4XpFLT-1g; Thu, 27 Oct 2022 14:56:01 +0000 Received: from smtpclient.apple (cpc91214-cmbg18-2-0-cust234.5-4.cable.virginm.net [81.102.75.235]) by morbo.fubar.geek.nz (Postfix) with ESMTPSA id 51C9D9946; Thu, 27 Oct 2022 14:55:57 +0000 (UTC) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: git: 9729f076e4d9 - main - arm64: Hyper-V: enablement for ARM64 in Hyper-V (Part 3, final) From: Andrew Turner In-Reply-To: <202210271354.29RDsUoH077155@gitrepo.freebsd.org> Date: Thu, 27 Oct 2022 15:55:56 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202210271354.29RDsUoH077155@gitrepo.freebsd.org> To: Wei Hu X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Smtpcorp-Track: 1oo4mP4bpFLT1g.WkwjVo0fsp37m Feedback-ID: 790814m:790814amQcrys:790814scBJig5zDu X-Report-Abuse: Please forward a copy of this message, including all headers, to X-Rspamd-Queue-Id: 4Mypdy04ZZz3Zrn X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=smtpservice.net header.s=mgy720.a1-4.dyn header.b=3Yzokwlp; dkim=pass header.d=fubar.geek.nz header.s=s790814 header.b=l9g7s132; dmarc=pass (policy=none) header.from=fubar.geek.nz; spf=pass (mx1.freebsd.org: domain of "bT.ipjkc5oc30=vrvu8ivouwde=fx59ey4y21@em790814.fubar.geek.nz" designates 103.2.140.251 as permitted sender) smtp.mailfrom="bT.ipjkc5oc30=vrvu8ivouwde=fx59ey4y21@em790814.fubar.geek.nz" X-Spamd-Result: default: False [-3.90 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[fubar.geek.nz,none]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; FORGED_SENDER(0.30)[andrew@fubar.geek.nz,bT.ipjkc5oc30=vrvu8ivouwde=fx59ey4y21@em790814.fubar.geek.nz]; RCVD_IN_DNSWL_MED(-0.20)[103.2.140.251:from]; R_SPF_ALLOW(-0.20)[+ip4:103.2.140.0/22]; R_DKIM_ALLOW(-0.20)[smtpservice.net:s=mgy720.a1-4.dyn,fubar.geek.nz:s=s790814]; MIME_GOOD(-0.10)[text/plain]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_NEQ_ENVFROM(0.00)[andrew@fubar.geek.nz,bT.ipjkc5oc30=vrvu8ivouwde=fx59ey4y21@em790814.fubar.geek.nz]; RCVD_COUNT_THREE(0.00)[4]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org]; DKIM_TRACE(0.00)[smtpservice.net:+,fubar.geek.nz:+]; ASN(0.00)[asn:23352, ipnet:103.2.140.0/22, country:US]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N I was planning on testing this as I now have appropriate hardware to run = arm64 Hyper-V. I have left some comments below. I am seeing FreeBSD/arm64 hang at the following point under Hyper-V on a = Microsoft Dev Kit 2023 box: vmbus0: decoding 3 range 0xe0000000-0xfed3ffff vmbus0: fb: fb_addr: 0xe0000000, size: 0x800000, actual size needed: = 0xc0000 vmbus0: allocated type 3 (0xe0000000-0xe07fffff) for rid 0 of vmbus0 vmbus0: successfully reserved memory for framebuffer starting at = 0xe0000000, size 0x800000 vmbus0: irq 0x2, vector 0 end 0x2 vmbus0: the irq 18 vmbus0: smp_started =3D 0 > On 27 Oct 2022, at 14:54, Wei Hu wrote: >=20 > The branch main has been updated by whu: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D9729f076e4d93c5a37e78d427bfe0f1a= b99bbcc6 >=20 > commit 9729f076e4d93c5a37e78d427bfe0f1ab99bbcc6 > Author: Souradeep Chakrabarti > AuthorDate: 2022-10-27 13:46:08 +0000 > Commit: Wei Hu > CommitDate: 2022-10-27 13:53:22 +0000 >=20 > arm64: Hyper-V: enablement for ARM64 in Hyper-V (Part 3, final) >=20 > This is the last part for ARM64 Hyper-V enablement. This includes > commone files and make file changes to enable the ARM64 FreeBSD > guest on Hyper-V. With this patch, it should be able to build > the ARM64 image and install it on Hyper-V. >=20 > Reviewed by: emaste, andrew, whu > Tested by: Souradeep Chakrabarti > Sponsored by: Microsoft > Differential Revision: https://reviews.freebsd.org/D36744 > --- > share/mk/src.opts.mk | 3 +- > sys/arm64/conf/GENERIC | 1 + > sys/arm64/conf/std.dev | 3 + > sys/arm64/conf/std.hyperv | 6 + > sys/conf/files.arm64 | 22 ++++ > sys/conf/files.x86 | 2 + > sys/dev/hyperv/include/hyperv.h | 5 + > sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c | 5 +- > sys/dev/hyperv/vmbus/hyperv.c | 194 = +++------------------------ > sys/dev/hyperv/vmbus/hyperv_machdep.h | 37 ------ > sys/dev/hyperv/vmbus/hyperv_reg.h | 193 = --------------------------- > sys/dev/hyperv/vmbus/hyperv_var.h | 4 + > sys/dev/hyperv/vmbus/i386/hyperv_machdep.c | 2 +- > sys/dev/hyperv/vmbus/vmbus.c | 197 = +++++++++------------------- > sys/dev/hyperv/vmbus/vmbus_et.c | 7 +- > sys/dev/hyperv/vmbus/vmbus_reg.h | 7 +- > sys/dev/hyperv/vmbus/vmbus_var.h | 15 +++ > sys/modules/Makefile | 1 + > sys/modules/hyperv/utilities/Makefile | 1 - > sys/modules/hyperv/vmbus/Makefile | 11 +- > 20 files changed, 164 insertions(+), 552 deletions(-) >=20 > diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk > index a03b8147ecbb..4c0913474ef7 100644 > --- a/share/mk/src.opts.mk > +++ b/share/mk/src.opts.mk > @@ -332,8 +332,7 @@ BROKEN_OPTIONS+=3DCXGBETOOL > BROKEN_OPTIONS+=3DMLX5TOOL > .endif >=20 > -# HyperV is currently x86-only > -.if ${__T} !=3D "amd64" && ${__T} !=3D "i386" > +.if ${__T} !=3D "amd64" && ${__T} !=3D "i386" && ${__T} !=3D = "aarch64" > BROKEN_OPTIONS+=3DHYPERV > .endif >=20 > diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC > index c716183aae61..60772893cdbb 100644 > --- a/sys/arm64/conf/GENERIC > +++ b/sys/arm64/conf/GENERIC > @@ -31,6 +31,7 @@ include "std.amd" > include "std.arm" > include "std.broadcom" > include "std.cavium" > +include "std.hyperv" > include "std.hisilicon" > include "std.imx" > include "std.marvell" > diff --git a/sys/arm64/conf/std.dev b/sys/arm64/conf/std.dev > index 6ef7358e5e85..8cdd35e2fd21 100644 > --- a/sys/arm64/conf/std.dev > +++ b/sys/arm64/conf/std.dev > @@ -107,3 +107,6 @@ device mmcsd # mmc/sd = flash cards > # HID support > options HID_DEBUG # enable debug msgs > device hid # Generic HID support > + > +#hyper-v support > +device hyperv This should only be in std.hyperv > diff --git a/sys/arm64/conf/std.hyperv b/sys/arm64/conf/std.hyperv > new file mode 100644 > index 000000000000..f87082f15c96 > --- /dev/null > +++ b/sys/arm64/conf/std.hyperv > @@ -0,0 +1,6 @@ > +# > +# Hyper-V support (Hyper-v Gen 2) > +# > + > +#hyper-v support > +device hyperv This file is missing a few devices needed by hyper-v, e.g. the uart and = acpi. It should be complete enough so the following kernel config will = boot: cpu ARM64 ident HYPERV include "std.arm64" include =E2=80=9Cstd.dev" include =E2=80=9Cstd.hyperv" > diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 > index 5178048cb0af..8b6ba43d2a3d 100644 > --- a/sys/conf/files.arm64 > +++ b/sys/conf/files.arm64 > @@ -624,3 +624,25 @@ arm64/rockchip/clk/rk3399_pmucru.c = optional fdt soc_rockchip_rk3399 >=20 > # Xilinx > arm/xilinx/uart_dev_cdnc.c optional uart = soc_xilinx_zynq > + > +# Microsoft Hyper-V This should probably be in the Device driver section, and be in = alphabetical order. > +dev/hyperv/vmbus/hyperv.c optional hyperv > +dev/hyperv/vmbus/aarch64/hyperv_aarch64.c optional = hyperv > +dev/hyperv/vmbus/vmbus.c optional = hyperv pci > +dev/hyperv/vmbus/aarch64/vmbus_aarch64.c optional = hyperv > +dev/hyperv/vmbus/vmbus_if.m optional = hyperv > +dev/hyperv/vmbus/vmbus_res.c optional = hyperv > +dev/hyperv/vmbus/vmbus_xact.c optional = hyperv > +dev/hyperv/vmbus/aarch64/hyperv_machdep.c = optional hyperv > +dev/hyperv/vmbus/vmbus_chan.c optional = hyperv > +dev/hyperv/vmbus/hyperv_busdma.c optional = hyperv > +dev/hyperv/vmbus/vmbus_br.c optional = hyperv > +dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c = optional hyperv > +dev/hyperv/utilities/vmbus_timesync.c = optional hyperv > +dev/hyperv/utilities/vmbus_heartbeat.c = optional hyperv > +dev/hyperv/utilities/vmbus_ic.c optional = hyperv > +dev/hyperv/utilities/vmbus_shutdown.c = optional hyperv > +dev/hyperv/utilities/hv_kvp.c optional = hyperv > +dev/hyperv/netvsc/hn_nvs.c optional = hyperv > +dev/hyperv/netvsc/hn_rndis.c optional hyperv > +dev/hyperv/netvsc/if_hn.c optional = hyperv The indentation for all the above should be cleaned up. Andrew