[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] common/vcpu: Switch v->vcpu_info_mfn to mfn_t
commit 3044a2a81910bf993c0fe6fa34bee0bf5b410911 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Wed Feb 15 17:32:30 2017 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Feb 16 14:15:25 2017 +0000 common/vcpu: Switch v->vcpu_info_mfn to mfn_t No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/common/domain.c | 15 ++++++--------- xen/include/xen/sched.h | 2 +- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index 40d583f..0c52831 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -116,7 +116,7 @@ static void vcpu_info_reset(struct vcpu *v) v->vcpu_info = ((v->vcpu_id < XEN_LEGACY_MAX_VCPUS) ? (vcpu_info_t *)&shared_info(d, vcpu_info[v->vcpu_id]) : &dummy_vcpu_info); - v->vcpu_info_mfn = mfn_x(INVALID_MFN); + v->vcpu_info_mfn = INVALID_MFN; } struct vcpu *alloc_vcpu( @@ -1149,7 +1149,7 @@ int map_vcpu_info(struct vcpu *v, unsigned long gfn, unsigned offset) if ( offset > (PAGE_SIZE - sizeof(vcpu_info_t)) ) return -EINVAL; - if ( v->vcpu_info_mfn != mfn_x(INVALID_MFN) ) + if ( !mfn_eq(v->vcpu_info_mfn, INVALID_MFN) ) return -EINVAL; /* Run this command on yourself or on other offline VCPUS. */ @@ -1188,7 +1188,7 @@ int map_vcpu_info(struct vcpu *v, unsigned long gfn, unsigned offset) } v->vcpu_info = new_info; - v->vcpu_info_mfn = page_to_mfn(page); + v->vcpu_info_mfn = _mfn(page_to_mfn(page)); /* Set new vcpu_info pointer /before/ setting pending flags. */ smp_wmb(); @@ -1207,22 +1207,19 @@ int map_vcpu_info(struct vcpu *v, unsigned long gfn, unsigned offset) /* * Unmap the vcpu info page if the guest decided to place it somewhere - * else. This is used from arch_domain_destroy and domain_soft_reset. + * else. This is used from domain_kill() and domain_soft_reset(). */ void unmap_vcpu_info(struct vcpu *v) { - unsigned long mfn; - - if ( v->vcpu_info_mfn == mfn_x(INVALID_MFN) ) + if ( mfn_eq(v->vcpu_info_mfn, INVALID_MFN) ) return; - mfn = v->vcpu_info_mfn; unmap_domain_page_global((void *) ((unsigned long)v->vcpu_info & PAGE_MASK)); vcpu_info_reset(v); - put_page_and_type(mfn_to_page(mfn)); + put_page_and_type(mfn_to_page(mfn_x(v->vcpu_info_mfn))); } int default_initialise_vcpu(struct vcpu *v, XEN_GUEST_HANDLE_PARAM(void) arg) diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index def097e..32893de 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -252,7 +252,7 @@ struct vcpu struct waitqueue_vcpu *waitqueue_vcpu; /* Guest-specified relocation of vcpu_info. */ - unsigned long vcpu_info_mfn; + mfn_t vcpu_info_mfn; struct evtchn_fifo_vcpu *evtchn_fifo; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |