[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V7 00/11] PCI devices passthrough on Arm, part 3
- To: Oleksandr Tyshchenko <olekstysh@xxxxxxxxx>
- From: Rahul Singh <Rahul.Singh@xxxxxxx>
- Date: Tue, 26 Jul 2022 13:47:59 +0000
- Accept-language: en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; 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=7B+pFb/N8Nt0CI6ybQ2DgiaZzn+77nUb4TRCrU8TpKU=; b=FSiUOjed09GOaEuI1MyrrYjYqkbb7oftWIvr7yqr+FqhF+FjeILvF0jLStlHrcxFr8taZB4JlVcziGCC+2DDcHB7cjYP+WJqHqXxOct/Wl4DgizecKq6LI97sMhyQ2/2+948W2RdM+o8cAyy+KH6XmbBPryfR+BJtGiez6wsn269oIXfWNpE89eDbqpZjFoidS1/bfFtJ5OjEUuBTOlkSBv8y4DkaBGPmvEj7B9f6esHS/rJN9qSpuIhxwVj9ELvCDIjsyR5qTts0TTKm+Uhp4rjWrRhMEXw5c0rIpXJaaqjGq5Y/grK8ufjgpQss41LBxO06UsxtGAJio9uAB3kwQ==
- 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=7B+pFb/N8Nt0CI6ybQ2DgiaZzn+77nUb4TRCrU8TpKU=; b=KW1HR6GZUa+GBr2VenPDnzl6ju5xHv5r5intJj7pA4Mq97rsfkkVY+GOP+uI69k4Bi5Oyq2hr2NkUblTClrfTLElT3Iq7VtlLRi/BpRJ+2Y2diLBnklRhEI4APGOrdhkiimAD5wv7T+dg0hObC/rEh2OfVjJl+08JjPCmL54L8LdBR7moOg4uiRY3ZUWWsUryXMqPezhlyyukYUJYmyI5Bxs3uGEqGzFP3STDQh/s1mjf0uoQMNrYQi3pdqYFuhTWDAFt8Lc2TeEGDyrpMdl+9Sh2ADslqz9UP8DzX+Uz93GRRo2I8IavUSAK+El5Z5r95/+oaM0p4OaHD/zF7Az0A==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=WQBrUClr+yrLufGStHl8H1dEzohRpvKA41y5m/eSSrazKJHKxZa2ELR8J6rKYoAES6WDGF1ha5xnQkP+CSU9nZfNLwxUeNAS+xOU3Wy8ejb37RBBKgUL8rHE8WPbgLwOEthlxWRnM5hmAlvWwGAOjwe/ypn8lCnro3Z+2esFTWp1kiR3fEzk1lw31KK9lHfAl4vENuVv6iAdJCJ1tA8pUxqXuSAsbMBkDZ/pyA8ooFGYvCWDMsgWl++XoAWkTL6/FmMBx7LvNSIeQRpO6dYy71Kg7Kg3a4G5crUpvofMTiXoCvgP7EUmt/mgyoqPu2aILFElt2S6pP+elZlK+66wow==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aGVQRI4DaY2FwYJX/qOFDTVaJtT+t8Y6s8W6cxtjmL6vp6LHem02wbJfy661vl2EpxXjOlogLipoZDAfjB5OuYySmSVB7gwN0Dee7E8KzGVDE26glPidIiEF39hCon26pYg9t4K9ybrVdVbFecfVkrKyxhoCE8ylvFNpm0Xga33OyqRgoyqjXzisQ2E1bt1mCoZBdo8Qs7/BX4Ew68lbbfSyX0Sv7YZOUK3MkJZ7FYpyPH7E9VpyN2cMdRCWGC6Aahrz3ocSQuStx25hgMFil31Kkh9mbADd4UsGjXtsDCmq/nWnjzDK+iWrMUgHPFN/cw8f6ftYlyKZZGxk5BAUwg==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
- Delivery-date: Tue, 26 Jul 2022 13:48:28 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHYm5cOuiXPVkeraUmibOPVUdwdrK2QtXSA
- Thread-topic: [PATCH V7 00/11] PCI devices passthrough on Arm, part 3
Hi Oleksandr,
> On 19 Jul 2022, at 6:42 pm, Oleksandr Tyshchenko <olekstysh@xxxxxxxxx> wrote:
>
> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
>
> Hi, all!
>
> You can find previous discussion at [1].
>
> 1. This patch series is focusing on vPCI and adds support for non-identity
> PCI BAR mappings which is required while passing through a PCI device to
> a guest. The highlights are:
>
> - Add relevant vpci register handlers when assigning PCI device to a domain
> and remove those when de-assigning. This allows having different
> handlers for different domains, e.g. hwdom and other guests.
>
> - Emulate guest BAR register values based on physical BAR values.
> This allows creating a guest view of the registers and emulates
> size and properties probe as it is done during PCI device enumeration by
> the guest.
>
> - Instead of handling a single range set, that contains all the memory
> regions of all the BARs and ROM, have them per BAR.
>
> - Take into account guest's BAR view and program its p2m accordingly:
> gfn is guest's view of the BAR and mfn is the physical BAR value as set
> up by the host bridge in the hardware domain.
> This way hardware domain sees physical BAR values and guest sees
> emulated ones.
>
> 2. The series also adds support for virtual PCI bus topology for guests:
> - We emulate a single host bridge for the guest, so segment is always 0.
> - The implementation is limited to 32 devices which are allowed on
> a single PCI bus.
> - The virtual bus number is set to 0, so virtual devices are seen
> as embedded endpoints behind the root complex.
>
> 3. The series has been updated due to the new PCI(vPCI) locking scheme
> implemented
> in the prereq series which is also on the review now [2].
>
> 4. For unprivileged guests vpci_{read|write} has been re-worked
> to not passthrough accesses to the registers not explicitly handled
> by the corresponding vPCI handlers: without that passthrough
> to guests is completely unsafe as Xen allows them full access to
> the registers. During development this can be reverted for debugging purposes.
>
> !!! OT: please note, Oleksandr Andrushchenko who is the author of all this
> stuff
> has managed to address allmost all review comments given for v6 and pushed
> the updated
> version to the github (23.02.22).
> So after receiving his agreement I just picked it up and did the following
> before
> pushing V7:
> - rebased on the recent staging (resolving a few conflicts)
> - updated according to the recent changes (added cf_check specifiers where
> appropriate, etc)
> and performed minor adjustments
> - made sure that both current and prereq series [2] didn't really break x86
> by testing
> PVH Dom0 (vPCI) and PV Dom0 + HVM DomU (PCI passthrough to DomU) using Qemu
> - my colleague Volodymyr Babchuk (who was involved in the prereq series)
> rechecked that
> both series worked on Arm using real HW
>
> You can also find the series at [3].
>
> [1]
> https://lore.kernel.org/xen-devel/20220204063459.680961-1-andr2000@xxxxxxxxx/
> [2]
> https://lore.kernel.org/xen-devel/20220718211521.664729-1-volodymyr_babchuk@xxxxxxxx/
> [3] https://github.com/otyshchenko1/xen/commits/vpci7
>
I tested the whole series on ARM N1SDP board everything works as expected.
So for the whole series:
Tested-by: Rahul Singh <rahul.singh@xxxxxxx>
Regards,
Rahul
|