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

Re: [PATCH v3 1/2] xen/passthrough: Provide stub functions when !HAS_PASSTHROUGH


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 5 Mar 2025 09:26:41 +0000
  • Accept-language: en-GB, 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=arm.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=arcselector10001; 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=6f91jiP+gRmKiRK4i/b6WbUqLqK4L+8SPBRRlWZrZko=; b=bMDTxakwJ2cfGimgA+tYbDjbucTloeWmKJc0FDd2AqP1l1f6PB5dkd8BFWx4fxlsKrEJt1FCf2HVQc6zFrA6Tm013fAaUyel+iWSjZUV6HAbE7Fs0pCd/fad2KMKz56kHZiJMVk3MiPRDmlpPyTYw0DiqvlQFN5icgt5EsmMYLsoFKFXp3kcLm8EOwLOIWLR0gmtp3cfItU8hu2Bagw1j7lz49zlEDNarzQUFmCoTf1wQk4XRBPEldofLpJL3U/BfmQ1Of05k3yUWiaim7sUPONNaVpqWNq0FYd4YaFYQ9G3Ddzgz3D0VXKo2hGUWkTgvMudIsTIYnuHoK0qRaVl9A==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=6f91jiP+gRmKiRK4i/b6WbUqLqK4L+8SPBRRlWZrZko=; b=ewlAK8onGxrxlK95LIQolccMYgyZ8TmeOgtnVHC/gncmgKKjUSXuqYxPgxXvjrdDCy3NL2VG6oehUkn018InXl+drDb82JjwWAz536vbUT8aMFCHQQzLQKLsAyQA3e4IvgTKDw1sT9lY52nmbnfDhP+7NShNQjwmKAdDYAVLamzTrrEe+yZFe1WqHgSX5SnGLfCV3/eis2F8crwxCeyPD0Q6IzrHl4R1CplLjRGm616SO451Qkl9dGIjLuNLpkuvDDe4ayJGNGFF7Ub1DClrvUkYZsfJ6thDtL6K1gg4y/5LsuUIdQQv26Rst3bUnh51mHRe0H7hVfSc0W6uuKU1TQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=ykYBGSpBER40MzOojLltDE9x1zpwL+AMntCaXZBfcyoufCXqTPSSB9/pXLxS7ajPNsDd7wZKC7fScuc7LXb7yuG+575Fpu76CqbhMhJ3raevusaW9hhXN28/PIELmoY049DKj+PeK2PIFmD5mVfkprHwdAXzU73CWtPfVl9AcTplNXoeUT++ZAhhA8sPfvqdBzc8fk/0HIHne57HJPPVwLTooZ3NGtgsA0hgIHDN6DaKBuUkaw9pdAeXY+lJWk9q9vj6A8+M6CWsuCGhvGl/SPp113lLJNzivkEM+DbwoJbPpufEmIaFJvFxp+WoQmH7gU3AB6xnQcbaQpUBjdPXPg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NWIOv6KegkGZ1cWX1i+4xp54Dn265sSDrzg/gIXCDNg4OiFQMH9KPYnpSrngNqljU4M5/+0R5QDEyFvHasCU3+tK1tHp1DrW3lT36dljgqh93FpPGu7krkyL+dSZGOS1x5FLifjCsYdcJqgdhZZyqMa0ayyAY4OUDrYTC8eh157okGbZsDhJkvhQPUygij15r61NRgVVh+nW/zjZL0qYhkTC4WpbVDyK17i9L9zWm8kMDnroxQppsGH11641dGAFc9eY/Dd7i4VAELMdRdc51FCOyV+OmgfannFSg2Q4n906KKLePixiIfbp0TRN+llAlLHoBCFoYqlxpfYW8nm2ig==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 05 Mar 2025 09:27:11 +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: AQHbgeq9NiESuirZAUKjxGV4IoLUtLNOlIQAgAAFvICAAAbRgIAAH+aAgAAG2QCAFKnTgIAA69gA
  • Thread-topic: [PATCH v3 1/2] xen/passthrough: Provide stub functions when !HAS_PASSTHROUGH

Hi Stefano,

> On 4 Mar 2025, at 19:22, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> 
> On Wed, 19 Feb 2025, Jan Beulich wrote:
>> On 19.02.2025 16:25, Luca Fancellu wrote:
>>>> On 19 Feb 2025, at 13:30, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>>> On 19.02.2025 14:06, Luca Fancellu wrote:
>>>>>> On 19 Feb 2025, at 12:45, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>>>>> As per the
>>>>>> respective revlog entry, this change looks to belong into whatever is
>>>>>> going to be done to deal with the one Arm use of the macro. Or maybe
>>>>>> it's unneeded altogether.
>>>>> 
>>>>> I didn’t understand that you were opposing to protecting 
>>>>> iommu_use_hap_pt() when
>>>>> !HAS_PASSTHROUGH, I thought you were referring only to the stub in the 
>>>>> #else
>>>>> branch.
>>>>> Can I ask why?
>>>> 
>>>> Sure. And no, I'm not against the extra protection. I'm against unnecessary
>>>> code churn. That is, any such a re-arrangement wants to have some kind of
>>>> justification.
>>> 
>>> ok, yes the justification is that MPU system will be built with 
>>> !HAS_PASSTHROUGH,
>>> but there is a common function (p2m_set_way_flush) to MMU/MPU subsystem that
>>> I would like to keep common, to do so I have to hide the macro in this 
>>> particular
>>> configuration and afterwards I have two choices:
>>> 
>>> 1) provide a stub implementation on the Arm side
>>> 2) provide a stub implementation in iommu.h
>>> 
>>> number 2 felt better because it could be applied on any Xen configuration 
>>> without
>>> HAS_PASSTHROUGH, even if at the moment there is only MPU.
>>> 
>>> Number 1 let the possibility for the specific configuration to choose what 
>>> to do in absence
>>> of HAS_PASSTHROUGH.
>>> 
>>> Now I would like your view on what would be acceptable here.
>> 
>> I think I indicated earlier that I'd like the Arm maintainers to voice
>> their preference. Doing it in iommu.h may be okay, but also may not be.
>> Yet to decide that very Arm use of the macro needs taking into account,
>> and I lack context there.
> 
> I think that doing it in iommu.h is fine

Thanks for sharing your view, Jan if you are ok with that, I’ll respin this 
patch with the stub implementation
in iommu.h.

Cheers,
Luca

 


Rackspace

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