From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60A87C76188 for ; Wed, 5 Apr 2023 04:46:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236599AbjDEEqa (ORCPT ); Wed, 5 Apr 2023 00:46:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236534AbjDEEq3 (ORCPT ); Wed, 5 Apr 2023 00:46:29 -0400 X-Greylist: delayed 351 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 04 Apr 2023 21:46:28 PDT Received: from bee.tesarici.cz (bee.tesarici.cz [IPv6:2a03:3b40:fe:2d4::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D05591BDF for ; Tue, 4 Apr 2023 21:46:28 -0700 (PDT) Received: from meshulam.tesarici.cz (unknown [213.235.133.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bee.tesarici.cz (Postfix) with ESMTPSA id 6D8B41476CB; Wed, 5 Apr 2023 06:40:25 +0200 (CEST) Authentication-Results: mail.tesarici.cz; dmarc=fail (p=none dis=none) header.from=tesarici.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tesarici.cz; s=mail; t=1680669629; bh=mghipZ7KjYeZ0FTGp7Tk3ekEFHhrukqRx9uoxJv7lJY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=n50aFp0ah0fQMPX/2Sf2WckMc09pbxAOz+P3m6LKnYxwdBq4381+4sVswaKJyA/j7 +4b+C/OJJXdKWyZYy0d4f3jO9P/eTWjtOppiVYH/HPOmrx551zsjyKSz8mmALo0daL 2+wjF6EKMPj3FvZ2/fStmwXiGayjo5pi1j1hjZ7lC9qpxJghFf9hCBseR0KKsplmUk zkzc+S1FZ4owdLbGYzPBH7uGIMSmZqrKQCDvWn5fi2kmdyk9M1NuEbckVJkuEsn0EL 5ST9lOSqLzklpEYV2G9txpH+gY7oveKHdaKca6ThPqvlY1bADcwqks9SqbLqSCAFJp E/aQsaT8YQPdg== Date: Wed, 5 Apr 2023 06:40:19 +0200 From: Petr =?UTF-8?B?VGVzYcWZw61r?= To: Dexuan Cui Cc: Dexuan-Linux Cui , Petr Tesarik , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Konrad Rzeszutek Wilk , Jianxiong Gao , David Stevens , Joerg Roedel , "open list:DMA MAPPING HELPERS" , open list , Roberto Sassu , "Michael Kelley (LINUX)" , Tianyu Lan , "linux-hyperv@vger.kernel.org" Subject: Re: [PATCH v1 2/2] swiotlb: Fix slot alignment checks Message-ID: <20230405064019.6258ebb3@meshulam.tesarici.cz> In-Reply-To: References: X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@vger.kernel.org Hi Dexuan, On Tue, 4 Apr 2023 20:11:18 +0000 Dexuan Cui wrote: > > From: Dexuan-Linux Cui > > Sent: Tuesday, April 4, 2023 12:55 PM > >=20 > > On Tue, Mar 21, 2023 at 1:37=E2=80=AFAM Petr Tesarik > > wrote: > > ... > >=20 > > Hi Petr, this patch has gone into the mainline: > > 0eee5ae10256 ("swiotlb: fix slot alignment checks") > >=20 > > Somehow it breaks Linux VMs on Hyper-V: a regular VM with > > swiotlb=3Dforce or a confidential VM (which uses swiotlb) fails to boot. > > If I revert this patch, everything works fine. =20 >=20 > The log is pasted below. Looks like the SCSI driver hv_storvsc fails to > detect the disk capacity: The first thing I can imagine is that there are in fact no (free) slots in the SWIOTLB which match the alignment constraints, so the map operation fails. However, this would result in a "swiotlb buffer is full" message in the log, and I can see no such message in the log excerpt you have posted. Please, can you check if there are any "swiotlb" messages preceding the first error message? Petr T