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

[PATCH v2 08/13] x86/shadow: sh_rm_write_access_from_sl1p() is HVM-only


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 30 Mar 2023 13:30:07 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=/nCRqVSKvE7qJC49XJOcofUh4xS4zVFI7oAhMmha4Gk=; b=gBKO7HrQfPQ1p4JYHO5L+RwKoialoaGihzmoYjE0OijJM51XrhQXMgh8qVdNJAqCpf4U9eOerzqWhUsgFzx1uO5UBkCvKRSEQemb9j3qZpAeu0OyvQq3gYcutlAEWkRFM2bfebDYacXYh9+ii2OZ3jU+btqLkYxkxmBGCkexEV1bHb1VLoTk4EmxL1hxrVwtr+TqBzG1Tu0o8wE1D2Pj0Qxu9HYRZQCnli5JKa4Tb5fKLAggkgbqZkU7CzL7bXE8nxUmtISsFmegbtuvx1lVZqyVlAi1uG2p+8skDAVtMojw8D24YUmpXR4ZApnIeIcGr6Uw8ylyOA7G+rBxMZVAgA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kZg0rSseGpV+uzGMN3CDD6fzLffFmJQacHnt3j6X5kZmjcacOTKDYIwtz0iSsGmecLRnjW2U2UV/WNPwomnRE2VD7xZXfp0y18ao0tigI+DUgVKlQLfVWa6ZhJO/k/R8tSF51Fw3xWAh8cEHBW/DRXptN4VDG53HXp4DY7R1s6l3ISXXoH+2BA3BVvp+SZAPsCyFKW7H2ZMwRLG4PoGrf6s5hX1/jZ8wVqTU+RSM68snYriEvZzPxYoKGpiYSRhmbymHu2jrofJILIFs/+VqH0/CfeCKYM8jZaSbnmDFLKS/Fh5lclbP+eaRy2Hx2GlYDQu2Zc9fIKDuYPG28NJZ0w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.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: Thu, 30 Mar 2023 11:30:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The function is used from (HVM-only) OOS code only - replace the
respective #ifdef inside the function to make this more obvious. (Note
that SHOPT_OUT_OF_SYNC won't be set when !HVM, so the #ifdef surrounding
the function is already sufficient.)

Requested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: New.

--- a/xen/arch/x86/mm/shadow/multi.c
+++ b/xen/arch/x86/mm/shadow/multi.c
@@ -3429,9 +3429,7 @@ static void cf_check sh_update_cr3(struc
 int sh_rm_write_access_from_sl1p(struct domain *d, mfn_t gmfn,
                                  mfn_t smfn, unsigned long off)
 {
-#ifdef CONFIG_HVM
     struct vcpu *curr = current;
-#endif
     int r;
     shadow_l1e_t *sl1p, sl1e;
     struct page_info *sp;
@@ -3439,12 +3437,10 @@ int sh_rm_write_access_from_sl1p(struct
     ASSERT(mfn_valid(gmfn));
     ASSERT(mfn_valid(smfn));
 
-#ifdef CONFIG_HVM
     /* Remember if we've been told that this process is being torn down */
     if ( curr->domain == d && is_hvm_domain(d) )
         curr->arch.paging.shadow.pagetable_dying
             = mfn_to_page(gmfn)->pagetable_dying;
-#endif
 
     sp = mfn_to_page(smfn);
 




 


Rackspace

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