Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1014854rdb; Fri, 9 Feb 2024 07:54:23 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWS5PEom+kM2QVIONZ4KtSd93c+nuR3aWZQHUw9l2JWkCyzB2ePnmU0lCpRcH/xK/L7P3oQrXQHagqGk1PaVXg0gWsQuT9k2aJLAD00Zg== X-Google-Smtp-Source: AGHT+IHb4qPqfEd7B8Sny9wuThLKsddB5G6vhB9epdqM9ABXLdTJSBS4yOaBez3nvZLqqAOH5WaS X-Received: by 2002:a05:6358:340b:b0:178:7f06:a5a6 with SMTP id h11-20020a056358340b00b001787f06a5a6mr1681029rwd.12.1707494063088; Fri, 09 Feb 2024 07:54:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707494063; cv=pass; d=google.com; s=arc-20160816; b=EFB0ZqLSXWyw0Gt6nPWTF1Qd6woQl40JbpnYAGFfY8RV4g+wfTGwgouN/X1qrgcpwF 0QADCDDegyL4jXXfSp4ZRBF8YXmrvUwUL5w7ffosyXANFjhRCUv7l+T96+z32Ok52yAB o4kXshx0mntIS8OdFdz6dln//uPU9Hb72rt99oxeH8UZFfPzcDS64edhIKnp4nm6K9Wr EjLpQ3+TOl4LNL5Gl7/8hniMNvTIoUtaZ5zC5nrVde53vQHn0IzlHuEsNGeCWIKAUC2C cWmjij7vxfO7c4eANk/aQ4YpQst2m5Gxgjx5T1P9L3PZYD8bLcO+RK7Wi6SEW2tOkHJx R3sA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=f0Eagis611j3xrnNQ+XDYUUruFeV1SrlAcioPW1B76w=; fh=XeMToVplZPmxrrfu9MYd5F838XFZ1K7gag9Z16ckc3Q=; b=GYFiOz7NT+U/78XfXMewDryFnjrEp+mbBo4VFRcqC56iL73WYTOcWuGGMU/EBDXMpN gv8SbqqjsQx2rJlQeGJEw9ENa4QRL7p8oJnjB8KQfze4od4CFUyeX0lNfPgnCHoxPc6J beoFy9VR1tAt/iG/L1+Ooc+8zCXrc9RMaUT5DQUKAO0NxIBCr03eWfZz5E7FlE7T1+5A Tb8ArSyc5rFkPTkEnUQ7UBHuhMWjjMZlYVOZW1JeiJK9oKNAF+h9GbKTTua9e2s+kGmo wz3Sjum9m8YLPXh8Mq4EBbj+lT5VEVnwxQrzOyls8NFRv7+lf3w/9ny5r8j3yFWkcDew kSOA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=qJq53reP; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-59561-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59561-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de X-Forwarded-Encrypted: i=2; AJvYcCW0kMK7E5ZP6R7O5VeZOcWGzGWSelfAcT5rQHyBn5b+x8rYd2a3t6+tNJHF9+9rGIvLAIDSSAbgCH8JnIVzjIIJzsxF8wM+GjaYIFTVyQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id w19-20020ae9e513000000b007858bf1d730si2214952qkf.30.2024.02.09.07.54.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 07:54:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59561-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=qJq53reP; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-59561-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59561-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8852B1C21955 for ; Fri, 9 Feb 2024 15:54:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F99C7603C; Fri, 9 Feb 2024 15:54:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=deller@gmx.de header.b="qJq53reP" Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C89737317B; Fri, 9 Feb 2024 15:54:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.15.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707494054; cv=none; b=S48iZISMA8Zpx5L0IeX73x4nShEUjAmR62Pp6IF+3sZ2LtYRt03/uE8CH/mqxEn84yUD4Rm246oF+x2n5l24cK1N4gdwh8EJ+/4ad41ZEmSLKTbM6VUn1PkX8Ytm9pKRB556Yf/mAVbN9HW2Jdf3PaItQFnw1u9gO86wyxWpNsE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707494054; c=relaxed/simple; bh=NfxzhdKyztjF8ciazrBlmb+rl5JXJQ+cQZovv89eN0A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=AzoOHIRtrX4Q820EEjNi/zACPwdh8r4Y5kvMXqRKPuKWhO1+uommUd1KjRuZ5zP1z+6oFZducfijb8HNG/yIilzPmit34/+rUnbTiOeaWwWtMEy/emFiAqGf5oGcA/rsJKvyUDrPMcbDRmCfPm/nzBKUSKL2XDaJ94yAK93cac4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=deller@gmx.de header.b=qJq53reP; arc=none smtp.client-ip=212.227.15.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1707494018; x=1708098818; i=deller@gmx.de; bh=NfxzhdKyztjF8ciazrBlmb+rl5JXJQ+cQZovv89eN0A=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=qJq53rePK2vW8Lv3zisaV/7HPKeiY/59o73G2CBKrbefuehS4eDm5t059sdTI7kM bnd3I3zMbKqb3aS1EPyiztXU49TTqtY/BlYZUmmCRegAvmALA1fd+xwLf/TGGE8xH 32jDL3V/WDVyc1rfd1J48HG1cJmY0f6ff2Z0v2uQQCgePs/Wae/i4neq6CgR8a4gy gB60G5HJSj6IiJETALpbvtD84RNgepS1gtMrejhZCMHgPXFo/Q5yESGLO60k/uBLX +OKTqkD226MnUhjm1tvI+BbynlEuehsPHTNHvqbyUFsGF6nBahyHaU1NZcuErTYln nMDBSqqjZsl7M3W4Tw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.20.55] ([94.134.148.154]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M3UZ6-1rXuxk1fE2-000ZEv; Fri, 09 Feb 2024 16:53:38 +0100 Message-ID: <8f6efa96-0744-4313-bb15-b38a992e05fc@gmx.de> Date: Fri, 9 Feb 2024 16:53:37 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/1] fbdev/hyperv_fb: Fix logic error for Gen2 VMs in hvfb_getmem() Content-Language: en-US To: Michael Kelley , "wei.liu@kernel.org" Cc: "dri-devel@lists.freedesktop.org" , "linux-fbdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , Thomas Zimmermann , "haiyangz@microsoft.com" , "decui@microsoft.com" , "drawat.floss@gmail.com" , "javierm@redhat.com" , "daniel@ffwll.ch" , "airlied@gmail.com" References: <20240201060022.233666-1-mhklinux@outlook.com> From: Helge Deller Autocrypt: addr=deller@gmx.de; keydata= xsFNBF3Ia3MBEAD3nmWzMgQByYAWnb9cNqspnkb2GLVKzhoH2QD4eRpyDLA/3smlClbeKkWT HLnjgkbPFDmcmCz5V0Wv1mKYRClAHPCIBIJgyICqqUZo2qGmKstUx3pFAiztlXBANpRECgwJ r+8w6mkccOM9GhoPU0vMaD/UVJcJQzvrxVHO8EHS36aUkjKd6cOpdVbCt3qx8cEhCmaFEO6u CL+k5AZQoABbFQEBocZE1/lSYzaHkcHrjn4cQjc3CffXnUVYwlo8EYOtAHgMDC39s9a7S90L 69l6G73lYBD/Br5lnDPlG6dKfGFZZpQ1h8/x+Qz366Ojfq9MuuRJg7ZQpe6foiOtqwKym/zV dVvSdOOc5sHSpfwu5+BVAAyBd6hw4NddlAQU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e25BPcJiaZkTuFt+xt2CdbvpZv3IPrEkp9GAKof2hHdFCRKMtgxBo8Kao6p Ws/Vv68FusAi94ySuZT3fp1xGWWf5+1jX4ylC//w0Rj85QihTpA2MylORUNFvH0MRJx4mlFk XN6G+5jIIJhG46LUucQ28+VyEDNcGL3tarnkw8ngEhAbnvMJ2RTx8vGh7PssKaGzAUmNNZiG MB4mPKqvDZ02j1wp7vthQcOEg08z1+XHXb8ZZKST7yTVa5P89JymGE8CBGdQaAXnqYK3/yWf FwRDcGV6nxanxZGKEkSHHOm8jHwvQWvPP73pvuPBEPtKGLzbgd7OOcGZWtq2hNC6cRtsRdDx 4TAGMCz4j238m+2mdbdhRh3iBnWT5yPFfnv/2IjFAk+sdix1Mrr+LIDF++kiekeq0yUpDdc4 ExBy2xf6dd+tuFFBp3/VDN4U0UfG4QJ2fg19zE5Z8dS4jGIbLg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:QSiZ+s4XAjHSPPDYeN2Jp309cR9lAC54p6AHsoDUVta6UMqBck8 uBQXIKMGM1WXxKm8/pNobcID9yl2jZVPS3ij5o7/r1mcIc6VdLuXSnxeia4eJeIzPu421Gu SIvaTPW/KceoYB4E2jQutzimEzJURU9fhinfIIaJM76ybv7YUFctYDwGE51YlfzRHV3L5hV 8XWwOJ7ssNXgHhyq+0/fw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:x1QbuVO1suU=;Z+0HoRj/htJU/tvJRZwKRTyrd6J odHg16h6Mdr8rT4caDUlCHget/VV65tATPe9XVIzCRM9TynVBgcYGWh7qSpopMhT4PX/kscum YUOLjmpo60RsJT/Ju11pCiB2pOSFpS2Wh6gSAtiz+fY74HaLGQSnsOkNn/QnGd95q03a7fRiq cG0qIEE4Hh50GMk0r0BTmySTPSGHf0muNRzij364tqOwn3nHdWv++dDK+j9CqDMmoRS5bqM+P XXNwtKxzFOdRO+v3u5eNZdsBY7OwNlamZT9qWvowHvG0OvgGypyu8sv0ILc+OUhdItwhXAUFk BEKF+ThuKDpX9M7DRfFUDtX5HILWn3wFjdjbVw3kyabTGUBYoVD1ei7PjOyRqBBddICLZrVhf SfnStDv+aqZCFgHFmJrMT0jbn8y6jozAXKVoNIUIohPtFE+7Yo/+YEkU2eEHiZ6HpETWzthcs brqZFHSMGT0/mlWGXX+Whi4aFuMDTomL4IwqeZJ8MwiU8aVEBIxxv73isxzb/YJAqV0Qx0I7d ag2Yk1dnf0uZUTtLUHjyLN/mqZGTACjCoohVFEu9kD9UfIYa/gsrwPL98n6zZuzw4LcMqWraA GGXHP2fG2GPD82Wed+88n/Bt2GQ2bdTZBCcClX3uVi1Hqh23Q89Zs12rWRx9oBqKlFOrix57j FHnyl1ahM35aCzJoZ9Q/Bi3KT1+WF7DDpiyOwv+oyz9NdqERHeutsOj+ob4/c93XFCmE8fQNX pdAToYLdIQ0SulrNo4gN0M+7of7OV53NvFQRhTHh5NwBEPfDKZDtR8fkMCfV0egOcXOrKzT7l CvWm4EfPiJRjNnce2CQwKMKRi3ITVO82qkchLCVVHdpHU= On 2/9/24 16:23, Michael Kelley wrote: > From: Thomas Zimmermann Sent: Thursday, February 1= , 2024 12:17 AM >> >> Hi >> >> Am 01.02.24 um 07:00 schrieb mhkelley58@gmail.com: >>> From: Michael Kelley >>> >>> A recent commit removing the use of screen_info introduced a logic >>> error. The error causes hvfb_getmem() to always return -ENOMEM >>> for Generation 2 VMs. As a result, the Hyper-V frame buffer >>> device fails to initialize. The error was introduced by removing >>> an "else if" clause, leaving Gen2 VMs to always take the -ENOMEM >>> error path. >>> >>> Fix the problem by removing the error path "else" clause. Gen 2 >>> VMs now always proceed through the MMIO memory allocation code, >>> but with "base" and "size" defaulting to 0. >> >> Indeed, that's how it was supposed to work. IDK how I didn't notice thi= s >> bug. Thanks a lot for the fix. >> >>> >>> Fixes: 0aa0838c84da ("fbdev/hyperv_fb: Remove firmware framebufferswit= h aperture helpers") >>> Signed-off-by: Michael Kelley >> >> Reviewed-by: Thomas Zimmermann > > Wei Liu and Helge Deller -- > > Should this fix go through the Hyper-V tree or the fbdev tree? I'm not > aware of a reason that it really matters, but it needs to be one or the > other, and sooner rather than later, because the Hyper-V driver is broke= n > starting in 6.8-rc1. I'm fine with either. If there is an upcoming hyper-v pull request, I'm fine if this is included there. If not, let me know and I can take it via fbdev. Helge > > Michael > >> >>> --- >>> drivers/video/fbdev/hyperv_fb.c | 2 -- >>> 1 file changed, 2 deletions(-) >>> >>> diff --git a/drivers/video/fbdev/hyperv_fb.c >> b/drivers/video/fbdev/hyperv_fb.c >>> index c26ee6fd73c9..8fdccf033b2d 100644 >>> --- a/drivers/video/fbdev/hyperv_fb.c >>> +++ b/drivers/video/fbdev/hyperv_fb.c >>> @@ -1010,8 +1010,6 @@ static int hvfb_getmem(struct hv_device *hdev, >> struct fb_info *info) >>> goto getmem_done; >>> } >>> pr_info("Unable to allocate enough contiguous physical memory on = Gen 1 VM. Using MMIO instead.\n"); >>> - } else { >>> - goto err1; >>> } >>> >>> /* >> > >