> -----Original Message----- [snip] > >>> + } > >>> + > >>> + if ( !vm_event_check(ved) ) > >>> + return -EINVAL; > >>> + > >>> + if ( frame != 0 || nr_frames != to_channels(ved)->nr_frames ) > >>> + return -EINVAL; > >> > >> Is there a particular reason for this all-or-nothing model? > > > > I've added this extra check due to the way acquire_resource interface > > is designed. In our case, the memory is allocated from > > XEN_VM_EVENT_ENABLE and the size is known beforehand: the number of > > pages needed to store (vcpus_count * sizeof vm_event_slot) bytes. > > However the acquire_resource needs a "nr_frames" parameter which is > > computed in a similar manner in the libxc wrapper. > > Hmm, maybe I'm not up to date here: Paul, is the general resource > obtaining/mapping logic indeed meant to be an all-or-nothing thing > only? >
Not really, no. The intention is that any subsection of the resource space may be mapped, so as frame + nr_frames doesn't exceed the size of the space then there should be no reason to return an error. Paul > Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel