[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 4/7] xen/arm: account IO handler for emulated PCI host bridge
- To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
- Date: Wed, 8 Dec 2021 18:57:54 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=HtwYOVErdYcnDE29dzp/1xiMaWcfQH+VYOP7Z9qTzPg=; b=Xtl2k1xkkVfyzwfyg+sbA8EZa/YXX1Vwb6/4fQVbGj1dCSjqxlm4x2ZoddGd6XCabXwsf1VyZet5RuunI37oXthmPurQQfe8+rWPC9LuOgnrATgX3bEgg3nl6M9zF5eAhPTqMO7BDqq6fUzi33wWZrx7UzS/m/FvaX/jT3BXQ5Ts2k1WhcI7TAV92Pd5iD2WQtcIlNP0Hp9go54ECV93SFtzjDQQPXXbhzUK22kbog0tln8066cySFN2SQZhZsJgfltn/wi3WjJIR7a28eC0O+0YTWPlZ1B7KPNrYo4VLyssJ0Khtc6GoV9rkbLRdxVuSKv8Kp+u363g+KOfGmOoFw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tm3SnDGL8Iz+bz2RZGeUUOQNEgIyla1pVH/K04IbZTe/K05q+UZUHYC8gRGxgY+GFwkpmpEbmYSaaSJxDvf/qK8/u7nS0vtVQnxcSWebWNsBqqSJUxyLgbJFcMOP1KVnyH+15fw4Vn7ynrRQC9VGGgqoUIDbF+9cPHH5fvikfyoS1d0+jtALWCmCYGMqt05GL7G6rQIBL1FWG1353nskIW/Tu6uzo27/l1WN5HShqVEtI99ZJnvTRKQK7DD6vQulvhMGXU7dxah6QQsG6l0aH20KMEh1bYKkquJRaiLQNrhry1P1JYJX3pewPwJ92DgkIXQ0keMaKJLuwYeQ3IChOg==
- Cc: "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Artem Mygaiev <Artem_Mygaiev@xxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, "paul@xxxxxxx" <paul@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
- Delivery-date: Wed, 08 Dec 2021 18:58:32 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHX4QlHTkep1sCXwU6sAzOhbUDnn6wo5hsAgAAi1QA=
- Thread-topic: [PATCH v7 4/7] xen/arm: account IO handler for emulated PCI host bridge
Hi, Julien!
On 08.12.21 18:53, Julien Grall wrote:
> Hi Oleksandr,
>
> On 24/11/2021 07:59, Oleksandr Andrushchenko wrote:
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
>>
>> At the moment, we always allocate an extra 16 slots for IO handlers
>> (see MAX_IO_HANDLER). So while adding an IO trap handler for the emulated
>> PCI host bridge we are not breaking anything, but we have a latent bug
>> as the maximum number of IOs may be exceeded.
>> Fix this by explicitly telling that we have an additional IO handler, so it
>> is
>> accounted.
>>
>> Fixes: d59168dc05a5 ("xen/arm: Enable the existing x86 virtual PCI support
>> for ARM")
>
> In general, it is better to have the fixes at the beginning of a series. So
> they are relying on less rework and easier to backport (if needed).
>
> In this case, PCI passthrough is still a technical preview so it doesn't
> matter too much.
I am planning to resend the whole series, so I can move this to the bottom,
but it is indeed doesn't matter at the moment
>
>>
>> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
> >
>> diff --git a/xen/arch/arm/vpci.c b/xen/arch/arm/vpci.c
>> index ccd998d8dba2..8e801f275879 100644
>> --- a/xen/arch/arm/vpci.c
>> +++ b/xen/arch/arm/vpci.c
>> @@ -126,7 +126,8 @@ unsigned int domain_vpci_get_num_mmio_handlers(struct
>> domain *d)
>> return ret < 0 ? 0 : ret;
>> }
>> - return 0;
>> + /* For a single emulated host bridge's configuration space. */
>
> This comment is lacking some context. I would suggest to reword to something
> like:
>
> "For the guests, each host bridge requires one region to cover the
> configuration space. At the moment, we only expose a single host bridge.
> "
>
Ok, will change
> With that (or a similar comment):
>
> Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
Thank you,
Oleksandr
>
> Cheers,
>
|