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

Re: [PATCH v2 06/14] x86/P2M: PoD, altp2m, and nested-p2m are HVM-only


  • To: Jan Beulich <JBeulich@xxxxxxxx>
  • From: George Dunlap <George.Dunlap@xxxxxxxxxx>
  • Date: Fri, 1 Apr 2022 12:36:51 +0000
  • Accept-language: en-US
  • 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=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=TN6dZ/g5nNvt7Qoz9gXC0DWYwPGm35dx6bIkM5j2DhI=; b=K0M5iaFp0AJ4kb2tIhR+3dJZDPvQviakmShMRQ/gFQDNe2wxM7nSNDlQstJdS2hU37xRRcbMtwi9R2kyzBlWV1lRhxgucvtlXt28+DTGe0JejXORcGXBOEH13FtGBKhKAzUwiPMqnYRFxasWgXhcc5ad+TuFPeFLEyEf6Xz3iyffNcXaojGup37/ycYcWnixiNT/vtKaSmlOSf1cGS+f9cuA/0rJO9KZd+1a4Watj1ddCBv1rjW1FCTgmE5t9qyN/Pf76+ZdgtWlkB0P9bclE6ThDyR1bKfOxSCFKfjnKUbpbSzu3TJ4P7fFOQCE+icZ8ZNRRZA7NnFjV9hHFNoQJw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FNMI5GAfqONg0CLaQr8ogQ8vbY3JgrxLeAep2T3PbfyBFGo+l1HGQHDkJM4IaybOmLjckYhmyRCqw8CbdllDCktDeae03EoRSZWUjByBO9fXefjKfpvjyNommW9pJt1TzMhafB3OE2QbBIO6F7w0UPY2+TAvf9veK1pywqT8mwkPnb+LD4g3VGyylhNLRsMtL++Rx+ZKAbKMaNJf/1J0eCBj+J4YLV0mgRAW3lJq09DV14zlMU3v3ZQXxRaIQ8PzSFgEjVwUCIYOVqdmaNapBpmyair8g++L99oYfkbw5pnQk7Bs3QgW5qmYEgAcUoEJ3GHONYeuJ2Sqjoi6+TPL3g==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=hardfail (body hash did not verify [final]) header.i=@citrix.onmicrosoft.com
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Andrew Cooper" <Andrew.Cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 01 Apr 2022 12:37:07 +0000
  • Ironport-data: A9a23:DQK8YapTtRBEg4o8j+B+qsPyN5VeBmKbZRIvgKrLsJaIsI4StFGz/ 9cnaN20SrzTNTykP5w0PZPnthk2DaWlxtZrTQVv/CE0QysboprIXYyTfxuvNi6fdsebF048t c5GO4jLdpg9Ey7SqB3xP+e9p3QshauDSuelA7GbY3EvFGeIJMtZZTdLwobV1aY00YjR73qxh O7PT+3j1H6NizMla2gY5avfohk2tamv42kUtFZnaaoS4wTVnSAeU8hOea3pI3XGGYQFReTSq 8QvbV2aEsE12z93V7tJR56iKhVirob6ZFTI0jwMM0SbqkAqShYai87XD9JBLxYP49m1t4opk o8V6cTpEV1B0pDkw4zxbTEJS0mSAoUekFP3CSDXXRu7lhCun9PEmp2CPWluVWEq0r8f7VJmr JT0HAslfBGb799a9ZrgIgVaambPG+GwVG8XkikIITg0lp/KS7ibK0nBzYcwMDvdGqmitBsRD iYUQWMHUfjOX/FAEkctAc4Dg8mhvUbATzF28VSqu5MoymeGmWSd0JC1WDbUUtmDRMETlUeEv GPWuW/+B3n2NvTGl2DDqCj1wLaSw2WrA+r+F5XhnhJuqHKewXYcBVs6SF2/qOGRgU+iQdNPb UcT/0LCqIBsqxP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oEWStmNwyUGT3/ARAghKU/apzLgpAifx+g4uuspx37 lM2H/cv51LDQnYlCC4/NTQUQp2/3DE6kbLAYYo/g1iuKYlGfZsRLYkjQto+VY7bVbHwZFiFP MrANDX5f5Qf1/fZ3fFvnN3yNjpWngoBB+JTkULp8TQilFt7T1E5lpdwNZakmYL9Zo7RZUB7+ PYMr5wnLULSsMNd6pyCOoIXMPyAG3QRhDHNn6UPD3cZes6EmOIr4Sy7KQ+5emsdpBNxJwumI 7ZWFcdrmI2c1KGM7z54HSKyGG7fIyQZ0We9igF3ekLhlTVfsufDRG+
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYKM6kfiQ1SdoPe0C+8EGNLnrHw6zbOLKA
  • Thread-topic: [PATCH v2 06/14] x86/P2M: PoD, altp2m, and nested-p2m are HVM-only


> On Feb 23, 2022, at 4:01 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
> 
> There's no need to initialize respective data for PV domains. Note that
> p2m_teardown_{alt,nested}p2m() will handle the lack-of-initialization
> case fine.
> 
> As a result, despite PV domains having a host P2M associated with them
> and hence using XENMEM_get_pod_target on such may not be a real problem,
> calling p2m_pod_set_mem_target() for a PV domain is surely wrong, even
> if benign at present. Add a guard there as well.
> 
> In p2m_pod_demand_populate() the situation is a little different: This
> function is reachable only for HVM domains anyway, but following from
> other PoD functions only ever acting on the host P2M (and hence PoD
> entries only ever existing in host P2Ms), assert and bail from there for
> non-host-P2Ms.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Thanks,

Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx>

> Perhaps p2m_pod_init() could be invoked from p2m_init_hostp2m(), leaving
> all other p2m's PoD state uninitialized. Of course at that point the
> question would be whether the PoD pieces of struct p2m_domain wouldn't
> better move into a separate structure, present only for host P2Ms.
> Together with the p2m_pod_demand_populate() adjustment this might then
> better be a separate change ...

I’d certainly be tempted to do that kind of clean-up.

I would just check this patch in as-is, but if you really want to pull the 
p2m_pod_demand_populate() adjustment into a separate patch to keep everything 
in the same place, feel free to drop that while retaining my R-b.

 -George

Attachment: signature.asc
Description: Message signed with OpenPGP


 


Rackspace

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