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

Re: [PATCH][4.15] x86: mirror compat argument translation area for 32-bit PV


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 22 Feb 2021 15:13:28 +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=fXNSbAxKetyjknVoleTu+e4FO8g8d0PVDRXqx/8BaAI=; b=BzYylmt57NTSMH8orP1y5aapEfgEowO7pfcgfsRvB3ZvVKww+tdW1ZpCAnbPmzHTCVTK61+o4YNPsYGZ23VTg1qTtaC64NxjkTu5WIGfGypOR6rT+FRHDZzILPJlN9g9nfDC5L2cVZraBRQTOcpyWGCQ601QRX2ebIDi/dMpBVCvtvUZtIwzDAacOAw2ibk7POCSiZ8FXKGZuNZQ14NpP3jpvVsm51tYE6rLZDcrfKmsny0KBXvz13X6bVSCWWz1cR2N5TLVr01ZjuF9AOIA+QwC0VMeTRDnTDRoyEgD2omhmV77rhF2oiy1Su1SiuXMZa8fcIlRyPSWQz047+1cJg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=imfBha3A90v/uCd5fLejUu4bOjjO1k7qP25yq8eI8G79/uXWcVHWNugcp2EabA3m7vH49fGd+yz1w0nK5XY3IkRdHWn2pQaOxvRET+3eaao7h+I7043NA5EIOdjSNNMPykXN3aeVUQzIA4PRC8SLZWcj1+yfSF1RNwAXi7cBqoWJKBx6M1DIt8+g3VctCbQAhbzs3xljlH7BCFSthLdg+xuhiaG+CIK+Emw74JUYQBxsB9zB+Bs5dbA8Gpn/8ePKN9CDk1ToyYBx2NMup6v6YCqBt+VsIizMjQegg3731EqLqWeQqAeiAcXI9PxQDFjyDFbUDJ3D/0lPh0hLI0hpkA==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>
  • Delivery-date: Mon, 22 Feb 2021 14:13:40 +0000
  • Ironport-sdr: qNgK37lxZkDuE3C/o8EEhgu4C1QMTIa420ZqWh2bwlOSgzTLp65rmPl9gQnkC1Oylrdn0iJ/It k0BE3birGgyOTaatnZtougZ8tt4DBANXLAh1eIpJqTXmKSApPZOWEGAEoUR3oEysaD95CrNdTc nN0a3umeLRpB11fTkX43oWf4atv9Wqh1yOBToi8iRdJuWihzR8CQXh4gZKHhDbMWlz4OqptdgF V6742VOsItjPqC/Qx4qiJNEb07vzH+e8qOTj+ewzj0+w2t/mU3GhnOGg4RUrmo6YYllUT766Cl oco=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Feb 22, 2021 at 12:35:21PM +0100, Roger Pau Monné wrote:
> On Mon, Feb 22, 2021 at 11:27:07AM +0100, Jan Beulich wrote:
> > Now that we guard the entire Xen VA space against speculative abuse
> > through hypervisor accesses to guest memory, the argument translation
> > area's VA also needs to live outside this range, at least for 32-bit PV
> > guests. To avoid extra is_hvm_*() conditionals, use the alternative VA
> > uniformly.
> 
> Since you are double mapping the per-domain virtual area, won't it
> make more sense to map it just once outside of the Xen virtual space
> area? (so it's always using PML4_ADDR(511))

Right, that's not possible for PV 64bit domains because it's guest
owned linear address space in that case.

It seems like paravirt_ctxt_switch_to will modify the root_pgt to set
the PERDOMAIN_VIRT_START entry, does the same need to be done for
PERDOMAIN2_VIRT_START?

I would also consider giving the slot a more meaningful name, as
PERDOMAIN2_VIRT_START makes it seem like a new per-domain scratch
space, when it's just a different mapping of the existing physical
memory.

Maybe PERDOMAIN_MIRROR_VIRT_START? Or PERDOMAIN_XLAT_VIRT_START?

Thanks, Roger.



 


Rackspace

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