[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 1/3] drivers/char: support up to 1M BAR0 of xhci
- To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 14 Dec 2022 11:44:21 +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=Fdp8Xs7GrHwvTtEpIJkSGlMjTOZrewPWiwBJ4NmCM7o=; b=HKs3XPl2e9acWxluxVGSfD5JQM4D+7PL/epuvPUzBBJTOv2OqBorgwZIhoiwWEFU9BOpRxgn1bkyt7AmyvLLB5i2o7dPio72yWdejAI2S7BGFwUj+LHqOIc7IsqHIXtsPJGNK21dGgR5MnmOG5DcA/CSNPC95w9c7nUFFj4Zx26gvTFClcQDUN98mqmpL9NGuPTtTX2GuhUSMFCTHpkpbEgfdCCHU9Y/tM1IaM/L+7/UlN8smQf4tCf/HpTTb6+vimqTcIVfpqpRYqa0Q/YqKV15Tpk2R3ldVBbiBfHNDR28QvBXfXHtEgtdiyZT7fdFfJUDyqLM8Z6mzJ1U7n+WNQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aviHrQG6yPNmHIOatBltcl8YMKk7VBoY0n3mM85Cv3B/9hdYJb/UeocWkE4CsgurQDhKzzoCbW1KefaeYPbfnsgIMkLIX6/d746R8M+xEEbJTjWQoKAXIujYD81YwtRpOA6GYnbfMlnao4Xe8zgzB9dAK5CDG6n6MflLDCoROisAxOR0w143qrDz+iJNWB/3wqafONQbUkZ42XfcRum6XaCVXQNKqRQGzKJNsHpbASUxWsz5qUKLlAVkTmICKATDKov7kqQHTvB0TVcZcR+v862fE5E+KXP1MnbZ82r0kZizCzxJoebkYDYSaI0ZA9p5opi9SY/ZOP99BDWb62b1LQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Wed, 14 Dec 2022 10:44:27 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 11.12.2022 03:10, Marek Marczykowski-Górecki wrote:
> AMD's XHCI has BAR0 of 1M (compared to 64K on Intel). Map it as a whole
> (reserving more space in the fixmap). Make fixmap slot conditional on
> CONFIG_XHCI.
>
> Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> --- a/xen/drivers/char/xhci-dbc.c
> +++ b/xen/drivers/char/xhci-dbc.c
> @@ -268,10 +268,12 @@ static void *dbc_sys_map_xhc(uint64_t phys, size_t size)
> {
> size_t i;
>
> - if ( size != MAX_XHCI_PAGES * PAGE_SIZE )
> + if ( size > MAX_XHCI_PAGES * PAGE_SIZE )
> return NULL;
To be honest I didn't really like the original, overly strict check.
Jan
|