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

Re: [PATCH 00/16] x86: assorted (mostly) shadow mode adjustments


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 23 Mar 2023 11:40:36 +0000
  • 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=wrRBXu4m7ZchmTzpx+LgntVE4Aqjx54Em/4mDv3IXhg=; b=OsZSCj8YpsfJd7PIeOgmJEf1/hLgBIJGANMNcr2bHTItFPUNZk9ep86/ATinUHTPmtS48d9WATlNQAfQNMK14rFktp4jjl49IyirZaNuGKH9Q7fcJw7r366Q7NLYoXHEDtnnA0b77TdmjbWxfnl5/gR3FnttiMQobs24TikMHiI7G/ZggMyv2lftYo5M3xywAcFQ2GtJVeocH/1+2EoifCICIC0rr/kPTYsL6LNdzSUDF8oIyfDojeULOW9d5tVhO388D6EjKcCOJwbp//BLcSpxe+7DBNmirvPdp6oCE5d7OyT4FoO47tJSP/4xQ+JKIf8jspVdwf+oQ+cGDmjwDQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CE9AC5rOhlTuu5zO4QBCjgat4XoO3DEOUwBiTGb+ZHi4yXFYUCSyyU3EicZaGaEnVNBNlqQ8idTcaCRxWtZ2kRpntxphhvxncbYah8wcq8xooyKvLt1y1jVG58DMV2epj2lb5jFQqsBK+BMwz/e3pK273ohBx4UTqhqmd1rjlAtuwI0y99AE/n2Rqcbx4I0/xts+rKp3OxHYP4rwMSh4v0LbW5b2nzBBCEu7yU9Zgz3sddL0smzdAUExFOdcvsvcS7ePYY10Td6SARFQQARJS48VGCPXSAmNGMaX674dOhJvvdKJz9aV9vvTIXaSTofwYGb6Fpd4rGEaGlC7cSVd3g==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>
  • Delivery-date: Thu, 23 Mar 2023 11:41:13 +0000
  • Ironport-data: A9a23:bM3ce6ph7p3Nh9vFprOD4287UGZeBmIpZBIvgKrLsJaIsI4StFCzt garIBnXbqneZjP0KNkiadu18k5XupSDyt9mGwJv+Sw9FioX8JuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpA1c/Ek/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06WNwUmAWP6gR5weFzSJNVfrzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXABE3VC2J37KY+4m6ddVDmP0HMfLNLZxK7xmMzRmBZRonabbqZvyQoPpnhnI3jM0IGuvCb c0EbzYpdA7HfxBEJlYQDtQ5gfusgX78NTZfrTp5p4JuuzSVkFM3juarbIG9lt+iHK25mm6xo G7c8nu/KRYdLNGFkhKO8262h/+JliT+MG4XPOTgqqIw2wTCmQT/DjUzVgvqhdCV1XW9XtZfA E5N5BgJ7qsboRnDot7VGkfQTGS/lhwWVsdUEuY6wBqQ0aeS6AGcbkAUQzgEZNE4ucseQT0xy kTPj97vHSZosrCeVTSa7Lj8hSy2ETgYKykFfyBsZRcE5vHzrYd1iQjAJuuPC4awh9zxXDTvm TaDqXFkg61J1ZJQkaKm4VrAnjSg4IDTSRI47RnWWWTj6R5lYImiZMqj7l2zAet8Ebt1h2Kp5 BAs8/VyJshXZX1RvERhmNkwIYw=
  • Ironport-hdrordr: A9a23:+J31ra2ml2e51HwF68eaiQqjBKMkLtp133Aq2lEZdPU1SKGlfq WV954mPHDP+VUssQ4b6LK90cW7L080lqQY3WByB9eftWDd0QOVxepZgrcKrQeAJ8T2zJ856Z td
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22/03/2023 9:28 am, Jan Beulich wrote:
> This is kind of fallout from XSA-427 investigations, partly related to
> there having been a more intrusive first approach. This is also the
> reason why one of the patch has R-b already - that was a prereq for
> the original approach.
>
> Most patches aren't really dependent upon one another, so can probably
> go in independently (as they get acked).
>
> 01: shadow: fix and improve sh_page_has_multiple_shadows()
> 02: shadow: fold/rename sh_unhook_*_mappings()
> 03: shadow: drop redundant present bit checks from SHADOW_FOREACH_L<N>E() 
> "bodys"
> 04: shadow: replace memcmp() in sh_resync_l1()
> 05: shadow: reduce explicit log-dirty recording for HVM
> 06: shadow: purge {write,cmpxchg}_guest_entry() hooks
> 07: shadow: call sh_update_cr3() directly sh_page_fault()
> 08: shadow: use lighter weight mode checks
> 09: shadow: OOS mode is HVM-only
> 10: shadow: move OOS functions to their own file
> 11: shadow: drop is_hvm_...() where easily possible
> 12: shadow: make monitor table create/destroy more consistent
> 13: shadow: vCPU-s never have "no mode"
> 14: shadow: "monitor table" is a HVM-only concept
> 15: shadow: adjust monitor table prealloc amount
> 16: PV: conditionalize arch_set_info_guest()'s call to update_cr3()

Out of interest, I looked at the net delta from this, and it's quite
interesting.

For data:
add/remove: 0/0 grow/shrink: 1/7 up/down: 8/-112 (-104)
__func__                                    2986    2994      +8
sh_paging_mode__guest_4                       96      80     -16
...

which is nice all around.  (Shame that __func__ is being merged
everywhere but oh well.)

For code, two notable exerts:
add/remove: 6/5 grow/shrink: 5/39 up/down: 1549/-3499 (-1950)
Function                                     old     new   delta
mod_l1_entry                                2120    2008    -112
do_mmu_update                               6548    6209    -339

I can't see any patch which obviously makes that change in one go, so I
can only assume it's combination of various small things.

~Andrew



 


Rackspace

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