Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
xen
24609-tools-libxc_handle_fallback_in_linux_priv...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 24609-tools-libxc_handle_fallback_in_linux_privcmd_map_foreign_bulk_properly.patch of Package xen
changeset: 24609:cdb1e4a38450 user: Olaf Hering <olaf@aepfle.de> date: Fri Jan 27 18:32:55 2012 +0000 files: tools/libxc/xc_linux_osdep.c description: tools/libxc: handle fallback in linux_privcmd_map_foreign_bulk properly If the first ioctl fails with ENOENT it means the command is known. If a second attempt to map each gfn happens to fail then there is no need to run the fallback code. Some gfns are paged and the fallback code would not fix the failure. Instead return the EINVAL to the caller. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com> --- tools/libxc/xc_linux_osdep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Index: xen-4.1.2-testing/tools/libxc/xc_linux_osdep.c =================================================================== --- xen-4.1.2-testing.orig/tools/libxc/xc_linux_osdep.c +++ xen-4.1.2-testing/tools/libxc/xc_linux_osdep.c @@ -193,6 +193,7 @@ static void *linux_privcmd_map_foreign_b rc = ioctl(fd, IOCTL_PRIVCMD_MMAPBATCH_V2, &ioctlx); + /* Command was recognized, some gfn in arr are in paging state */ if ( rc < 0 && errno == ENOENT ) { for ( i = rc = 0; rc == 0 && i < num; i++ ) @@ -211,8 +212,8 @@ static void *linux_privcmd_map_foreign_b } while ( rc < 0 && errno == ENOENT && err[i] == -ENOENT ); } } - - if ( rc < 0 && errno == EINVAL && (int)num > 0 ) + /* Command was not recognized, use fall back */ + else if ( rc < 0 && errno == EINVAL && (int)num > 0 ) { /* * IOCTL_PRIVCMD_MMAPBATCH_V2 is not supported - fall back to
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor