direct-io.hg

changeset 11503:38d6cf70e8f2

[LIBXC][POWERPC] Add missing xc_memory.c
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author hollisb@localhost
date Mon Sep 18 13:08:58 2006 -0500 (2006-09-18)
parents a22a7797e0ba
children fcc0efacc17a
files tools/libxc/powerpc64/xc_memory.c
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tools/libxc/powerpc64/xc_memory.c	Mon Sep 18 13:08:58 2006 -0500
     1.3 @@ -0,0 +1,42 @@
     1.4 +/*
     1.5 + * This program is free software; you can redistribute it and/or modify
     1.6 + * it under the terms of the GNU General Public License as published by
     1.7 + * the Free Software Foundation; either version 2 of the License, or
     1.8 + * (at your option) any later version.
     1.9 + *
    1.10 + * This program is distributed in the hope that it will be useful,
    1.11 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.12 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.13 + * GNU General Public License for more details.
    1.14 + *
    1.15 + * You should have received a copy of the GNU General Public License
    1.16 + * along with this program; if not, write to the Free Software
    1.17 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    1.18 + *
    1.19 + * Copyright (C) IBM Corporation 2006
    1.20 + *
    1.21 + * Authors: Hollis Blanchard <hollisb@us.ibm.com>
    1.22 + */
    1.23 +
    1.24 +#include "xc_private.h"
    1.25 +#include <xen/domctl.h>
    1.26 +
    1.27 +int xc_alloc_real_mode_area(int xc_handle,
    1.28 +                            uint32_t domain,
    1.29 +                            unsigned int log)
    1.30 +{
    1.31 +    DECLARE_DOMCTL;
    1.32 +    int err;
    1.33 +
    1.34 +    domctl.cmd = XEN_DOMCTL_real_mode_area;
    1.35 +    domctl.domain = (domid_t)domain;
    1.36 +    domctl.u.real_mode_area.log = log;
    1.37 +
    1.38 +    err = do_domctl(xc_handle, &domctl);
    1.39 +
    1.40 +    if (err)
    1.41 +        DPRINTF("Failed real mode area allocation for dom %u (log %u)\n",
    1.42 +                domain, log);
    1.43 +
    1.44 +    return err;
    1.45 +}