* [PATCH] x86: Make use of pagetable_get_mfn() where appropriate
@ 2017-09-28 18:36 Andrew Cooper
2017-09-29 9:03 ` George Dunlap
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Andrew Cooper @ 2017-09-28 18:36 UTC (permalink / raw)
To: Xen-devel; +Cc: George Dunlap, Andrew Cooper, Tim Deegan, Jan Beulich
... instead of the opencoded _mfn(pagetable_get_pfn(...)) construct.
Fix two overly long lines; 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: George Dunlap <george.dunlap@eu.citrix.com>
---
xen/arch/x86/domain.c | 2 +-
xen/arch/x86/domctl.c | 2 +-
xen/arch/x86/mm/p2m-ept.c | 12 +++++++-----
xen/arch/x86/mm/shadow/multi.c | 5 +++--
4 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 466a1a2..c399b3e 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -1113,7 +1113,7 @@ int arch_set_info_guest(
{
l4_pgentry_t *l4tab;
- l4tab = map_domain_page(_mfn(pagetable_get_pfn(v->arch.guest_table)));
+ l4tab = map_domain_page(pagetable_get_mfn(v->arch.guest_table));
*l4tab = l4e_from_pfn(page_to_mfn(cr3_page),
_PAGE_PRESENT|_PAGE_RW|_PAGE_USER|_PAGE_ACCESSED);
unmap_domain_page(l4tab);
diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index 540ba08..dfda274 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -1640,7 +1640,7 @@ void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c)
else
{
const l4_pgentry_t *l4e =
- map_domain_page(_mfn(pagetable_get_pfn(v->arch.guest_table)));
+ map_domain_page(pagetable_get_mfn(v->arch.guest_table));
c.cmp->ctrlreg[3] = compat_pfn_to_cr3(l4e_get_pfn(*l4e));
unmap_domain_page(l4e);
diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c
index 23c0518..2cca0d0 100644
--- a/xen/arch/x86/mm/p2m-ept.c
+++ b/xen/arch/x86/mm/p2m-ept.c
@@ -434,7 +434,7 @@ static int ept_invalidate_emt_range(struct p2m_domain *p2m,
unsigned int i, index;
int wrc, rc = 0, ret = GUEST_TABLE_MAP_FAILED;
- table = map_domain_page(_mfn(pagetable_get_pfn(p2m_get_pagetable(p2m))));
+ table = map_domain_page(pagetable_get_mfn(p2m_get_pagetable(p2m)));
for ( i = p2m->ept.wl; i > target; --i )
{
ret = ept_next_level(p2m, 1, &table, &gfn_remainder, i);
@@ -717,7 +717,7 @@ ept_set_entry(struct p2m_domain *p2m, unsigned long gfn, mfn_t mfn,
(target == 0));
ASSERT(!p2m_is_foreign(p2mt) || target == 0);
- table = map_domain_page(_mfn(pagetable_get_pfn(p2m_get_pagetable(p2m))));
+ table = map_domain_page(pagetable_get_mfn(p2m_get_pagetable(p2m)));
ret = GUEST_TABLE_MAP_FAILED;
for ( i = ept->wl; i > target; i-- )
@@ -914,7 +914,8 @@ static mfn_t ept_get_entry(struct p2m_domain *p2m,
p2m_query_t q, unsigned int *page_order,
bool_t *sve)
{
- ept_entry_t *table = map_domain_page(_mfn(pagetable_get_pfn(p2m_get_pagetable(p2m))));
+ ept_entry_t *table =
+ map_domain_page(pagetable_get_mfn(p2m_get_pagetable(p2m)));
unsigned long gfn_remainder = gfn;
ept_entry_t *ept_entry;
u32 index;
@@ -1024,7 +1025,8 @@ void ept_walk_table(struct domain *d, unsigned long gfn)
{
struct p2m_domain *p2m = p2m_get_hostp2m(d);
struct ept_data *ept = &p2m->ept;
- ept_entry_t *table = map_domain_page(_mfn(pagetable_get_pfn(p2m_get_pagetable(p2m))));
+ ept_entry_t *table =
+ map_domain_page(pagetable_get_mfn(p2m_get_pagetable(p2m)));
unsigned long gfn_remainder = gfn;
int i;
@@ -1323,7 +1325,7 @@ static void ept_dump_p2m_table(unsigned char key)
char c = 0;
gfn_remainder = gfn;
- table = map_domain_page(_mfn(pagetable_get_pfn(p2m_get_pagetable(p2m))));
+ table = map_domain_page(pagetable_get_mfn(p2m_get_pagetable(p2m)));
for ( i = ept->wl; i > 0; i-- )
{
diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c
index 8d4f244..a057f2d 100644
--- a/xen/arch/x86/mm/shadow/multi.c
+++ b/xen/arch/x86/mm/shadow/multi.c
@@ -3391,7 +3391,8 @@ static int sh_page_fault(struct vcpu *v,
int i;
for ( i = 0; i < 4; i++ )
{
- mfn_t smfn = _mfn(pagetable_get_pfn(v->arch.shadow_table[i]));
+ mfn_t smfn = pagetable_get_mfn(v->arch.shadow_table[i]);
+
if ( mfn_valid(smfn) && (mfn_x(smfn) != 0) )
{
used |= (mfn_to_page(smfn)->v.sh.back == mfn_x(gmfn));
@@ -4645,7 +4646,7 @@ static void sh_pagetable_dying(struct vcpu *v, paddr_t gpa)
if ( pagetable_is_null(v->arch.shadow_table[i]) )
smfn = INVALID_MFN;
else
- smfn = _mfn(pagetable_get_pfn(v->arch.shadow_table[i]));
+ smfn = pagetable_get_mfn(v->arch.shadow_table[i]);
}
else
{
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] x86: Make use of pagetable_get_mfn() where appropriate
2017-09-28 18:36 [PATCH] x86: Make use of pagetable_get_mfn() where appropriate Andrew Cooper
@ 2017-09-29 9:03 ` George Dunlap
2017-10-03 10:35 ` Julien Grall
2017-09-29 12:29 ` Wei Liu
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: George Dunlap @ 2017-09-29 9:03 UTC (permalink / raw)
To: Andrew Cooper, Xen-devel
Cc: George Dunlap, Julien Grall, Tim Deegan, Jan Beulich
On 09/28/2017 07:36 PM, Andrew Cooper wrote:
> ... instead of the opencoded _mfn(pagetable_get_pfn(...)) construct.
>
> Fix two overly long lines; no functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
I think this technically violates the last posting date, as it's not a
bug fix.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86: Make use of pagetable_get_mfn() where appropriate
2017-09-28 18:36 [PATCH] x86: Make use of pagetable_get_mfn() where appropriate Andrew Cooper
2017-09-29 9:03 ` George Dunlap
@ 2017-09-29 12:29 ` Wei Liu
2017-10-04 12:07 ` Jan Beulich
2017-10-06 17:27 ` Tim Deegan
3 siblings, 0 replies; 7+ messages in thread
From: Wei Liu @ 2017-09-29 12:29 UTC (permalink / raw)
To: Andrew Cooper; +Cc: George Dunlap, Wei Liu, Tim Deegan, Jan Beulich, Xen-devel
On Thu, Sep 28, 2017 at 07:36:40PM +0100, Andrew Cooper wrote:
> ... instead of the opencoded _mfn(pagetable_get_pfn(...)) construct.
>
> Fix two overly long lines; no functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86: Make use of pagetable_get_mfn() where appropriate
2017-09-29 9:03 ` George Dunlap
@ 2017-10-03 10:35 ` Julien Grall
0 siblings, 0 replies; 7+ messages in thread
From: Julien Grall @ 2017-10-03 10:35 UTC (permalink / raw)
To: George Dunlap, Andrew Cooper, Xen-devel
Cc: George Dunlap, Tim Deegan, Jan Beulich
Hi,
On 29/09/17 10:03, George Dunlap wrote:
> On 09/28/2017 07:36 PM, Andrew Cooper wrote:
>> ... instead of the opencoded _mfn(pagetable_get_pfn(...)) construct.
>>
>> Fix two overly long lines; no functional change.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> Reviewed-by: George Dunlap <george.dunlap@citrix.com>
>
> I think this technically violates the last posting date, as it's not a
> bug fix.
I am ok to get this in Xen 4.10. It is small enough and also clean-up
the code.
Release-acked-by: Julien Grall <julien.grall@arm.com>
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86: Make use of pagetable_get_mfn() where appropriate
2017-09-28 18:36 [PATCH] x86: Make use of pagetable_get_mfn() where appropriate Andrew Cooper
2017-09-29 9:03 ` George Dunlap
2017-09-29 12:29 ` Wei Liu
@ 2017-10-04 12:07 ` Jan Beulich
2017-10-10 5:20 ` Tian, Kevin
2017-10-06 17:27 ` Tim Deegan
3 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2017-10-04 12:07 UTC (permalink / raw)
To: Andrew Cooper
Cc: George Dunlap, Kevin Tian, Tim Deegan, Jun Nakajima, Xen-devel
>>> On 28.09.17 at 20:36, <andrew.cooper3@citrix.com> wrote:
> ... instead of the opencoded _mfn(pagetable_get_pfn(...)) construct.
>
> Fix two overly long lines; 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: George Dunlap <george.dunlap@eu.citrix.com>
> ---
> xen/arch/x86/domain.c | 2 +-
> xen/arch/x86/domctl.c | 2 +-
> xen/arch/x86/mm/p2m-ept.c | 12 +++++++-----
You forgot to Cc the VMX maintainers for this one.
Acked-by: Jan Beulich <jbeulich@suse.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86: Make use of pagetable_get_mfn() where appropriate
2017-09-28 18:36 [PATCH] x86: Make use of pagetable_get_mfn() where appropriate Andrew Cooper
` (2 preceding siblings ...)
2017-10-04 12:07 ` Jan Beulich
@ 2017-10-06 17:27 ` Tim Deegan
3 siblings, 0 replies; 7+ messages in thread
From: Tim Deegan @ 2017-10-06 17:27 UTC (permalink / raw)
To: Andrew Cooper; +Cc: George Dunlap, Jan Beulich, Xen-devel
At 19:36 +0100 on 28 Sep (1506627400), Andrew Cooper wrote:
> ... instead of the opencoded _mfn(pagetable_get_pfn(...)) construct.
>
> Fix two overly long lines; no functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86: Make use of pagetable_get_mfn() where appropriate
2017-10-04 12:07 ` Jan Beulich
@ 2017-10-10 5:20 ` Tian, Kevin
0 siblings, 0 replies; 7+ messages in thread
From: Tian, Kevin @ 2017-10-10 5:20 UTC (permalink / raw)
To: Jan Beulich, Andrew Cooper
Cc: George Dunlap, Tim Deegan, Nakajima, Jun, Xen-devel
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: Wednesday, October 4, 2017 8:07 PM
>
> >>> On 28.09.17 at 20:36, <andrew.cooper3@citrix.com> wrote:
> > ... instead of the opencoded _mfn(pagetable_get_pfn(...)) construct.
> >
> > Fix two overly long lines; 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: George Dunlap <george.dunlap@eu.citrix.com>
> > ---
> > xen/arch/x86/domain.c | 2 +-
> > xen/arch/x86/domctl.c | 2 +-
> > xen/arch/x86/mm/p2m-ept.c | 12 +++++++-----
>
> You forgot to Cc the VMX maintainers for this one.
>
> Acked-by: Jan Beulich <jbeulich@suse.com>
>
Acked-by: Kevin Tian <kevin.tian@intel.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-10-10 5:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-28 18:36 [PATCH] x86: Make use of pagetable_get_mfn() where appropriate Andrew Cooper
2017-09-29 9:03 ` George Dunlap
2017-10-03 10:35 ` Julien Grall
2017-09-29 12:29 ` Wei Liu
2017-10-04 12:07 ` Jan Beulich
2017-10-10 5:20 ` Tian, Kevin
2017-10-06 17:27 ` Tim Deegan
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).