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

RE: [PATCH v4] xen/arm: p2m: Populate pages for GICv2 mapping in arch_domain_create()


  • To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Tue, 18 Oct 2022 12:54:18 +0000
  • Accept-language: zh-CN, 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=armh.onmicrosoft.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=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=3ZVPCmAawhP/ivgOYB1lMAEBPcBuPLOnQXrB6xC0yQ8=; b=jgfjR0WSFZyumVYwZ/Sy0tYR3eIP33aNcxPSRy6fLWCkTQiiZXlcf7Gb80N3dFnWE0LP+GbrgzGxNaODUjm6sNaAJ1r/+aZlbNCz01zXvZ5Bn9shiwYj5PMoEGAipClXTgw/OGctVGMRpF8lE1dIFY/2ZaAM0U9h1ecfKCihiflJEwjDQeFi+/YIvGVz4n3Fm/YtHPg3P4XjoOp5OQsnfgyGuwucIBKAFZXy4Sec2Ps4u6l+JbLL6MLChBYHf4SzGF49ieRElWgR+7nx6gy6YGGllO2HonNHuM7XbPUNcxgWYL8DSgsxa36ijWhajG5zubxoZR5+sxot8SUkw0O1/g==
  • 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=3ZVPCmAawhP/ivgOYB1lMAEBPcBuPLOnQXrB6xC0yQ8=; b=QrEnVWiAxPA3+n9OJvzlCSoC4ioQIFQ90aoMJAdHRYYZY6jQD+Q2yqXB/9EmQkCt8bLzdYU3PZmgWXjz5ThhkrPtA2iLffAbU67Uvk3qHbfn8Rw2rVwjOFRF//PRAwnjYGueHn6EXpcGleHbWdDo5rcVZ2IhKbPPRiEBySv8AgvxZXwg6qZvP7Fhrcn/8dpx/BbUJFZWpzNfOq1VDrh314yeH/8PMwAGhJyPYb6XESPv5JCRjqwwuRKBb9X8630dAtDcDiByhO9lFPAdlNABwpGKDb18GEFBGrFFfY8XqIVKmtjP1FnBUpXz4s/GFjd/ja8oe98yM6jIzg1iriqDKA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=GfACyHzofszpH7E990Q+doPO9sAXPAKDqMhl0YqIrQTjmPmaiGrghl0wF4U8iHYJqVWoQ/DuEREAaX/h43GEF2s7jWCUnA0MP/MG+tOP622xPvJIiA50EePjZMer8l0IGexRpqxjyQkLW2902PaMLERi3YTDgM/Qw3v7uPPPf5pnDfBrneBc1S6zh1hAJw6ePXue7OfwnZ9fQJqYJS9jjXRXCwNU/i1nB5jCJnlhyPoyk90B8eXZoc30POjRkiEd2zrpxLFVtEo9Rkto0a68LB/tIcQLGJCjQxbJ8khoyw9DvHEPi5LlQdt1KTtrS/SxZceiXGK5dGRuB7ZGz2biqw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oDZjNQcS29hiyts6Tqe/Bamwkaj0F5tUTg+knrMSjsyIavzNiecQk5ts41kjQL8YfMsyeCb9FLw1qoGQYu5qV8jajXa42uq3ESgsxlcvQtL+NRapMwDV2Qdj/5QPWedh9xJAZUKZxgNHKvfHWTNisScW1KbI5sxRLohmIEXvxB34idYFDhWEK+V4pRjjyHz3FSWx1O7TXTV/js/gvpXSXEcRIwojNAPXJzBIJfmq6JX0pNAyOB4wPWMgbVfQkZ1URiiV+FCgBYJTEHEuR0ta5ogYPyKuKLIPephdrg0f/0AAQiiPIlyVhc7hYkWuZMgCmyz8/jIPFR/Ls9i5V6+hgQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 18 Oct 2022 12:54:56 +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: AQHY4kjE8chHQ2hgBESCJmpSFAnjhK4UGfkAgAAAnDA=
  • Thread-topic: [PATCH v4] xen/arm: p2m: Populate pages for GICv2 mapping in arch_domain_create()

Hi Julien,

> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> Subject: Re: [PATCH v4] xen/arm: p2m: Populate pages for GICv2 mapping in
> arch_domain_create()
> >       if ( p2m->root )
> > @@ -1784,6 +1800,8 @@ int p2m_init(struct domain *d)
> 
> As Andrew pointed out the change in p2m_init() will end up leaking
> either the VMID or the root table.
> 
> Andrew's patch #1 [1] should help to solve the problem. So I would
> suggest to rebase on top of it.

Of course. I appreciate Andrew very much for finding the issue. To
properly solve the problem and reduce the amount of work from
maintainers, I will try to respin the patch series (with #1 from Andrew
and #2 from my rebased patch with commit message properly adapted).
So that either we decided to pick Andrew's whole series or Andrew's #1
plus my #2, we can fetch the series directly from ML.

[...]

> 
> Other than that, the logic looks good to me. This is even knowning that
> Andrew said the code is buggy. I spent some time starring at the code

Thanks for your time :)

> and can't figure out where the issue lies because p2m_teardown() will do
> nothing when the list is empty. If it is not empty, then it is
> guaranteed that the VMID and root table is allocated. So the code looks
> functional but just not efficient.
> 
> We already discussed the latter point earlier in the review and agreed
> to look at improve it post 4.17.
> 
> For the former, I am happy to be proven wrong. But this is going to
> require more substantial explanations.

...having said that, definitely no problem for me to wait for a bit for
the discussion continues. We can pick the most suitable series when we
reach to the conclusion.

Kind regards,
Henry

> 
> Cheers,
> 
> --
> Julien Grall

 


Rackspace

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