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

[Xen-devel] [PATCH for 4.7] xen: Rename of xSplice to livepatch.



Specifically:

s/\.xsplice/\.xlivepatch/
s/XSPLICE_OP/LIVEPATCH_OP/
s/XSPLICE/LIVE_PATCH/
s/xsplice/livepatch/
s/livepatch_patch_func/livepatch_func/
s/xSplice/Xen Live Patching/

And then modify some of the function arguments
to have two more characters. And lastly move the
header include to be in proper alphabetic order
(if the file has it in the first place).

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
Cc: Ross Lagerwall ross.lagerwall@xxxxxxxxxx
Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxx>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
Cc: Tim Deegan <tim@xxxxxxx>
Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
Cc: Martin Pohlack <mpohlack@xxxxxxxxx>
---
 .gitignore                                         |   8 +-
 MAINTAINERS                                        |  20 +-
 docs/misc/{xsplice.markdown => livepatch.markdown} | 184 +++++-----
 tools/flask/policy/policy/modules/xen/xen.te       |   2 +-
 tools/libxc/include/xenctrl.h                      |  32 +-
 tools/libxc/xc_misc.c                              | 142 ++++----
 tools/misc/Makefile                                |   4 +-
 tools/misc/{xen-xsplice.c => xen-livepatch.c}      |  62 ++--
 xen/arch/arm/Makefile                              |   2 +-
 xen/arch/arm/livepatch.c                           |  79 +++++
 xen/arch/arm/xsplice.c                             |  79 -----
 xen/arch/x86/Makefile                              |   8 +-
 xen/arch/x86/alternative.c                         |  18 +-
 xen/arch/x86/domain.c                              |   4 +-
 xen/arch/x86/extable.c                             |   8 +-
 xen/arch/x86/{xsplice.c => livepatch.c}            |  56 ++--
 xen/arch/x86/test/Makefile                         |  58 ++--
 xen/arch/x86/test/xen_bye_world.c                  |   6 +-
 xen/arch/x86/test/xen_hello_world.c                |   6 +-
 xen/arch/x86/test/xen_replace_world.c              |   6 +-
 xen/arch/x86/traps.c                               |   2 +-
 xen/common/Kconfig                                 |  10 +-
 xen/common/Makefile                                |   4 +-
 xen/common/{xsplice.c => livepatch.c}              | 370 ++++++++++-----------
 xen/common/{xsplice_elf.c => livepatch_elf.c}      | 109 +++---
 xen/common/sysctl.c                                |   6 +-
 xen/common/virtual_region.c                        |   4 +-
 xen/common/vsprintf.c                              |   4 +-
 xen/include/asm-x86/current.h                      |   8 +-
 xen/include/public/sysctl.h                        | 138 ++++----
 xen/include/xen/elfstructs.h                       |   2 +-
 xen/include/xen/livepatch.h                        | 119 +++++++
 xen/include/xen/{xsplice_elf.h => livepatch_elf.h} |  35 +-
 xen/include/xen/xsplice.h                          | 119 -------
 xen/xsm/flask/hooks.c                              |   4 +-
 xen/xsm/flask/policy/access_vectors                |   4 +-
 36 files changed, 862 insertions(+), 860 deletions(-)
 rename docs/misc/{xsplice.markdown => livepatch.markdown} (87%)
 rename tools/misc/{xen-xsplice.c => xen-livepatch.c} (86%)
 create mode 100644 xen/arch/arm/livepatch.c
 delete mode 100644 xen/arch/arm/xsplice.c
 rename xen/arch/x86/{xsplice.c => livepatch.c} (74%)
 rename xen/common/{xsplice.c => livepatch.c} (75%)
 rename xen/common/{xsplice_elf.c => livepatch_elf.c} (72%)
 create mode 100644 xen/include/xen/livepatch.h
 rename xen/include/xen/{xsplice_elf.h => livepatch_elf.h} (56%)
 delete mode 100644 xen/include/xen/xsplice.h

diff --git a/.gitignore b/.gitignore
index 1b73293..bf8cb42 100644
--- a/.gitignore
+++ b/.gitignore
@@ -182,7 +182,7 @@ tools/misc/xen_cpuperf
 tools/misc/xen-cpuid
 tools/misc/xen-detect
 tools/misc/xen-tmem-list-parse
-tools/misc/xen-xsplice
+tools/misc/xen-livepatch
 tools/misc/xenperf
 tools/misc/xenpm
 tools/misc/xen-hvmctx
@@ -247,9 +247,9 @@ xen/arch/x86/efi/check.efi
 xen/arch/x86/efi/disabled
 xen/arch/x86/efi/mkreloc
 xen/arch/x86/test/config.h
-xen/arch/x86/test/xen_hello_world.xsplice
-xen/arch/x86/test/xen_bye_world.xsplice
-xen/arch/x86/test/xen_replace_world.xsplice
+xen/arch/x86/test/xen_hello_world.xlivepatch
+xen/arch/x86/test/xen_bye_world.xlivepatch
+xen/arch/x86/test/xen_replace_world.xlivepatch
 xen/arch/*/efi/boot.c
 xen/arch/*/efi/compat.c
 xen/arch/*/efi/efi.h
diff --git a/MAINTAINERS b/MAINTAINERS
index 62f4ffd..d5792ed 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -274,6 +274,16 @@ L: minios-devel@xxxxxxxxxxxxxxxxxxxx
 T:     git git://xenbits.xen.org/mini-os.git
 F:     config/MiniOS.mk
 
+LIVE PATCH
+M:  Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
+M:  Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
+S:  Supported
+F:  docs/misc/livepatch.markdown
+F:  tools/misc/xen-livepatch.c
+F:  xen/arch/*/livepatch*
+F:  xen/common/livepatch*
+F:  xen/include/xen/livepatch*
+
 OCAML TOOLS
 M:     David Scott <dave@xxxxxxxxxx>
 S:     Supported
@@ -470,16 +480,6 @@ F:  xen/include/xsm/
 F:  xen/xsm/
 F:  docs/misc/xsm-flask.txt
 
-XSPLICE
-M:  Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
-M:  Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
-S:  Supported
-F:  docs/misc/xsplice.markdown
-F:  tools/misc/xen-xsplice.c
-F:  xen/arch/*/xsplice*
-F:  xen/common/xsplice*
-F:  xen/include/xen/xsplice*
-
 THE REST
 M:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
 M:     George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
diff --git a/docs/misc/xsplice.markdown b/docs/misc/livepatch.markdown
similarity index 87%
rename from docs/misc/xsplice.markdown
rename to docs/misc/livepatch.markdown
index 05c1a55..5186c5f 100644
--- a/docs/misc/xsplice.markdown
+++ b/docs/misc/livepatch.markdown
@@ -1,4 +1,4 @@
-# xSplice Design v1
+# Xen Live Patching Design v1
 
 ## Rationale
 
@@ -265,7 +265,7 @@ structures using Elf types, etc). This design will explain 
the structures
 and how they are used together and not dig in the ELF format - except mention
 that the section names should match the structure names.
 
-The xSplice payload is a relocatable ELF binary. A typical binary would have:
+The Xen Live Patch payload is a relocatable ELF binary. A typical binary would 
have:
 
  * One or more .text sections.
  * Zero or more read-only data sections.
@@ -279,24 +279,24 @@ It may also have some architecture-specific sections. For 
example:
  * Exception tables.
  * Relocations for each of these sections.
 
-The xSplice core code loads the payload as a standard ELF binary, relocates it
+The Xen Live Patch core code loads the payload as a standard ELF binary, 
relocates it
 and handles the architecture-specifc sections as needed. This process is much
 like what the Linux kernel module loader does.
 
 The payload contains at least three sections:
 
- * `.xsplice.funcs` - which is an array of xsplice_patch_func structures.
- * `.xsplice.depends` - which is an ELF Note that describes what the payload
+ * `.livepatch.funcs` - which is an array of livepatch_func structures.
+ * `.livepatch.depends` - which is an ELF Note that describes what the payload
     depends on. **MUST** have one.
  *  `.note.gnu.build-id` - the build-id of this payload. **MUST** have one.
 
-### .xsplice.funcs
+### .livepatch.funcs
 
-The `.xsplice.funcs` contains an array of xsplice_patch_func structures
+The `.livepatch.funcs` contains an array of livepatch_func structures
 which describe the functions to be patched:
 
 <pre>
-struct xsplice_patch_func {  
+struct livepatch_func {  
     const char *name;  
     void *new_addr;  
     void *old_addr;  
@@ -329,24 +329,24 @@ The size of the structure is 64 bytes on 64-bit 
hypervisors. It will be
 
 * `opaque` **MUST** be zero.
 
-The size of the `xsplice_patch_func` array is determined from the ELF section
+The size of the `livepatch_func` array is determined from the ELF section
 size.
 
-When applying the patch the hypervisor iterates over each `xsplice_patch_func`
+When applying the patch the hypervisor iterates over each `livepatch_func`
 structure and the core code inserts a trampoline at `old_addr` to `new_addr`.
 The `new_addr` is altered when the ELF payload is loaded.
 
-When reverting a patch, the hypervisor iterates over each `xsplice_patch_func`
+When reverting a patch, the hypervisor iterates over each `livepatch_func`
 and the core code copies the data from the undo buffer (private internal copy)
 to `old_addr`.
 
-### Example of .xsplice.funcs
+### Example of .livepatch.funcs
 
 A simple example of what a payload file can be:
 
 <pre>
 /* MUST be in sync with hypervisor. */  
