From nobody Thu Sep 8 04:23:14 2022 X-Original-To: dev-commits-src-main@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 4MNQwL33Mbz4c32Z; Thu, 8 Sep 2022 04:23:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MNQwL2QD6z3FZY; Thu, 8 Sep 2022 04:23:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662610994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FTnQqNR/Pbe0tHF7lx82cZs6/I3/POO9GRVHN0i0/x4=; b=yqTO8PqfH4orOh4GWqM+mLfR5Wz4n2lFxG+sCfilSFg3aKxbWZC/mqIXbRf28Hx87PEmym ZFTV5/0L8fFiFSLplsCi8Z25WnbZrxW91ByLXTI7O+eDXAoxIRCVNGsC2fMokgzk/3PAgu p+ZCfPlWWJ0Cn+sGQGFGESWL/W6PMjp/+fEcouB+DUufHXtlb39XWlSvTbMYpR63x41XZm kIEUJ9aN1Bw6mWbrvk/QRP+Dhzi5SKppxNNOWCkPijRHS4Sag7I/OL6hyOGqGKBSV/geJc BXJqX4HmJmtGjqPpT2xqVYUul+TX+0g8oNn3ctjnCjNlSAqVj3RREq/skQv31w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MNQwL1TSYzlvx; Thu, 8 Sep 2022 04:23:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2884NE9d089210; Thu, 8 Sep 2022 04:23:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2884NErO089209; Thu, 8 Sep 2022 04:23:14 GMT (envelope-from git) Date: Thu, 8 Sep 2022 04:23:14 GMT Message-Id: <202209080423.2884NErO089209@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wei Hu Subject: git: 6f7b1310b6fe - main - Hyper-V: storvsc: relax a couple more kasserts List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6f7b1310b6fe36f9bb653d3e97bc257adced3a2b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662610994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FTnQqNR/Pbe0tHF7lx82cZs6/I3/POO9GRVHN0i0/x4=; b=h2ry2SpAnHcXoG2pHevZRATxLQFETWYRX7Fu8vjflz2K+bs6YYL7lkOhdz9F2bqR9CSg0I THFaJqmb70Pu1ZwMcWcKONkWeho2AW8qiDvwcknNIcnEoHSbtxqRiTVRsU8cgTn/Gmz5NL GPyFYOd0FIgOYC5Zul+J8hFP1QhRKZKGeqiNGgqZGFkF8jTfQ9f7W20QUU6MLBpHTNELzB EBpAaR+ijcbdh5y71V/FHtXs8KQ/VM3gzhIXCrmcJWyivLz8+7DtDmRghORx/k1TcJJQOs qzTX1rR297UHpk9jzqrT9Lynpk21yrgDUc4FBicE5OTT8JYdqX4oZJXg0Pl76w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662610994; a=rsa-sha256; cv=none; b=GArm24v4hHJMErLp8r0CjM4rOT2Nw8d3lI2NK7YAnHbmOBQXVNTe7632JJijEbDjPHNyLg aV3tvgJIy1myYTGe1ys8JwWyf0YAlU+yKsIBylh9qzuCNAxJaVUdykfjZZPuLxWPI7OBsO SxB00O5ro1yxe2LSQ59Tynj5h1Wih20wDuOaLUe5VYcl2VKKUcdRJv4LMWdliuwcnfCvJK CIyvaeU4F+Eo43oaVKY4+UNOj12ClnOLIxcGSDWVxatRa/EFG/+yJzRxpCPHh8ziDZYQmF DtVVNvCtjiZCgl+v16AKl0tNCW3o4F1ZPb8+9SaQsrj8NHru/7dgezciAXwzSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=6f7b1310b6fe36f9bb653d3e97bc257adced3a2b commit 6f7b1310b6fe36f9bb653d3e97bc257adced3a2b Author: Wei Hu AuthorDate: 2022-09-08 04:19:55 +0000 Commit: Wei Hu CommitDate: 2022-09-08 04:22:26 +0000 Hyper-V: storvsc: relax a couple more kasserts Seems these kasserts don't work well on ARM64 Fixes: 0af5a0cd2788e Sponsored by: Microsoft --- sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c index d12d6a5982f6..75e2ae924d4b 100644 --- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c +++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c @@ -1830,17 +1830,15 @@ storvsc_xferbuf_prepare(void *arg, bus_dma_segment_t *segs, int nsegs, int error for (i = 0; i < nsegs; i++) { #ifdef INVARIANTS +#if !defined(__aarch64__) if (nsegs > 1) { -#if defined(__amd64__) if (i == 0) { KASSERT((segs[i].ds_addr & PAGE_MASK) + segs[i].ds_len == PAGE_SIZE, ("invalid 1st page, ofs 0x%jx, len %zu", (uintmax_t)segs[i].ds_addr, segs[i].ds_len)); - } else -#endif - if (i == nsegs - 1) { + } else if (i == nsegs - 1) { KASSERT((segs[i].ds_addr & PAGE_MASK) == 0, ("invalid last page, ofs 0x%jx", (uintmax_t)segs[i].ds_addr)); @@ -1852,6 +1850,7 @@ storvsc_xferbuf_prepare(void *arg, bus_dma_segment_t *segs, int nsegs, int error segs[i].ds_len)); } } +#endif #endif prplist->gpa_page[i] = atop(segs[i].ds_addr); }