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

[PATCH v3 08/12] x86/shadow: sh_rm_write_access_from_sl1p() is HVM-only


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 16 May 2023 09:41:10 +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=A5NXxvDRQXD0WHTV28k08tC6LtvezCvIIN1lLE6iH/8=; b=IQdVFRQGPSg/8liKRqJZuGoaziYlooUgIPUi4VNU0pBCMdW+Z/Q4hzRQ9eHWc0bhYe+/VDxUW5VEzadPyeKX/I4h3+ptHX8shUodzq1I9eb2TWz5Cavs+GTn2aPjTqveO5Jpb8sAMf4N3iIUxh/GXRv2tc0X30YhQEdkv+JcxDGTu05gtFAn0p9iu+LmG8WJypcaO1lwzU/VvF4s8ix4CkMpr5KMdCO6tJfYcyeOvD/RY+DWytVztc8+XrBLtivSZKVcnycCw/lLjm843CeIBvkzQcap2++qJsazzrdRT0nr8Ezej9Ogn+FVuP2aipd71FOo6PQhgEgmOHmX1m672w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EAgr2drEjkyUIiw7JOxAEKj0NBHR7FCPysbM2YGXYIzwvB4ONBdKWpY1dODvU45BR1wqB8NjMQIwvjhtMU1NMbE7mdGwQOBMPisoTQvsVURvCEHW0cLMgIwqkGNToUINyonOgDPaGwRDOqNK9q/YaF+DrY/jqXAetpFb6COvUyubLvfXUpMI1yvM+CaHvcTJwYp5U84dS/kLlppOi0pi+M+ffeWf6SUwwL5qT7wEKuLEs4Yzi8UGClIqiP2kGR2hNUY+dZXQXXZmUix+NF9xv0ftm23VVYczwLpS+IkULZb7Q0md9zM4GC1vSlvp+5SBgX55ul0FCeOL/KAvSFV8tA==
  • 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: Tue, 16 May 2023 07:41:15 +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
@@ -3417,9 +3417,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;
@@ -3427,12 +3425,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®.