On Wed, Jul 23, 2008 at 10:36:46AM +0200, [EMAIL PROTECTED] wrote:

Hi Christian,

<snip>

> +/*
> + * this is guest memory granted to the hypervisor;
> + * the hypervisor can place data in this area and rewrite
> + * privileged instructions to read from this area without
> + * trapping.
> + * Only the Hypervisor needs to be aware of the structure layout
> + * which makes the guest more felxible - the guest only guarantees
> + * the size which is requested by the hypervisor and read from a
> + * device tree entry.
> + */
> +void *kvm_magicpage;

static?

<snip>

> +/* reads the specified data field out of the hypervisor node */
> +static inline int kvmppc_pv_read_data(char *dtcell)
> +{
> +     struct device_node *dn;
> +     const int *dtval;
> +
> +     dn = of_find_node_by_path("/hypervisor");
> +     if (!dn)
> +             return -EINVAL;
> +
> +     dtval = of_get_property(dn, dtcell, NULL);
> +     if (dtval)
> +             return *dtval;
> +     else
> +             return -EINVAL;

You need an of_node_put(dn) in this function somewhere.

Yours Tony

  linux.conf.au    http://www.marchsouth.org/
  Jan 19 - 24 2009 The Australian Linux Technical Conference!

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Reply via email to