ia64/xen-unstable

changeset 18461:4f27d1a23bca

libxc: fix xc_memory_op(): handles XENMEM_remove_from_phsymap case.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Sep 09 15:02:32 2008 +0100 (2008-09-09)
parents 1f89af507e62
children 33d907ff2b04
files tools/libxc/xc_private.c
line diff
     1.1 --- a/tools/libxc/xc_private.c	Tue Sep 09 14:54:56 2008 +0100
     1.2 +++ b/tools/libxc/xc_private.c	Tue Sep 09 15:02:32 2008 +0100
     1.3 @@ -307,6 +307,13 @@ int xc_memory_op(int xc_handle,
     1.4              goto out1;
     1.5          }
     1.6          break;
     1.7 +    case XENMEM_remove_from_physmap:
     1.8 +        if ( lock_pages(arg, sizeof(struct xen_remove_from_physmap)) )
     1.9 +        {
    1.10 +            PERROR("Could not lock");
    1.11 +            goto out1;
    1.12 +        }
    1.13 +        break;
    1.14      case XENMEM_current_reservation:
    1.15      case XENMEM_maximum_reservation:
    1.16      case XENMEM_maximum_gpfn:
    1.17 @@ -340,6 +347,9 @@ int xc_memory_op(int xc_handle,
    1.18      case XENMEM_add_to_physmap:
    1.19          unlock_pages(arg, sizeof(struct xen_add_to_physmap));
    1.20          break;
    1.21 +    case XENMEM_remove_from_physmap:
    1.22 +        unlock_pages(arg, sizeof(struct xen_remove_from_physmap));
    1.23 +        break;
    1.24      case XENMEM_current_reservation:
    1.25      case XENMEM_maximum_reservation:
    1.26      case XENMEM_maximum_gpfn: