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

Re: [PATCH v2 04/14] x86/mm: split set_identity_p2m_entry() into PV and HVM parts


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 8 Apr 2022 14:14:13 +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=UHV6gbW///R1wlj+a4qra8fR15tXppu/qY55Lum5rV8=; b=YF6UxMmNk9ezVtW/+0ib9KJNIo3qnmAwzSKIAMs37KVqGWyQ6EerPjTKxqgw6xCmYuQ5U0Us/xCkrQnFZ8vxKjYf3CKKYmnH6ZcHhVOst+VM652rQOoEPT0nvLOuLaMo8wvIucLq+GiJvl9qpzAoFPQsFwi1oY2O4pX+ascsogJ/kiue4B3VClSGTxf5TJ0hy7OKgHINaiYElz3Soph19sZ3ZzXI3bpVKgnOOkj9rXZJPaWG5k+GmLKCZWeN5EfHinTSZF6NhCr2KC6Jx1+/7G6FvzIGxyqvRubScMxp5HEJsXubXEYldnIv+wH7LBoXdvwOz45L23xXKU0CNBua1w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RX/+FZYcDZBFgfjXz/lESUzWFz8T6Na/2kDqcp1Xd2Ykg1bgkHAJCJdRk40BzFfZNPZSp3U/7VW4wClqCj2M5otLfVVCfi3Pbfss/poyiVM2oDDXoQviYOt/0RUdZaBg7vi+LcNpGPVZWHaFJIr7cbWG3d7VJOGjrPqXkX2D7yNfDykvNyH/4iQ7duMM62mpkYLlE1ZA3KBzUxOfWVe7Ku23MbwJElYmDVULJdH/0gz5JYp7tqxSteVfgZFEI60Z8sfalVOHEcfcnxq1cnUqkcocQyB5bzPKEYuj/3qM7mnfxQl7ygnZ8yjwJ1/K34Jci4dpBpDMnSqZ08k04dcQ6w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Fri, 08 Apr 2022 12:14:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 08.04.2022 12:55, Roger Pau Monné wrote:
> On Wed, Feb 23, 2022 at 04:59:42PM +0100, Jan Beulich wrote:
>> ..., moving the former into the new physmap.c. Also call the new
>> functions directly from arch_iommu_hwdom_init() and
>> vpci_make_msix_hole(), as the PV/HVM split is explicit there.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>> Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx>
> 
> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Thanks.

> Just one comment below, which can also be taken care in a followup
> patch if you agree.
> 
>> ---
>> v2: Change arch_iommu_hwdom_init() and vpci_make_msix_hole().
>>
>> --- a/xen/arch/x86/mm/p2m.c
>> +++ b/xen/arch/x86/mm/p2m.c
>> @@ -1473,12 +1473,9 @@ static int clear_mmio_p2m_entry(struct d
>>      return rc;
>>  }
>>  
>> -#endif /* CONFIG_HVM */
>> -
>> -int set_identity_p2m_entry(struct domain *d, unsigned long gfn_l,
>> +int p2m_add_identity_entry(struct domain *d, unsigned long gfn_l,
> 
> I guess switching the gfn_l parameter to be gfn_t gfn, and then
> defining:
> 
> unsigned long gfn_l = gfn_x(gfn);
> 
> Was too much churn?

Well, yes, I probably could have done that, but the series was (going
to be) big enough already, so I tried to stay away from such (for
consistency's sake I think I would then have needed to do the same
elsewhere as well).

Jan




 


Rackspace

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