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

Re: [SUSPECTED SPAM][PATCH 01/10] pci/pvh: Allow PCI toolstack code run with PVH domains on ARM


  • To: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 11 Nov 2020 14:55:13 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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-SenderADCheck; bh=XSpNNaLXyuqiFYcmfB9iAlMpva/Dy6v5KrqoG81RS+E=; b=jS9JE30tcCGhs1ILKOVQuN8X0U+jY916yN7i8Nj/Sjh2H9pukBgWhzC6vUKtIyOOZoPY0YbD3tK3IwF/GFNQLcZhBbFefpMNt3YN03QPOGqH8dU5MOWOPDkiEYbHWKs0GW9rIfxPE+qaGXy5o0YCV2i7eUS4g+1f2kSszabx0EfVNVwrUv1EEB6s+InRl2oJ/fS4Ler+HPOpSyfzfM/P7d6o1TwVOTxoZOSHoVmHRtQFh1D9mJEAcvr7zaIWb+PnTw8uuUB+j59FTK1P1saJP/fTmjhbH4+GmHYAGEWYLs/T8k87l5XhpAKYKLAZ4LmWKm1TxiLa5jOkkuoBGH/svg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jWNwso7HdU5Zhug5kFQitMu68kAVIiWwMC+NkZuBzbuuQ9ZNMcbcodeEVGXhuO7I/Q9Ozp7S3rU/KfXjY2upSR2Oej3CT5YKLNA1hxhS2QdNz8E0e2ykaiG7MXX4/tqJ3qLnI7PxFxiek1oDts9ZrDRIqt8MIk76wlRj2B3IkTJIm7uAnxgAGGmpzyFYUqWJV6lIhka4I0G5Rb6E9eXltQqNoOKeok5/32T3KTynvug4wOahdJZ7viKkRdhx21aJ2govSVcfgC8luLzmrKR9WSNIFKDAts3dAGLTZMV/M4GeKLrzz2z2X+MAQmbdlPMiWF54uWFYPSoyr8PVzxCV5w==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "Rahul.Singh@xxxxxxx" <Rahul.Singh@xxxxxxx>, "Bertrand.Marquis@xxxxxxx" <Bertrand.Marquis@xxxxxxx>, "julien.grall@xxxxxxx" <julien.grall@xxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "iwj@xxxxxxxxxxxxxx" <iwj@xxxxxxxxxxxxxx>, "wl@xxxxxxx" <wl@xxxxxxx>, Oleksandr Andrushchenko <andr2000@xxxxxxxxx>
  • Delivery-date: Wed, 11 Nov 2020 13:58:57 +0000
  • Ironport-sdr: 9OB6vcaYkHJY69CdRfIycjwBN0oL6WiZfGnGI3yTnORwvOrc1SrOLM7xAhiuiFds81gUVfegil HglMpde/eAtjAtwKBd8eGtqDW7WVGC8dtUkuQjL9ULbX4bdETqkNGEmgXnoD4SBwNl0J2zYfqL QXYEhHLF9IclFzsAMxJHfXF0vN2uQcaCzl29lHvCJHZZ/4kWxDk6fc1cbMvxlYtZUaaJ2l3PyZ Z7Sjbc6YnxQ/WGCk7hWNen+csuI3M6X+KjjBSvdQTg1Dfd3VVyBnogDgr2yL3+MMBZ/vH1DfIM r0w=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Nov 11, 2020 at 01:10:01PM +0000, Oleksandr Andrushchenko wrote:
> 
> On 11/11/20 2:31 PM, Roger Pau Monné wrote:
> > On Mon, Nov 09, 2020 at 02:50:22PM +0200, Oleksandr Andrushchenko wrote:
> >> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
> >>
> >> According to https://wiki.xenproject.org/wiki/Linux_PVH:
> >>
> >> Items not supported by PVH
> >>   - PCI pass through (as of Xen 4.10)
> >>
> >> Allow running PCI remove code on ARM and do not assert for PVH domains.
> >>
> >> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
> >> ---
> >>   tools/libxl/Makefile    | 4 ++++
> >>   tools/libxl/libxl_pci.c | 4 +++-
> >>   2 files changed, 7 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
> >> index 241da7fff6f4..f3806aafcb4e 100644
> >> --- a/tools/libxl/Makefile
> >> +++ b/tools/libxl/Makefile
> >> @@ -130,6 +130,10 @@ endif
> >>   
> >>   LIBXL_LIBS += -lyajl
> >>   
> >> +ifeq ($(CONFIG_ARM),y)
> >> +CFALGS += -DCONFIG_ARM
> >> +endif
> >> +
> >>   LIBXL_OBJS = flexarray.o libxl.o libxl_create.o libxl_dm.o libxl_pci.o \
> >>                    libxl_dom.o libxl_exec.o libxl_xshelp.o libxl_device.o \
> >>                    libxl_internal.o libxl_utils.o libxl_uuid.o \
> >> diff --git a/tools/libxl/libxl_pci.c b/tools/libxl/libxl_pci.c
> >> index bc5843b13701..b93cf976642b 100644
> >> --- a/tools/libxl/libxl_pci.c
> >> +++ b/tools/libxl/libxl_pci.c
> >> @@ -1915,8 +1915,10 @@ static void do_pci_remove(libxl__egc *egc, uint32_t 
> >> domid,
> >>               goto out_fail;
> >>           }
> >>       } else {
> >> +        /* PCI passthrough can also run on ARM PVH */
> >> +#ifndef CONFIG_ARM
> >>           assert(type == LIBXL_DOMAIN_TYPE_PV);
> >> -
> >> +#endif
> > I would just remove the assert now if this is to be used by Arm and
> > you don't need to fork the file for Arm.
> 
> Sounds good, I will drop then
> 
> But what would be the right explanation then? I mean why there was an ASSERT
> 
> and now it is safe (for x86) to remove that?

An assert is just a safe belt, the expectation is that it's never hit
by actual code. Given that this path will now also be used by PVH
(even if only on Arm) I don't see the point in keeping the assert, and
making it conditional to != Arm seems worse than just dropping it.

Thanks, Roger.



 


Rackspace

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