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

Re: [PATCH v5 01/11] xen/arm: xc_domain_ioport_permission(..) not supported on ARM.


  • To: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 12 Oct 2021 12:03:52 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=FSelyn2GNiLeHHZsI2XBP/pqcmLhnNtXThtS2+gh2JM=; b=ZzHjMsUbjIxAaJliwMOXCiHmw9QISAKhPtue3augAvgjX35e6XEZCPXT9RwRJLoce3uY4hYiT86xlrrSD0yY7TZhdtBdjpBi4dpqq/9MS9E7tKnvSljqt0ZsLmBq6f+uqVNDTK2wKY9ESgBp8AiO6VsHDL5W1n8EW7RilpGrGg4GqOb2Gj5Y5gdu+l/dcLrOr8T8AvR+zKVhoTCUSRh/2i1WsdUARBLEhjPhm44YyE2o5xS4ceACiRaolyTD8VAlv92/Sd35kBlVEdrgWbcXewotcwtBsjdya42rj3qozSfZj1z1Xp12RwLwjJs3BmB509JxKcMri88zM7UExReJHg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JcEGuqcP/FDhQQSXN5oP4oxToSkVLgAj5o71aGr3tZCfChWsOAhH3DNqQ6R1WgQ95O1NEndqBYpReH1AOABmCRwEKt1ViQKzfPCNHcsrT6a4ou/FLTdAwr936ZHnxSDUfssfdZ2rj+sdtWPtJESyZ9SALgN2KdpnKJrqchlgy2Cv3RocQBaqdSkcytdwo3dCI+IlIdTvXX6xJZZVnnH+/a2caBy1pPgxGT8gyLqP8Rvj0jRAIJgWTMww8YM4iaSWskuJbkyXkbnEcMvA17UrWaDzspyhBOQemhtEBe5WAyG5fMhZNR1bF4PwAbhdWN+6g6R/rJZ7UqPy8KR5jPbtcg==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com;
  • Cc: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>, Rahul Singh <Rahul.Singh@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andre Przywara <Andre.Przywara@xxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 12 Oct 2021 10:04:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.10.2021 11:40, Bertrand Marquis wrote:
> Hi Jan,
> 
>> On 12 Oct 2021, at 10:32, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>
>> On 12.10.2021 10:41, Bertrand Marquis wrote:
>>> Hi Jan,
>>>
>>>> On 12 Oct 2021, at 09:29, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>>>
>>>> On 11.10.2021 19:11, Bertrand Marquis wrote:
>>>>>> On 11 Oct 2021, at 17:32, Roger Pau Monné <roger.pau@xxxxxxxxxx> wrote:
>>>>>> On Mon, Oct 11, 2021 at 02:16:19PM +0000, Bertrand Marquis wrote:
>>>>>>>> On 11 Oct 2021, at 14:57, Roger Pau Monné <roger.pau@xxxxxxxxxx> wrote:
>>>>>>>> I think the commit message needs to at least be expanded in order to
>>>>>>>> contain the information provided here. It might also be helpful to
>>>>>>>> figure out whether we would have to handle IO port accesses in the
>>>>>>>> future on Arm, or if it's fine to just ignore them.
>>>>>>>
>>>>>>> All our investigations and tests have been done without supporting it
>>>>>>> without any issues so this is not a critical feature (most devices can
>>>>>>> be operated without using the I/O ports).
>>>>>>
>>>>>> IMO we should let the users know they attempted to use a device with
>>>>>> BARs in the IO space, and that those BARs won't be accessible which
>>>>>> could make the device not function as expected.
>>>>>>
>>>>>> Do you think it would be reasonable to attempt the hypercall on Arm
>>>>>> also, and in case of error (on Arm) just print a warning message and
>>>>>> continue operations as normal?
>>>>>
>>>>> I think this would lead to a warning printed on lots of devices where in
>>>>> fact there would be no issues.
>>>>>
>>>>> If this is an issue for a device driver because it cannot operate without
>>>>> I/O ports, this will be raised by the driver inside the guest.
>>>>
>>>> On what basis would the driver complain? The kernel might know of
>>>> the MMIO equivalent for ports, and hence might allow the driver
>>>> to properly obtain whatever is needed to later access the ports.
>>>> Just that the port accesses then wouldn't work (possibly crashing
>>>> the guest, or making it otherwise misbehave).
>>>
>>> As ECAM and Arm does not support I/O ports, a driver requesting access
>>> to them would get an error back.
>>> So in practice it is not possible to try to access the ioports as there is 
>>> no
>>> way on arm to use them (no instructions).
>>>
>>> A driver could misbehave by ignoring the fact that ioports are not there but
>>> I am not quite sure how we could solve that as it would be a bug in the 
>>> driver.
>>
>> The minimal thing I'd suggest (or maybe you're doing this already)
>> would be to expose such BARs to the guest as r/o zero, rather than
>> letting their port nature "shine through".
> 
> We are emulating an ECAM PCI which does not support I/O ports so I do not
> think we are (and can) expose those to guests.

I'm afraid I don't follow: What do you mean by "expose to guests" in
relation to what I've said? I did specifically suggest to hide the real
nature of such BARs, and instead surface them such that the guest would
have to conclude the BAR is actually not in use at all.

Jan




 


Rackspace

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