All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Tim Deegan" <tim@xen.org>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: [PATCH 01/10] x86/mm: no-one passes a NULL domain to init_xen_l4_slots()
Date: Fri, 17 Apr 2020 16:25:11 +0200	[thread overview]
Message-ID: <19d7ad4f-c653-b7b6-59a8-90c9700c9200@suse.com> (raw)
In-Reply-To: <65bfcd6a-2bb0-da6f-9e85-39f224bd81fb@suse.com>

Drop the NULL checks - they've been introduced by commit 8d7b633ada
("x86/mm: Consolidate all Xen L4 slot writing into
init_xen_l4_slots()") for no apparent reason.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -1696,7 +1696,7 @@ void init_xen_l4_slots(l4_pgentry_t *l4t
      * PV vcpus need a shortened directmap.  HVM and Idle vcpus get the full
      * directmap.
      */
-    bool short_directmap = d && !paging_mode_external(d);
+    bool short_directmap = !paging_mode_external(d);
 
     /* Slot 256: RO M2P (if applicable). */
     l4t[l4_table_offset(RO_MPT_VIRT_START)] =
@@ -1717,10 +1717,9 @@ void init_xen_l4_slots(l4_pgentry_t *l4t
         mfn_eq(sl4mfn, INVALID_MFN) ? l4e_empty() :
         l4e_from_mfn(sl4mfn, __PAGE_HYPERVISOR_RW);
 
-    /* Slot 260: Per-domain mappings (if applicable). */
+    /* Slot 260: Per-domain mappings. */
     l4t[l4_table_offset(PERDOMAIN_VIRT_START)] =
-        d ? l4e_from_page(d->arch.perdomain_l3_pg, __PAGE_HYPERVISOR_RW)
-          : l4e_empty();
+        l4e_from_page(d->arch.perdomain_l3_pg, __PAGE_HYPERVISOR_RW);
 
     /* Slot 261-: text/data/bss, RW M2P, vmap, frametable, directmap. */
 #ifndef NDEBUG



  reply	other threads:[~2020-04-17 14:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-17 14:23 [PATCH 00/10] x86: mm (mainly shadow) adjustments Jan Beulich
2020-04-17 14:25 ` Jan Beulich [this message]
2020-04-17 19:46   ` [PATCH 01/10] x86/mm: no-one passes a NULL domain to init_xen_l4_slots() Andrew Cooper
2020-04-20  5:48     ` Jan Beulich
2020-04-22 12:20       ` Andrew Cooper
2020-04-17 14:25 ` [PATCH 02/10] x86/shadow: drop a stray forward structure declaration Jan Beulich
2020-04-17 14:26 ` [PATCH 03/10] x86/shadow: monitor table is HVM-only Jan Beulich
2020-04-17 19:51   ` Andrew Cooper
2020-04-17 14:26 ` [PATCH 04/10] x86/shadow: sh_update_linear_entries() is a no-op for PV Jan Beulich
2020-04-18  8:56   ` Tim Deegan
2020-04-17 14:27 ` [PATCH 05/10] x86/mm: monitor table is HVM-only Jan Beulich
2020-04-17 14:27 ` [PATCH 06/10] x86/shadow: sh_remove_write_access_from_sl1p() can be static Jan Beulich
2020-04-17 14:28 ` [PATCH 07/10] x86/shadow: the guess_wrmap() hook is needed for HVM only Jan Beulich
2020-04-18  9:03   ` Tim Deegan
2020-04-20 13:06     ` Jan Beulich
2020-04-21  5:31       ` Tim Deegan
2020-04-17 14:28 ` [PATCH 08/10] x86/mm: pagetable_dying() is HVM-only Jan Beulich
2020-04-17 14:29 ` [PATCH 09/10] x86/shadow: the trace_emul_write_val() hook " Jan Beulich
2020-04-17 14:29 ` [PATCH 10/10] x86/shadow: don't open-code shadow_blow_tables_per_domain() Jan Beulich
2020-04-17 20:12 ` [PATCH 00/10] x86: mm (mainly shadow) adjustments Andrew Cooper
2020-04-18  9:04 ` Tim Deegan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19d7ad4f-c653-b7b6-59a8-90c9700c9200@suse.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=tim@xen.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.