Blob Blame History Raw
--- xen-4.14.0/xen/include/crypto/vmac.h.orig	2020-07-23 16:07:51.000000000 +0100
+++ xen-4.14.0/xen/include/crypto/vmac.h	2020-10-24 15:45:49.246467465 +0100
@@ -142,7 +142,7 @@
 
 #define vmac_update vhash_update
 
-void vhash_update(unsigned char m[],
+void vhash_update(uint8_t *m,
           unsigned int mbytes,
           vmac_ctx_t *ctx);
 
--- xen-4.14.0/tools/libs/foreignmemory/linux.c.orig	2020-07-23 16:07:51.000000000 +0100
+++ xen-4.14.0/tools/libs/foreignmemory/linux.c	2020-10-25 21:36:00.982040566 +0000
@@ -162,7 +162,7 @@
 void *osdep_xenforeignmemory_map(xenforeignmemory_handle *fmem,
                                  uint32_t dom, void *addr,
                                  int prot, int flags, size_t num,
-                                 const xen_pfn_t arr[/*num*/], int err[/*num*/])
+                                 const xen_pfn_t arr[num], int err[num])
 {
     int fd = fmem->fd;
     privcmd_mmapbatch_v2_t ioctlx;
--- xen-4.14.0/tools/libs/foreignmemory/minios.c.orig	2020-07-23 16:07:51.000000000 +0100
+++ xen-4.14.0/tools/libs/foreignmemory/minios.c	2020-10-26 22:36:12.423883688 +0000
@@ -42,7 +42,7 @@
 void *osdep_xenforeignmemory_map(xenforeignmemory_handle *fmem,
                                  uint32_t dom, void *addr,
                                  int prot, int flags, size_t num,
-                                 const xen_pfn_t arr[/*num*/], int err[/*num*/])
+                                 const xen_pfn_t arr[num], int err[num])
 {
     unsigned long pt_prot = 0;
     if (prot & PROT_READ)
diff --git a/xen/arch/x86/tboot.c b/xen/arch/x86/tboot.c
index 320e06f..618ae92 100644
--- a/xen/arch/x86/tboot.c
+++ b/xen/arch/x86/tboot.c
@@ -91,7 +91,7 @@ static void __init tboot_copy_memory(unsigned char *va, uint32_t size,
 
 void __init tboot_probe(void)
 {
-    tboot_shared_t *tboot_shared;
+    tboot_shared_t * volatile tboot_shared;
 
     /* Look for valid page-aligned address for shared page. */
     if ( !opt_tboot_pa || (opt_tboot_pa & ~PAGE_MASK) )
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 84bb8e0..6ecf5db 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -725,9 +725,9 @@ union vex {
 #define copy_VEX(ptr, vex) ({ \
     if ( !mode_64bit() ) \
         (vex).reg |= 8; \
-    (ptr)[0 - PFX_BYTES] = ext < ext_8f08 ? 0xc4 : 0x8f; \
-    (ptr)[1 - PFX_BYTES] = (vex).raw[0]; \
-    (ptr)[2 - PFX_BYTES] = (vex).raw[1]; \
+    ((volatile uint8_t *)ptr)[0 - PFX_BYTES] = ext < ext_8f08 ? 0xc4 : 0x8f; \
+    ((volatile uint8_t *)ptr)[1 - PFX_BYTES] = (vex).raw[0]; \
+    ((volatile uint8_t *)ptr)[2 - PFX_BYTES] = (vex).raw[1]; \
     container_of((ptr) + 1 - PFX_BYTES, typeof(vex), raw[0]); \
 })