All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien@xen.org>
To: Stewart Hildebrand <stewart.hildebrand@amd.com>,
	xen-devel@lists.xenproject.org
Cc: "Rahul Singh" <rahul.singh@arm.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Oleksandr Tyshchenko" <oleksandr_tyshchenko@epam.com>,
	"Artem Mygaiev" <artem_mygaiev@epam.com>,
	"Stefano Stabellini" <stefano.stabellini@amd.com>
Subject: Re: [PATCH v2 1/3] xen/arm: pci: introduce PCI_PASSTHROUGH Kconfig option
Date: Thu, 20 Jul 2023 10:20:11 +0100	[thread overview]
Message-ID: <2053098f-5311-89ec-294a-aa731f2b01e1@xen.org> (raw)
In-Reply-To: <1a8d7024-f881-a3f4-c575-240fb393555f@amd.com>

Hi,

On 18/07/2023 18:35, Stewart Hildebrand wrote:
> On 7/13/23 14:40, Julien Grall wrote:
>> Hi Stewart,
>>
>> On 07/07/2023 02:47, Stewart Hildebrand wrote:
>>> From: Rahul Singh <rahul.singh@arm.com>
>>>
>>> Setting CONFIG_PCI_PASSTHROUGH=y will enable PCI passthrough on ARM, even though
>>> the feature is not yet complete in the current upstream codebase. The purpose of
>>> this is to make it easier to enable the necessary configs (HAS_PCI, HAS_VPCI) for
>>> testing and development of PCI passthrough on ARM.
>>>
>>> Since PCI passthrough on ARM is still work in progress at this time, make it
>>> depend on EXPERT.
>>
>> While preparing the patch for committing, I noticed that HAS_PASSTHROUGH
>> will now allow the user to select one of the IOMMU quarantine options.
>>
>> There are three of them right now:
>>    1. none
>>    2. basic (i.e. faulting)
>>    3. scratch page
>>
>> The latter is unlikely to work on Arm because we don't setup the scratch
>> page. AFAIU, for that, we would need to implement the callback
>> quarantine_init().
>>
>> I would expect 1 and 2 work. That said, I think 1. would behave like 2.
>> because on Arm the device should not be automatically re-assigned to
>> dom0. I know this is correct for platform device, but will it be valid
>> for PCI as well?
> 
> In a system with dom0 where the guest is created from the xl toolstack, we rely on "xl pci-assignable-add". Upon domain destruction, the device automatically gets assigned to domIO.

Ok. To clarify, does this mean any DMA will fault, the same as for 
platform device?

> However, there's nothing preventing a user from attempting to invoke "xl pci-assignable-remove", which should assign the device back to dom0, but it is not automatic.

I don't think we want to fully prevent a user to re-assign a device to 
dom0. But we at least want to avoid re-assigning the device to dom0 by 
default. After that a user can reset the device before it gets 
re-assigned to dom0.

Cheers,

-- 
Julien Grall


  reply	other threads:[~2023-07-20  9:20 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07  1:47 [PATCH v2 0/3] Kconfig for PCI passthrough on ARM Stewart Hildebrand
2023-07-07  1:47 ` [PATCH v2 1/3] xen/arm: pci: introduce PCI_PASSTHROUGH Kconfig option Stewart Hildebrand
2023-07-07  6:55   ` Jan Beulich
2023-07-07  8:10     ` Julien Grall
2023-07-07  8:38   ` Julien Grall
2023-07-13 18:40   ` Julien Grall
2023-07-18 17:35     ` Stewart Hildebrand
2023-07-20  9:20       ` Julien Grall [this message]
2023-10-04 18:07         ` Stewart Hildebrand
2023-07-07  1:47 ` [PATCH v2 2/3] xen/arm: make has_vpci depend on CONFIG_HAS_VPCI Stewart Hildebrand
2023-07-07  6:59   ` Jan Beulich
2023-07-18 17:01     ` Stewart Hildebrand
2023-07-19  7:42       ` Jan Beulich
2023-07-07  8:55   ` Julien Grall
2023-10-09 19:11     ` Stewart Hildebrand
2023-07-07  1:47 ` [PATCH v2 3/3] [FUTURE] xen/arm: enable vPCI for domUs Stewart Hildebrand
2023-07-07  9:00   ` Julien Grall
2023-07-07 10:06     ` Roger Pau Monné
2023-07-07 10:33       ` Julien Grall
2023-07-07 10:47         ` Roger Pau Monné
2023-07-07 11:16           ` Julien Grall
2023-07-07 11:34             ` Roger Pau Monné
2023-07-07 12:09               ` Julien Grall
2023-07-07 13:13                 ` Roger Pau Monné
2023-07-07 13:27                   ` Julien Grall
2023-07-07 13:40                     ` Roger Pau Monné
2023-10-09 19:12     ` Stewart Hildebrand
2023-07-07 11:04   ` Rahul Singh
2023-07-21  4:54     ` Stewart Hildebrand
2023-07-21  8:41       ` Rahul Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2053098f-5311-89ec-294a-aa731f2b01e1@xen.org \
    --to=julien@xen.org \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=artem_mygaiev@epam.com \
    --cc=bertrand.marquis@arm.com \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=rahul.singh@arm.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=stefano.stabellini@amd.com \
    --cc=stewart.hildebrand@amd.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.