-struct xsplice_patch_func {  
+struct livepatch_func {  
     const char *name;  
     void *new_addr;  
     void *old_addr;  
@@ -364,26 +364,26 @@ const char *xen_hello_world(void)
 
 static unsigned char patch_this_fnc[] = "xen_extra_version";  
 
-struct xsplice_patch_func xsplice_hello_world = {  
-    .version = XSPLICE_PAYLOAD_VERSION,
+struct livepatch_func livepatch_hello_world = {  
+    .version = LIVE_PATCH_PAYLOAD_VERSION,
     .name = patch_this_fnc,  
     .new_addr = xen_hello_world,  
     .old_addr = (void *)0xffff82d08013963c, /* Extracted from xen-syms. */  
     .new_size = 13, /* To be be computed by scripts. */  
     .old_size = 13, /* -----------""---------------  */  
-} __attribute__((__section__(".xsplice.funcs")));  
+} __attribute__((__section__(".livepatch.funcs")));  
 
 </pre>
 
 Code must be compiled with -fPIC.
 
-### .xsplice.depends and .note.gnu.build-id
+### .livepatch.depends and .note.gnu.build-id
 
 To support dependencies checking and safe loading (to load the
 appropiate payload against the right hypervisor) there is a need
 to embbed an build-id dependency.
 
-This is done by the payload containing an section `.xsplice.depends`
+This is done by the payload containing an section `.livepatch.depends`
 which follows the format of an ELF Note. The contents of this
 (name, and description) are specific to the linker utilized to
 build the hypevisor and payload.
@@ -424,8 +424,8 @@ one uint32_t to determine the sub-operations and one 
padding field which
 *MUST* always be zero.
 
 <pre>
-struct xen_sysctl_xsplice_op {  
-    uint32_t cmd;                   /* IN: XEN_SYSCTL_XSPLICE_*. */  
+struct xen_sysctl_livepatch_op {  
+    uint32_t cmd;                   /* IN: XEN_SYSCTL_LIVE_PATCH_*. */  
     uint32_t pad;                   /* IN: Always zero. */  
        union {  
           ... see below ...  
@@ -435,9 +435,9 @@ struct xen_sysctl_xsplice_op {
 </pre>
 while the rest of hypercall specific structures are part of the this structure.
 
-### Basic type: struct xen_xsplice_name
+### Basic type: struct xen_livepatch_name
 
-Most of the hypercalls employ an shared structure called `struct 
xen_xsplice_name`
+Most of the hypercalls employ an shared structure called `struct 
xen_livepatch_name`
 which contains:
 
  * `name` - pointer where the string for the name is located.
@@ -451,25 +451,25 @@ The structure is as follow:
  *  Uniquely identifies the payload.  Should be human readable.  
  * Includes the NUL terminator  
  */  
-#define XEN_XSPLICE_NAME_SIZE 128  
-struct xen_xsplice_name {  
+#define XEN_LIVE_PATCH_NAME_SIZE 128  
+struct xen_livepatch_name {  
     XEN_GUEST_HANDLE_64(char) name;         /* IN, pointer to name. */  
     uint16_t size;                          /* IN, size of name. May be upto   
-                                               XEN_XSPLICE_NAME_SIZE. */  
+                                               XEN_LIVE_PATCH_NAME_SIZE. */  
     uint16_t pad[3];                        /* IN: MUST be zero. */ 
 };  
 </pre>
 
-### XEN_SYSCTL_XSPLICE_UPLOAD (0)
+### XEN_SYSCTL_LIVE_PATCH_UPLOAD (0)
 
 Upload a payload to the hypervisor. The payload is verified
 against basic checks and if there are any issues the proper return code
 will be returned. The payload is not applied at this time - that is
-controlled by *XEN_SYSCTL_XSPLICE_ACTION*.
+controlled by *XEN_SYSCTL_LIVE_PATCH_ACTION*.
 
 The caller provides:
 
- * A `struct xen_xsplice_name` called `name` which has the unique name.
+ * A `struct xen_livepatch_name` called `name` which has the unique name.
  * `size` the size of the ELF payload (in bytes).
  * `payload` the virtual address of where the ELF payload is.
 
@@ -485,29 +485,29 @@ The `payload` is the ELF payload as mentioned in the 
`Payload format` section.
 The structure is as follow:
 
 <pre>
-struct xen_sysctl_xsplice_upload {  
-    xen_xsplice_name_t name;            /* IN, name of the patch. */  
+struct xen_sysctl_livepatch_upload {  
+    xen_livepatch_name_t name;          /* IN, name of the patch. */  
     uint64_t size;                      /* IN, size of the ELF file. */  
     XEN_GUEST_HANDLE_64(uint8) payload; /* IN: ELF file. */  
 };  
 </pre>
 
-### XEN_SYSCTL_XSPLICE_GET (1)
+### XEN_SYSCTL_LIVE_PATCH_GET (1)
 
 Retrieve an status of an specific payload. This caller provides:
 
- * A `struct xen_xsplice_name` called `name` which has the unique name.
- * A `struct xen_xsplice_status` structure. The member values will
+ * A `struct xen_livepatch_name` called `name` which has the unique name.
+ * A `struct xen_livepatch_status` structure. The member values will
    be over-written upon completion.
 
-Upon completion the `struct xen_xsplice_status` is updated.
+Upon completion the `struct xen_livepatch_status` is updated.
 
  * `status` - indicates the current status of the payload:
-   * *XSPLICE_STATUS_CHECKED*  (1) loaded and the ELF payload safety checks 
passed.
-   * *XSPLICE_STATUS_APPLIED* (2) loaded, checked, and applied.
+   * *LIVE_PATCH_STATUS_CHECKED*  (1) loaded and the ELF payload safety checks 
passed.
+   * *LIVE_PATCH_STATUS_APPLIED* (2) loaded, checked, and applied.
    *  No other value is possible.
  * `rc` - -XEN_EXX type errors encountered while performing the last
-   XSPLICE_ACTION_* operation. The normal values can be zero or -XEN_EAGAIN 
which
+   LIVE_PATCH_ACTION_* operation. The normal values can be zero or -XEN_EAGAIN 
which
    respectively mean: success or operation in progress. Other values
    imply an error occurred. If there is an error in `rc`, `status` will **NOT**
    have changed.
@@ -519,15 +519,15 @@ rc=-XEN_EAGAIN and return value can be 0).
 For example, supposing there is an payload:
 
 <pre>
- status: XSPLICE_STATUS_CHECKED
+ status: LIVE_PATCH_STATUS_CHECKED
  rc: 0
 </pre>
 
-We apply an action - XSPLICE_ACTION_REVERT - to revert it (which won't work
+We apply an action - LIVE_PATCH_ACTION_REVERT - to revert it (which won't work
 as we have not even applied it. Afterwards we will have:
 
 <pre>
- status: XSPLICE_STATUS_CHECKED
+ status: LIVE_PATCH_STATUS_CHECKED
  rc: -XEN_EINVAL
 </pre>
 
@@ -538,20 +538,20 @@ This operation is synchronous and does not require 
preemption.
 The structure is as follow:
 
 <pre>
-struct xen_xsplice_status {  
-#define XSPLICE_STATUS_CHECKED      1  
-#define XSPLICE_STATUS_APPLIED      2  
-    uint32_t state;                 /* OUT: XSPLICE_STATE_*. */  
+struct xen_livepatch_status {  
+#define LIVE_PATCH_STATUS_CHECKED      1  
+#define LIVE_PATCH_STATUS_APPLIED      2  
+    uint32_t state;                 /* OUT: LIVE_PATCH_STATE_*. */  
     int32_t rc;                     /* OUT: 0 if no error, otherwise -XEN_EXX. 
*/  
 };  
 
-struct xen_sysctl_xsplice_get {  
-    xen_xsplice_name_t name;        /* IN, the name of the payload. */  
-    xen_xsplice_status_t status;    /* IN/OUT: status of the payload. */  
+struct xen_sysctl_livepatch_get {  
+    xen_livepatch_name_t name;      /* IN, the name of the payload. */  
+    xen_livepatch_status_t status;  /* IN/OUT: status of the payload. */  
 };  
 </pre>
 
-### XEN_SYSCTL_XSPLICE_LIST (2)
+### XEN_SYSCTL_LIVE_PATCH_LIST (2)
 
 Retrieve an array of abbreviated status and names of payloads that are loaded 
in the
 hypervisor.
@@ -568,11 +568,11 @@ The caller provides:
     in the hypercall being a probing one and return the number of payloads
     (and update the `version`).
  * `pad` - *MUST* be zero.
- * `status` virtual address of where to write `struct xen_xsplice_status`
+ * `status` virtual address of where to write `struct xen_livepatch_status`
    structures. Caller *MUST* allocate up to `nr` of them.
  * `name` - virtual address of where to write the unique name of the payload.
    Caller *MUST* allocate up to `nr` of them. Each *MUST* be of
-   **XEN_XSPLICE_NAME_SIZE** size. Note that **XEN_XSPLICE_NAME_SIZE** includes
+   **XEN_LIVE_PATCH_NAME_SIZE** size. Note that **XEN_LIVE_PATCH_NAME_SIZE** 
includes
    the NUL terminator.
  * `len` - virtual address of where to write the length of each unique name
    of the payload. Caller *MUST* allocate up to `nr` of them. Each *MUST* be
@@ -597,14 +597,14 @@ between each invocation. if the version differs it should 
discard the stale
 data and start from scratch. It is OK for the toolstack to use the new
 `version` field.
 
-The `struct xen_xsplice_status` structure contains an status of payload which 
includes:
+The `struct xen_livepatch_status` structure contains an status of payload 
which includes:
 
  * `status` - indicates the current status of the payload:
-   * *XSPLICE_STATUS_CHECKED*  (1) loaded and the ELF payload safety checks 
passed.
-   * *XSPLICE_STATUS_APPLIED* (2) loaded, checked, and applied.
+   * *LIVE_PATCH_STATUS_CHECKED*  (1) loaded and the ELF payload safety checks 
passed.
+   * *LIVE_PATCH_STATUS_APPLIED* (2) loaded, checked, and applied.
    *  No other value is possible.
  * `rc` - -XEN_EXX type errors encountered while performing the last
-   XSPLICE_ACTION_* operation. The normal values can be zero or -XEN_EAGAIN 
which
+   LIVE_PATCH_ACTION_* operation. The normal values can be zero or -XEN_EAGAIN 
which
    respectively mean: success or operation in progress. Other values
    imply an error occurred. If there is an error in `rc`, `status` will **NOT**
    have changed.
@@ -612,7 +612,7 @@ The `struct xen_xsplice_status` structure contains an 
status of payload which in
 The structure is as follow:
 
 <pre>
-struct xen_sysctl_xsplice_list {  
+struct xen_sysctl_livepatch_list {  
     uint32_t version;                       /* OUT: Hypervisor stamps value.
                                                If varies between calls, we are 
 
                                                getting stale data. */  
@@ -622,38 +622,38 @@ struct xen_sysctl_xsplice_list {
                                                amount of payloads and version. 
 
                                                OUT: How many payloads left. */ 
 
     uint32_t pad;                           /* IN: Must be zero. */  
-    XEN_GUEST_HANDLE_64(xen_xsplice_status_t) status;  /* OUT. Must have 
enough  
+    XEN_GUEST_HANDLE_64(xen_livepatch_status_t) status;  /* OUT. Must have 
enough  
                                                space allocate for nr of them. 
*/  
     XEN_GUEST_HANDLE_64(char) id;           /* OUT: Array of names. Each 
member  
-                                               MUST XEN_XSPLICE_NAME_SIZE in 
size.  
+                                               MUST XEN_LIVE_PATCH_NAME_SIZE 
in size.  
                                                Must have nr of them. */  
     XEN_GUEST_HANDLE_64(uint32) len;        /* OUT: Array of lengths of 
name's.  
                                                Must have nr of them. */  
 };  
 </pre>
 
-### XEN_SYSCTL_XSPLICE_ACTION (3)
+### XEN_SYSCTL_LIVE_PATCH_ACTION (3)
 
 Perform an operation on the payload structure referenced by the `name` field.
 The operation request is asynchronous and the status should be retrieved
-by using either **XEN_SYSCTL_XSPLICE_GET** or **XEN_SYSCTL_XSPLICE_LIST** 
hypercall.
+by using either **XEN_SYSCTL_LIVE_PATCH_GET** or 
**XEN_SYSCTL_LIVE_PATCH_LIST** hypercall.
 
 The caller provides:
 
- * A 'struct xen_xsplice_name` `name` containing the unique name.
+ * A 'struct xen_livepatch_name` `name` containing the unique name.
  * `cmd` the command requested:
-  * *XSPLICE_ACTION_UNLOAD* (1) unload the payload.
+  * *LIVE_PATCH_ACTION_UNLOAD* (1) unload the payload.
    Any further hypercalls against the `name` will result in failure unless
-   **XEN_SYSCTL_XSPLICE_UPLOAD** hypercall is perfomed with same `name`.
-  * *XSPLICE_ACTION_REVERT* (2) revert the payload. If the operation takes
-  more time than the upper bound of time the `rc` in `xen_xsplice_status'
-  retrieved via **XEN_SYSCTL_XSPLICE_GET** will be -XEN_EBUSY.
-  * *XSPLICE_ACTION_APPLY* (3) apply the payload. If the operation takes
-  more time than the upper bound of time the `rc` in `xen_xsplice_status'
-  retrieved via **XEN_SYSCTL_XSPLICE_GET** will be -XEN_EBUSY.
-  * *XSPLICE_ACTION_REPLACE* (4) revert all applied payloads and apply this
+   **XEN_SYSCTL_LIVE_PATCH_UPLOAD** hypercall is perfomed with same `name`.
+  * *LIVE_PATCH_ACTION_REVERT* (2) revert the payload. If the operation takes
+  more time than the upper bound of time the `rc` in `xen_livepatch_status'
+  retrieved via **XEN_SYSCTL_LIVE_PATCH_GET** will be -XEN_EBUSY.
+  * *LIVE_PATCH_ACTION_APPLY* (3) apply the payload. If the operation takes
+  more time than the upper bound of time the `rc` in `xen_livepatch_status'
+  retrieved via **XEN_SYSCTL_LIVE_PATCH_GET** will be -XEN_EBUSY.
+  * *LIVE_PATCH_ACTION_REPLACE* (4) revert all applied payloads and apply this
   payload. If the operation takes more time than the upper bound of time
-  the `rc` in `xen_xsplice_status' retrieved via **XEN_SYSCTL_XSPLICE_GET**
+  the `rc` in `xen_livepatch_status' retrieved via 
**XEN_SYSCTL_LIVE_PATCH_GET**
   will be -XEN_EBUSY.
  * `time` the upper bound of time (ms) the cmd should take. Zero means 
infinite.
    If within the time the operation does not succeed the operation would go in
@@ -665,13 +665,13 @@ The return value will be zero unless the provided fields 
are incorrect.
 The structure is as follow:
 
 <pre>
-#define XSPLICE_ACTION_UNLOAD  1  
-#define XSPLICE_ACTION_REVERT  2  
-#define XSPLICE_ACTION_APPLY   3  
-#define XSPLICE_ACTION_REPLACE 4  
-struct xen_sysctl_xsplice_action {  
-    xen_xsplice_name_t name;                /* IN, name of the patch. */  
-    uint32_t cmd;                           /* IN: XSPLICE_ACTION_* */  
+#define LIVE_PATCH_ACTION_UNLOAD  1  
+#define LIVE_PATCH_ACTION_REVERT  2  
+#define LIVE_PATCH_ACTION_APPLY   3  
+#define LIVE_PATCH_ACTION_REPLACE 4  
+struct xen_sysctl_livepatch_action {  
+    xen_livepatch_name_t name;              /* IN, name of the patch. */  
+    uint32_t cmd;                           /* IN: LIVE_PATCH_ACTION_* */  
     uint32_t time;                          /* IN: Zero if no timeout. */   
                                             /* Or upper bound of time (ms) */  
 
                                             /* for operation to take. */  
@@ -679,11 +679,11 @@ struct xen_sysctl_xsplice_action {
 
 </pre>
 
-## State diagrams of XSPLICE_ACTION commands.
+## State diagrams of LIVE_PATCH_ACTION commands.
 
 There is a strict ordering state of what the commands can be.
-The XSPLICE_ACTION prefix has been dropped to easy reading and
-does not include the XSPLICE_STATES:
+The LIVE_PATCH_ACTION prefix has been dropped to easy reading and
+does not include the LIVE_PATCH_STATES:
 
 <pre>
               /->\  
@@ -693,11 +693,11 @@ does not include the XSPLICE_STATES:
                  \-------------------<-------------/  
 
 </pre>
-## State transition table of XSPLICE_ACTION commands and XSPLICE_STATUS.
+## State transition table of LIVE_PATCH_ACTION commands and LIVE_PATCH_STATUS.
 
 Note that:
 
- - The CHECKED state is the starting one achieved with 
*XEN_SYSCTL_XSPLICE_UPLOAD* hypercall.
+ - The CHECKED state is the starting one achieved with 
*XEN_SYSCTL_LIVE_PATCH_UPLOAD* hypercall.
  - The REVERT operation on success will automatically move to the CHECKED 
state.
  - There are two STATES: CHECKED and APPLIED.
  - There are four actions (aka commands): APPLY, REPLACE, REVERT, and UNLOAD.
@@ -735,10 +735,10 @@ All the other state transitions are invalid.
 
 The normal sequence of events is to:
 
- 1. *XEN_SYSCTL_XSPLICE_UPLOAD* to upload the payload. If there are errors 
*STOP* here.
- 2. *XEN_SYSCTL_XSPLICE_GET* to check the `->rc`. If *-XEN_EAGAIN* spin. If 
zero go to next step.
- 3. *XEN_SYSCTL_XSPLICE_ACTION* with *XSPLICE_ACTION_APPLY* to apply the patch.
- 4. *XEN_SYSCTL_XSPLICE_GET* to check the `->rc`. If in *-XEN_EAGAIN* spin. If 
zero exit with success.
+ 1. *XEN_SYSCTL_LIVE_PATCH_UPLOAD* to upload the payload. If there are errors 
*STOP* here.
+ 2. *XEN_SYSCTL_LIVE_PATCH_GET* to check the `->rc`. If *-XEN_EAGAIN* spin. If 
zero go to next step.
+ 3. *XEN_SYSCTL_LIVE_PATCH_ACTION* with *LIVE_PATCH_ACTION_APPLY* to apply the 
patch.
+ 4. *XEN_SYSCTL_LIVE_PATCH_GET* to check the `->rc`. If in *-XEN_EAGAIN* spin. 
If zero exit with success.
 
 
 ## Addendum
@@ -809,14 +809,14 @@ Hotpatch generation often requires support for compiling 
the target
 with -ffunction-sections / -fdata-sections.  Changes would have to
 be done to the linker scripts to support this.
 
-### Generation of xSplice ELF payloads
+### Generation of Live Patch ELF payloads
 
 The design of that is not discussed in this design.
 
 This is implemented in a seperate tool which lives in a seperate
 GIT repo.
 
-Currently it resides at https://github.com/rosslagerwall/xsplice-build
+Currently it resides at https://github.com/rosslagerwall/livepatch-build
 
 ### Exception tables and symbol tables growth
 
@@ -879,9 +879,9 @@ This is implemented in the Xen Project hypervisor.
 
 Only the privileged domain should be allowed to do this operation.
 
-### xSplice interdependencies
+### Live patch interdependencies
 
-xSplice patches interdependencies are tricky.
+Live patch patches interdependencies are tricky.
 
 There are the ways this can be addressed:
  * A single large patch that subsumes and replaces all previous ones.
@@ -918,7 +918,7 @@ build-id.
 
 # Not Yet Done
 
-This is for further development of xSplice.
+This is for further development of live patching.
 
 ## TODO Goals
 
@@ -930,7 +930,7 @@ The implementation must also have a mechanism for (in no 
particular order):
  * Deal with NMI/MCE checks during patching instead of ignoring them.
  * Further safety checks (blacklist of which functions cannot be patched, check
    the stack, make sure the payload is built with same compiler as hypervisor).
-   Specifically we want to make sure that xSplice codepaths cannot be patched.
+   Specifically we want to make sure that live patching codepaths cannot be 
patched.
  * NOP out the code sequence if `new_size` is zero.
  * Deal with other relocation types:  R_X86_64_[8,16,32,32S], 
R_X86_64_PC[8,16,64]
    in payload file.
diff --git a/tools/flask/policy/policy/modules/xen/xen.te 
b/tools/flask/policy/policy/modules/xen/xen.te
index 0b1c955..50aa602 100644
--- a/tools/flask/policy/policy/modules/xen/xen.te
+++ b/tools/flask/policy/policy/modules/xen/xen.te
@@ -74,7 +74,7 @@ allow dom0_t xen_t:xen2 {
     get_symbol
     get_cpu_levelling_caps
     get_cpu_featureset
-    xsplice_op
+    livepatch_op
 };
 
 # Allow dom0 to use all XENVER_ subops that have checks.
diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
index dc54612..5180b70 100644
--- a/tools/libxc/include/xenctrl.h
+++ b/tools/libxc/include/xenctrl.h
@@ -2610,15 +2610,15 @@ const uint32_t *xc_get_feature_deep_deps(uint32_t 
feature);
 
 #endif
 
-int xc_xsplice_upload(xc_interface *xch,
-                      char *name, unsigned char *payload, uint32_t size);
+int xc_livepatch_upload(xc_interface *xch,
+                        char *name, unsigned char *payload, uint32_t size);
 
-int xc_xsplice_get(xc_interface *xch,
-                   char *name,
-                   xen_xsplice_status_t *status);
+int xc_livepatch_get(xc_interface *xch,
+                     char *name,
+                     xen_livepatch_status_t *status);
 
 /*
- * The heart of this function is to get an array of xen_xsplice_status_t.
+ * The heart of this function is to get an array of xen_livepatch_status_t.
  *
  * However it is complex because it has to deal with the hypervisor
  * returning some of the requested data or data being stale
@@ -2638,10 +2638,10 @@ int xc_xsplice_get(xc_interface *xch,
  * number of entries that 'info', 'name', and 'len' arrays can
  * be filled up with.
  *
- * Each entry in the 'name' array is expected to be of XEN_XSPLICE_NAME_SIZE
+ * Each entry in the 'name' array is expected to be of XEN_LIVE_PATCH_NAME_SIZE
  * length.
  *
- * Each entry in the 'info' array is expected to be of xen_xsplice_status_t
+ * Each entry in the 'info' array is expected to be of xen_livepatch_status_t
  * structure size.
  *
  * Each entry in the 'len' array is expected to be of uint32_t size.
@@ -2655,10 +2655,10 @@ int xc_xsplice_get(xc_interface *xch,
  * will contain the number of entries that had been succesfully
  * retrieved (if any).
  */
-int xc_xsplice_list(xc_interface *xch, unsigned int max, unsigned int start,
-                    xen_xsplice_status_t *info, char *name,
-                    uint32_t *len, unsigned int *done,
-                    unsigned int *left);
+int xc_livepatch_list(xc_interface *xch, unsigned int max, unsigned int start,
+                      xen_livepatch_status_t *info, char *name,
+                      uint32_t *len, unsigned int *done,
+                      unsigned int *left);
 
 /*
  * The operations are asynchronous and the hypervisor may take a while
@@ -2666,10 +2666,10 @@ int xc_xsplice_list(xc_interface *xch, unsigned int 
max, unsigned int start,
  * operation if it could not be completed within the specified time
  * (in ms). Value of 0 means let hypervisor decide the best timeout.
  */
-int xc_xsplice_apply(xc_interface *xch, char *name, uint32_t timeout);
-int xc_xsplice_revert(xc_interface *xch, char *name, uint32_t timeout);
-int xc_xsplice_unload(xc_interface *xch, char *name, uint32_t timeout);
-int xc_xsplice_replace(xc_interface *xch, char *name, uint32_t timeout);
+int xc_livepatch_apply(xc_interface *xch, char *name, uint32_t timeout);
+int xc_livepatch_revert(xc_interface *xch, char *name, uint32_t timeout);
+int xc_livepatch_unload(xc_interface *xch, char *name, uint32_t timeout);
+int xc_livepatch_replace(xc_interface *xch, char *name, uint32_t timeout);
 
 /* Compat shims */
 #include "xenctrl_compat.h"
diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c
index d73f622..6665bf1 100644
--- a/tools/libxc/xc_misc.c
+++ b/tools/libxc/xc_misc.c
@@ -696,16 +696,16 @@ int xc_hvm_inject_trap(
     return rc;
 }
 
-int xc_xsplice_upload(xc_interface *xch,
-                      char *name,
-                      unsigned char *payload,
-                      uint32_t size)
+int xc_livepatch_upload(xc_interface *xch,
+                        char *name,
+                        unsigned char *payload,
+                        uint32_t size)
 {
     int rc;
     DECLARE_SYSCTL;
     DECLARE_HYPERCALL_BUFFER(char, local);
     DECLARE_HYPERCALL_BOUNCE(name, 0 /* later */, 
XC_HYPERCALL_BUFFER_BOUNCE_IN);
-    xen_xsplice_name_t def_name = { .pad = { 0, 0, 0 } };
+    xen_livepatch_name_t def_name = { .pad = { 0, 0, 0 } };
 
     if ( !name || !payload )
     {
@@ -714,7 +714,7 @@ int xc_xsplice_upload(xc_interface *xch,
     }
 
     def_name.size = strlen(name) + 1;
-    if ( def_name.size > XEN_XSPLICE_NAME_SIZE )
+    if ( def_name.size > XEN_LIVE_PATCH_NAME_SIZE )
     {
         errno = EINVAL;
         return -1;
@@ -733,14 +733,14 @@ int xc_xsplice_upload(xc_interface *xch,
     }
     memcpy(local, payload, size);
 
-    sysctl.cmd = XEN_SYSCTL_xsplice_op;
-    sysctl.u.xsplice.cmd = XEN_SYSCTL_XSPLICE_UPLOAD;
-    sysctl.u.xsplice.pad = 0;
-    sysctl.u.xsplice.u.upload.size = size;
-    set_xen_guest_handle(sysctl.u.xsplice.u.upload.payload, local);
+    sysctl.cmd = XEN_SYSCTL_livepatch_op;
+    sysctl.u.livepatch.cmd = XEN_SYSCTL_LIVE_PATCH_UPLOAD;
+    sysctl.u.livepatch.pad = 0;
+    sysctl.u.livepatch.u.upload.size = size;
+    set_xen_guest_handle(sysctl.u.livepatch.u.upload.payload, local);
 
-    sysctl.u.xsplice.u.upload.name = def_name;
-    set_xen_guest_handle(sysctl.u.xsplice.u.upload.name.name, name);
+    sysctl.u.livepatch.u.upload.name = def_name;
+    set_xen_guest_handle(sysctl.u.livepatch.u.upload.name.name, name);
 
     rc = do_sysctl(xch, &sysctl);
 
@@ -750,14 +750,14 @@ int xc_xsplice_upload(xc_interface *xch,
     return rc;
 }
 
-int xc_xsplice_get(xc_interface *xch,
-                   char *name,
-                   xen_xsplice_status_t *status)
+int xc_livepatch_get(xc_interface *xch,
+                     char *name,
+                     xen_livepatch_status_t *status)
 {
     int rc;
     DECLARE_SYSCTL;
     DECLARE_HYPERCALL_BOUNCE(name, 0 /*adjust later */, 
XC_HYPERCALL_BUFFER_BOUNCE_IN);
-    xen_xsplice_name_t def_name = { .pad = { 0, 0, 0 } };
+    xen_livepatch_name_t def_name = { .pad = { 0, 0, 0 } };
 
     if ( !name )
     {
@@ -766,7 +766,7 @@ int xc_xsplice_get(xc_interface *xch,
     }
 
     def_name.size = strlen(name) + 1;
-    if ( def_name.size > XEN_XSPLICE_NAME_SIZE )
+    if ( def_name.size > XEN_LIVE_PATCH_NAME_SIZE )
     {
         errno = EINVAL;
         return -1;
@@ -777,27 +777,27 @@ int xc_xsplice_get(xc_interface *xch,
     if ( xc_hypercall_bounce_pre(xch, name) )
         return -1;
 
-    sysctl.cmd = XEN_SYSCTL_xsplice_op;
-    sysctl.u.xsplice.cmd = XEN_SYSCTL_XSPLICE_GET;
-    sysctl.u.xsplice.pad = 0;
+    sysctl.cmd = XEN_SYSCTL_livepatch_op;
+    sysctl.u.livepatch.cmd = XEN_SYSCTL_LIVE_PATCH_GET;
+    sysctl.u.livepatch.pad = 0;
 
-    sysctl.u.xsplice.u.get.status.state = 0;
-    sysctl.u.xsplice.u.get.status.rc = 0;
+    sysctl.u.livepatch.u.get.status.state = 0;
+    sysctl.u.livepatch.u.get.status.rc = 0;
 
-    sysctl.u.xsplice.u.get.name = def_name;
-    set_xen_guest_handle(sysctl.u.xsplice.u.get.name.name, name);
+    sysctl.u.livepatch.u.get.name = def_name;
+    set_xen_guest_handle(sysctl.u.livepatch.u.get.name.name, name);
 
     rc = do_sysctl(xch, &sysctl);
 
     xc_hypercall_bounce_post(xch, name);
 
-    memcpy(status, &sysctl.u.xsplice.u.get.status, sizeof(*status));
+    memcpy(status, &sysctl.u.livepatch.u.get.status, sizeof(*status));
 
     return rc;
 }
 
 /*
- * The heart of this function is to get an array of xen_xsplice_status_t.
+ * The heart of this function is to get an array of xen_livepatch_status_t.
  *
  * However it is complex because it has to deal with the hypervisor
  * returning some of the requested data or data being stale
@@ -817,10 +817,10 @@ int xc_xsplice_get(xc_interface *xch,
  * number of entries that 'info', 'name', and 'len' arrays can
  * be filled up with.
  *
- * Each entry in the 'name' array is expected to be of XEN_XSPLICE_NAME_SIZE
+ * Each entry in the 'name' array is expected to be of XEN_LIVE_PATCH_NAME_SIZE
  * length.
  *
- * Each entry in the 'info' array is expected to be of xen_xsplice_status_t
+ * Each entry in the 'info' array is expected to be of xen_livepatch_status_t
  * structure size.
  *
  * Each entry in the 'len' array is expected to be of uint32_t size.
@@ -834,11 +834,11 @@ int xc_xsplice_get(xc_interface *xch,
  * will contain the number of entries that had been succesfully
  * retrieved (if any).
  */
-int xc_xsplice_list(xc_interface *xch, unsigned int max, unsigned int start,
-                    xen_xsplice_status_t *info,
-                    char *name, uint32_t *len,
-                    unsigned int *done,
-                    unsigned int *left)
+int xc_livepatch_list(xc_interface *xch, unsigned int max, unsigned int start,
+                      xen_livepatch_status_t *info,
+                      char *name, uint32_t *len,
+                      unsigned int *done,
+                      unsigned int *left)
 {
     int rc;
     DECLARE_SYSCTL;
@@ -857,16 +857,16 @@ int xc_xsplice_list(xc_interface *xch, unsigned int max, 
unsigned int start,
         return -1;
     }
 
-    sysctl.cmd = XEN_SYSCTL_xsplice_op;
-    sysctl.u.xsplice.cmd = XEN_SYSCTL_XSPLICE_LIST;
-    sysctl.u.xsplice.pad = 0;
-    sysctl.u.xsplice.u.list.version = 0;
-    sysctl.u.xsplice.u.list.idx = start;
-    sysctl.u.xsplice.u.list.pad = 0;
+    sysctl.cmd = XEN_SYSCTL_livepatch_op;
+    sysctl.u.livepatch.cmd = XEN_SYSCTL_LIVE_PATCH_LIST;
+    sysctl.u.livepatch.pad = 0;
+    sysctl.u.livepatch.u.list.version = 0;
+    sysctl.u.livepatch.u.list.idx = start;
+    sysctl.u.livepatch.u.list.pad = 0;
 
     max_batch_sz = max;
     /* Convience value. */
-    sz = sizeof(*name) * XEN_XSPLICE_NAME_SIZE;
+    sz = sizeof(*name) * XEN_LIVE_PATCH_NAME_SIZE;
     *done = 0;
     *left = 0;
     do {
@@ -886,7 +886,7 @@ int xc_xsplice_list(xc_interface *xch, unsigned int max, 
unsigned int start,
 
         nr = min(max - *done, max_batch_sz);
 
-        sysctl.u.xsplice.u.list.nr = nr;
+        sysctl.u.livepatch.u.list.nr = nr;
         /* Fix the size (may vary between hypercalls). */
         HYPERCALL_BOUNCE_SET_SIZE(info, nr * sizeof(*info));
         HYPERCALL_BOUNCE_SET_SIZE(name, nr * nr);
@@ -908,9 +908,9 @@ int xc_xsplice_list(xc_interface *xch, unsigned int max, 
unsigned int start,
         if ( rc )
             break;
 
-        set_xen_guest_handle(sysctl.u.xsplice.u.list.status, info);
-        set_xen_guest_handle(sysctl.u.xsplice.u.list.name, name);
-        set_xen_guest_handle(sysctl.u.xsplice.u.list.len, len);
+        set_xen_guest_handle(sysctl.u.livepatch.u.list.status, info);
+        set_xen_guest_handle(sysctl.u.livepatch.u.list.name, name);
+        set_xen_guest_handle(sysctl.u.livepatch.u.list.len, len);
 
         rc = do_sysctl(xch, &sysctl);
         /*
@@ -933,9 +933,9 @@ int xc_xsplice_list(xc_interface *xch, unsigned int max, 
unsigned int start,
             break;
 
         if ( !version )
-            version = sysctl.u.xsplice.u.list.version;
+            version = sysctl.u.livepatch.u.list.version;
 
-        if ( sysctl.u.xsplice.u.list.version != version )
+        if ( sysctl.u.livepatch.u.list.version != version )
         {
             /* We could make this configurable as parameter? */
             if ( retries++ > 3 )
@@ -945,7 +945,7 @@ int xc_xsplice_list(xc_interface *xch, unsigned int max, 
unsigned int start,
                 break;
             }
             *done = 0; /* Retry from scratch. */
-            version = sysctl.u.xsplice.u.list.version;
+            version = sysctl.u.livepatch.u.list.version;
             adjust = 1; /* And make sure we continue in the loop. */
             /* No memory leaks. */
             xc_hypercall_bounce_post(xch, info);
@@ -961,7 +961,7 @@ int xc_xsplice_list(xc_interface *xch, unsigned int max, 
unsigned int start,
             rc = -1;
             break;
         }
-        *left = sysctl.u.xsplice.u.list.nr; /* Total remaining count. */
+        *left = sysctl.u.livepatch.u.list.nr; /* Total remaining count. */
         /* Copy only up 'rc' of data' - we could add 'min(rc,nr) if desired. */
         HYPERCALL_BOUNCE_SET_SIZE(info, (rc * sizeof(*info)));
         HYPERCALL_BOUNCE_SET_SIZE(name, (rc * sz));
@@ -973,7 +973,7 @@ int xc_xsplice_list(xc_interface *xch, unsigned int max, 
unsigned int start,
         /* And update how many elements of info we have copied into. */
         *done += rc;
         /* Update idx. */
-        sysctl.u.xsplice.u.list.idx = *done;
+        sysctl.u.livepatch.u.list.idx = *done;
     } while ( adjust || (*done < max && *left != 0) );
 
     if ( rc < 0 )
@@ -986,20 +986,20 @@ int xc_xsplice_list(xc_interface *xch, unsigned int max, 
unsigned int start,
     return rc > 0 ? 0 : rc;
 }
 
-static int _xc_xsplice_action(xc_interface *xch,
-                              char *name,
-                              unsigned int action,
-                              uint32_t timeout)
+static int _xc_livepatch_action(xc_interface *xch,
+                                char *name,
+                                unsigned int action,
+                                uint32_t timeout)
 {
     int rc;
     DECLARE_SYSCTL;
     /* The size is figured out when we strlen(name) */
     DECLARE_HYPERCALL_BOUNCE(name, 0, XC_HYPERCALL_BUFFER_BOUNCE_IN);
-    xen_xsplice_name_t def_name = { .pad = { 0, 0, 0 } };
+    xen_livepatch_name_t def_name = { .pad = { 0, 0, 0 } };
 
     def_name.size = strlen(name) + 1;
 
-    if ( def_name.size > XEN_XSPLICE_NAME_SIZE )
+    if ( def_name.size > XEN_LIVE_PATCH_NAME_SIZE )
     {
         errno = EINVAL;
         return -1;
@@ -1010,14 +1010,14 @@ static int _xc_xsplice_action(xc_interface *xch,
     if ( xc_hypercall_bounce_pre(xch, name) )
         return -1;
 
-    sysctl.cmd = XEN_SYSCTL_xsplice_op;
-    sysctl.u.xsplice.cmd = XEN_SYSCTL_XSPLICE_ACTION;
-    sysctl.u.xsplice.pad = 0;
-    sysctl.u.xsplice.u.action.cmd = action;
-    sysctl.u.xsplice.u.action.timeout = timeout;
+    sysctl.cmd = XEN_SYSCTL_livepatch_op;
+    sysctl.u.livepatch.cmd = XEN_SYSCTL_LIVE_PATCH_ACTION;
+    sysctl.u.livepatch.pad = 0;
+    sysctl.u.livepatch.u.action.cmd = action;
+    sysctl.u.livepatch.u.action.timeout = timeout;
 
-    sysctl.u.xsplice.u.action.name = def_name;
-    set_xen_guest_handle(sysctl.u.xsplice.u.action.name.name, name);
+    sysctl.u.livepatch.u.action.name = def_name;
+    set_xen_guest_handle(sysctl.u.livepatch.u.action.name.name, name);
 
     rc = do_sysctl(xch, &sysctl);
 
@@ -1026,24 +1026,24 @@ static int _xc_xsplice_action(xc_interface *xch,
     return rc;
 }
 
-int xc_xsplice_apply(xc_interface *xch, char *name, uint32_t timeout)
+int xc_livepatch_apply(xc_interface *xch, char *name, uint32_t timeout)
 {
-    return _xc_xsplice_action(xch, name, XSPLICE_ACTION_APPLY, timeout);
+    return _xc_livepatch_action(xch, name, LIVE_PATCH_ACTION_APPLY, timeout);
 }
 
-int xc_xsplice_revert(xc_interface *xch, char *name, uint32_t timeout)
+int xc_livepatch_revert(xc_interface *xch, char *name, uint32_t timeout)
 {
-    return _xc_xsplice_action(xch, name, XSPLICE_ACTION_REVERT, timeout);
+    return _xc_livepatch_action(xch, name, LIVE_PATCH_ACTION_REVERT, timeout);
 }
 
-int xc_xsplice_unload(xc_interface *xch, char *name, uint32_t timeout)
+int xc_livepatch_unload(xc_interface *xch, char *name, uint32_t timeout)
 {
-    return _xc_xsplice_action(xch, name, XSPLICE_ACTION_UNLOAD, timeout);
+    return _xc_livepatch_action(xch, name, LIVE_PATCH_ACTION_UNLOAD, timeout);
 }
 
-int xc_xsplice_replace(xc_interface *xch, char *name, uint32_t timeout)
+int xc_livepatch_replace(xc_interface *xch, char *name, uint32_t timeout)
 {
-    return _xc_xsplice_action(xch, name, XSPLICE_ACTION_REPLACE, timeout);
+    return _xc_livepatch_action(xch, name, LIVE_PATCH_ACTION_REPLACE, timeout);
 }
 
 /*
diff --git a/tools/misc/Makefile b/tools/misc/Makefile
index 3a5f842..cee2b99 100644
--- a/tools/misc/Makefile
+++ b/tools/misc/Makefile
@@ -32,7 +32,7 @@ INSTALL_SBIN                   += xenlockprof
 INSTALL_SBIN                   += xenperf
 INSTALL_SBIN                   += xenpm
 INSTALL_SBIN                   += xenwatchdogd
-INSTALL_SBIN                   += xen-xsplice
+INSTALL_SBIN                   += xen-livepatch
 INSTALL_SBIN += $(INSTALL_SBIN-y)
 
 # Everything to be installed in a private bin/
@@ -104,7 +104,7 @@ xen-mfndump: xen-mfndump.o
 xenwatchdogd: xenwatchdogd.o
        $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
 
-xen-xsplice: xen-xsplice.o
+xen-livepatch: xen-livepatch.o
        $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
 
 xen-lowmemd: xen-lowmemd.o
diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-livepatch.c
similarity index 86%
rename from tools/misc/xen-xsplice.c
rename to tools/misc/xen-livepatch.c
index ddaa079..6e9ead5 100644
--- a/tools/misc/xen-xsplice.c
+++ b/tools/misc/xen-livepatch.c
@@ -20,8 +20,8 @@ static xc_interface *xch;
 void show_help(void)
 {
     fprintf(stderr,
-            "xen-xsplice: Xsplice test tool\n"
-            "Usage: xen-xsplice <command> [args]\n"
+            "xen-livepatch: live patching test tool\n"
+            "Usage: xen-livepatch <command> [args]\n"
             " <name> An unique name of payload. Up to %d characters.\n"
             "Commands:\n"
             "  help                   display this help\n"
@@ -33,7 +33,7 @@ void show_help(void)
             "  unload <name>          unload name <name> patch.\n"
             "  load  <file>           upload and apply <file>.\n"
             "                         name is the <file> name\n",
-            XEN_XSPLICE_NAME_SIZE);
+            XEN_LIVE_PATCH_NAME_SIZE);
 }
 
 /* wrapper function */
@@ -47,7 +47,7 @@ static int help_func(int argc, char *argv[])
 
 static const char *state2str(unsigned int state)
 {
-#define STATE(x) [XSPLICE_STATE_##x] = #x
+#define STATE(x) [LIVE_PATCH_STATE_##x] = #x
     static const char *const names[] = {
             STATE(CHECKED),
             STATE(APPLIED),
@@ -64,7 +64,7 @@ static const char *state2str(unsigned int state)
 static int list_func(int argc, char *argv[])
 {
     unsigned int idx, done, left, i;
-    xen_xsplice_status_t *info = NULL;
+    xen_livepatch_status_t *info = NULL;
     char *name = NULL;
     uint32_t *len = NULL;
     int rc = ENOMEM;
@@ -78,7 +78,7 @@ static int list_func(int argc, char *argv[])
     info = malloc(sizeof(*info) * MAX_LEN);
     if ( !info )
         return rc;
-    name = malloc(sizeof(*name) * XEN_XSPLICE_NAME_SIZE * MAX_LEN);
+    name = malloc(sizeof(*name) * XEN_LIVE_PATCH_NAME_SIZE * MAX_LEN);
     if ( !name )
     {
         free(info);
@@ -97,9 +97,9 @@ static int list_func(int argc, char *argv[])
         done = 0;
         /* The memset is done to catch errors. */
         memset(info, 'A', sizeof(*info) * MAX_LEN);
-        memset(name, 'B', sizeof(*name) * MAX_LEN * XEN_XSPLICE_NAME_SIZE);
+        memset(name, 'B', sizeof(*name) * MAX_LEN * XEN_LIVE_PATCH_NAME_SIZE);
         memset(len, 'C', sizeof(*len) * MAX_LEN);
-        rc = xc_xsplice_list(xch, MAX_LEN, idx, info, name, len, &done, &left);
+        rc = xc_livepatch_list(xch, MAX_LEN, idx, info, name, len, &done, 
&left);
         if ( rc )
         {
             fprintf(stderr, "Failed to list %d/%d: %d(%s)!\n",
@@ -113,8 +113,8 @@ static int list_func(int argc, char *argv[])
             char *str;
 
             sz = len[i];
-            str = name + (i * XEN_XSPLICE_NAME_SIZE);
-            for ( j = sz; j < XEN_XSPLICE_NAME_SIZE; j++ )
+            str = name + (i * XEN_LIVE_PATCH_NAME_SIZE);
+            for ( j = sz; j < XEN_LIVE_PATCH_NAME_SIZE; j++ )
                 str[j] = '\0';
 
             printf("%-40s| %s", str, state2str(info[i].state));
@@ -136,14 +136,14 @@ static int list_func(int argc, char *argv[])
 static int get_name(int argc, char *argv[], char *name)
 {
     ssize_t len = strlen(argv[0]);
-    if ( len > XEN_XSPLICE_NAME_SIZE )
+    if ( len > XEN_LIVE_PATCH_NAME_SIZE )
     {
-        fprintf(stderr, "ID MUST be %d characters!\n", XEN_XSPLICE_NAME_SIZE);
+        fprintf(stderr, "ID MUST be %d characters!\n", 
XEN_LIVE_PATCH_NAME_SIZE);
         errno = EINVAL;
         return errno;
     }
     /* Don't want any funny strings from the stack. */
-    memset(name, 0, XEN_XSPLICE_NAME_SIZE);
+    memset(name, 0, XEN_LIVE_PATCH_NAME_SIZE);
     strncpy(name, argv[0], len);
     return 0;
 }
@@ -151,7 +151,7 @@ static int get_name(int argc, char *argv[], char *name)
 static int upload_func(int argc, char *argv[])
 {
     char *filename;
-    char name[XEN_XSPLICE_NAME_SIZE];
+    char name[XEN_LIVE_PATCH_NAME_SIZE];
     int fd = 0, rc;
     struct stat buf;
     unsigned char *fbuf;
@@ -192,7 +192,7 @@ static int upload_func(int argc, char *argv[])
         return errno;
     }
     printf("Uploading %s (%zu bytes)\n", filename, len);
-    rc = xc_xsplice_upload(xch, name, fbuf, len);
+    rc = xc_livepatch_upload(xch, name, fbuf, len);
     if ( rc )
         fprintf(stderr, "Upload failed: %s, error: %d(%s)!\n",
                 filename, errno, strerror(errno));
@@ -224,25 +224,25 @@ struct {
     int (*function)(xc_interface *xch, char *name, uint32_t timeout);
     unsigned int executed; /* Has the function been called?. */
 } action_options[] = {
-    {   .allow = XSPLICE_STATE_CHECKED,
-        .expected = XSPLICE_STATE_APPLIED,
+    {   .allow = LIVE_PATCH_STATE_CHECKED,
+        .expected = LIVE_PATCH_STATE_APPLIED,
         .name = "apply",
-        .function = xc_xsplice_apply,
+        .function = xc_livepatch_apply,
     },
-    {   .allow = XSPLICE_STATE_APPLIED,
-        .expected = XSPLICE_STATE_CHECKED,
+    {   .allow = LIVE_PATCH_STATE_APPLIED,
+        .expected = LIVE_PATCH_STATE_CHECKED,
         .name = "revert",
-        .function = xc_xsplice_revert,
+        .function = xc_livepatch_revert,
     },
-    {   .allow = XSPLICE_STATE_CHECKED,
+    {   .allow = LIVE_PATCH_STATE_CHECKED,
         .expected = -XEN_ENOENT,
         .name = "unload",
-        .function = xc_xsplice_unload,
+        .function = xc_livepatch_unload,
     },
-    {   .allow = XSPLICE_STATE_CHECKED,
-        .expected = XSPLICE_STATE_APPLIED,
+    {   .allow = LIVE_PATCH_STATE_CHECKED,
+        .expected = LIVE_PATCH_STATE_APPLIED,
         .name = "replace",
-        .function = xc_xsplice_replace,
+        .function = xc_livepatch_replace,
     },
 };
 
@@ -253,9 +253,9 @@ struct {
 
 int action_func(int argc, char *argv[], unsigned int idx)
 {
-    char name[XEN_XSPLICE_NAME_SIZE];
+    char name[XEN_LIVE_PATCH_NAME_SIZE];
     int rc, original_state;
-    xen_xsplice_status_t status;
+    xen_livepatch_status_t status;
     unsigned int retry = 0;
 
     if ( argc != 1 )
@@ -271,7 +271,7 @@ int action_func(int argc, char *argv[], unsigned int idx)
         return EINVAL;
 
     /* Check initial status. */
-    rc = xc_xsplice_get(xch, name, &status);
+    rc = xc_livepatch_get(xch, name, &status);
     if ( rc )
     {
         fprintf(stderr, "%s failed to get status %d(%s)!\n",
@@ -312,7 +312,7 @@ int action_func(int argc, char *argv[], unsigned int idx)
 
     original_state = status.state;
     do {
-        rc = xc_xsplice_get(xch, name, &status);
+        rc = xc_livepatch_get(xch, name, &status);
         if ( rc )
         {
             rc = -errno;
@@ -432,7 +432,7 @@ int main(int argc, char *argv[])
         if ( j == ARRAY_SIZE(action_options) )
         {
             fprintf(stderr, "Unrecognised command '%s' -- try "
-                   "'xen-xsplice help'\n", argv[1]);
+                   "'xen-livepatch help'\n", argv[1]);
             return 1;
         }
     } else
diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index ead0cc0..7af3140 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -40,7 +40,7 @@ obj-y += device.o
 obj-y += decode.o
 obj-y += processor.o
 obj-y += smc.o
-obj-$(CONFIG_XSPLICE) += xsplice.o
+obj-$(CONFIG_LIVE_PATCH) += livepatch.o
 
 #obj-bin-y += ....o
 
diff --git a/xen/arch/arm/livepatch.c b/xen/arch/arm/livepatch.c
new file mode 100644
index 0000000..cfae6dd
--- /dev/null
+++ b/xen/arch/arm/livepatch.c
@@ -0,0 +1,79 @@
+/*
+ *  Copyright (C) 2016 Citrix Systems R&D Ltd.
+ */
+#include <xen/errno.h>
+#include <xen/init.h>
+#include <xen/lib.h>
+#include <xen/livepatch_elf.h>
+#include <xen/livepatch.h>
+
+void arch_livepatching_enter(void)
+{
+}
+
+void arch_livepatching_leave(void)
+{
+}
+
+int arch_livepatch_verify_func(const struct livepatch_func *func)
+{
+    return -ENOSYS;
+}
+
+void arch_livepatch_apply_jmp(struct livepatch_func *func)
+{
+}
+
+void arch_livepatch_revert_jmp(const struct livepatch_func *func)
+{
+}
+
+void arch_livepatch_post_action(void)
+{
+}
+
+void arch_livepatch_mask(void)
+{
+}
+
+void arch_livepatch_unmask(void)
+{
+}
+
+int arch_livepatch_verify_elf(const struct livepatch_elf *elf)
+{
+    return -ENOSYS;
+}
+
+int arch_livepatch_perform_rel(struct livepatch_elf *elf,
+                               const struct livepatch_elf_sec *base,
+                               const struct livepatch_elf_sec *rela)
+{
+    return -ENOSYS;
+}
+
+int arch_livepatch_perform_rela(struct livepatch_elf *elf,
+                                const struct livepatch_elf_sec *base,
+                                const struct livepatch_elf_sec *rela)
+{
+    return -ENOSYS;
+}
+
+int arch_livepatch_secure(const void *va, unsigned int pages, enum va_type 
type)
+{
+    return -ENOSYS;
+}
+
+void __init arch_livepatch_init(void)
+{
+}
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/arch/arm/xsplice.c b/xen/arch/arm/xsplice.c
deleted file mode 100644
index db0dce2..0000000
--- a/xen/arch/arm/xsplice.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *  Copyright (C) 2016 Citrix Systems R&D Ltd.
- */
-#include <xen/errno.h>
-#include <xen/init.h>
-#include <xen/lib.h>
-#include <xen/xsplice_elf.h>
-#include <xen/xsplice.h>
-
-void arch_xsplice_patching_enter(void)
-{
-}
-
-void arch_xsplice_patching_leave(void)
-{
-}
-
-int arch_xsplice_verify_func(const struct xsplice_patch_func *func)
-{
-    return -ENOSYS;
-}
-
-void arch_xsplice_apply_jmp(struct xsplice_patch_func *func)
-{
-}
-
-void arch_xsplice_revert_jmp(const struct xsplice_patch_func *func)
-{
-}
-
-void arch_xsplice_post_action(void)
-{
-}
-
-void arch_xsplice_mask(void)
-{
-}
-
-void arch_xsplice_unmask(void)
-{
-}
-
-int arch_xsplice_verify_elf(const struct xsplice_elf *elf)
-{
-    return -ENOSYS;
-}
-
-int arch_xsplice_perform_rel(struct xsplice_elf *elf,
-                             const struct xsplice_elf_sec *base,
-                             const struct xsplice_elf_sec *rela)
-{
-    return -ENOSYS;
-}
-
-int arch_xsplice_perform_rela(struct xsplice_elf *elf,
-                              const struct xsplice_elf_sec *base,
-                              const struct xsplice_elf_sec *rela)
-{
-    return -ENOSYS;
-}
-
-int arch_xsplice_secure(const void *va, unsigned int pages, enum va_type type)
-{
-    return -ENOSYS;
-}
-
-void __init arch_xsplice_init(void)
-{
-}
-
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: nil
- * End:
- */
diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 4665a68..5023e79 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -7,7 +7,7 @@ subdir-$(CONFIG_XENOPROF) += oprofile
 subdir-y += x86_64
 
 alternative-y := alternative.init.o
-alternative-$(CONFIG_XSPLICE) :=
+alternative-$(CONFIG_LIVE_PATCH) :=
 obj-bin-y += $(alternative-y)
 obj-y += apic.o
 obj-y += bitops.o
@@ -30,6 +30,7 @@ obj-y += flushtlb.o
 obj-y += i387.o
 obj-y += i8259.o
 obj-y += io_apic.o
+obj-$(CONFIG_LIVE_PATCH) += alternative.o livepatch.o
 obj-y += msi.o
 obj-y += ioport_emulate.o
 obj-y += irq.o
@@ -63,7 +64,6 @@ obj-y += x86_emulate.o
 obj-y += tboot.o
 obj-y += hpet.o
 obj-y += vm_event.o
-obj-$(CONFIG_XSPLICE) += alternative.o xsplice.o
 obj-y += xstate.o
 
 obj-$(crash_debug) += gdbstub.o
@@ -80,7 +80,7 @@ else
 notes_phdrs =
 endif
 
-ifdef CONFIG_XSPLICE
+ifdef CONFIG_LIVE_PATCH
 all_symbols = --all-symbols
 ifdef CONFIG_FAST_SYMBOL_LOOKUP
 all_symbols = --all-symbols --sort-by-name
@@ -95,7 +95,7 @@ $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32
 
 .PHONY: tests
 tests:
-       $(MAKE) -f $(BASEDIR)/Rules.mk -C test xsplice
+       $(MAKE) -f $(BASEDIR)/Rules.mk -C test livepatch
 
 ALL_OBJS := $(BASEDIR)/arch/x86/boot/built_in.o 
$(BASEDIR)/arch/x86/efi/built_in.o $(ALL_OBJS)
 
diff --git a/xen/arch/x86/alternative.c b/xen/arch/x86/alternative.c
index c188a15..be40b13 100644
--- a/xen/arch/x86/alternative.c
+++ b/xen/arch/x86/alternative.c
@@ -22,14 +22,14 @@
 #include <asm/system.h>
 #include <asm/traps.h>
 #include <asm/nmi.h>
-#include <xen/xsplice.h>
+#include <xen/livepatch.h>
 
 #define MAX_PATCH_LEN (255-1)
 
 extern struct alt_instr __alt_instructions[], __alt_instructions_end[];
 
 #ifdef K8_NOP1
-static const unsigned char k8nops[] init_or_xsplice_const = {
+static const unsigned char k8nops[] init_or_livepatch_const = {
     K8_NOP1,
     K8_NOP2,
     K8_NOP3,
@@ -39,7 +39,7 @@ static const unsigned char k8nops[] init_or_xsplice_const = {
     K8_NOP7,
     K8_NOP8
 };
-static const unsigned char * const k8_nops[ASM_NOP_MAX+1] 
init_or_xsplice_constrel = {
+static const unsigned char * const k8_nops[ASM_NOP_MAX+1] 
init_or_livepatch_constrel = {
     NULL,
     k8nops,
     k8nops + 1,
@@ -53,7 +53,7 @@ static const unsigned char * const k8_nops[ASM_NOP_MAX+1] 
init_or_xsplice_constr
 #endif
 
 #ifdef P6_NOP1
-static const unsigned char p6nops[] init_or_xsplice_const = {
+static const unsigned char p6nops[] init_or_livepatch_const = {
     P6_NOP1,
     P6_NOP2,
     P6_NOP3,
@@ -63,7 +63,7 @@ static const unsigned char p6nops[] init_or_xsplice_const = {
     P6_NOP7,
     P6_NOP8
 };
-static const unsigned char * const p6_nops[ASM_NOP_MAX+1] 
init_or_xsplice_constrel = {
+static const unsigned char * const p6_nops[ASM_NOP_MAX+1] 
init_or_livepatch_constrel = {
     NULL,
     p6nops,
     p6nops + 1,
@@ -76,7 +76,7 @@ static const unsigned char * const p6_nops[ASM_NOP_MAX+1] 
init_or_xsplice_constr
 };
 #endif
 
-static const unsigned char * const *ideal_nops init_or_xsplice_data = k8_nops;
+static const unsigned char * const *ideal_nops init_or_livepatch_data = 
k8_nops;
 
 static int __init mask_nmi_callback(const struct cpu_user_regs *regs, int cpu)
 {
@@ -101,7 +101,7 @@ static void __init arch_init_ideal_nops(void)
 }
 
 /* Use this to add nops to a buffer, then text_poke the whole buffer. */
-static void init_or_xsplice add_nops(void *insns, unsigned int len)
+static void init_or_livepatch add_nops(void *insns, unsigned int len)
 {
     while ( len > 0 )
     {
@@ -129,7 +129,7 @@ static void init_or_xsplice add_nops(void *insns, unsigned 
int len)
  * You should run this with interrupts disabled or on code that is not
  * executing.
  */
-static void *init_or_xsplice text_poke(void *addr, const void *opcode, size_t 
len)
+static void *init_or_livepatch text_poke(void *addr, const void *opcode, 
size_t len)
 {
     memcpy(addr, opcode, len);
     sync_core();
@@ -144,7 +144,7 @@ static void *init_or_xsplice text_poke(void *addr, const 
void *opcode, size_t le
  * APs have less capabilities than the boot processor are not handled.
  * Tough. Make sure you disable such features by hand.
  */
-void init_or_xsplice apply_alternatives_nocheck(struct alt_instr *start, 
struct alt_instr *end)
+void init_or_livepatch apply_alternatives_nocheck(struct alt_instr *start, 
struct alt_instr *end)
 {
     struct alt_instr *a;
     u8 *instr, *replacement;
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 5af2cc5..f2d7f47 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -36,7 +36,7 @@
 #include <xen/cpu.h>
 #include <xen/wait.h>
 #include <xen/guest_access.h>
-#include <xen/xsplice.h>
+#include <xen/livepatch.h>
 #include <public/sysctl.h>
 #include <public/hvm/hvm_vcpu.h>
 #include <asm/regs.h>
@@ -125,7 +125,7 @@ static void idle_loop(void)
          * We MUST be last (or before pm_idle). Otherwise after we get the
          * softirq we would execute pm_idle (and sleep) and not patch.
          */
-        check_for_xsplice_work();
+        check_for_livepatch_work();
     }
 }
 
diff --git a/xen/arch/x86/extable.c b/xen/arch/x86/extable.c
index 349df79..701441a 100644
--- a/xen/arch/x86/extable.c
+++ b/xen/arch/x86/extable.c
@@ -7,7 +7,7 @@
 #include <xen/spinlock.h>
 #include <asm/uaccess.h>
 #include <xen/virtual_region.h>
-#include <xen/xsplice.h>
+#include <xen/livepatch.h>
 
 #define EX_FIELD(ptr, field) ((unsigned long)&(ptr)->field + (ptr)->field)
 
@@ -21,7 +21,7 @@ static inline unsigned long ex_cont(const struct 
exception_table_entry *x)
        return EX_FIELD(x, cont);
 }
 
-static int init_or_xsplice cmp_ex(const void *a, const void *b)
+static int init_or_livepatch cmp_ex(const void *a, const void *b)
 {
        const struct exception_table_entry *l = a, *r = b;
        unsigned long lip = ex_addr(l);
@@ -36,7 +36,7 @@ static int init_or_xsplice cmp_ex(const void *a, const void 
*b)
 }
 
 #ifndef swap_ex
-static void init_or_xsplice swap_ex(void *a, void *b, int size)
+static void init_or_livepatch swap_ex(void *a, void *b, int size)
 {
        struct exception_table_entry *l = a, *r = b, tmp;
        long delta = b - a;
@@ -49,7 +49,7 @@ static void init_or_xsplice swap_ex(void *a, void *b, int 
size)
 }
 #endif
 
-void init_or_xsplice sort_exception_table(struct exception_table_entry *start,
+void init_or_livepatch sort_exception_table(struct exception_table_entry 
*start,
                                  const struct exception_table_entry *stop)
 {
     sort(start, stop - start,
diff --git a/xen/arch/x86/xsplice.c b/xen/arch/x86/livepatch.c
similarity index 74%
rename from xen/arch/x86/xsplice.c
rename to xen/arch/x86/livepatch.c
index ff1346c..f3a068d 100644
--- a/xen/arch/x86/xsplice.c
+++ b/xen/arch/x86/livepatch.c
@@ -5,29 +5,29 @@
 #include <xen/errno.h>
 #include <xen/init.h>
 #include <xen/lib.h>
+#include <xen/livepatch_elf.h>
+#include <xen/livepatch.h>
 #include <xen/mm.h>
 #include <xen/pfn.h>
 #include <xen/vmap.h>
-#include <xen/xsplice_elf.h>
-#include <xen/xsplice.h>
 
 #include <asm/nmi.h>
 
 #define PATCH_INSN_SIZE 5
 
-void arch_xsplice_patching_enter(void)
+void arch_livepatching_enter(void)
 {
     /* Disable WP to allow changes to read-only pages. */
     write_cr0(read_cr0() & ~X86_CR0_WP);
 }
 
-void arch_xsplice_patching_leave(void)
+void arch_livepatching_leave(void)
 {
     /* Reinstate WP. */
     write_cr0(read_cr0() | X86_CR0_WP);
 }
 
-int arch_xsplice_verify_func(const struct xsplice_patch_func *func)
+int arch_livepatch_verify_func(const struct livepatch_func *func)
 {
     /* No NOP patching yet. */
     if ( !func->new_size )
@@ -39,7 +39,7 @@ int arch_xsplice_verify_func(const struct xsplice_patch_func 
*func)
     return 0;
 }
 
-void arch_xsplice_apply_jmp(struct xsplice_patch_func *func)
+void arch_livepatch_apply_jmp(struct livepatch_func *func)
 {
     int32_t val;
     uint8_t *old_ptr;
@@ -55,13 +55,13 @@ void arch_xsplice_apply_jmp(struct xsplice_patch_func *func)
     memcpy(old_ptr, &val, sizeof(val));
 }
 
-void arch_xsplice_revert_jmp(const struct xsplice_patch_func *func)
+void arch_livepatch_revert_jmp(const struct livepatch_func *func)
 {
     memcpy(func->old_addr, func->opaque, PATCH_INSN_SIZE);
 }
 
 /* Serialise the CPU pipeline. */
-void arch_xsplice_post_action(void)
+void arch_livepatch_post_action(void)
 {
     cpuid_eax(0);
 }
@@ -77,17 +77,17 @@ static int mask_nmi_callback(const struct cpu_user_regs 
*regs, int cpu)
     return 1;
 }
 
-void arch_xsplice_mask(void)
+void arch_livepatch_mask(void)
 {
     saved_nmi_callback = set_nmi_callback(mask_nmi_callback);
 }
 
-void arch_xsplice_unmask(void)
+void arch_livepatch_unmask(void)
 {
     set_nmi_callback(saved_nmi_callback);
 }
 
-int arch_xsplice_verify_elf(const struct xsplice_elf *elf)
+int arch_livepatch_verify_elf(const struct livepatch_elf *elf)
 {
 
     const Elf_Ehdr *hdr = elf->hdr;
@@ -96,7 +96,7 @@ int arch_xsplice_verify_elf(const struct xsplice_elf *elf)
          hdr->e_ident[EI_CLASS] != ELFCLASS64 ||
          hdr->e_ident[EI_DATA] != ELFDATA2LSB )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Unsupported ELF Machine type!\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Unsupported ELF Machine type!\n",
                 elf->name);
         return -EOPNOTSUPP;
     }
@@ -104,18 +104,18 @@ int arch_xsplice_verify_elf(const struct xsplice_elf *elf)
     return 0;
 }
 
-int arch_xsplice_perform_rel(struct xsplice_elf *elf,
-                             const struct xsplice_elf_sec *base,
-                             const struct xsplice_elf_sec *rela)
+int arch_livepatch_perform_rel(struct livepatch_elf *elf,
+                               const struct livepatch_elf_sec *base,
+                               const struct livepatch_elf_sec *rela)
 {
-    dprintk(XENLOG_ERR, XSPLICE "%s: SHT_REL relocation unsupported\n",
+    dprintk(XENLOG_ERR, LIVE_PATCH "%s: SHT_REL relocation unsupported\n",
             elf->name);
     return -EOPNOTSUPP;
 }
 
-int arch_xsplice_perform_rela(struct xsplice_elf *elf,
-                              const struct xsplice_elf_sec *base,
-                              const struct xsplice_elf_sec *rela)
+int arch_livepatch_perform_rela(struct livepatch_elf *elf,
+                                const struct livepatch_elf_sec *base,
+                                const struct livepatch_elf_sec *rela)
 {
     const Elf_RelA *r;
     unsigned int symndx, i;
@@ -129,7 +129,7 @@ int arch_xsplice_perform_rela(struct xsplice_elf *elf,
     if ( rela->sec->sh_entsize < sizeof(Elf_RelA) ||
          rela->sec->sh_size % rela->sec->sh_entsize )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Section relative header is 
corrupted!\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Section relative header is 
corrupted!\n",
                 elf->name);
         return -EINVAL;
     }
@@ -142,7 +142,7 @@ int arch_xsplice_perform_rela(struct xsplice_elf *elf,
 
         if ( symndx > elf->nsym )
         {
-            dprintk(XENLOG_ERR, XSPLICE "%s: Relative relocation wants 
symbol@%u which is past end!\n",
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: Relative relocation wants 
symbol@%u which is past end!\n",
                     elf->name, symndx);
             return -EINVAL;
         }
@@ -181,14 +181,14 @@ int arch_xsplice_perform_rela(struct xsplice_elf *elf,
             *(int32_t *)dest = val;
             if ( (int64_t)val != *(int32_t *)dest )
             {
-                dprintk(XENLOG_ERR, XSPLICE "%s: Overflow in relocation %u in 
%s for %s!\n",
+                dprintk(XENLOG_ERR, LIVE_PATCH "%s: Overflow in relocation %u 
in %s for %s!\n",
                         elf->name, i, rela->name, base->name);
                 return -EOVERFLOW;
             }
             break;
 
         default:
-            dprintk(XENLOG_ERR, XSPLICE "%s: Unhandled relocation %lu\n",
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: Unhandled relocation %lu\n",
                     elf->name, ELF64_R_TYPE(r->r_info));
             return -EOPNOTSUPP;
         }
@@ -197,7 +197,7 @@ int arch_xsplice_perform_rela(struct xsplice_elf *elf,
     return 0;
 
  bad_offset:
-    dprintk(XENLOG_ERR, XSPLICE "%s: Relative relocation offset is past %s 
section!\n",
+    dprintk(XENLOG_ERR, LIVE_PATCH "%s: Relative relocation offset is past %s 
section!\n",
             elf->name, base->name);
     return -EINVAL;
 }
@@ -207,7 +207,7 @@ int arch_xsplice_perform_rela(struct xsplice_elf *elf,
  * we secure the memory by putting in the proper page table attributes
  * for the desired type.
  */
-int arch_xsplice_secure(const void *va, unsigned int pages, enum va_type type)
+int arch_livepatch_secure(const void *va, unsigned int pages, enum va_type 
type)
 {
     unsigned long start = (unsigned long)va;
     unsigned int flag;
@@ -215,9 +215,9 @@ int arch_xsplice_secure(const void *va, unsigned int pages, 
enum va_type type)
     ASSERT(va);
     ASSERT(pages);
 
-    if ( type == XSPLICE_VA_RX )
+    if ( type == LIVE_PATCH_VA_RX )
         flag = PAGE_HYPERVISOR_RX;
-    else if ( type == XSPLICE_VA_RW )
+    else if ( type == LIVE_PATCH_VA_RW )
         flag = PAGE_HYPERVISOR_RW;
     else
         flag = PAGE_HYPERVISOR_RO;
@@ -227,7 +227,7 @@ int arch_xsplice_secure(const void *va, unsigned int pages, 
enum va_type type)
     return 0;
 }
 
-void __init arch_xsplice_init(void)
+void __init arch_livepatch_init(void)
 {
     void *start, *end;
 
diff --git a/xen/arch/x86/test/Makefile b/xen/arch/x86/test/Makefile
index a9d43a1..0934e1b 100644
--- a/xen/arch/x86/test/Makefile
+++ b/xen/arch/x86/test/Makefile
@@ -5,24 +5,24 @@ CODE_SZ=$(shell nm --defined -S $(1) | grep $(2) | awk '{ 
print "0x"$$2}')
 
 .PHONY: default
 
-XSPLICE := xen_hello_world.xsplice
-XSPLICE_BYE := xen_bye_world.xsplice
-XSPLICE_REPLACE := xen_replace_world.xsplice
+LIVE_PATCH := xen_hello_world.xlivepatch
+LIVE_PATCH_BYE := xen_bye_world.xlivepatch
+LIVE_PATCH_REPLACE := xen_replace_world.xlivepatch
 
-default: xsplice
+default: livepatch
 
-install: xsplice
-       $(INSTALL_DATA) $(XSPLICE) $(DESTDIR)$(DEBUG_DIR)/$(XSPLICE)
-       $(INSTALL_DATA) $(XSPLICE_BYE) $(DESTDIR)$(DEBUG_DIR)/$(XSPLICE_BYE)
-       $(INSTALL_DATA) $(XSPLICE_REPLACE) 
$(DESTDIR)$(DEBUG_DIR)/$(XSPLICE_REPLACE)
+install: livepatch
+       $(INSTALL_DATA) $(LIVE_PATCH) $(DESTDIR)$(DEBUG_DIR)/$(LIVE_PATCH)
+       $(INSTALL_DATA) $(LIVE_PATCH_BYE) 
$(DESTDIR)$(DEBUG_DIR)/$(LIVE_PATCH_BYE)
+       $(INSTALL_DATA) $(LIVE_PATCH_REPLACE) 
$(DESTDIR)$(DEBUG_DIR)/$(LIVE_PATCH_REPLACE)
 uninstall:
-       rm -f $(DESTDIR)$(DEBUG_DIR)/$(XSPLICE)
-       rm -f $(DESTDIR)$(DEBUG_DIR)/$(XSPLICE_BYE)
-       rm -f $(DESTDIR)$(DEBUG_DIR)/$(XSPLICE_REPLACE)
+       rm -f $(DESTDIR)$(DEBUG_DIR)/$(LIVE_PATCH)
+       rm -f $(DESTDIR)$(DEBUG_DIR)/$(LIVE_PATCH_BYE)
+       rm -f $(DESTDIR)$(DEBUG_DIR)/$(LIVE_PATCH_REPLACE)
 
 .PHONY: clean
 clean::
-       rm -f *.o .*.o.d *.xsplice config.h
+       rm -f *.o .*.o.d *.livepatch config.h
 
 #
 # To compute these values we need the binary files: xen-syms
@@ -38,12 +38,12 @@ config.h: xen_hello_world_func.o
 
 xen_hello_world.o: config.h
 
-.PHONY: $(XSPLICE)
-$(XSPLICE): xen_hello_world_func.o xen_hello_world.o note.o
-       $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(XSPLICE) $^
+.PHONY: $(LIVE_PATCH)
+$(LIVE_PATCH): xen_hello_world_func.o xen_hello_world.o note.o
+       $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVE_PATCH) $^
 
 #
-# This target is only accessible if CONFIG_XSPLICE is defined, which
+# This target is only accessible if CONFIG_LIVE_PATCH is defined, which
 # depends on $(build_id_linker) being available. Hence we do not
 # need any checks.
 #
@@ -55,31 +55,31 @@ $(XSPLICE): xen_hello_world_func.o xen_hello_world.o note.o
 note.o:
        $(OBJCOPY) -O binary --only-section=.note.gnu.build-id 
$(BASEDIR)/xen-syms $@.bin
        $(OBJCOPY) -I binary -O elf64-x86-64 -B i386:x86-64 \
-                  --rename-section=.data=.xsplice.depends -S $@.bin $@
+                  --rename-section=.data=.livepatch.depends -S $@.bin $@
        rm -f $@.bin
 
 #
-# Extract the build-id of the xen_hello_world.xsplice
+# Extract the build-id of the xen_hello_world.livepatch
 # (which xen_bye_world will depend on).
 #
 .PHONY: hello_world_note.o
-hello_world_note.o: $(XSPLICE)
-       $(OBJCOPY) -O binary --only-section=.note.gnu.build-id $(XSPLICE) $@.bin
+hello_world_note.o: $(LIVE_PATCH)
+       $(OBJCOPY) -O binary --only-section=.note.gnu.build-id $(LIVE_PATCH) 
$@.bin
        $(OBJCOPY)  -I binary -O elf64-x86-64 -B i386:x86-64 \
-                  --rename-section=.data=.xsplice.depends -S $@.bin $@
+                  --rename-section=.data=.livepatch.depends -S $@.bin $@
        rm -f $@.bin
 
 xen_bye_world.o: config.h
 
-.PHONY: $(XSPLICE_BYE)
-$(XSPLICE_BYE): xen_bye_world_func.o xen_bye_world.o hello_world_note.o
-       $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(XSPLICE_BYE) $^
+.PHONY: $(LIVE_PATCH_BYE)
+$(LIVE_PATCH_BYE): xen_bye_world_func.o xen_bye_world.o hello_world_note.o
+       $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVE_PATCH_BYE) $^
 
 xen_replace_world.o: config.h
 
-.PHONY: $(XSPLICE_REPLACE)
-$(XSPLICE_REPLACE): xen_replace_world_func.o xen_replace_world.o note.o
-       $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(XSPLICE_REPLACE) $^
+.PHONY: $(LIVE_PATCH_REPLACE)
+$(LIVE_PATCH_REPLACE): xen_replace_world_func.o xen_replace_world.o note.o
+       $(LD) $(LDFLAGS) $(build_id_linker) -r -o $(LIVE_PATCH_REPLACE) $^
 
-.PHONY: xsplice
-xsplice: $(XSPLICE) $(XSPLICE_BYE) $(XSPLICE_REPLACE)
+.PHONY: livepatch
+livepatch: $(LIVE_PATCH) $(LIVE_PATCH_BYE) $(LIVE_PATCH_REPLACE)
diff --git a/xen/arch/x86/test/xen_bye_world.c 
b/xen/arch/x86/test/xen_bye_world.c
index f93f969..fa4b005 100644
--- a/xen/arch/x86/test/xen_bye_world.c
+++ b/xen/arch/x86/test/xen_bye_world.c
@@ -5,17 +5,17 @@
 
 #include "config.h"
 #include <xen/lib.h>
+#include <xen/livepatch.h>
 #include <xen/types.h>
 #include <xen/version.h>
-#include <xen/xsplice.h>
 
 #include <public/sysctl.h>
 
 static char bye_world_patch_this_fnc[] = "xen_extra_version";
 extern const char *xen_bye_world(void);
 
-struct xsplice_patch_func __section(".xsplice.funcs") xsplice_xen_bye_world = {
-    .version = XSPLICE_PAYLOAD_VERSION,
+struct livepatch_func __section(".livepatch.funcs") livepatch_xen_bye_world = {
+    .version = LIVE_PATCH_PAYLOAD_VERSION,
     .name = bye_world_patch_this_fnc,
     .new_addr = xen_bye_world,
     .old_addr = xen_extra_version,
diff --git a/xen/arch/x86/test/xen_hello_world.c 
b/xen/arch/x86/test/xen_hello_world.c
index 8afd66e..057e962 100644
--- a/xen/arch/x86/test/xen_hello_world.c
+++ b/xen/arch/x86/test/xen_hello_world.c
@@ -6,15 +6,15 @@
 #include "config.h"
 #include <xen/types.h>
 #include <xen/version.h>
-#include <xen/xsplice.h>
+#include <xen/livepatch.h>
 
 #include <public/sysctl.h>
 
 static char hello_world_patch_this_fnc[] = "xen_extra_version";
 extern const char *xen_hello_world(void);
 
-struct xsplice_patch_func __section(".xsplice.funcs") xsplice_xen_hello_world 
= {
-    .version = XSPLICE_PAYLOAD_VERSION,
+struct livepatch_func __section(".livepatch.funcs") livepatch_xen_hello_world 
= {
+    .version = LIVE_PATCH_PAYLOAD_VERSION,
     .name = hello_world_patch_this_fnc,
     .new_addr = xen_hello_world,
     .old_addr = xen_extra_version,
diff --git a/xen/arch/x86/test/xen_replace_world.c 
b/xen/arch/x86/test/xen_replace_world.c
index fab2841..2b98829 100644
--- a/xen/arch/x86/test/xen_replace_world.c
+++ b/xen/arch/x86/test/xen_replace_world.c
@@ -5,16 +5,16 @@
 
 #include "config.h"
 #include <xen/lib.h>
+#include <xen/livepatch.h>
 #include <xen/types.h>
-#include <xen/xsplice.h>
 
 #include <public/sysctl.h>
 
 static char xen_replace_world_name[] = "xen_extra_version";
 extern const char *xen_replace_world(void);
 
-struct xsplice_patch_func __section(".xsplice.funcs") 
xsplice_xen_replace_world = {
-    .version = XSPLICE_PAYLOAD_VERSION,
+struct livepatch_func __section(".livepatch.funcs") 
livepatch_xen_replace_world = {
+    .version = LIVE_PATCH_PAYLOAD_VERSION,
     .name = xen_replace_world_name,
     .old_addr = 0, /* Forces the hypervisor to lookup .name */
     .new_addr = xen_replace_world,
diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 1ef8401..7160340 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -50,7 +50,7 @@
 #include <xen/paging.h>
 #include <xen/virtual_region.h>
 #include <xen/watchdog.h>
-#include <xen/xsplice.h>
+#include <xen/livepatch.h>
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/atomic.h>
diff --git a/xen/common/Kconfig b/xen/common/Kconfig
index 91ea904..f430f05 100644
--- a/xen/common/Kconfig
+++ b/xen/common/Kconfig
@@ -192,9 +192,9 @@ config SCHED_DEFAULT
 
 endmenu
 
-# Enable/Disable xsplice support
-config XSPLICE
-       bool "xSplice live patching support (TECH PREVIEW)"
+# Enable/Disable live patching support
+config LIVE_PATCH
+       bool "Live patching support (TECH PREVIEW)"
        default n
        depends on X86 && HAS_BUILD_ID = "y"
        ---help---
@@ -207,13 +207,13 @@ config XSPLICE
 config FAST_SYMBOL_LOOKUP
        bool "Fast symbol lookup (bigger binary)"
        default y
-       depends on XSPLICE
+       depends on LIVE_PATCH
        ---help---
          When searching for symbol addresses we can use the built-in system
          that is optimized for searching symbols using addresses as the key.
          However using it for the inverse (find address using the symbol name)
          it is slow. This extra data and code (~55kB) speeds up the search.
-         The only user of this is xSplice.
+         The only user of this is live patching.
 
          If unsure, say Y.
 endmenu
diff --git a/xen/common/Makefile b/xen/common/Makefile
index afd84b6..75760a4 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -17,6 +17,8 @@ obj-y += keyhandler.o
 obj-$(CONFIG_KEXEC) += kexec.o
 obj-$(CONFIG_KEXEC) += kimage.o
 obj-y += lib.o
+obj-$(CONFIG_LIVE_PATCH) += livepatch.o
+obj-$(CONFIG_LIVE_PATCH) += livepatch_elf.o
 obj-y += lzo.o
 obj-$(CONFIG_HAS_MEM_ACCESS) += mem_access.o
 obj-y += memory.o
@@ -58,8 +60,6 @@ obj-y += vsprintf.o
 obj-y += wait.o
 obj-$(CONFIG_XENOPROF) += xenoprof.o
 obj-y += xmalloc_tlsf.o
-obj-$(CONFIG_XSPLICE) += xsplice.o
-obj-$(CONFIG_XSPLICE) += xsplice_elf.o
 
 obj-bin-$(CONFIG_X86) += $(foreach n,decompress bunzip2 unxz unlzma unlzo 
unlz4 earlycpio,$(n).init.o)
 
diff --git a/xen/common/xsplice.c b/xen/common/livepatch.c
similarity index 75%
rename from xen/common/xsplice.c
rename to xen/common/livepatch.c
index b68875b..2b33cf7 100644
--- a/xen/common/xsplice.c
+++ b/xen/common/livepatch.c
@@ -10,6 +10,8 @@
 #include <xen/keyhandler.h>
 #include <xen/lib.h>
 #include <xen/list.h>
+#include <xen/livepatch_elf.h>
+#include <xen/livepatch.h>
 #include <xen/mm.h>
 #include <xen/sched.h>
 #include <xen/smp.h>
@@ -21,8 +23,6 @@
 #include <xen/virtual_region.h>
 #include <xen/vmap.h>
 #include <xen/wait.h>
-#include <xen/xsplice_elf.h>
-#include <xen/xsplice.h>
 
 #include <asm/event.h>
 
@@ -44,13 +44,13 @@ static unsigned int payload_cnt;
 static unsigned int payload_version = 1;
 
 /* To contain the ELF Note header. */
-struct xsplice_build_id {
+struct livepatch_build_id {
    const void *p;
    unsigned int len;
 };
 
 struct payload {
-    uint32_t state;                      /* One of the XSPLICE_STATE_*. */
+    uint32_t state;                      /* One of the LIVE_PATCH_STATE_*. */
     int32_t rc;                          /* 0 or -XEN_EXX. */
     struct list_head list;               /* Linked to 'payload_list'. */
     const void *text_addr;               /* Virtual address of .text. */
@@ -61,44 +61,44 @@ struct payload {
     size_t ro_size;                      /* .. and its size (if any). */
     unsigned int pages;                  /* Total pages for [text,rw,ro]_addr 
*/
     struct list_head applied_list;       /* Linked to 'applied_list'. */
-    struct xsplice_patch_func *funcs;    /* The array of functions to patch. */
+    struct livepatch_func *funcs;        /* The array of functions to patch. */
     unsigned int nfuncs;                 /* Nr of functions to patch. */
-    const struct xsplice_symbol *symtab; /* All symbols. */
+    const struct livepatch_symbol *symtab; /* All symbols. */
     const char *strtab;                  /* Pointer to .strtab. */
     struct virtual_region region;        /* symbol, bug.frame patching and
                                             exception table (x86). */
     unsigned int nsyms;                  /* Nr of entries in .strtab and 
symbols. */
-    struct xsplice_build_id id;          /* ELFNOTE_DESC(.note.gnu.build-id) 
of the payload. */
-    struct xsplice_build_id dep;         /* ELFNOTE_DESC(.xsplice.depends). */
-    char name[XEN_XSPLICE_NAME_SIZE];    /* Name of it. */
+    struct livepatch_build_id id;        /* ELFNOTE_DESC(.note.gnu.build-id) 
of the payload. */
+    struct livepatch_build_id dep;       /* ELFNOTE_DESC(.livepatch.depends). 
*/
+    char name[XEN_LIVE_PATCH_NAME_SIZE]; /* Name of it. */
 };
 
 /* Defines an outstanding patching action. */
-struct xsplice_work
+struct livepatch_work
 {
     atomic_t semaphore;          /* Used to rendezvous CPUs in
-                                    check_for_xsplice_work. */
+                                    check_for_livepatch_work. */
     uint32_t timeout;            /* Timeout to do the operation. */
     struct payload *data;        /* The payload on which to act. */
     volatile bool_t do_work;     /* Signals work to do. */
     volatile bool_t ready;       /* Signals all CPUs synchronized. */
-    unsigned int cmd;            /* Action request: XSPLICE_ACTION_* */
+    unsigned int cmd;            /* Action request: LIVE_PATCH_ACTION_* */
 };
 
 /* There can be only one outstanding patching action. */
-static struct xsplice_work xsplice_work;
+static struct livepatch_work livepatch_work;
 
 /*
- * Indicate whether the CPU needs to consult xsplice_work structure.
- * We want an per-cpu data structure otherwise the check_for_xsplice_work
- * would hammer a global xsplice_work structure on every guest VMEXIT.
+ * Indicate whether the CPU needs to consult livepatch_work structure.
+ * We want an per-cpu data structure otherwise the check_for_livepatch_work
+ * would hammer a global livepatch_work structure on every guest VMEXIT.
  * Having an per-cpu lessens the load.
  */
 static DEFINE_PER_CPU(bool_t, work_to_do);
 
-static int get_name(const xen_xsplice_name_t *name, char *n)
+static int get_name(const xen_livepatch_name_t *name, char *n)
 {
-    if ( !name->size || name->size > XEN_XSPLICE_NAME_SIZE )
+    if ( !name->size || name->size > XEN_LIVE_PATCH_NAME_SIZE )
         return -EINVAL;
 
     if ( name->pad[0] || name->pad[1] || name->pad[2] )
@@ -113,7 +113,7 @@ static int get_name(const xen_xsplice_name_t *name, char *n)
     return 0;
 }
 
-static int verify_payload(const xen_sysctl_xsplice_upload_t *upload, char *n)
+static int verify_payload(const xen_sysctl_livepatch_upload_t *upload, char *n)
 {
     if ( get_name(&upload->name, n) )
         return -EINVAL;
@@ -159,7 +159,7 @@ bool_t is_patch(const void *ptr)
     return r;
 }
 
-unsigned long xsplice_symbols_lookup_by_name(const char *symname)
+unsigned long livepatch_symbols_lookup_by_name(const char *symname)
 {
     const struct payload *data;
 
@@ -181,10 +181,10 @@ unsigned long xsplice_symbols_lookup_by_name(const char 
*symname)
     return 0;
 }
 
-static const char *xsplice_symbols_lookup(unsigned long addr,
-                                          unsigned long *symbolsize,
-                                          unsigned long *offset,
-                                          char *namebuf)
+static const char *livepatch_symbols_lookup(unsigned long addr,
+                                            unsigned long *symbolsize,
+                                            unsigned long *offset,
+                                            char *namebuf)
 {
     const struct payload *data;
     unsigned int i, best;
@@ -248,8 +248,8 @@ static struct payload *find_payload(const char *name)
 }
 
 /*
- * Functions related to XEN_SYSCTL_XSPLICE_UPLOAD (see xsplice_upload), and
- * freeing payload (XEN_SYSCTL_XSPLICE_ACTION:XSPLICE_ACTION_UNLOAD).
+ * Functions related to XEN_SYSCTL_LIVE_PATCH_UPLOAD (see livepatch_upload), 
and
+ * freeing payload (XEN_SYSCTL_LIVE_PATCH_ACTION:LIVE_PATCH_ACTION_UNLOAD).
  */
 
 static void free_payload_data(struct payload *payload)
@@ -270,7 +270,7 @@ static void free_payload_data(struct payload *payload)
 * address space for the payload (using passed in size). This is used in
 * move_payload to figure out the destination location (load_addr).
 */
-static void calc_section(const struct xsplice_elf_sec *sec, size_t *size,
+static void calc_section(const struct livepatch_elf_sec *sec, size_t *size,
                          unsigned int *offset)
 {
     const Elf_Shdr *s = sec->sec;
@@ -281,7 +281,7 @@ static void calc_section(const struct xsplice_elf_sec *sec, 
size_t *size,
     *size = s->sh_size + align_size;
 }
 
-static int move_payload(struct payload *payload, struct xsplice_elf *elf)
+static int move_payload(struct payload *payload, struct livepatch_elf *elf)
 {
     void *text_buf, *ro_buf, *rw_buf;
     unsigned int i;
@@ -315,7 +315,7 @@ static int move_payload(struct payload *payload, struct 
xsplice_elf *elf)
             calc_section(&elf->sec[i], &payload->ro_size, &offset[i]);
         else
         {
-            dprintk(XENLOG_DEBUG, XSPLICE "%s: Not supporting %s section!\n",
+            dprintk(XENLOG_DEBUG, LIVE_PATCH "%s: Not supporting %s 
section!\n",
                     elf->name, elf->sec[i].name);
             rc = -EOPNOTSUPP;
             goto out;
@@ -335,7 +335,7 @@ static int move_payload(struct payload *payload, struct 
xsplice_elf *elf)
     text_buf = vmalloc_xen(size * PAGE_SIZE);
     if ( !text_buf )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Could not allocate memory for 
payload!\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Could not allocate memory for 
payload!\n",
                 elf->name);
         rc = -ENOMEM;
         goto out;
@@ -370,7 +370,7 @@ static int move_payload(struct payload *payload, struct 
xsplice_elf *elf)
             {
                 memcpy(elf->sec[i].load_addr, elf->sec[i].data,
                        elf->sec[i].sec->sh_size);
-                dprintk(XENLOG_DEBUG, XSPLICE "%s: Loaded %s at %p\n",
+                dprintk(XENLOG_DEBUG, LIVE_PATCH "%s: Loaded %s at %p\n",
                         elf->name, elf->sec[i].name, elf->sec[i].load_addr);
             }
             else
@@ -384,7 +384,7 @@ static int move_payload(struct payload *payload, struct 
xsplice_elf *elf)
     return rc;
 }
 
-static int secure_payload(struct payload *payload, struct xsplice_elf *elf)
+static int secure_payload(struct payload *payload, struct livepatch_elf *elf)
 {
     int rc;
     unsigned int text_pages, rw_pages, ro_pages;
@@ -392,57 +392,57 @@ static int secure_payload(struct payload *payload, struct 
xsplice_elf *elf)
     text_pages = PFN_UP(payload->text_size);
     ASSERT(text_pages);
 
-    rc = arch_xsplice_secure(payload->text_addr, text_pages, XSPLICE_VA_RX);
+    rc = arch_livepatch_secure(payload->text_addr, text_pages, 
LIVE_PATCH_VA_RX);
     if ( rc )
         return rc;
 
     rw_pages = PFN_UP(payload->rw_size);
     if ( rw_pages )
     {
-        rc = arch_xsplice_secure(payload->rw_addr, rw_pages, XSPLICE_VA_RW);
+        rc = arch_livepatch_secure(payload->rw_addr, rw_pages, 
LIVE_PATCH_VA_RW);
         if ( rc )
             return rc;
     }
 
     ro_pages = PFN_UP(payload->ro_size);
     if ( ro_pages )
-        rc = arch_xsplice_secure(payload->ro_addr, ro_pages, XSPLICE_VA_RO);
+        rc = arch_livepatch_secure(payload->ro_addr, ro_pages, 
LIVE_PATCH_VA_RO);
 
     ASSERT(ro_pages + rw_pages + text_pages == payload->pages);
 
     return rc;
 }
 
-static int check_special_sections(const struct xsplice_elf *elf)
+static int check_special_sections(const struct livepatch_elf *elf)
 {
     unsigned int i;
-    static const char *const names[] = { ELF_XSPLICE_FUNC,
-                                         ELF_XSPLICE_DEPENDS,
+    static const char *const names[] = { ELF_LIVE_PATCH_FUNC,
+                                         ELF_LIVE_PATCH_DEPENDS,
                                          ELF_BUILD_ID_NOTE};
     DECLARE_BITMAP(found, ARRAY_SIZE(names)) = { 0 };
 
     for ( i = 0; i < ARRAY_SIZE(names); i++ )
     {
-        const struct xsplice_elf_sec *sec;
+        const struct livepatch_elf_sec *sec;
 
-        sec = xsplice_elf_sec_by_name(elf, names[i]);
+        sec = livepatch_elf_sec_by_name(elf, names[i]);
         if ( !sec )
         {
-            dprintk(XENLOG_ERR, XSPLICE "%s: %s is missing!\n",
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: %s is missing!\n",
                     elf->name, names[i]);
             return -EINVAL;
         }
 
         if ( !sec->sec->sh_size )
         {
-            dprintk(XENLOG_ERR, XSPLICE "%s: %s is empty!\n",
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: %s is empty!\n",
                     elf->name, names[i]);
             return -EINVAL;
         }
 
         if ( test_and_set_bit(i, found) )
         {
-            dprintk(XENLOG_ERR, XSPLICE "%s: %s was seen more than once!\n",
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: %s was seen more than once!\n",
                     elf->name, names[i]);
             return -EINVAL;
         }
@@ -452,19 +452,19 @@ static int check_special_sections(const struct 
xsplice_elf *elf)
 }
 
 static int prepare_payload(struct payload *payload,
-                           struct xsplice_elf *elf)
+                           struct livepatch_elf *elf)
 {
-    const struct xsplice_elf_sec *sec;
+    const struct livepatch_elf_sec *sec;
     unsigned int i;
-    struct xsplice_patch_func *f;
+    struct livepatch_func *f;
     struct virtual_region *region;
     const Elf_Note *n;
 
-    sec = xsplice_elf_sec_by_name(elf, ELF_XSPLICE_FUNC);
+    sec = livepatch_elf_sec_by_name(elf, ELF_LIVE_PATCH_FUNC);
     ASSERT(sec);
     if ( sec->sec->sh_size % sizeof(*payload->funcs) )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Wrong size of "ELF_XSPLICE_FUNC"!\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Wrong size of 
"ELF_LIVE_PATCH_FUNC"!\n",
                 elf->name);
         return -EINVAL;
     }
@@ -478,21 +478,21 @@ static int prepare_payload(struct payload *payload,
 
         f = &(payload->funcs[i]);
 
-        if ( f->version != XSPLICE_PAYLOAD_VERSION )
+        if ( f->version != LIVE_PATCH_PAYLOAD_VERSION )
         {
-            dprintk(XENLOG_ERR, XSPLICE "%s: Wrong version (%u). Expected 
%d!\n",
-                    elf->name, f->version, XSPLICE_PAYLOAD_VERSION);
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: Wrong version (%u). Expected 
%d!\n",
+                    elf->name, f->version, LIVE_PATCH_PAYLOAD_VERSION);
             return -EOPNOTSUPP;
         }
 
         if ( !f->new_addr || !f->new_size )
         {
-            dprintk(XENLOG_ERR, XSPLICE "%s: Address or size fields are 
zero!\n",
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: Address or size fields are 
zero!\n",
                     elf->name);
             return -EINVAL;
         }
 
-        rc = arch_xsplice_verify_func(f);
+        rc = arch_livepatch_verify_func(f);
         if ( rc )
             return rc;
 
@@ -502,20 +502,20 @@ static int prepare_payload(struct payload *payload,
             f->old_addr = (void *)symbols_lookup_by_name(f->name);
             if ( !f->old_addr )
             {
-                f->old_addr = (void *)xsplice_symbols_lookup_by_name(f->name);
+                f->old_addr = (void 
*)livepatch_symbols_lookup_by_name(f->name);
                 if ( !f->old_addr )
                 {
-                    dprintk(XENLOG_ERR, XSPLICE "%s: Could not resolve old 
address of %s\n",
+                    dprintk(XENLOG_ERR, LIVE_PATCH "%s: Could not resolve old 
address of %s\n",
                             elf->name, f->name);
                     return -ENOENT;
                 }
             }
-            dprintk(XENLOG_DEBUG, XSPLICE "%s: Resolved old address %s => 
%p\n",
+            dprintk(XENLOG_DEBUG, LIVE_PATCH "%s: Resolved old address %s => 
%p\n",
                     elf->name, f->name, f->old_addr);
         }
     }
 
-    sec = xsplice_elf_sec_by_name(elf, ELF_BUILD_ID_NOTE);
+    sec = livepatch_elf_sec_by_name(elf, ELF_BUILD_ID_NOTE);
     if ( sec )
     {
         const struct payload *data;
@@ -540,14 +540,14 @@ static int prepare_payload(struct payload *payload,
             if ( data->id.len == payload->id.len &&
                  !memcmp(data->id.p, payload->id.p, data->id.len) )
             {
-                dprintk(XENLOG_DEBUG, XSPLICE "%s: Already loaded as %s!\n",
+                dprintk(XENLOG_DEBUG, LIVE_PATCH "%s: Already loaded as %s!\n",
                         elf->name, data->name);
                 return -EEXIST;
             }
         }
     }
 
-    sec = xsplice_elf_sec_by_name(elf, ELF_XSPLICE_DEPENDS);
+    sec = livepatch_elf_sec_by_name(elf, ELF_LIVE_PATCH_DEPENDS);
     if ( sec )
     {
         n = sec->load_addr;
@@ -566,7 +566,7 @@ static int prepare_payload(struct payload *payload,
     /* Setup the virtual region with proper data. */
     region = &payload->region;
 
-    region->symbols_lookup = xsplice_symbols_lookup;
+    region->symbols_lookup = livepatch_symbols_lookup;
     region->start = payload->text_addr;
     region->end = payload->text_addr + payload->text_size;
 
@@ -576,13 +576,13 @@ static int prepare_payload(struct payload *payload,
         char str[14];
 
         snprintf(str, sizeof(str), ".bug_frames.%u", i);
-        sec = xsplice_elf_sec_by_name(elf, str);
+        sec = livepatch_elf_sec_by_name(elf, str);
         if ( !sec )
             continue;
 
         if ( sec->sec->sh_size % sizeof(*region->frame[i].bugs) )
         {
-            dprintk(XENLOG_ERR, XSPLICE "%s: Wrong size of .bug_frames.%u!\n",
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: Wrong size of 
.bug_frames.%u!\n",
                     elf->name, i);
             return -EINVAL;
         }
@@ -593,14 +593,14 @@ static int prepare_payload(struct payload *payload,
     }
 
 #ifndef CONFIG_ARM
-    sec = xsplice_elf_sec_by_name(elf, ".altinstructions");
+    sec = livepatch_elf_sec_by_name(elf, ".altinstructions");
     if ( sec )
     {
         struct alt_instr *a, *start, *end;
 
         if ( sec->sec->sh_size % sizeof(*a) )
         {
-            dprintk(XENLOG_ERR, XSPLICE "%s: Size of .alt_instr is not 
multiple of %zu!\n",
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: Size of .alt_instr is not 
multiple of %zu!\n",
                     elf->name, sizeof(*a));
             return -EINVAL;
         }
@@ -616,7 +616,7 @@ static int prepare_payload(struct payload *payload,
             if ( (instr < region->start && instr >= region->end) ||
                  (replacement < region->start && replacement >= region->end) )
             {
-                dprintk(XENLOG_ERR, XSPLICE "%s Alt patching outside payload: 
%p!\n",
+                dprintk(XENLOG_ERR, LIVE_PATCH "%s Alt patching outside 
payload: %p!\n",
                         elf->name, instr);
                 return -EINVAL;
             }
@@ -624,7 +624,7 @@ static int prepare_payload(struct payload *payload,
         apply_alternatives_nocheck(start, end);
     }
 
-    sec = xsplice_elf_sec_by_name(elf, ".ex_table");
+    sec = livepatch_elf_sec_by_name(elf, ".ex_table");
     if ( sec )
     {
         struct exception_table_entry *s, *e;
@@ -632,7 +632,7 @@ static int prepare_payload(struct payload *payload,
         if ( !sec->sec->sh_size ||
              (sec->sec->sh_size % sizeof(*region->ex)) )
         {
-            dprintk(XENLOG_ERR, XSPLICE "%s: Wrong size of .ex_table (exp:%lu 
vs %lu)!\n",
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: Wrong size of .ex_table 
(exp:%lu vs %lu)!\n",
                     elf->name, sizeof(*region->ex),
                     sec->sec->sh_size);
             return -EINVAL;
@@ -651,8 +651,8 @@ static int prepare_payload(struct payload *payload,
     return 0;
 }
 
-static bool_t is_payload_symbol(const struct xsplice_elf *elf,
-                                const struct xsplice_elf_sym *sym)
+static bool_t is_payload_symbol(const struct livepatch_elf *elf,
+                                const struct livepatch_elf_sym *sym)
 {
     if ( sym->sym->st_shndx == SHN_UNDEF ||
          sym->sym->st_shndx >= elf->hdr->e_shnum )
@@ -688,11 +688,11 @@ static bool_t is_payload_symbol(const struct xsplice_elf 
*elf,
 }
 
 static int build_symbol_table(struct payload *payload,
-                              const struct xsplice_elf *elf)
+                              const struct livepatch_elf *elf)
 {
     unsigned int i, j, nsyms = 0;
     size_t strtab_len = 0;
-    struct xsplice_symbol *symtab;
+    struct livepatch_symbol *symtab;
     char *strtab;
 
     ASSERT(payload->nfuncs);
@@ -707,7 +707,7 @@ static int build_symbol_table(struct payload *payload,
         }
     }
 
-    symtab = xmalloc_array(struct xsplice_symbol, nsyms);
+    symtab = xmalloc_array(struct livepatch_symbol, nsyms);
     strtab = xmalloc_array(char, strtab_len);
 
     if ( !strtab || !symtab )
@@ -749,22 +749,22 @@ static int build_symbol_table(struct payload *payload,
         if ( !found )
         {
             if ( symbols_lookup_by_name(symtab[i].name) ||
-                 xsplice_symbols_lookup_by_name(symtab[i].name) )
+                 livepatch_symbols_lookup_by_name(symtab[i].name) )
             {
-                dprintk(XENLOG_ERR, XSPLICE "%s: duplicate new symbol: %s\n",
+                dprintk(XENLOG_ERR, LIVE_PATCH "%s: duplicate new symbol: 
%s\n",
                         elf->name, symtab[i].name);
                 xfree(symtab);
                 xfree(strtab);
                 return -EEXIST;
             }
             symtab[i].new_symbol = 1;
-            dprintk(XENLOG_DEBUG, XSPLICE "%s: new symbol %s\n",
+            dprintk(XENLOG_DEBUG, LIVE_PATCH "%s: new symbol %s\n",
                      elf->name, symtab[i].name);
         }
         else
         {
             /* new_symbol is not set. */
-            dprintk(XENLOG_DEBUG, XSPLICE "%s: overriding symbol %s\n",
+            dprintk(XENLOG_DEBUG, LIVE_PATCH "%s: overriding symbol %s\n",
                     elf->name, symtab[i].name);
         }
     }
@@ -790,10 +790,10 @@ static void free_payload(struct payload *data)
 
 static int load_payload_data(struct payload *payload, void *raw, size_t len)
 {
-    struct xsplice_elf elf = { .name = payload->name, .len = len };
+    struct livepatch_elf elf = { .name = payload->name, .len = len };
     int rc = 0;
 
-    rc = xsplice_elf_load(&elf, raw);
+    rc = livepatch_elf_load(&elf, raw);
     if ( rc )
         goto out;
 
@@ -801,11 +801,11 @@ static int load_payload_data(struct payload *payload, 
void *raw, size_t len)
     if ( rc )
         goto out;
 
-    rc = xsplice_elf_resolve_symbols(&elf);
+    rc = livepatch_elf_resolve_symbols(&elf);
     if ( rc )
         goto out;
 
-    rc = xsplice_elf_perform_relocs(&elf);
+    rc = livepatch_elf_perform_relocs(&elf);
     if ( rc )
         goto out;
 
@@ -828,15 +828,15 @@ static int load_payload_data(struct payload *payload, 
void *raw, size_t len)
         free_payload_data(payload);
 
     /* Free our temporary data structure. */
-    xsplice_elf_free(&elf);
+    livepatch_elf_free(&elf);
 
     return rc;
 }
 
-static int xsplice_upload(xen_sysctl_xsplice_upload_t *upload)
+static int livepatch_upload(xen_sysctl_livepatch_upload_t *upload)
 {
     struct payload *data, *found;
-    char n[XEN_XSPLICE_NAME_SIZE];
+    char n[XEN_LIVE_PATCH_NAME_SIZE];
     void *raw_data;
     int rc;
 
@@ -866,7 +866,7 @@ static int xsplice_upload(xen_sysctl_xsplice_upload_t 
*upload)
         if ( rc )
             goto out;
 
-        data->state = XSPLICE_STATE_CHECKED;
+        data->state = LIVE_PATCH_STATE_CHECKED;
         INIT_LIST_HEAD(&data->list);
         INIT_LIST_HEAD(&data->applied_list);
 
@@ -890,11 +890,11 @@ static int xsplice_upload(xen_sysctl_xsplice_upload_t 
*upload)
     return rc;
 }
 
-static int xsplice_get(xen_sysctl_xsplice_get_t *get)
+static int livepatch_get(xen_sysctl_livepatch_get_t *get)
 {
     struct payload *data;
     int rc;
-    char n[XEN_XSPLICE_NAME_SIZE];
+    char n[XEN_LIVE_PATCH_NAME_SIZE];
 
     rc = get_name(&get->name, n);
     if ( rc )
@@ -921,9 +921,9 @@ static int xsplice_get(xen_sysctl_xsplice_get_t *get)
     return 0;
 }
 
-static int xsplice_list(xen_sysctl_xsplice_list_t *list)
+static int livepatch_list(xen_sysctl_livepatch_list_t *list)
 {
-    xen_xsplice_status_t status;
+    xen_livepatch_status_t status;
     struct payload *data;
     unsigned int idx = 0, i = 0;
     int rc = 0;
@@ -936,7 +936,7 @@ static int xsplice_list(xen_sysctl_xsplice_list_t *list)
 
     if ( list->nr &&
          (!guest_handle_okay(list->status, list->nr) ||
-          !guest_handle_okay(list->name, XEN_XSPLICE_NAME_SIZE * list->nr) ||
+          !guest_handle_okay(list->name, XEN_LIVE_PATCH_NAME_SIZE * list->nr) 
||
           !guest_handle_okay(list->len, list->nr)) )
         return -EINVAL;
 
@@ -961,7 +961,7 @@ static int xsplice_list(xen_sysctl_xsplice_list_t *list)
             len = strlen(data->name) + 1;
 
             /* N.B. 'idx' != 'i'. */
-            if ( __copy_to_guest_offset(list->name, idx * 
XEN_XSPLICE_NAME_SIZE,
+            if ( __copy_to_guest_offset(list->name, idx * 
XEN_LIVE_PATCH_NAME_SIZE,
                                         data->name, len) ||
                 __copy_to_guest_offset(list->len, idx, &len, 1) ||
                 __copy_to_guest_offset(list->status, idx, &status, 1) )
@@ -987,22 +987,22 @@ static int xsplice_list(xen_sysctl_xsplice_list_t *list)
 /*
  * The following functions get the CPUs into an appropriate state and
  * apply (or revert) each of the payload's functions. This is needed
- * for XEN_SYSCTL_XSPLICE_ACTION operation (see xsplice_action).
+ * for XEN_SYSCTL_LIVE_PATCH_ACTION operation (see livepatch_action).
  */
 
 static int apply_payload(struct payload *data)
 {
     unsigned int i;
 
-    printk(XENLOG_INFO XSPLICE "%s: Applying %u functions\n",
+    printk(XENLOG_INFO LIVE_PATCH "%s: Applying %u functions\n",
             data->name, data->nfuncs);
 
-    arch_xsplice_patching_enter();
+    arch_livepatching_enter();
 
     for ( i = 0; i < data->nfuncs; i++ )
-        arch_xsplice_apply_jmp(&data->funcs[i]);
+        arch_livepatch_apply_jmp(&data->funcs[i]);
 
-    arch_xsplice_patching_leave();
+    arch_livepatching_leave();
 
     /*
      * We need RCU variant (which has barriers) in case we crash here.
@@ -1018,14 +1018,14 @@ static int revert_payload(struct payload *data)
 {
     unsigned int i;
 
-    printk(XENLOG_INFO XSPLICE "%s: Reverting\n", data->name);
+    printk(XENLOG_INFO LIVE_PATCH "%s: Reverting\n", data->name);
 
-    arch_xsplice_patching_enter();
+    arch_livepatching_enter();
 
     for ( i = 0; i < data->nfuncs; i++ )
-        arch_xsplice_revert_jmp(&data->funcs[i]);
+        arch_livepatch_revert_jmp(&data->funcs[i]);
 
-    arch_xsplice_patching_leave();
+    arch_livepatching_leave();
 
     /*
      * We need RCU variant (which has barriers) in case we crash here.
@@ -1041,31 +1041,31 @@ static int revert_payload(struct payload *data)
  * This function is executed having all other CPUs with no deep stack (we may
  * have cpu_idle on it) and IRQs disabled.
  */
-static void xsplice_do_action(void)
+static void livepatch_do_action(void)
 {
     int rc;
     struct payload *data, *other, *tmp;
 
-    data = xsplice_work.data;
+    data = livepatch_work.data;
     /*
      * This function and the transition from asm to C code should be the only
      * one on any stack. No need to lock the payload list or applied list.
      */
-    switch ( xsplice_work.cmd )
+    switch ( livepatch_work.cmd )
     {
-    case XSPLICE_ACTION_APPLY:
+    case LIVE_PATCH_ACTION_APPLY:
         rc = apply_payload(data);
         if ( rc == 0 )
-            data->state = XSPLICE_STATE_APPLIED;
+            data->state = LIVE_PATCH_STATE_APPLIED;
         break;
 
-    case XSPLICE_ACTION_REVERT:
+    case LIVE_PATCH_ACTION_REVERT:
         rc = revert_payload(data);
         if ( rc == 0 )
-            data->state = XSPLICE_STATE_CHECKED;
+            data->state = LIVE_PATCH_STATE_CHECKED;
         break;
 
-    case XSPLICE_ACTION_REPLACE:
+    case LIVE_PATCH_ACTION_REPLACE:
         rc = 0;
         /*
         * N.B: Use 'applied_list' member, not 'list'. We also abuse the
@@ -1075,7 +1075,7 @@ static void xsplice_do_action(void)
         {
             other->rc = revert_payload(other);
             if ( other->rc == 0 )
-                other->state = XSPLICE_STATE_CHECKED;
+                other->state = LIVE_PATCH_STATE_CHECKED;
             else
             {
                 rc = -EINVAL;
@@ -1087,7 +1087,7 @@ static void xsplice_do_action(void)
         {
             rc = apply_payload(data);
             if ( rc == 0 )
-                data->state = XSPLICE_STATE_APPLIED;
+                data->state = LIVE_PATCH_STATE_APPLIED;
         }
         break;
 
@@ -1097,7 +1097,7 @@ static void xsplice_do_action(void)
         break;
     }
 
-    /* We must set rc as xsplice_action sets it to -EAGAIN when kicking of. */
+    /* We must set rc as livepatch_action sets it to -EAGAIN when kicking of. 
*/
     data->rc = rc;
 }
 
@@ -1105,7 +1105,7 @@ static bool_t is_work_scheduled(const struct payload 
*data)
 {
     ASSERT(spin_is_locked(&payload_lock));
 
-    return xsplice_work.do_work && xsplice_work.data == data;
+    return livepatch_work.do_work && livepatch_work.data == data;
 }
 
 static int schedule_work(struct payload *data, uint32_t cmd, uint32_t timeout)
@@ -1113,30 +1113,30 @@ static int schedule_work(struct payload *data, uint32_t 
cmd, uint32_t timeout)
     ASSERT(spin_is_locked(&payload_lock));
 
     /* Fail if an operation is already scheduled. */
-    if ( xsplice_work.do_work )
+    if ( livepatch_work.do_work )
         return -EBUSY;
 
     if ( !get_cpu_maps() )
     {
-        printk(XENLOG_ERR XSPLICE "%s: unable to get cpu_maps lock!\n",
+        printk(XENLOG_ERR LIVE_PATCH "%s: unable to get cpu_maps lock!\n",
                data->name);
         return -EBUSY;
     }
 
-    xsplice_work.cmd = cmd;
-    xsplice_work.data = data;
-    xsplice_work.timeout = timeout ?: MILLISECS(30);
+    livepatch_work.cmd = cmd;
+    livepatch_work.data = data;
+    livepatch_work.timeout = timeout ?: MILLISECS(30);
 
-    dprintk(XENLOG_DEBUG, XSPLICE "%s: timeout is %"PRI_stime"ms\n",
-            data->name, xsplice_work.timeout / MILLISECS(1));
+    dprintk(XENLOG_DEBUG, LIVE_PATCH "%s: timeout is %"PRI_stime"ms\n",
+            data->name, livepatch_work.timeout / MILLISECS(1));
 
-    atomic_set(&xsplice_work.semaphore, -1);
+    atomic_set(&livepatch_work.semaphore, -1);
 
-    xsplice_work.ready = 0;
+    livepatch_work.ready = 0;
 
     smp_wmb();
 
-    xsplice_work.do_work = 1;
+    livepatch_work.do_work = 1;
     this_cpu(work_to_do) = 1;
 
     put_cpu_maps();
@@ -1150,8 +1150,8 @@ static void reschedule_fn(void *unused)
     raise_softirq(SCHEDULE_SOFTIRQ);
 }
 
-static int xsplice_spin(atomic_t *counter, s_time_t timeout,
-                           unsigned int cpus, const char *s)
+static int livepatch_spin(atomic_t *counter, s_time_t timeout,
+                          unsigned int cpus, const char *s)
 {
     int rc = 0;
 
@@ -1161,12 +1161,12 @@ static int xsplice_spin(atomic_t *counter, s_time_t 
timeout,
     /* Log & abort. */
     if ( atomic_read(counter) != cpus )
     {
-        printk(XENLOG_ERR XSPLICE "%s: Timed out on semaphore in %s quiesce 
phase %u/%u\n",
-               xsplice_work.data->name, s, atomic_read(counter), cpus);
+        printk(XENLOG_ERR LIVE_PATCH "%s: Timed out on semaphore in %s quiesce 
phase %u/%u\n",
+               livepatch_work.data->name, s, atomic_read(counter), cpus);
         rc = -EBUSY;
-        xsplice_work.data->rc = rc;
+        livepatch_work.data->rc = rc;
         smp_wmb();
-        xsplice_work.do_work = 0;
+        livepatch_work.do_work = 0;
     }
 
     return rc;
@@ -1176,9 +1176,9 @@ static int xsplice_spin(atomic_t *counter, s_time_t 
timeout,
  * The main function which manages the work of quiescing the system and
  * patching code.
  */
-void check_for_xsplice_work(void)
+void check_for_livepatch_work(void)
 {
-#define ACTION(x) [XSPLICE_ACTION_##x] = #x
+#define ACTION(x) [LIVE_PATCH_ACTION_##x] = #x
     static const char *const names[] = {
             ACTION(APPLY),
             ACTION(REVERT),
@@ -1195,7 +1195,7 @@ void check_for_xsplice_work(void)
 
     smp_rmb();
     /* In case we aborted, other CPUs can skip right away. */
-    if ( !xsplice_work.do_work )
+    if ( !livepatch_work.do_work )
     {
         per_cpu(work_to_do, cpu) = 0;
         return;
@@ -1204,22 +1204,22 @@ void check_for_xsplice_work(void)
     ASSERT(local_irq_is_enabled());
 
     /* Set at -1, so will go up to num_online_cpus - 1. */
-    if ( atomic_inc_and_test(&xsplice_work.semaphore) )
+    if ( atomic_inc_and_test(&livepatch_work.semaphore) )
     {
         struct payload *p;
         unsigned int cpus;
 
-        p = xsplice_work.data;
+        p = livepatch_work.data;
         if ( !get_cpu_maps() )
         {
-            printk(XENLOG_ERR XSPLICE "%s: CPU%u - unable to get cpu_maps 
lock!\n",
+            printk(XENLOG_ERR LIVE_PATCH "%s: CPU%u - unable to get cpu_maps 
lock!\n",
                    p->name, cpu);
             per_cpu(work_to_do, cpu) = 0;
-            xsplice_work.data->rc = -EBUSY;
+            livepatch_work.data->rc = -EBUSY;
             smp_wmb();
-            xsplice_work.do_work = 0;
+            livepatch_work.do_work = 0;
             /*
-             * Do NOT decrement xsplice_work.semaphore down - as that may cause
+             * Do NOT decrement livepatch_work.semaphore down - as that may 
cause
              * the other CPU (which may be at this point ready to increment it)
              * to assume the role of master and then needlessly time out
              * out (as do_work is zero).
@@ -1227,58 +1227,58 @@ void check_for_xsplice_work(void)
             return;
         }
         /* "Mask" NMIs. */
-        arch_xsplice_mask();
+        arch_livepatch_mask();
 
         barrier(); /* MUST do it after get_cpu_maps. */
         cpus = num_online_cpus() - 1;
 
         if ( cpus )
         {
-            dprintk(XENLOG_DEBUG, XSPLICE "%s: CPU%u - IPIing the other %u 
CPUs\n",
+            dprintk(XENLOG_DEBUG, LIVE_PATCH "%s: CPU%u - IPIing the other %u 
CPUs\n",
                     p->name, cpu, cpus);
             smp_call_function(reschedule_fn, NULL, 0);
         }
 
-        timeout = xsplice_work.timeout + NOW();
-        if ( xsplice_spin(&xsplice_work.semaphore, timeout, cpus, "CPU") )
+        timeout = livepatch_work.timeout + NOW();
+        if ( livepatch_spin(&livepatch_work.semaphore, timeout, cpus, "CPU") )
             goto abort;
 
         /* All CPUs are waiting, now signal to disable IRQs. */
-        atomic_set(&xsplice_work.semaphore, 0);
+        atomic_set(&livepatch_work.semaphore, 0);
         /*
          * MUST have a barrier after semaphore so that the other CPUs don't
          * leak out of the 'Wait for all CPUs to rendezvous' loop and increment
          * 'semaphore' before we set it to zero.
          */
         smp_wmb();
-        xsplice_work.ready = 1;
+        livepatch_work.ready = 1;
 
-        if ( !xsplice_spin(&xsplice_work.semaphore, timeout, cpus, "IRQ") )
+        if ( !livepatch_spin(&livepatch_work.semaphore, timeout, cpus, "IRQ") )
         {
             local_irq_save(flags);
             /* Do the patching. */
-            xsplice_do_action();
+            livepatch_do_action();
             /* Serialize and flush out the CPU via CPUID instruction (on x86). 
*/
-            arch_xsplice_post_action();
+            arch_livepatch_post_action();
             local_irq_restore(flags);
         }
 
  abort:
-        arch_xsplice_unmask();
+        arch_livepatch_unmask();
 
         per_cpu(work_to_do, cpu) = 0;
-        xsplice_work.do_work = 0;
+        livepatch_work.do_work = 0;
 
         /* put_cpu_maps has an barrier(). */
         put_cpu_maps();
 
-        printk(XENLOG_INFO XSPLICE "%s finished %s with rc=%d\n",
-               p->name, names[xsplice_work.cmd], p->rc);
+        printk(XENLOG_INFO LIVE_PATCH "%s finished %s with rc=%d\n",
+               p->name, names[livepatch_work.cmd], p->rc);
     }
     else
     {
         /* Wait for all CPUs to rendezvous. */
-        while ( xsplice_work.do_work && !xsplice_work.ready )
+        while ( livepatch_work.do_work && !livepatch_work.ready )
             cpu_relax();
 
         /* Disable IRQs and signal. */
@@ -1287,14 +1287,14 @@ void check_for_xsplice_work(void)
          * We re-use the sempahore, so MUST have it reset by master before
          * we exit the loop above.
          */
-        atomic_inc(&xsplice_work.semaphore);
+        atomic_inc(&livepatch_work.semaphore);
 
         /* Wait for patching to complete. */
-        while ( xsplice_work.do_work )
+        while ( livepatch_work.do_work )
             cpu_relax();
 
         /* To flush out pipeline. */
-        arch_xsplice_post_action();
+        arch_livepatch_post_action();
         local_irq_restore(flags);
 
         per_cpu(work_to_do, cpu) = 0;
@@ -1343,17 +1343,17 @@ static int build_id_dep(struct payload *payload, bool_t 
internal)
          memcmp(id, payload->dep.p, len) )
     {
         dprintk(XENLOG_ERR, "%s%s: check against %s build-id failed!\n",
-                XSPLICE, payload->name, name);
+                LIVE_PATCH, payload->name, name);
         return -EINVAL;
     }
 
     return 0;
 }
 
-static int xsplice_action(xen_sysctl_xsplice_action_t *action)
+static int livepatch_action(xen_sysctl_livepatch_action_t *action)
 {
     struct payload *data;
-    char n[XEN_XSPLICE_NAME_SIZE];
+    char n[XEN_LIVE_PATCH_NAME_SIZE];
     int rc;
 
     rc = get_name(&action->name, n);
@@ -1381,8 +1381,8 @@ static int xsplice_action(xen_sysctl_xsplice_action_t 
*action)
 
     switch ( action->cmd )
     {
-    case XSPLICE_ACTION_UNLOAD:
-        if ( data->state == XSPLICE_STATE_CHECKED )
+    case LIVE_PATCH_ACTION_UNLOAD:
+        if ( data->state == LIVE_PATCH_STATE_CHECKED )
         {
             free_payload(data);
             /* No touching 'data' from here on! */
@@ -1392,8 +1392,8 @@ static int xsplice_action(xen_sysctl_xsplice_action_t 
*action)
             rc = -EINVAL;
         break;
 
-    case XSPLICE_ACTION_REVERT:
-        if ( data->state == XSPLICE_STATE_APPLIED )
+    case LIVE_PATCH_ACTION_REVERT:
+        if ( data->state == LIVE_PATCH_STATE_APPLIED )
         {
             const struct payload *p;
 
@@ -1403,7 +1403,7 @@ static int xsplice_action(xen_sysctl_xsplice_action_t 
*action)
             if ( p != data )
             {
                 dprintk(XENLOG_ERR, "%s%s: can't unload. Top is %s!\n",
-                        XSPLICE, data->name, p->name);
+                        LIVE_PATCH, data->name, p->name);
                 rc = -EBUSY;
                 break;
             }
@@ -1412,8 +1412,8 @@ static int xsplice_action(xen_sysctl_xsplice_action_t 
*action)
         }
         break;
 
-    case XSPLICE_ACTION_APPLY:
-        if ( data->state == XSPLICE_STATE_CHECKED )
+    case LIVE_PATCH_ACTION_APPLY:
+        if ( data->state == LIVE_PATCH_STATE_CHECKED )
         {
             rc = build_id_dep(data, !!list_empty(&applied_list));
             if ( rc )
@@ -1423,8 +1423,8 @@ static int xsplice_action(xen_sysctl_xsplice_action_t 
*action)
         }
         break;
 
-    case XSPLICE_ACTION_REPLACE:
-        if ( data->state == XSPLICE_STATE_CHECKED )
+    case LIVE_PATCH_ACTION_REPLACE:
+        if ( data->state == LIVE_PATCH_STATE_CHECKED )
         {
             rc = build_id_dep(data, 1 /* against hypervisor. */);
             if ( rc )
@@ -1445,29 +1445,29 @@ static int xsplice_action(xen_sysctl_xsplice_action_t 
*action)
     return rc;
 }
 
-int xsplice_op(xen_sysctl_xsplice_op_t *xsplice)
+int livepatch_op(xen_sysctl_livepatch_op_t *livepatch)
 {
     int rc;
 
-    if ( xsplice->pad )
+    if ( livepatch->pad )
         return -EINVAL;
 
-    switch ( xsplice->cmd )
+    switch ( livepatch->cmd )
     {
-    case XEN_SYSCTL_XSPLICE_UPLOAD:
-        rc = xsplice_upload(&xsplice->u.upload);
+    case XEN_SYSCTL_LIVE_PATCH_UPLOAD:
+        rc = livepatch_upload(&livepatch->u.upload);
         break;
 
-    case XEN_SYSCTL_XSPLICE_GET:
-        rc = xsplice_get(&xsplice->u.get);
+    case XEN_SYSCTL_LIVE_PATCH_GET:
+        rc = livepatch_get(&livepatch->u.get);
         break;
 
-    case XEN_SYSCTL_XSPLICE_LIST:
-        rc = xsplice_list(&xsplice->u.list);
+    case XEN_SYSCTL_LIVE_PATCH_LIST:
+        rc = livepatch_list(&livepatch->u.list);
         break;
 
-    case XEN_SYSCTL_XSPLICE_ACTION:
-        rc = xsplice_action(&xsplice->u.action);
+    case XEN_SYSCTL_LIVE_PATCH_ACTION:
+        rc = livepatch_action(&livepatch->u.action);
         break;
 
     default:
@@ -1480,7 +1480,7 @@ int xsplice_op(xen_sysctl_xsplice_op_t *xsplice)
 
 static const char *state2str(unsigned int state)
 {
-#define STATE(x) [XSPLICE_STATE_##x] = #x
+#define STATE(x) [LIVE_PATCH_STATE_##x] = #x
     static const char *const names[] = {
             STATE(CHECKED),
             STATE(APPLIED),
@@ -1493,14 +1493,14 @@ static const char *state2str(unsigned int state)
     return names[state];
 }
 
-static void xsplice_printall(unsigned char key)
+static void livepatch_printall(unsigned char key)
 {
     struct payload *data;
     const void *binary_id = NULL;
     unsigned int len = 0;
     unsigned int i;
 
-    printk("'%c' pressed - Dumping all xsplice patches\n", key);
+    printk("'%c' pressed - Dumping all livepatch patches\n", key);
 
     if ( !xen_build_id(&binary_id, &len) )
         printk("build-id: %*phN\n", len, binary_id);
@@ -1519,7 +1519,7 @@ static void xsplice_printall(unsigned char key)
 
         for ( i = 0; i < data->nfuncs; i++ )
         {
-            struct xsplice_patch_func *f = &(data->funcs[i]);
+            struct livepatch_func *f = &(data->funcs[i]);
             printk("    %s patch %p(%u) with %p (%u)\n",
                    f->name, f->old_addr, f->old_size, f->new_addr, 
f->new_size);
 
@@ -1544,20 +1544,20 @@ static void xsplice_printall(unsigned char key)
     spin_unlock(&payload_lock);
 }
 
-static int __init xsplice_init(void)
+static int __init livepatch_init(void)
 {
     const void *binary_id;
     unsigned int len;
 
     if ( !xen_build_id(&binary_id, &len) )
-        printk(XENLOG_INFO XSPLICE ": build-id: %*phN\n", len, binary_id);
+        printk(XENLOG_INFO LIVE_PATCH ": build-id: %*phN\n", len, binary_id);
 
-    register_keyhandler('x', xsplice_printall, "print xsplicing info", 1);
+    register_keyhandler('x', livepatch_printall, "print livepatch info", 1);
 
-    arch_xsplice_init();
+    arch_livepatch_init();
     return 0;
 }
-__initcall(xsplice_init);
+__initcall(livepatch_init);
 
 /*
  * Local variables:
diff --git a/xen/common/xsplice_elf.c b/xen/common/livepatch_elf.c
similarity index 72%
rename from xen/common/xsplice_elf.c
rename to xen/common/livepatch_elf.c
index d59759f..a1207d6 100644
--- a/xen/common/xsplice_elf.c
+++ b/xen/common/livepatch_elf.c
@@ -4,12 +4,13 @@
 
 #include <xen/errno.h>
 #include <xen/lib.h>
+#include <xen/livepatch_elf.h>
+#include <xen/livepatch.h>
 #include <xen/symbols.h>
-#include <xen/xsplice_elf.h>
-#include <xen/xsplice.h>
 
-const struct xsplice_elf_sec *xsplice_elf_sec_by_name(const struct xsplice_elf 
*elf,
-                                                      const char *name)
+const struct livepatch_elf_sec *
+livepatch_elf_sec_by_name(const struct livepatch_elf *elf,
+                          const char *name)
 {
     unsigned int i;
 
@@ -22,7 +23,7 @@ const struct xsplice_elf_sec *xsplice_elf_sec_by_name(const 
struct xsplice_elf *
     return NULL;
 }
 
-static int elf_verify_strtab(const struct xsplice_elf_sec *sec)
+static int elf_verify_strtab(const struct livepatch_elf_sec *sec)
 {
     const Elf_Shdr *s;
     const char *contents;
@@ -43,25 +44,25 @@ static int elf_verify_strtab(const struct xsplice_elf_sec 
*sec)
     return 0;
 }
 
-static int elf_resolve_sections(struct xsplice_elf *elf, const void *data)
+static int elf_resolve_sections(struct livepatch_elf *elf, const void *data)
 {
-    struct xsplice_elf_sec *sec;
+    struct livepatch_elf_sec *sec;
     unsigned int i;
     Elf_Off delta;
     int rc;
 
-    /* xsplice_elf_load sanity checked e_shnum. */
-    sec = xmalloc_array(struct xsplice_elf_sec, elf->hdr->e_shnum);
+    /* livepatch_elf_load sanity checked e_shnum. */
+    sec = xmalloc_array(struct livepatch_elf_sec, elf->hdr->e_shnum);
     if ( !sec )
     {
-        dprintk(XENLOG_ERR, XSPLICE"%s: Could not allocate memory for section 
table!\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH"%s: Could not allocate memory for 
section table!\n",
                elf->name);
         return -ENOMEM;
     }
 
     elf->sec = sec;
 
-    /* e_shoff and e_shnum overflow checks are done in xsplice_header_check. */
+    /* e_shoff and e_shnum overflow checks are done in livepatch_header_check. 
*/
     delta = elf->hdr->e_shoff + elf->hdr->e_shnum * elf->hdr->e_shentsize;
     ASSERT(delta <= elf->len);
 
@@ -80,7 +81,7 @@ static int elf_resolve_sections(struct xsplice_elf *elf, 
const void *data)
              (sec[i].sec->sh_type != SHT_NOBITS && /* Skip SHT_NOBITS */
               (delta > elf->len || (delta + sec[i].sec->sh_size > elf->len))) )
         {
-            dprintk(XENLOG_ERR, XSPLICE "%s: Section [%u] data %s of 
payload!\n",
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: Section [%u] data %s of 
payload!\n",
                     elf->name, i,
                     delta < sizeof(Elf_Ehdr) ? "at ELF header" : "is past 
end");
             return -EINVAL;
@@ -94,7 +95,7 @@ static int elf_resolve_sections(struct xsplice_elf *elf, 
const void *data)
         {
             if ( elf->symtab )
             {
-                dprintk(XENLOG_ERR, XSPLICE "%s: Unsupported multiple symbol 
tables!\n",
+                dprintk(XENLOG_ERR, LIVE_PATCH "%s: Unsupported multiple 
symbol tables!\n",
                         elf->name);
                 return -EOPNOTSUPP;
             }
@@ -108,7 +109,7 @@ static int elf_resolve_sections(struct xsplice_elf *elf, 
const void *data)
              */
             if ( elf->symtab->sec->sh_link >= elf->hdr->e_shnum )
             {
-                dprintk(XENLOG_ERR, XSPLICE
+                dprintk(XENLOG_ERR, LIVE_PATCH
                         "%s: Symbol table idx (%u) to strtab past end (%u)\n",
                         elf->name, elf->symtab->sec->sh_link,
                         elf->hdr->e_shnum);
@@ -119,7 +120,7 @@ static int elf_resolve_sections(struct xsplice_elf *elf, 
const void *data)
 
     if ( !elf->symtab )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: No symbol table found!\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: No symbol table found!\n",
                 elf->name);
         return -EINVAL;
     }
@@ -128,7 +129,7 @@ static int elf_resolve_sections(struct xsplice_elf *elf, 
const void *data)
          elf->symtab->sec->sh_entsize < sizeof(Elf_Sym) ||
          elf->symtab->sec->sh_size % elf->symtab->sec->sh_entsize )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Symbol table header is corrupted!\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Symbol table header is 
corrupted!\n",
                 elf->name);
         return -EINVAL;
     }
@@ -142,19 +143,19 @@ static int elf_resolve_sections(struct xsplice_elf *elf, 
const void *data)
     rc = elf_verify_strtab(elf->strtab);
     if ( rc )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: String table section is corrupted\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: String table section is 
corrupted\n",
                 elf->name);
     }
 
     return rc;
 }
 
-static int elf_resolve_section_names(struct xsplice_elf *elf, const void *data)
+static int elf_resolve_section_names(struct livepatch_elf *elf, const void 
*data)
 {
     const char *shstrtab;
     unsigned int i;
     Elf_Off offset, delta;
-    struct xsplice_elf_sec *sec;
+    struct livepatch_elf_sec *sec;
     int rc;
 
     /*
@@ -167,7 +168,7 @@ static int elf_resolve_section_names(struct xsplice_elf 
*elf, const void *data)
     rc = elf_verify_strtab(sec);
     if ( rc )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Section string table is corrupted\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Section string table is 
corrupted\n",
                 elf->name);
         return rc;
     }
@@ -185,7 +186,7 @@ static int elf_resolve_section_names(struct xsplice_elf 
*elf, const void *data)
         /* Boundary check on offset of name within the .shstrtab. */
         if ( delta >= sec->sec->sh_size )
         {
-            dprintk(XENLOG_ERR, XSPLICE "%s: Section %u name is not within 
.shstrtab!\n",
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: Section %u name is not within 
.shstrtab!\n",
                     elf->name, i);
             return -EINVAL;
         }
@@ -196,10 +197,10 @@ static int elf_resolve_section_names(struct xsplice_elf 
*elf, const void *data)
     return 0;
 }
 
-static int elf_get_sym(struct xsplice_elf *elf, const void *data)
+static int elf_get_sym(struct livepatch_elf *elf, const void *data)
 {
-    const struct xsplice_elf_sec *symtab_sec, *strtab_sec;
-    struct xsplice_elf_sym *sym;
+    const struct livepatch_elf_sec *symtab_sec, *strtab_sec;
+    struct livepatch_elf_sym *sym;
     unsigned int i, nsym;
     Elf_Off offset;
     Elf_Word delta;
@@ -220,10 +221,10 @@ static int elf_get_sym(struct xsplice_elf *elf, const 
void *data)
     /* No need to check values as elf_resolve_sections did it. */
     nsym = symtab_sec->sec->sh_size / symtab_sec->sec->sh_entsize;
 
-    sym = xmalloc_array(struct xsplice_elf_sym, nsym);
+    sym = xmalloc_array(struct livepatch_elf_sym, nsym);
     if ( !sym )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Could not allocate memory for 
symbols\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Could not allocate memory for 
symbols\n",
                elf->name);
         return -ENOMEM;
     }
@@ -239,7 +240,7 @@ static int elf_get_sym(struct xsplice_elf *elf, const void 
*data)
         /* Boundary check within the .strtab. */
         if ( delta >= strtab_sec->sec->sh_size )
         {
-            dprintk(XENLOG_ERR, XSPLICE "%s: Symbol [%u] name is not within 
.strtab!\n",
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: Symbol [%u] name is not within 
.strtab!\n",
                     elf->name, i);
             return -EINVAL;
         }
@@ -252,7 +253,7 @@ static int elf_get_sym(struct xsplice_elf *elf, const void 
*data)
     return 0;
 }
 
-int xsplice_elf_resolve_symbols(struct xsplice_elf *elf)
+int livepatch_elf_resolve_symbols(struct livepatch_elf *elf)
 {
     unsigned int i;
     int rc = 0;
@@ -268,7 +269,7 @@ int xsplice_elf_resolve_symbols(struct xsplice_elf *elf)
         switch ( idx )
         {
         case SHN_COMMON:
-            dprintk(XENLOG_ERR, XSPLICE "%s: Unexpected common symbol: %s\n",
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: Unexpected common symbol: 
%s\n",
                     elf->name, elf->sym[i].name);
             rc = -EINVAL;
             break;
@@ -277,21 +278,21 @@ int xsplice_elf_resolve_symbols(struct xsplice_elf *elf)
             st_value = symbols_lookup_by_name(elf->sym[i].name);
             if ( !st_value )
             {
-                st_value = xsplice_symbols_lookup_by_name(elf->sym[i].name);
+                st_value = livepatch_symbols_lookup_by_name(elf->sym[i].name);
                 if ( !st_value )
                 {
-                    dprintk(XENLOG_ERR, XSPLICE "%s: Unknown symbol: %s\n",
+                    dprintk(XENLOG_ERR, LIVE_PATCH "%s: Unknown symbol: %s\n",
                             elf->name, elf->sym[i].name);
                     rc = -ENOENT;
                     break;
                 }
             }
-            dprintk(XENLOG_DEBUG, XSPLICE "%s: Undefined symbol resolved: %s 
=> %#"PRIxElfAddr"\n",
+            dprintk(XENLOG_DEBUG, LIVE_PATCH "%s: Undefined symbol resolved: 
%s => %#"PRIxElfAddr"\n",
                     elf->name, elf->sym[i].name, st_value);
             break;
 
         case SHN_ABS:
-            dprintk(XENLOG_DEBUG, XSPLICE "%s: Absolute symbol: %s => 
%#"PRIxElfAddr"\n",
+            dprintk(XENLOG_DEBUG, LIVE_PATCH "%s: Absolute symbol: %s => 
%#"PRIxElfAddr"\n",
                     elf->name, elf->sym[i].name, sym->st_value);
             break;
 
@@ -304,7 +305,7 @@ int xsplice_elf_resolve_symbols(struct xsplice_elf *elf)
 
             if ( rc )
             {
-                dprintk(XENLOG_ERR, XSPLICE "%s: Out of bounds symbol section 
%#x\n",
+                dprintk(XENLOG_ERR, LIVE_PATCH "%s: Out of bounds symbol 
section %#x\n",
                         elf->name, idx);
                 break;
             }
@@ -315,7 +316,7 @@ int xsplice_elf_resolve_symbols(struct xsplice_elf *elf)
 
             st_value += (unsigned long)elf->sec[idx].load_addr;
             if ( elf->sym[i].name )
-                dprintk(XENLOG_DEBUG, XSPLICE "%s: Symbol resolved: %s => 
%#"PRIxElfAddr" (%s)\n",
+                dprintk(XENLOG_DEBUG, LIVE_PATCH "%s: Symbol resolved: %s => 
%#"PRIxElfAddr" (%s)\n",
                        elf->name, elf->sym[i].name,
                        st_value, elf->sec[idx].name);
         }
@@ -329,9 +330,9 @@ int xsplice_elf_resolve_symbols(struct xsplice_elf *elf)
     return rc;
 }
 
-int xsplice_elf_perform_relocs(struct xsplice_elf *elf)
+int livepatch_elf_perform_relocs(struct livepatch_elf *elf)
 {
-    struct xsplice_elf_sec *r, *base;
+    struct livepatch_elf_sec *r, *base;
     unsigned int i;
     int rc = 0;
 
@@ -357,16 +358,16 @@ int xsplice_elf_perform_relocs(struct xsplice_elf *elf)
 
         if ( r->sec->sh_link != elf->symtab_idx )
         {
-            dprintk(XENLOG_ERR, XSPLICE "%s: Relative link of %s is incorrect 
(%d, expected=%d)\n",
+            dprintk(XENLOG_ERR, LIVE_PATCH "%s: Relative link of %s is 
incorrect (%d, expected=%d)\n",
                     elf->name, r->name, r->sec->sh_link, elf->symtab_idx);
             rc = -EINVAL;
             break;
         }
 
         if ( r->sec->sh_type == SHT_RELA )
-            rc = arch_xsplice_perform_rela(elf, base, r);
+            rc = arch_livepatch_perform_rela(elf, base, r);
         else /* SHT_REL */
-            rc = arch_xsplice_perform_rel(elf, base, r);
+            rc = arch_livepatch_perform_rel(elf, base, r);
 
         if ( rc )
             break;
@@ -375,21 +376,21 @@ int xsplice_elf_perform_relocs(struct xsplice_elf *elf)
     return rc;
 }
 
-static int xsplice_header_check(const struct xsplice_elf *elf)
+static int livepatch_header_check(const struct livepatch_elf *elf)
 {
     const Elf_Ehdr *hdr = elf->hdr;
     int rc;
 
     if ( sizeof(*elf->hdr) > elf->len )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Section header is bigger than 
payload!\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Section header is bigger than 
payload!\n",
                 elf->name);
         return -EINVAL;
     }
 
     if ( !IS_ELF(*hdr) )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Not an ELF payload!\n", elf->name);
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Not an ELF payload!\n", elf->name);
         return -EINVAL;
     }
 
@@ -402,17 +403,17 @@ static int xsplice_header_check(const struct xsplice_elf 
*elf)
          hdr->e_type != ET_REL ||
          hdr->e_phnum != 0 )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Invalid ELF payload!\n", elf->name);
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Invalid ELF payload!\n", 
elf->name);
         return -EOPNOTSUPP;
     }
 
-    rc = arch_xsplice_verify_elf(elf);
+    rc = arch_livepatch_verify_elf(elf);
     if ( rc )
         return rc;
 
     if ( elf->hdr->e_shstrndx == SHN_UNDEF )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Section name idx is undefined!?\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Section name idx is undefined!?\n",
                 elf->name);
         return -EINVAL;
     }
@@ -420,7 +421,7 @@ static int xsplice_header_check(const struct xsplice_elf 
*elf)
     /* Arbitrary boundary limit. */
     if ( elf->hdr->e_shnum >= 1024 )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Too many (%u) sections!\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Too many (%u) sections!\n",
                 elf->name, elf->hdr->e_shnum);
         return -EOPNOTSUPP;
     }
@@ -428,20 +429,20 @@ static int xsplice_header_check(const struct xsplice_elf 
*elf)
     /* Check that section name index is within the sections. */
     if ( elf->hdr->e_shstrndx >= elf->hdr->e_shnum )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Section name idx (%u) is past end of 
sections (%u)!\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Section name idx (%u) is past end 
of sections (%u)!\n",
                 elf->name, elf->hdr->e_shstrndx, elf->hdr->e_shnum);
         return -EINVAL;
     }
 
     if ( elf->hdr->e_shoff >= elf->len )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Bogus e_shoff!\n", elf->name);
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Bogus e_shoff!\n", elf->name);
         return -EINVAL;
     }
 
     if ( elf->hdr->e_shentsize < sizeof(Elf_Shdr) )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Section header size is %u! Expected 
%zu!?\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Section header size is %u! 
Expected %zu!?\n",
                 elf->name, elf->hdr->e_shentsize, sizeof(Elf_Shdr));
         return -EINVAL;
     }
@@ -449,7 +450,7 @@ static int xsplice_header_check(const struct xsplice_elf 
*elf)
     if ( ((elf->len - elf->hdr->e_shoff) / elf->hdr->e_shentsize) <
          elf->hdr->e_shnum )
     {
-        dprintk(XENLOG_ERR, XSPLICE "%s: Section header size is corrupted!\n",
+        dprintk(XENLOG_ERR, LIVE_PATCH "%s: Section header size is 
corrupted!\n",
                 elf->name);
         return -EINVAL;
     }
@@ -457,13 +458,13 @@ static int xsplice_header_check(const struct xsplice_elf 
*elf)
     return 0;
 }
 
-int xsplice_elf_load(struct xsplice_elf *elf, const void *data)
+int livepatch_elf_load(struct livepatch_elf *elf, const void *data)
 {
     int rc;
 
     elf->hdr = data;
 
-    rc = xsplice_header_check(elf);
+    rc = livepatch_header_check(elf);
     if ( rc )
         return rc;
 
@@ -482,7 +483,7 @@ int xsplice_elf_load(struct xsplice_elf *elf, const void 
*data)
     return 0;
 }
 
-void xsplice_elf_free(struct xsplice_elf *elf)
+void livepatch_elf_free(struct livepatch_elf *elf)
 {
     xfree(elf->sec);
     elf->sec = NULL;
diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index 9a4cc1f..585dc20 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -18,6 +18,7 @@
 #include <xen/trace.h>
 #include <xen/console.h>
 #include <xen/iocap.h>
+#include <xen/livepatch.h>
 #include <xen/guest_access.h>
 #include <xen/keyhandler.h>
 #include <asm/current.h>
@@ -28,7 +29,6 @@
 #include <xsm/xsm.h>
 #include <xen/pmstat.h>
 #include <xen/gcov.h>
-#include <xen/xsplice.h>
 
 long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
 {
@@ -461,8 +461,8 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) 
u_sysctl)
         ret = tmem_control(&op->u.tmem_op);
         break;
 
-    case XEN_SYSCTL_xsplice_op:
-        ret = xsplice_op(&op->u.xsplice);
+    case XEN_SYSCTL_livepatch_op:
+        ret = livepatch_op(&op->u.livepatch);
         if ( ret != -ENOSYS && ret != -EOPNOTSUPP )
             copyback = 1;
         break;
diff --git a/xen/common/virtual_region.c b/xen/common/virtual_region.c
index 426dfa0..b666bc9 100644
--- a/xen/common/virtual_region.c
+++ b/xen/common/virtual_region.c
@@ -25,7 +25,7 @@ static struct virtual_region core_init __initdata = {
  * RCU locking. Additions are done either at startup (when there is only
  * one CPU) or when all CPUs are running without IRQs.
  *
- * Deletions are bit tricky. We do it when xSplicing (all CPUs running
+ * Deletions are bit tricky. We do it when live patching (all CPUs running
  * without IRQs) or during bootup (when clearing the init).
  *
  * Hence we use list_del_rcu (which sports an memory fence) and a spinlock
@@ -85,7 +85,7 @@ static void remove_virtual_region(struct virtual_region *r)
 
 void unregister_virtual_region(struct virtual_region *r)
 {
-    /* Expected to be called from xSplice - which has IRQs disabled. */
+    /* Expected to be called from live patching - which has IRQs disabled. */
     ASSERT(!local_irq_is_enabled());
 
     remove_virtual_region(r);
diff --git a/xen/common/vsprintf.c b/xen/common/vsprintf.c
index 70e1edf..82914d8 100644
--- a/xen/common/vsprintf.c
+++ b/xen/common/vsprintf.c
@@ -19,8 +19,8 @@
 #include <xen/ctype.h>
 #include <xen/symbols.h>
 #include <xen/lib.h>
+#include <xen/livepatch.h>
 #include <xen/sched.h>
-#include <xen/xsplice.h>
 #include <asm/div64.h>
 #include <asm/page.h>
 
@@ -356,7 +356,7 @@ static char *pointer(char *str, char *end, const char 
**fmt_ptr,
         }
 
         /*
-         * namebuf contents and s for core hypervisor are same but for xSplice
+         * namebuf contents and s for core hypervisor are same but for live 
patch
          * payloads they differ (namebuf contains the name of the payload).
          */
         if ( namebuf != s )
diff --git a/xen/include/asm-x86/current.h b/xen/include/asm-x86/current.h
index fa55602..7c6d623 100644
--- a/xen/include/asm-x86/current.h
+++ b/xen/include/asm-x86/current.h
@@ -86,17 +86,17 @@ static inline struct cpu_info *get_cpu_info(void)
 unsigned long get_stack_trace_bottom(unsigned long sp);
 unsigned long get_stack_dump_bottom (unsigned long sp);
 
-#ifdef CONFIG_XSPLICE
-# define CHECK_FOR_XSPLICE_WORK "call check_for_xsplice_work;"
+#ifdef CONFIG_LIVE_PATCH
+# define CHECK_FOR_LIVE_PATCH_WORK "call check_for_livepatch_work;"
 #else
-# define CHECK_FOR_XSPLICE_WORK ""
+# define CHECK_FOR_LIVE_PATCH_WORK ""
 #endif
 
 #define reset_stack_and_jump(__fn)                                      \
     ({                                                                  \
         __asm__ __volatile__ (                                          \
             "mov %0,%%"__OP"sp;"                                        \
-            CHECK_FOR_XSPLICE_WORK                                      \
+            CHECK_FOR_LIVE_PATCH_WORK                                      \
              "jmp %c1"                                                  \
             : : "r" (guest_cpu_user_regs()), "i" (__fn) : "memory" );   \
         unreachable();                                                  \
diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h
index b2b312b..a617479 100644
--- a/xen/include/public/sysctl.h
+++ b/xen/include/public/sysctl.h
@@ -849,67 +849,67 @@ typedef struct xen_sysctl_featureset 
xen_sysctl_featureset_t;
 DEFINE_XEN_GUEST_HANDLE(xen_sysctl_featureset_t);
 
 /*
- * XEN_SYSCTL_XSPLICE_op
+ * XEN_SYSCTL_LIVE_PATCH_op
  *
- * Refer to the docs/unstable/misc/xsplice.markdown
+ * Refer to the docs/unstable/misc/livepatch.markdown
  * for the design details of this hypercall.
  *
  * There are four sub-ops:
- *  XEN_SYSCTL_XSPLICE_UPLOAD (0)
- *  XEN_SYSCTL_XSPLICE_GET (1)
- *  XEN_SYSCTL_XSPLICE_LIST (2)
- *  XEN_SYSCTL_XSPLICE_ACTION (3)
+ *  XEN_SYSCTL_LIVE_PATCH_UPLOAD (0)
+ *  XEN_SYSCTL_LIVE_PATCH_GET (1)
+ *  XEN_SYSCTL_LIVE_PATCH_LIST (2)
+ *  XEN_SYSCTL_LIVE_PATCH_ACTION (3)
  *
  * The normal sequence of sub-ops is to:
- *  1) XEN_SYSCTL_XSPLICE_UPLOAD to upload the payload. If errors STOP.
- *  2) XEN_SYSCTL_XSPLICE_GET to check the `->rc`. If -XEN_EAGAIN spin.
+ *  1) XEN_SYSCTL_LIVE_PATCH_UPLOAD to upload the payload. If errors STOP.
+ *  2) XEN_SYSCTL_LIVE_PATCH_GET to check the `->rc`. If -XEN_EAGAIN spin.
  *     If zero go to next step.
- *  3) XEN_SYSCTL_XSPLICE_ACTION with XSPLICE_ACTION_APPLY to apply the patch.
- *  4) XEN_SYSCTL_XSPLICE_GET to check the `->rc`. If in -XEN_EAGAIN spin.
+ *  3) XEN_SYSCTL_LIVE_PATCH_ACTION with LIVE_PATCH_ACTION_APPLY to apply the 
patch.
+ *  4) XEN_SYSCTL_LIVE_PATCH_GET to check the `->rc`. If in -XEN_EAGAIN spin.
  *     If zero exit with success.
  */
 
-#define XSPLICE_PAYLOAD_VERSION 1
+#define LIVE_PATCH_PAYLOAD_VERSION 1
 /*
- * .xsplice.funcs structure layout defined in the `Payload format`
- * section in the xSplice design document.
+ * .livepatch.funcs structure layout defined in the `Payload format`
+ * section in the Live Patch design document.
  *
  * We guard this with __XEN__ as toolstacks SHOULD not use it.
  */
 #ifdef __XEN__
-struct xsplice_patch_func {
+struct livepatch_func {
     const char *name;       /* Name of function to be patched. */
     void *new_addr;
     void *old_addr;
     uint32_t new_size;
     uint32_t old_size;
-    uint8_t version;        /* MUST be XSPLICE_PAYLOAD_VERSION. */
+    uint8_t version;        /* MUST be LIVE_PATCH_PAYLOAD_VERSION. */
     uint8_t opaque[31];
 };
-typedef struct xsplice_patch_func xsplice_patch_func_t;
+typedef struct livepatch_func livepatch_func_t;
 #endif
 
 /*
  * Structure describing an ELF payload. Uniquely identifies the
  * payload. Should be human readable.
- * Recommended length is upto XEN_XSPLICE_NAME_SIZE.
+ * Recommended length is upto XEN_LIVE_PATCH_NAME_SIZE.
  * Includes the NUL terminator.
  */
-#define XEN_XSPLICE_NAME_SIZE 128
-struct xen_xsplice_name {
+#define XEN_LIVE_PATCH_NAME_SIZE 128
+struct xen_livepatch_name {
     XEN_GUEST_HANDLE_64(char) name;         /* IN: pointer to name. */
     uint16_t size;                          /* IN: size of name. May be upto
-                                               XEN_XSPLICE_NAME_SIZE. */
+                                               XEN_LIVE_PATCH_NAME_SIZE. */
     uint16_t pad[3];                        /* IN: MUST be zero. */
 };
-typedef struct xen_xsplice_name xen_xsplice_name_t;
-DEFINE_XEN_GUEST_HANDLE(xen_xsplice_name_t);
+typedef struct xen_livepatch_name xen_livepatch_name_t;
+DEFINE_XEN_GUEST_HANDLE(xen_livepatch_name_t);
 
 /*
  * Upload a payload to the hypervisor. The payload is verified
  * against basic checks and if there are any issues the proper return code
  * will be returned. The payload is not applied at this time - that is
- * controlled by XEN_SYSCTL_XSPLICE_ACTION.
+ * controlled by XEN_SYSCTL_LIVE_PATCH_ACTION.
  *
  * The return value is zero if the payload was succesfully uploaded.
  * Otherwise an EXX return value is provided. Duplicate `name` are not
@@ -918,42 +918,42 @@ DEFINE_XEN_GUEST_HANDLE(xen_xsplice_name_t);
  * The payload at this point is verified against basic checks.
  *
  * The `payload` is the ELF payload as mentioned in the `Payload format`
- * section in the xSplice design document.
+ * section in the Live Patching design document.
  */
-#define XEN_SYSCTL_XSPLICE_UPLOAD 0
-struct xen_sysctl_xsplice_upload {
-    xen_xsplice_name_t name;                /* IN, name of the patch. */
+#define XEN_SYSCTL_LIVE_PATCH_UPLOAD 0
+struct xen_sysctl_livepatch_upload {
+    xen_livepatch_name_t name;              /* IN, name of the patch. */
     uint64_t size;                          /* IN, size of the ELF file. */
     XEN_GUEST_HANDLE_64(uint8) payload;     /* IN, the ELF file. */
 };
-typedef struct xen_sysctl_xsplice_upload xen_sysctl_xsplice_upload_t;
-DEFINE_XEN_GUEST_HANDLE(xen_sysctl_xsplice_upload_t);
+typedef struct xen_sysctl_livepatch_upload xen_sysctl_livepatch_upload_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_livepatch_upload_t);
 
 /*
  * Retrieve an status of an specific payload.
  *
- * Upon completion the `struct xen_xsplice_status` is updated.
+ * Upon completion the `struct xen_livepatch_status` is updated.
  *
  * The return value is zero on success and XEN_EXX on failure. This operation
  * is synchronous and does not require preemption.
  */
-#define XEN_SYSCTL_XSPLICE_GET 1
+#define XEN_SYSCTL_LIVE_PATCH_GET 1
 
-struct xen_xsplice_status {
-#define XSPLICE_STATE_CHECKED      1
-#define XSPLICE_STATE_APPLIED      2
-    uint32_t state;                /* OUT: XSPLICE_STATE_*. */
+struct xen_livepatch_status {
+#define LIVE_PATCH_STATE_CHECKED      1
+#define LIVE_PATCH_STATE_APPLIED      2
+    uint32_t state;                /* OUT: LIVE_PATCH_STATE_*. */
     int32_t rc;                    /* OUT: 0 if no error, otherwise -XEN_EXX. 
*/
 };
-typedef struct xen_xsplice_status xen_xsplice_status_t;
-DEFINE_XEN_GUEST_HANDLE(xen_xsplice_status_t);
+typedef struct xen_livepatch_status xen_livepatch_status_t;
+DEFINE_XEN_GUEST_HANDLE(xen_livepatch_status_t);
 
-struct xen_sysctl_xsplice_get {
-    xen_xsplice_name_t name;                /* IN, name of the payload. */
-    xen_xsplice_status_t status;            /* IN/OUT, state of it. */
+struct xen_sysctl_livepatch_get {
+    xen_livepatch_name_t name;              /* IN, name of the payload. */
+    xen_livepatch_status_t status;          /* IN/OUT, state of it. */
 };
-typedef struct xen_sysctl_xsplice_get xen_sysctl_xsplice_get_t;
-DEFINE_XEN_GUEST_HANDLE(xen_sysctl_xsplice_get_t);
+typedef struct xen_sysctl_livepatch_get xen_sysctl_livepatch_get_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_livepatch_get_t);
 
 /*
  * Retrieve an array of abbreviated status and names of payloads that are
@@ -976,8 +976,8 @@ DEFINE_XEN_GUEST_HANDLE(xen_sysctl_xsplice_get_t);
  * data and start from scratch. It is OK for the toolstack to use the new
  * `version` field.
  */
-#define XEN_SYSCTL_XSPLICE_LIST 2
-struct xen_sysctl_xsplice_list {
+#define XEN_SYSCTL_LIVE_PATCH_LIST 2
+struct xen_sysctl_livepatch_list {
     uint32_t version;                       /* OUT: Hypervisor stamps value.
                                                If varies between calls, we are
                                              * getting stale data. */
@@ -987,49 +987,49 @@ struct xen_sysctl_xsplice_list {
                                                amount of payloads and version.
                                                OUT: How many payloads left. */
     uint32_t pad;                           /* IN: Must be zero. */
-    XEN_GUEST_HANDLE_64(xen_xsplice_status_t) status;  /* OUT. Must have enough
+    XEN_GUEST_HANDLE_64(xen_livepatch_status_t) status;  /* OUT. Must have 
enough
                                                space allocate for nr of them. 
*/
     XEN_GUEST_HANDLE_64(char) name;         /* OUT: Array of names. Each member
-                                               MUST XEN_XSPLICE_NAME_SIZE in 
size.
+                                               MUST XEN_LIVE_PATCH_NAME_SIZE 
in size.
                                                Must have nr of them. */
     XEN_GUEST_HANDLE_64(uint32) len;        /* OUT: Array of lengths of name's.
                                                Must have nr of them. */
 };
-typedef struct xen_sysctl_xsplice_list xen_sysctl_xsplice_list_t;
-DEFINE_XEN_GUEST_HANDLE(xen_sysctl_xsplice_list_t);
+typedef struct xen_sysctl_livepatch_list xen_sysctl_livepatch_list_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_livepatch_list_t);
 
 /*
  * Perform an operation on the payload structure referenced by the `name` 
field.
  * The operation request is asynchronous and the status should be retrieved
- * by using either XEN_SYSCTL_XSPLICE_GET or XEN_SYSCTL_XSPLICE_LIST hypercall.
+ * by using either XEN_SYSCTL_LIVE_PATCH_GET or XEN_SYSCTL_LIVE_PATCH_LIST 
hypercall.
  */
-#define XEN_SYSCTL_XSPLICE_ACTION 3
-struct xen_sysctl_xsplice_action {
-    xen_xsplice_name_t name;                /* IN, name of the patch. */
-#define XSPLICE_ACTION_UNLOAD       1
-#define XSPLICE_ACTION_REVERT       2
-#define XSPLICE_ACTION_APPLY        3
-#define XSPLICE_ACTION_REPLACE      4
-    uint32_t cmd;                           /* IN: XSPLICE_ACTION_*. */
+#define XEN_SYSCTL_LIVE_PATCH_ACTION 3
+struct xen_sysctl_livepatch_action {
+    xen_livepatch_name_t name;              /* IN, name of the patch. */
+#define LIVE_PATCH_ACTION_UNLOAD       1
+#define LIVE_PATCH_ACTION_REVERT       2
+#define LIVE_PATCH_ACTION_APPLY        3
+#define LIVE_PATCH_ACTION_REPLACE      4
+    uint32_t cmd;                           /* IN: LIVE_PATCH_ACTION_*. */
     uint32_t timeout;                       /* IN: Zero if no timeout. */
                                             /* Or upper bound of time (ms) */
                                             /* for operation to take. */
 };
-typedef struct xen_sysctl_xsplice_action xen_sysctl_xsplice_action_t;
-DEFINE_XEN_GUEST_HANDLE(xen_sysctl_xsplice_action_t);
+typedef struct xen_sysctl_livepatch_action xen_sysctl_livepatch_action_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_livepatch_action_t);
 
-struct xen_sysctl_xsplice_op {
-    uint32_t cmd;                           /* IN: XEN_SYSCTL_XSPLICE_*. */
+struct xen_sysctl_livepatch_op {
+    uint32_t cmd;                           /* IN: XEN_SYSCTL_LIVE_PATCH_*. */
     uint32_t pad;                           /* IN: Always zero. */
     union {
-        xen_sysctl_xsplice_upload_t upload;
-        xen_sysctl_xsplice_list_t list;
-        xen_sysctl_xsplice_get_t get;
-        xen_sysctl_xsplice_action_t action;
+        xen_sysctl_livepatch_upload_t upload;
+        xen_sysctl_livepatch_list_t list;
+        xen_sysctl_livepatch_get_t get;
+        xen_sysctl_livepatch_action_t action;
     } u;
 };
-typedef struct xen_sysctl_xsplice_op xen_sysctl_xsplice_op_t;
-DEFINE_XEN_GUEST_HANDLE(xen_sysctl_xsplice_op_t);
+typedef struct xen_sysctl_livepatch_op xen_sysctl_livepatch_op_t;
+DEFINE_XEN_GUEST_HANDLE(xen_sysctl_livepatch_op_t);
 
 struct xen_sysctl {
     uint32_t cmd;
@@ -1058,7 +1058,7 @@ struct xen_sysctl {
 #define XEN_SYSCTL_tmem_op                       24
 #define XEN_SYSCTL_get_cpu_levelling_caps        25
 #define XEN_SYSCTL_get_cpu_featureset            26
-#define XEN_SYSCTL_xsplice_op                    27
+#define XEN_SYSCTL_livepatch_op                  27
     uint32_t interface_version; /* XEN_SYSCTL_INTERFACE_VERSION */
     union {
         struct xen_sysctl_readconsole       readconsole;
@@ -1086,7 +1086,7 @@ struct xen_sysctl {
         struct xen_sysctl_tmem_op           tmem_op;
         struct xen_sysctl_cpu_levelling_caps cpu_levelling_caps;
         struct xen_sysctl_cpu_featureset    cpu_featureset;
-        struct xen_sysctl_xsplice_op        xsplice;
+        struct xen_sysctl_livepatch_op      livepatch;
         uint8_t                             pad[128];
     } u;
 };
diff --git a/xen/include/xen/elfstructs.h b/xen/include/xen/elfstructs.h
index 68954b0..ceac45e 100644
--- a/xen/include/xen/elfstructs.h
+++ b/xen/include/xen/elfstructs.h
@@ -353,7 +353,7 @@ typedef struct {
 #define        ELF64_R_TYPE(info)      ((info) & 0xFFFFFFFF)
 #define ELF64_R_INFO(s,t)      (((s) << 32) + (u_int32_t)(t))
 
-/* x86-64 relocation types. We list only the ones xSplice implements. */
+/* x86-64 relocation types. We list only the ones Live Patching implements. */
 #define R_X86_64_NONE          0       /* No reloc */
 #define R_X86_64_64            1       /* Direct 64 bit  */
 #define R_X86_64_PC32          2       /* PC relative 32 bit signed */
diff --git a/xen/include/xen/livepatch.h b/xen/include/xen/livepatch.h
new file mode 100644
index 0000000..bf9478f
--- /dev/null
+++ b/xen/include/xen/livepatch.h
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
+ *
+ */
+
+#ifndef __XEN_LIVE_PATCH_H__
+#define __XEN_LIVE_PATCH_H__
+
+struct livepatch_elf;
+struct livepatch_elf_sec;
+struct livepatch_elf_sym;
+struct xen_sysctl_livepatch_op;
+
+#include <xen/elfstructs.h>
+#ifdef CONFIG_LIVE_PATCH
+
+/*
+ * We use alternative and exception table code - which by default are __init
+ * only, however we need them during runtime. These macros allows us to build
+ * the image with these functions built-in. (See the #else below).
+ */
+#define init_or_livepatch_const
+#define init_or_livepatch_constrel
+#define init_or_livepatch_data
+#define init_or_livepatch
+
+/* Convenience define for printk. */
+#define LIVE_PATCH             "livepatch: "
+/* ELF payload special section names. */
+#define ELF_LIVE_PATCH_FUNC    ".livepatch.funcs"
+#define ELF_LIVE_PATCH_DEPENDS ".livepatch.depends"
+#define ELF_BUILD_ID_NOTE      ".note.gnu.build-id"
+
+struct livepatch_symbol {
+    const char *name;
+    unsigned long value;
+    unsigned int size;
+    bool_t new_symbol;
+};
+
+int livepatch_op(struct xen_sysctl_livepatch_op *);
+void check_for_livepatch_work(void);
+unsigned long livepatch_symbols_lookup_by_name(const char *symname);
+bool_t is_patch(const void *addr);
+int xen_build_id_check(const Elf_Note *n, unsigned int n_sz,
+                       const void **p, unsigned int *len);
+
+/* Arch hooks. */
+int arch_livepatch_verify_elf(const struct livepatch_elf *elf);
+int arch_livepatch_perform_rel(struct livepatch_elf *elf,
+                               const struct livepatch_elf_sec *base,
+                               const struct livepatch_elf_sec *rela);
+int arch_livepatch_perform_rela(struct livepatch_elf *elf,
+                                const struct livepatch_elf_sec *base,
+                                const struct livepatch_elf_sec *rela);
+enum va_type {
+    LIVE_PATCH_VA_RX, /* .text */
+    LIVE_PATCH_VA_RW, /* .data */
+    LIVE_PATCH_VA_RO, /* .rodata */
+};
+
+/*
+ * Function to secure the allocate pages (from arch_livepatch_alloc_payload)
+ * with the right page permissions.
+ */
+int arch_livepatch_secure(const void *va, unsigned int pages, enum va_type 
types);
+
+void arch_livepatch_init(void);
+
+#include <public/sysctl.h> /* For struct livepatch_func. */
+int arch_livepatch_verify_func(const struct livepatch_func *func);
+/*
+ * These functions are called around the critical region patching live code,
+ * for an architecture to take make appropratie global state adjustments.
+ */
+void arch_livepatching_enter(void);
+void arch_livepatching_leave(void);
+
+void arch_livepatch_apply_jmp(struct livepatch_func *func);
+void arch_livepatch_revert_jmp(const struct livepatch_func *func);
+void arch_livepatch_post_action(void);
+
+void arch_livepatch_mask(void);
+void arch_livepatch_unmask(void);
+#else
+
+/*
+ * If not compiling with live patching certain functionality should stay as
+ * __init.
+ */
+#define init_or_livepatch_const       __initconst
+#define init_or_livepatch_constrel    __initconstrel
+#define init_or_livepatch_data        __initdata
+#define init_or_livepatch             __init
+
+#include <xen/errno.h> /* For -ENOSYS */
+static inline int livepatch_op(struct xen_sysctl_livepatch_op *op)
+{
+    return -ENOSYS;
+}
+
+static inline void check_for_livepatch_work(void) { };
+static inline bool_t is_patch(const void *addr)
+{
+    return 0;
+}
+#endif /* CONFIG_LIVE_PATCH */
+
+#endif /* __XEN_LIVE_PATCH_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/include/xen/xsplice_elf.h b/xen/include/xen/livepatch_elf.h
similarity index 56%
rename from xen/include/xen/xsplice_elf.h
rename to xen/include/xen/livepatch_elf.h
index 750dc94..e0baf5c 100644
--- a/xen/include/xen/xsplice_elf.h
+++ b/xen/include/xen/livepatch_elf.h
@@ -2,14 +2,14 @@
  * Copyright (C) 2016 Citrix Systems R&D Ltd.
  */
 
-#ifndef __XEN_XSPLICE_ELF_H__
-#define __XEN_XSPLICE_ELF_H__
+#ifndef __XEN_LIVE_PATCH_ELF_H__
+#define __XEN_LIVE_PATCH_ELF_H__
 
 #include <xen/types.h>
 #include <xen/elfstructs.h>
 
-/* The following describes an Elf file as consumed by xSplice. */
-struct xsplice_elf_sec {
+/* The following describes an Elf file as consumed by Xen Live Patching. */
+struct livepatch_elf_sec {
     const Elf_Shdr *sec;                 /* Hooked up in 
elf_resolve_sections.*/
     const char *name;                    /* Human readable name hooked in
                                             elf_resolve_section_names. */
@@ -19,33 +19,34 @@ struct xsplice_elf_sec {
                                             Done by load_payload_data. */
 };
 
-struct xsplice_elf_sym {
+struct livepatch_elf_sym {
     const Elf_Sym *sym;
     const char *name;
 };
 
-struct xsplice_elf {
+struct livepatch_elf {
     const char *name;                    /* Pointer to payload->name. */
     size_t len;                          /* Length of the ELF file. */
     const Elf_Ehdr *hdr;                 /* ELF file. */
-    struct xsplice_elf_sec *sec;         /* Array of sections, allocated by 
us. */
-    struct xsplice_elf_sym *sym;         /* Array of symbols , allocated by 
us. */
+    struct livepatch_elf_sec *sec;       /* Array of sections, allocated by 
us. */
+    struct livepatch_elf_sym *sym;       /* Array of symbols , allocated by 
us. */
     unsigned int nsym;
-    const struct xsplice_elf_sec *symtab;/* Pointer to .symtab section - aka to
+    const struct livepatch_elf_sec *symtab;/* Pointer to .symtab section - aka 
to
                                             sec[symtab_idx]. */
-    const struct xsplice_elf_sec *strtab;/* Pointer to .strtab section. */
+    const struct livepatch_elf_sec *strtab;/* Pointer to .strtab section. */
     unsigned int symtab_idx;
 };
 
-const struct xsplice_elf_sec *xsplice_elf_sec_by_name(const struct xsplice_elf 
*elf,
-                                                      const char *name);
-int xsplice_elf_load(struct xsplice_elf *elf, const void *data);
-void xsplice_elf_free(struct xsplice_elf *elf);
+const struct livepatch_elf_sec *
+livepatch_elf_sec_by_name(const struct livepatch_elf *elf,
+                          const char *name);
+int livepatch_elf_load(struct livepatch_elf *elf, const void *data);
+void livepatch_elf_free(struct livepatch_elf *elf);
 
-int xsplice_elf_resolve_symbols(struct xsplice_elf *elf);
-int xsplice_elf_perform_relocs(struct xsplice_elf *elf);
+int livepatch_elf_resolve_symbols(struct livepatch_elf *elf);
+int livepatch_elf_perform_relocs(struct livepatch_elf *elf);
 
-#endif /* __XEN_XSPLICE_ELF_H__ */
+#endif /* __XEN_LIVE_PATCH_ELF_H__ */
 
 /*
  * Local variables:
diff --git a/xen/include/xen/xsplice.h b/xen/include/xen/xsplice.h
deleted file mode 100644
index 5ffb69d..0000000
--- a/xen/include/xen/xsplice.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved.
- *
- */
-
-#ifndef __XEN_XSPLICE_H__
-#define __XEN_XSPLICE_H__
-
-struct xsplice_elf;
-struct xsplice_elf_sec;
-struct xsplice_elf_sym;
-struct xen_sysctl_xsplice_op;
-
-#include <xen/elfstructs.h>
-#ifdef CONFIG_XSPLICE
-
-/*
- * We use alternative and exception table code - which by default are __init
- * only, however we need them during runtime. These macros allows us to build
- * the image with these functions built-in. (See the #else below).
- */
-#define init_or_xsplice_const
-#define init_or_xsplice_constrel
-#define init_or_xsplice_data
-#define init_or_xsplice
-
-/* Convenience define for printk. */
-#define XSPLICE             "xsplice: "
-/* ELF payload special section names. */
-#define ELF_XSPLICE_FUNC    ".xsplice.funcs"
-#define ELF_XSPLICE_DEPENDS ".xsplice.depends"
-#define ELF_BUILD_ID_NOTE   ".note.gnu.build-id"
-
-struct xsplice_symbol {
-    const char *name;
-    unsigned long value;
-    unsigned int size;
-    bool_t new_symbol;
-};
-
-int xsplice_op(struct xen_sysctl_xsplice_op *);
-void check_for_xsplice_work(void);
-unsigned long xsplice_symbols_lookup_by_name(const char *symname);
-bool_t is_patch(const void *addr);
-int xen_build_id_check(const Elf_Note *n, unsigned int n_sz,
-                       const void **p, unsigned int *len);
-
-/* Arch hooks. */
-int arch_xsplice_verify_elf(const struct xsplice_elf *elf);
-int arch_xsplice_perform_rel(struct xsplice_elf *elf,
-                             const struct xsplice_elf_sec *base,
-                             const struct xsplice_elf_sec *rela);
-int arch_xsplice_perform_rela(struct xsplice_elf *elf,
-                              const struct xsplice_elf_sec *base,
-                              const struct xsplice_elf_sec *rela);
-enum va_type {
-    XSPLICE_VA_RX, /* .text */
-    XSPLICE_VA_RW, /* .data */
-    XSPLICE_VA_RO, /* .rodata */
-};
-
-/*
- * Function to secure the allocate pages (from arch_xsplice_alloc_payload)
- * with the right page permissions.
- */
-int arch_xsplice_secure(const void *va, unsigned int pages, enum va_type 
types);
-
-void arch_xsplice_init(void);
-
-#include <public/sysctl.h> /* For struct xsplice_patch_func. */
-int arch_xsplice_verify_func(const struct xsplice_patch_func *func);
-/*
- * These functions are called around the critical region patching live code,
- * for an architecture to take make appropratie global state adjustments.
- */
-void arch_xsplice_patching_enter(void);
-void arch_xsplice_patching_leave(void);
-
-void arch_xsplice_apply_jmp(struct xsplice_patch_func *func);
-void arch_xsplice_revert_jmp(const struct xsplice_patch_func *func);
-void arch_xsplice_post_action(void);
-
-void arch_xsplice_mask(void);
-void arch_xsplice_unmask(void);
-#else
-
-/*
- * If not compiling with xSplice certain functionality should stay as
- * __init.
- */
-#define init_or_xsplice_const       __initconst
-#define init_or_xsplice_constrel    __initconstrel
-#define init_or_xsplice_data        __initdata
-#define init_or_xsplice             __init
-
-#include <xen/errno.h> /* For -ENOSYS */
-static inline int xsplice_op(struct xen_sysctl_xsplice_op *op)
-{
-    return -ENOSYS;
-}
-
-static inline void check_for_xsplice_work(void) { };
-static inline bool_t is_patch(const void *addr)
-{
-    return 0;
-}
-#endif /* CONFIG_XSPLICE */
-
-#endif /* __XEN_XSPLICE_H__ */
-
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: nil
- * End:
- */
diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c
index 7477dbe..20d46c8 100644
--- a/xen/xsm/flask/hooks.c
+++ b/xen/xsm/flask/hooks.c
@@ -814,9 +814,9 @@ static int flask_sysctl(int cmd)
     case XEN_SYSCTL_get_cpu_featureset:
         return domain_has_xen(current->domain, XEN2__GET_CPU_FEATURESET);
 
-    case XEN_SYSCTL_xsplice_op:
+    case XEN_SYSCTL_livepatch_op:
         return avc_current_has_perm(SECINITSID_XEN, SECCLASS_XEN2,
-                                    XEN2__XSPLICE_OP, NULL);
+                                    XEN2__LIVEPATCH_OP, NULL);
 
     default:
         printk("flask_sysctl: Unknown op %d\n", cmd);
diff --git a/xen/xsm/flask/policy/access_vectors 
b/xen/xsm/flask/policy/access_vectors
index 4d1b548..3d29042 100644
--- a/xen/xsm/flask/policy/access_vectors
+++ b/xen/xsm/flask/policy/access_vectors
@@ -97,8 +97,8 @@ class xen2
     get_cpu_levelling_caps
 # XEN_SYSCTL_get_cpu_featureset
     get_cpu_featureset
-# XEN_SYSCTL_xsplice_op
-    xsplice_op
+# XEN_SYSCTL_livepatch_op
+    livepatch_op
 }
 
 # Classes domain and domain2 consist of operations that a domain performs on
-- 
2.5.5


_______________________________________________
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®.