[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86: XENMEM_resource_ioreq_server is HVM only
commit 49136c3898fc71c4d9e9a8c93bb59b4c601b1eec Author: Wei Liu <wei.liu2@xxxxxxxxxx> AuthorDate: Thu Sep 6 16:18:31 2018 +0100 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Thu Sep 6 16:54:38 2018 +0100 x86: XENMEM_resource_ioreq_server is HVM only Put the entire case branch under CONFIG_HVM. Lift the check from hvm_get_ioreq_server_frame into its caller. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/hvm/ioreq.c | 3 +-- xen/arch/x86/mm.c | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/ioreq.c b/xen/arch/x86/hvm/ioreq.c index b3e1a3a36f..3569beaad5 100644 --- a/xen/arch/x86/hvm/ioreq.c +++ b/xen/arch/x86/hvm/ioreq.c @@ -898,8 +898,7 @@ int hvm_get_ioreq_server_frame(struct domain *d, ioservid_t id, struct hvm_ioreq_server *s; int rc; - if ( !is_hvm_domain(d) ) - return -EINVAL; + ASSERT(is_hvm_domain(d)); spin_lock_recursive(&d->arch.hvm.ioreq_server.lock); diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 409814ce0a..baea2f5e63 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -4381,12 +4381,16 @@ int arch_acquire_resource(struct domain *d, unsigned int type, switch ( type ) { +#ifdef CONFIG_HVM case XENMEM_resource_ioreq_server: { ioservid_t ioservid = id; unsigned int i; rc = -EINVAL; + if ( !is_hvm_domain(d) ) + break; + if ( id != (unsigned int)ioservid ) break; @@ -4409,6 +4413,7 @@ int arch_acquire_resource(struct domain *d, unsigned int type, *flags |= XENMEM_rsrc_acq_caller_owned; break; } +#endif default: rc = -EOPNOTSUPP; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |