From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Tim Deegan" <tim@xen.org>, "Wei Liu" <wei.liu2@citrix.com>,
"Jan Beulich" <JBeulich@suse.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [PATCH 6/6] x86/shadow: Use mfn_t in shadow_track_dirty_vram()
Date: Wed, 15 Aug 2018 19:34:37 +0100 [thread overview]
Message-ID: <1534358077-24700-7-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1534358077-24700-1-git-send-email-andrew.cooper3@citrix.com>
... as the only user of sl1mfn would prefer it that way.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Tim Deegan <tim@xen.org>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
xen/arch/x86/mm/shadow/common.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index c9640b9..28d1dd4 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -3834,7 +3834,7 @@ int shadow_track_dirty_vram(struct domain *d,
memcpy(dirty_bitmap, dirty_vram->dirty_bitmap, dirty_size);
else
{
- unsigned long map_mfn = mfn_x(INVALID_MFN);
+ mfn_t map_mfn = INVALID_MFN;
void *map_sl1p = NULL;
/* Iterate over VRAM to track dirty bits. */
@@ -3872,13 +3872,13 @@ int shadow_track_dirty_vram(struct domain *d,
/* Hopefully the most common case: only one mapping,
* whose dirty bit we can use. */
l1_pgentry_t *sl1e;
- unsigned long sl1mfn = paddr_to_pfn(sl1ma);
+ mfn_t sl1mfn = maddr_to_mfn(sl1ma);
- if ( sl1mfn != map_mfn )
+ if ( !mfn_eq(sl1mfn, map_mfn) )
{
if ( map_sl1p )
unmap_domain_page(map_sl1p);
- map_sl1p = map_domain_page(_mfn(sl1mfn));
+ map_sl1p = map_domain_page(sl1mfn);
map_mfn = sl1mfn;
}
sl1e = map_sl1p + (sl1ma & ~PAGE_MASK);
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-08-15 18:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-15 18:34 [PATCH 0/6] x86/mm: Minor non-functional cleanup Andrew Cooper
2018-08-15 18:34 ` [PATCH 1/6] x86/mm: Use mfn_eq()/mfn_add() rather than opencoded variations Andrew Cooper
2018-08-16 16:07 ` Roger Pau Monné
2018-08-17 12:54 ` Jan Beulich
2018-08-15 18:34 ` [PATCH 2/6] x86/shadow: Use more appropriate conversion functions Andrew Cooper
2018-08-16 16:08 ` Roger Pau Monné
2018-08-21 10:02 ` Wei Liu
2018-08-15 18:34 ` [PATCH 3/6] x86/shadow: Switch shadow_domain.has_fast_mmio_entries to bool Andrew Cooper
2018-08-16 16:09 ` Roger Pau Monné
2018-08-17 12:57 ` Jan Beulich
2018-08-15 18:34 ` [PATCH 4/6] x86/shadow: Use MASK_* helpers for the MMIO fastpath PTE manipulation Andrew Cooper
2018-08-16 16:12 ` Roger Pau Monné
2018-08-21 10:04 ` Wei Liu
2018-08-15 18:34 ` [PATCH 5/6] x86/shadow: Clean up the MMIO fastpath helpers Andrew Cooper
2018-08-16 16:16 ` Roger Pau Monné
2018-08-21 10:05 ` Wei Liu
2018-08-15 18:34 ` Andrew Cooper [this message]
2018-08-16 16:18 ` [PATCH 6/6] x86/shadow: Use mfn_t in shadow_track_dirty_vram() Roger Pau Monné
2018-08-21 10:05 ` Wei Liu
2018-08-16 19:00 ` [PATCH 0/6] x86/mm: Minor non-functional cleanup 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=1534358077-24700-7-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).