[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/x86: obtain upper 32 bits of video frame buffer address for Dom0


  • To: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 5 Jan 2022 08:59:36 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4Qx3jjLUJOMh7D49d17gLVc/OBJCpcFwdFU7J6iKyac=; b=KcK1lK8B/ciZz1g2kNnyWlNGasRY/waU88bGygaw6CUn8GO6jGU90ZQGt1ywDprhswghmEw6fvXqwjjsEMh7pg5hzaNbCT+n58JV3EUxwWl8k0xtkrR+4bKbmOEQue4+O7+0FWcsaZ/5HEOcOuzczTdgetxfVls2kM22lMqE0pOrdaobJ2h7GvfvYTCyZiIGUATnd737bt746irbXplOcY0czezsIAu5qF2dlHZGGH4aMUIu2P+Lr/4nMMH424jY1dXboPYYTrDBMPY4FlgpAyNEK7nm041wQh5e0QuyXYF3M9kNkVbKGyBAdkdd0OsTGCg1JhIU7PIUZ/aLyzeVyw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GA10SBVIwU7/VOUGf1qlgNx5JWsW5KSWqVWLBYo6R3Drsk87XyS1/830lSAUlIzxLU5I6jWa2aIigOwx/9XTOGXI2yjS/ESltLXhr4cdR2PivIDwrdoVXmn7RNKfjdAjqP+0SJW0J633dU9j0tYnhF7+SqIzHbe0tGGzQl06h+vIcYN4tKiR94WmETRdNh10u0vMIgFqBgsNB58/gcF+pNFhsuHSr0cfdZlc2Ylo+UaxSvAUhP/L1/Zi4Xut7ndL9mqYMLnAUMeNQdcE2U58BdXsr0QwppJWqFCYwxCEDWCl3KqBW6A3yhw/Wz+O3vyjAFEzmPTdGyAn7q360wdazw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Wed, 05 Jan 2022 07:59:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 04.01.2022 18:03, Boris Ostrovsky wrote:
> 
> On 1/4/22 11:54 AM, Jan Beulich wrote:
>> On 04.01.2022 17:50, Boris Ostrovsky wrote:
>>> On 1/4/22 3:46 AM, Jan Beulich wrote:
>>>> The hypervisor has been supplying this information for a couple of major
>>>> releases. Make use of it. The need to set a flag in the capabilities
>>>> field also points out that the prior setting of that field from the
>>>> hypervisor interface's gbl_caps one was wrong, so that code gets deleted
>>>> (there's also no equivalent of this in native boot code).
>>>>
>>>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>>>>
>>>> --- a/arch/x86/xen/vga.c
>>>> +++ b/arch/x86/xen/vga.c
>>>> @@ -63,13 +63,17 @@ void __init xen_init_vga(const struct do
>>>>                    }
>>>>    
>>>>                    if (size >= offsetof(struct dom0_vga_console_info,
>>>> -                               u.vesa_lfb.gbl_caps)
>>>> -              + sizeof(info->u.vesa_lfb.gbl_caps))
>>>> -                  screen_info->capabilities = info->u.vesa_lfb.gbl_caps;
>>>> -          if (size >= offsetof(struct dom0_vga_console_info,
>>>>                                         u.vesa_lfb.mode_attrs)
>>>>                        + sizeof(info->u.vesa_lfb.mode_attrs))
>>>
>>> Do we still need this test? All 4.0+ hypervisors will have mode_attrs.
>> Perhaps this could also be dropped, but unlike the capabilities part
>> I'd view this as an unrelated change.
> 
> 
> Right.
> 
> 
>>   Furthermore even a new hypervisor
>> would be free to omit the field, provided it also sets size low enough.
> 
> 
> If this is allowed, how would we deal with hypervisor dropping some other 
> random field here?

Random fields can't be dropped, or very old Dom0 kernels might break.
It's only the "extensions" that have been added later which we can
expect consumers to properly deal with (by checking whether they're
covered by the supplied size).

> Have we had a precedent of this happening?

No. But doing so wouldn't violate the ABI.

Anyway - I'd appreciate if the patch at hand could be taken
independent of possible further adjustments here, as it addresses
an issue observed in the field.

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.