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

Re: [PATCH V7 01/11] xen/pci: arm: add stub for is_memory_hole


  • To: Oleksandr <olekstysh@xxxxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Wed, 3 Aug 2022 09:29:30 +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=e7LsUQkASUsQ3/xYCcyDKys2w0HCjo9W9ByR8ZAk/lU=; b=Yf1XovYjKIVVauMrYuM1BseGZyGDwQUkZkUwxdYs5P9io+UYMauI4+mTWpp5cRTB/k7fmz0xj19lhMkX0Obe/zTYNsH5hoqHnvgHt9n6Uox5rExw0Dj95h/AQVdU+rU2I+7pDm7hhI6bT2z4xf2d/9vNe6NwNQd3De5l9pGYRPYpk6MJ4NXXHpjuBeSODeS4UaYpZzBOhYnDffLiLEahgCh7xzoYKJtno5z5kvN5FKg6aEBrSmElN8C6QgAoWr5aJbdjJLZEpN/dlesv5T4bR3uhtKGaNbN5i/T3hzjVvSy9Zg3sSkQ9ix27CtVDZ+VjUcqmp+NDtOmC9r2VH5j61Q==
  • 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=e7LsUQkASUsQ3/xYCcyDKys2w0HCjo9W9ByR8ZAk/lU=; b=nPeLRPQhXztJg3sopEAKtCCuCqdP0lXie1gxGAZVHCvRCinjQlUCTuR9JOfNhEpuu3/bTZNUvffNf00AaiEbVjFUJLL/NtZDUXtBVzC237HZ5cxWw6CKK01IPujxCByfrAjI+HRWtHKtNgLD6M+Xmc4eyFGe+hlJT5GJ51OR7lvwsT3t8rQlpQcixtluvQcd1Bxqn6QeaWtNNGhC8qi57ibithLfqE1hOxbdaFBnbALMhVH88rc+vD3+bwNbsAq1wrHgF8R6foER0e7+vueRN+Y1iVMyqqHQIp6HZVdG+K/y2EcygXkTnr+/mDmTsZgsDSZeFvR18imBlXvFcybGew==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=CHRZOx7AnQm5pEb+w3QPbD/SJLe7E+ZraC3LAAzADOQ87LtLRntK54ny+P3R/nYm28w7Z0lPnGEmAtUeHF7uQni547g8kl0v+Ip5k1L+ZiwVrhwSuSmdpqZxqWX1ZIIBqcq32azQT2bGiHphqfCMlbY5EUb7bsvy6A+ONvd3DP+o6Pm7SBFu6JeGViVLsIuG73WoV6zl6guZBF4szxlhi+ULhuvTMDo2XjZgKqYi3PfudNSOlXTsCwpwrxHKDOxl8WZbhcGmffTC4efjr9RN2YGh7CdD5eFWdR8hAdYspCKGiY91cTP6KlV36flgTJsoJp3gQ71kJyW8D6cnNVtuAQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DjuKaPiY1RDCHYLFV6KZghMbVYVvNrGXw+ti1sYZIl3bNvzBEAIiBue/CKijFSp3BZvNy8hJRTiXi2neH2udn00cU4lGa9SUHCPBA8Dx3y2JLit5u5Disemup79RI44/r95WD7pnqxgfUSXew9c2xqvDTz9Uxf3alie0ZLZg/3nNY/XA9VAK/5W6JoWzz1yYBiPQG6t1Fx1bZ67IY0Skc8EIu4/G/+f5EIaqCwU47rwkjGNOjaBrmSYKmnUwT8cJ5K8u6sdQAugCKC9zEC3CLJ72cjDvkGFcU3gF4G/1N0iaHvuC4RN5T868OpRk0wcq7Y9re7tF/p+rE4N3aDj6Lw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 03 Aug 2022 09:29:52 +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: AQHYm5cPHjzDoLlJ5UyWUT58Xfo5Ca2VmV4AgAdmg4A=
  • Thread-topic: [PATCH V7 01/11] xen/pci: arm: add stub for is_memory_hole

Hi Oleksandr,

> On 29 Jul 2022, at 5:28 pm, Oleksandr <olekstysh@xxxxxxxxx> wrote:
> 
> 
> Hello Rahul
> 
> 
> On 19.07.22 20:42, Oleksandr Tyshchenko wrote:
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
>> 
>> Add a stub for is_memory_hole which is required for PCI passthrough
>> on Arm.
>> 
>> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
>> ---
>> OT: It looks like the discussion got stuck. As I understand this
>> patch is not immediately needed in the context of current series
>> as PCI passthrough is not enabled on Arm at the moment. So the patch
>> could be added later on, but it is needed to allow PCI passthrough
>> to be built on Arm for those who want to test it.
>> 
>> Copy here some context provided by Julien:
>> 
>> Here a summary of the discussion (+ some my follow-up thoughts):
>> 
>> is_memory_hole() was recently introduced on x86 (see commit 75cc460a1b8c
>> "xen/pci: detect when BARs are not suitably positioned") to check
>> whether the BAR are positioned outside of a valid memory range. This was
>> introduced to work-around quirky firmware.
>> 
>> In theory, this could also happen on Arm. In practice, this may not
>> happen but it sounds better to sanity check that the BAR contains
>> "valid" I/O range.
>> 
>> On x86, this is implemented by checking the region is not described is
>> in the e820. IIUC, on Arm, the BARs have to be positioned in pre-defined
>> ranges. So I think it would be possible to implement is_memory_hole() by
>> going through the list of hostbridges and check the ranges.
>> 
>> But first, I'd like to confirm my understanding with Rahul, and others.
> 
> 
> May I please ask about your opinion on that?

I agree with Julien we can implement the something similar to is_memory_hole()  
for ARM
that will check that the bar is within the bridge ranges.

If you are okay you can discard this patch in next version of the series and I 
will push the patch
for review.

Regards,
Rahul 



 


Rackspace

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