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

Re: [PATCH v2] x86/PV: make post-migration page state consistent


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 23 Nov 2020 12:48:43 +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=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=db88IQDK/BpAmsJMUM22U2nhGSmJcS5NbW0gVk4oxLg=; b=D6Y2MwaXIGY4cWmRk1eMjX/ljIySkTF6mGWq7eCfq9bb38sx0kNVVpVRiRx5/t5Jl2+fvrAUUV17KGqbFyLE9bbbimkVbLLomV7QfP6eNWB4aMVyPEjks3cBmhdXsgsCifEcBhDcOhmIqtEOcgL64ntBqjIM8flZf4CUoGFvtkz6BCCEU7iAd/MPKyE9JZTyn2dOFNPZyl2V4dYV9hy59mJCzZ5oYtm9Ot3DCtFOa9WtOcVkh5qfF3ozSZSbihR6jgzJlOKL7RvClGJtFK70u113fn7fa0sVXLBcrmzYIZOpPNTDVjUV/F/pNpis5gLEIldGH66BYR4+PxA0Wanf8g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Snqi20AnYD3JAR1yrjTm6DDhiqzGmbR5nx2hIl/sQA/x14mv2kiqKHus7tFYeuvAGe8MvudkI01FrzHe4vQHS5J9qqBleASBbDKvRs4COOCUUQpLpnp0aN9MB5ZLChFZQ1ooaml3xHI2CSNX2dZbb/nydsGV8sb9VHWgKYt1AlKdvJfp02UlbSJsjm5tZ54z7ng/bRGoIhOXIFKyQQqu/Y3gM5NGNXRNvyWk19ZxNvT//ptLx4llb5StXKi41gqWf9WlZtWLSOJkDRG2I4YiJ8kjnEtyrUnwuVSctMuXHb8p1wODfmHUJ33YD8y6MGv0pi9DkPQMNcoSUTK8d55N+w==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 23 Nov 2020 11:49:03 +0000
  • Ironport-sdr: oxEEeMk8Z75SMSuS7hG46ZdJ7NSuWcxehSCnA4BZ+PLmFspGHv6C1hbGsZDO5qO8lVKfjvNYo9 ub4Y9f0f6OjPvTzpYTO8UQi8MPtWbvrIQgl0C8QQClj+SIDbchd1/gmUuJfwq+z2vDEs8kLqzj HaWFE71+fX/g0n5c+1zvHIFJhG5u6DMvCSHPtW4hXiv+dTWRDYkcvZK+IYeHpV6md64wWGa0vg lBYBVf7wY5FpTMmyDPFsz7YyQxKG/WU7aQPzGp2rPwybY4Tu3FpmIVdp/LLPsWVZOwvtGXYa7U E1k=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Nov 04, 2020 at 08:56:50AM +0100, Jan Beulich wrote:
> When a page table page gets de-validated, its type reference count drops
> to zero (and PGT_validated gets cleared), but its type remains intact.
> XEN_DOMCTL_getpageframeinfo3, therefore, so far reported prior usage for
> such pages. An intermediate write to such a page via e.g.
> MMU_NORMAL_PT_UPDATE, however, would transition the page's type to
> PGT_writable_page, thus altering what XEN_DOMCTL_getpageframeinfo3 would
> return. In libxc the decision which pages to normalize / localize
> depends solely on the type returned from the domctl. As a result without
> further precautions the guest won't be able to tell whether such a page
> has had its (apparent) PTE entries transitioned to the new MFNs.
> 
> Add a check of PGT_validated, thus consistently avoiding normalization /
> localization in the tool stack.
> 
> Also use XEN_DOMCTL_PFINFO_NOTAB in the variable's initializer instead
> open coding it.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Maybe the switch could be avoided if the page is not validated or
broken? Not that I care that much.

Thanks, Roger.



 


Rackspace

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