From owner-freebsd-virtualization@freebsd.org Sat May 15 18:55:30 2021 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 AF42264CF4E for ; Sat, 15 May 2021 18:55:30 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2a00:e10:2800::a130]) (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 "CN", Issuer "CN" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FjF2n48jSz3M68 for ; Sat, 15 May 2021 18:55:29 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mh0.gentlemail.de (mh0.gentlemail.de [IPv6:2a00:e10:2800:0:0:0:0:a135]) by mx0.gentlemail.de (8.15.2/8.15.2) with ESMTP id 14FItGs7005889; Sat, 15 May 2021 20:55:18 +0200 (CEST) (envelope-from freebsd@omnilan.de) Received: from titan.inop.mo1.omnilan.net (s1.omnilan.de [217.91.127.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 1BA83C6A; Sat, 15 May 2021 20:55:16 +0200 (CEST) Subject: Re: FreeBSD 12.1 i386 on Hyper-V Fails to Mount Root From: Harry Schmalzbauer To: Wei Hu , Chris Knight , "freebsd-virtualization@freebsd.org" References: Organization: OmniLAN Message-ID: Date: Sat, 15 May 2021 20:55:15 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Greylist: inspected by milter-greylist-4.6.2 (mx0.gentlemail.de [IPv6:2a00:e10:2800:0:0:0:0:a130]); Sat, 15 May 2021 20:55:20 +0200 (CEST) for IP:'2a00:e10:2800::a135' DOMAIN:'mh0.gentlemail.de' HELO:'mh0.gentlemail.de' FROM:'freebsd@omnilan.de' RCPT:'' X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx0.gentlemail.de [IPv6:2a00:e10:2800:0:0:0:0:a130]); Sat, 15 May 2021 20:55:20 +0200 (CEST) X-Rspamd-Queue-Id: 4FjF2n48jSz3M68 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@omnilan.de designates 2a00:e10:2800::a130 as permitted sender) smtp.mailfrom=freebsd@omnilan.de X-Spamd-Result: default: False [-1.30 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[omnilan.de]; ARC_NA(0.00)[]; NEURAL_SPAM_SHORT(1.00)[0.999]; HAS_ORG_HEADER(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; SPAMHAUS_ZRD(0.00)[2a00:e10:2800::a130:from:127.0.2.255]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; FREEMAIL_TO(0.00)[microsoft.com,gmail.com,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:61157, ipnet:2a00:e10:2800::/38, country:DE]; RCVD_TLS_LAST(0.00)[]; MAILMAN_DEST(0.00)[freebsd-virtualization]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:e10:2800::a130:from] X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.34 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: Sat, 15 May 2021 18:55:30 -0000 Am 14.05.2021 um 18:44 schrieb Harry Schmalzbauer: > Am 16.10.2020 um 11:35 schrieb Wei Hu via freebsd-virtualization: >>> : >>> >> Did you try 12.0? Maybe something changed in 12.x causes failure. >> I386 is not well tested on Hyper-V. I will try to reproduce and take >> a look. > > The regression happened before 12.0. > Today I stumbled across this problem too and tried 11.4 (/May 8th, > 2020) /sucessfully, while 12.0 (/Oct 19th, 2018)/ is failing with i386 > releases. > > One commit which is in 12 but not in 11.4 is r332489. > : : : > Unfortunately beyond my skills. In sys/x86/x86/local_apic.c, I added this debug printf:         for (idx = IPI_DYN_FIRST; idx <= IPI_DYN_LAST; idx++) { printf("DEBUG: native_lapic_ipi_alloc(), idx = %i\n", idx);                 ip = &idt[idx];                 func = (ip->gd_hioffset << 16) | ip->gd_looffset;                 if ((!pti && func == (uintptr_t)&IDTVEC(rsvd)) ||                     (pti && func == (uintptr_t)&IDTVEC(rsvd_pti))) {                         vector = idx;                         setidt(vector, ipifunc, SDT_APIC, SEL_KPL, GSEL_APIC);                         break;                 }         } This is my latest attempt to see if at least the origin of my fault tracing matches. It does. From #define IPI_DYN_FIRST   (APIC_IPI_INTS + 9) in sys/x86/include/apicvar.h I expected to see 252, 253 and 254, which I sucessfully verified. Now comes the part I cannot read: (uintptr_t)&IDTVEC(rsvd) IDTVEC(rsvd) seems to be a assembler makro from sys/i386/i386/exception.s But now it doesn't make any sense for me to dig further, I simply do not understand it. Unfortunately having broken i386 support on Hyper-V is not a cosmetic issue. Removing "device hyperv" from kernel gives access to the v-hdd via legacy IDE/ada, but then I have no NIC. Choosing between missing HDD and missing network support is hard nowadays ;-) Any help getting i386 up and running back on Hyper-V highly appreciated!  11.4 is the latest working version, all i386-releases starting with 12.0 don't work! Thanks, -harry