[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v6 11/24] x86/xen_hello_world.xsplice: Test payload for patching 'xen_extra_version'.



> diff --git a/docs/misc/xsplice.markdown b/docs/misc/xsplice.markdown
> index d4e7d75..8d2d413 100644
> --- a/docs/misc/xsplice.markdown
> +++ b/docs/misc/xsplice.markdown
> @@ -330,6 +330,41 @@ When reverting a patch, the hypervisor iterates over 
> each `xsplice_patch_func`
>  and the core code copies the data from the undo buffer (private internal 
> copy)
>  to `old_addr`.
>  
> +### Example of .xsplice.funcs
> +
> +A simple example of what a payload file can be:
> +
> +<pre>
> +/* MUST be in sync with hypervisor. */  
> +struct xsplice_patch_func {  
> +    const char *name;  
> +    uint64_t new_addr;  
> +    uint64_t old_addr;  
> +    uint32_t new_size;  
> +    uint32_t old_size;  
> +    uint8_t pad[32];  
> +};  
> +
> +/* Our replacement function for xen_extra_version. */  
> +const char *xen_hello_world(void)  
> +{  
> +    return "Hello World";  
> +}  
> +
> +static unsigned char name[] = "xen_hello_world";  

Which really ought to be 'xen_extra_version' as that is what we are patching.

So changed that, along with:
> diff --git a/xen/arch/x86/test/xen_hello_world.c 
> b/xen/arch/x86/test/xen_hello_world.c
> new file mode 100644
> index 0000000..67bbe65
> --- /dev/null
> +++ b/xen/arch/x86/test/xen_hello_world.c
> @@ -0,0 +1,30 @@
> +/*
> + * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
> + *
> + */
> +
> +#include <xen/types.h>
> +#include <xen/xsplice.h>
> +#include "config.h"
> +
> +static char xen_hello_world_name[] = "xen_hello_world";

This to be 'xen_extra_version' and named the variable 'patch_this_fnc'

It has no bearing on the test-case at all, just a minor cosmetic item hence
retained the Reviewed-by.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.