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

Re: [PATCH v3 10/12] x86/shadow: make monitor table create/destroy more consistent


  • To: Jan Beulich <jbeulich@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 20 Feb 2026 15:15:58 +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=arcselector10001; 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=OnAMwIXEOQS5x1d/x0X5GM1M9e9QKzI6y6Zq9KNIbq4=; b=v0XqWJMh6rfMRLQgetI7AfQl65ul04PDysER6ySSHN9ONpTC6K7knCA0s7O/7demQnHHMJkWjkiVMAS82urdWVo6FDizxbCe8PvD5f8rOubHrSWYmaiWMbaenwlJDWRenrChlemQP61CosXeOvFr/R1L4KdBXpN4mIQ1i86j69FLEZ5jHa3TgkDZq8iVLKwJzEIu+krTRtj50HzFfQDdI/skpD4Oh9hc9WbqzWF2ZaKItIZwmcQf0kDGeVheQwgdBm/hxx+gneN2eAMnGBgQGmGgEhV5uNcCCEkM6ZjukJ1wFnIjuZVRmyV0CfFlRemmZzEFYilQqgcKT+w9wrHywQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KQKEjY+Il9z3jsjfQHToHRnphTNeZV0OOqIpmvmBkfIbVibkZo3aJSWhLfjsBgtXtGCRjoSU4gBIF9cWdCQsr0MIYtjGoPTVJVmBgkQu+g5ZJQh6tustQDRPzPM6ndmasdYJdyCDgy2i6CJ2M4xaIQd3dhJlEpXpQBveQ+5jzZV1vnCs6YWeW05rKPufwlS9ertwtLBmOgEUjL0EtoVC2/HcIH+gdGFW+DkptBx+TkJWoht19XDAF+iQveafLZeixiX/PYlfSk+xoUrnUMgB40Rfok3KvYgYoAL3MRJcSYire401YXf8tfhCIZCaBhZIgIubBKQB8aHa9KQDY5HeOQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>
  • Delivery-date: Fri, 20 Feb 2026 15:16:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16/05/2023 8:41 am, Jan Beulich wrote:
> While benign at present, it is still a little fragile to operate on a
> wrong "old_mode" value in sh_update_paging_modes(). This can happen when
> no monitor table was present initially - we'd create one for the new
> mode without updating old_mode. Correct this in two ways, each of which
> would be sufficient on its own: Once by adding "else" to the second of
> the involved if()s in the function, and then by setting the correct
> initial mode for HVM domains in shadow_vcpu_init().
>
> Further use the same predicate (paging_mode_external()) consistently
> when dealing with shadow mode init/update/cleanup, rather than a mix of
> is_hvm_vcpu() (init), is_hvm_domain() (update), and
> paging_mode_external() (cleanup).
>
> Finally drop a redundant is_hvm_domain() from inside the bigger if()
> (which is being converted to paging_mode_external()) in
> sh_update_paging_modes().
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>



 


Rackspace

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