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

Re: [PATCH 1/4] vtd: Move (un)map_vtd_domain_page to extern.h


  • To: Teddy Astie <teddy.astie@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 22 Oct 2025 10:58:30 +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=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=AOHXihEUwjHwoXMW6yWGv9PJBf8ma/WW1N3dIzUNNaQ=; b=oAWnFwkWL/lckR78ULDH8UvzMpbf/VbayhTa29fqGjx8f/Q1e29BUdzPom8zCQcZr9gRHZ1ly9a3IR1zZr3s0lNWsJW2ZrHJT32LF9TKe8Z2lZb4w+Sc8/5nTl4uOePncBJ4mbYs+2laZN/DNosYBHKoIw17hSdFvRvBoq0mOWsz2xIUs1ETT7m/ltS4k2YR1jfGSHsnxoORdg+/m7HvXviPgTBkokeU92q6WeKX2cOQz88sf37dRjYY3icn0YROYtpn3EGXw4bBTKyrjhfpdpG9Q7aHYPKL7wDrt2SPfF5Ei8ht/cbUXwVWVj4T8NZZy6zFsvM+1zqEFkP6Avt+IQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=QctVF2UHCNiq6UYkZ6Z03FgWTKojTZOSMx19v32rVq0cng88MDrcWFaKJ2vLuMTnAPXWaXNzVdN9QDo0b/9CZvPRMG4dKFbM1nm5+mVK4oN4/Ze/uWgPfKwdaUQQhHbutG6kc1gl+vd6SoJRDHZuAMBR34VsnGxUypVdl2fJZc2XDVA3Ziq+91dhRM9AfLp3tSlG27jLHARi/yKiXnwplzAR/Oh/mkPxq9YaStXItDL1ThDfcIABJYYoCpS4nH4ub9wCnxOw68wes0OJHdZtbIoQXk7jLlAM+LHys0cHYlQCirOFqycarzloS0LmunG6uteB/qm5IdDoabKp+SBYbg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 22 Oct 2025 09:58:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22/10/2025 10:51 am, Teddy Astie wrote:
> These functions are basically wrappers of map_domain_page; move

We tend to write map_domain_page() with brackets, to make it clearer
that we're talking about a function.

> diff --git a/xen/drivers/passthrough/vtd/extern.h 
> b/xen/drivers/passthrough/vtd/extern.h
> index c16583c951..a62310b3e7 100644
> --- a/xen/drivers/passthrough/vtd/extern.h
> +++ b/xen/drivers/passthrough/vtd/extern.h
> @@ -114,4 +113,14 @@ void quirk_iommu_caps(struct vtd_iommu *iommu);
>  bool platform_supports_intremap(void);
>  bool platform_supports_x2apic(void);
>  
> +static inline void *map_vtd_domain_page(u64 maddr)
> +{
> +    return map_domain_page(_mfn(paddr_to_pfn(maddr)));

maddr_to_mfn() drops the _mfn() wrapper.  u64 wants to become paddr_t.

Otherwise, Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>.  I can
fix up when queueing.

~Andrew



 


Rackspace

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