[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 11/23] x86: XENMEM_resource_ioreq_server is HVM only
>>> On 26.08.18 at 14:19, <wei.liu2@xxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |