mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Michael Kelley <mhklinux@outlook.com>,
	"wei.liu@kernel.org" <wei.liu@kernel.org>
Cc: "dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	"haiyangz@microsoft.com" <haiyangz@microsoft.com>,
	"decui@microsoft.com" <decui@microsoft.com>,
	"drawat.floss@gmail.com" <drawat.floss@gmail.com>,
	"javierm@redhat.com" <javierm@redhat.com>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"airlied@gmail.com" <airlied@gmail.com>
Subject: Re: [PATCH 1/1] fbdev/hyperv_fb: Fix logic error for Gen2 VMs in hvfb_getmem()
Date: Fri, 9 Feb 2024 16:53:37 +0100	[thread overview]
Message-ID: <8f6efa96-0744-4313-bb15-b38a992e05fc@gmx.de> (raw)
In-Reply-To: <SN6PR02MB4157811F082C62B6132EC283D44B2@SN6PR02MB4157.namprd02.prod.outlook.com>

On 2/9/24 16:23, Michael Kelley wrote:
> From: Thomas Zimmermann <tzimmermann@suse.de> Sent: Thursday, February 1, 2024 12:17 AM
>>
>> Hi
>>
>> Am 01.02.24 um 07:00 schrieb mhkelley58@gmail.com:
>>> From: Michael Kelley <mhklinux@outlook.com>
>>>
>>> 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 this
>> bug. Thanks a lot for the fix.
>>
>>>
>>> Fixes: 0aa0838c84da ("fbdev/hyperv_fb: Remove firmware framebufferswith aperture helpers")
>>> Signed-off-by: Michael Kelley <mhklinux@outlook.com>
>>
>> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
>
> 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 broken
> 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;
>>>    	}
>>>
>>>    	/*
>>
>
>


  reply	other threads:[~2024-02-09 15:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01  6:00 mhkelley58
2024-02-01  8:17 ` Thomas Zimmermann
2024-02-09 15:23   ` Michael Kelley
2024-02-09 15:53     ` Helge Deller [this message]
2024-03-01  9:25       ` Wei Liu
2024-03-01 16:41         ` Michael Kelley
2024-02-03  8:08 ` Saurabh Singh Sengar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f6efa96-0744-4313-bb15-b38a992e05fc@gmx.de \
    --to=deller@gmx.de \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=decui@microsoft.com \
    --cc=drawat.floss@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=haiyangz@microsoft.com \
    --cc=javierm@redhat.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhklinux@outlook.com \
    --cc=tzimmermann@suse.de \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®