|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 16/17] PVH xen: elf and iommu related changes to prep for dom0 PVH
>>> On 23.04.13 at 23:26, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote:
> +void __init early_pvh_copy_or_zero(unsigned long dest, char *src, int len,
> + unsigned long v_start)
..., const void *src, ...
> @@ -122,11 +123,25 @@ void elf_set_verbose(struct elf_binary *elf)
> elf->verbose = 1;
> }
>
> -static int elf_load_image(void *dst, const void *src, uint64_t filesz,
> uint64_t memsz)
> +extern void __init early_pvh_copy_or_zero(unsigned long dest, char *src,
> + int len, unsigned long v_start);
This needs to be put in a header included both here and at the
producer side.
Also, if you need to pass v_start around just to pass it back to
this function, you could as well store it in a static variable in
domain_build.c, and leave all of these functions untouched.
> +
> +static int elf_load_image(void *dst, const void *src, uint64_t filesz,
> + uint64_t memsz, unsigned long v_start)
> {
> int rc;
> if ( filesz > ULONG_MAX || memsz > ULONG_MAX )
> return -1;
> +
> + if ( v_start )
> + {
> + unsigned long addr = (unsigned long)dst;
> + early_pvh_copy_or_zero(addr, (char *)src, filesz, v_start);
With the adjustment above, ugly casts like this can be dropped.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |