>>> On 26.08.18 at 14:19, <wei.l...@citrix.com> wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -4376,12 +4376,17 @@ 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; > + > + rc = -EINVAL; > if ( id != (unsigned int)ioservid ) > break;
Since this is the only caller of hvm_get_ioreq_server_frame(), adding an is_hvm_domain() check here means the one inside the function becomes redundant - it should be dropped or converted to an ASSERT() imo. Furthermore if the check is to remain here, please drop the redundant assignment of rc. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel