WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] libxl: fix compilation errors for ia64

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] libxl: fix compilation errors for ia64
From: "KUWAMURA Shin'ya" <kuwa@xxxxxxxxxxxxxx>
Date: Fri, 29 Oct 2010 16:45:39 +0900 (JST)
Delivery-date: Fri, 29 Oct 2010 00:47:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

This patch fixes compilation errors for ia64:
  libxl.c:112: error: 'XEN_CPUID_INPUT_UNUSED' undeclared (first use in this 
function)

# cpuid is supported only on x86.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
-- 
  KUWAMURA Shin'ya
# HG changeset patch
# User KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>
# Date 1288242858 -32400
# Node ID ff992de935b8ffe6630715789ed3bf74653f071a
# Parent  0b66bc83e438eae4fe5183f001228c20aa2a5f22
libxl: fix compilation errors for ia64

cpuid is supported only on x86.

Signed-off-by: KUWAMURA Shin'ya <kuwa@xxxxxxxxxxxxxx>

diff -r 0b66bc83e438 -r ff992de935b8 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Thu Oct 28 11:28:34 2010 +0900
+++ b/tools/libxl/libxl.c       Thu Oct 28 14:14:18 2010 +0900
@@ -102,6 +102,7 @@ void libxl_key_value_list_destroy(libxl_
     free(kvl);
 }
 
+#if defined(__i386__) || defined(__x86_64__)
 void libxl_cpuid_destroy(libxl_cpuid_policy_list *p_cpuid_list)
 {
     int i, j;
@@ -116,6 +117,9 @@ void libxl_cpuid_destroy(libxl_cpuid_pol
     }
     return;
 }
+#else /* !(defined(__i386__) || defined(__x86_64__)) */
+void libxl_cpuid_destroy(libxl_cpuid_policy_list *p_cpuid_list) {}
+#endif
 
 
/******************************************************************************/
 
@@ -3542,6 +3546,7 @@ struct cpuid_flags {
     int length;
 };
 
+#if defined(__i386__) || defined(__x86_64__)
 /* go through the dynamic array finding the entry for a specified leaf.
  * if no entry exists, allocate one and return that.
  */
@@ -3799,6 +3804,7 @@ int libxl_cpuid_parse_config_xend(libxl_
     }
     return 0;
 }
+#endif /* defined(__i386__) || defined(__x86_64__) */
 
 char *libxl_tmem_list(libxl_ctx *ctx, uint32_t domid, int use_long)
 {
diff -r 0b66bc83e438 -r ff992de935b8 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Thu Oct 28 11:28:34 2010 +0900
+++ b/tools/libxl/libxl.h       Thu Oct 28 14:14:18 2010 +0900
@@ -418,9 +418,11 @@ int libxl_device_pci_shutdown(libxl_ctx 
 int libxl_device_pci_list_assigned(libxl_ctx *ctx, libxl_device_pci **list, 
uint32_t domid, int *num);
 int libxl_device_pci_list_assignable(libxl_ctx *ctx, libxl_device_pci **list, 
int *num);
 int libxl_device_pci_parse_bdf(libxl_ctx *ctx, libxl_device_pci *pcidev, const 
char *str);
+#if defined(__i386__) || defined(__x86_64__)
 int libxl_cpuid_parse_config(libxl_cpuid_policy_list *cpuid, const char* str);
 int libxl_cpuid_parse_config_xend(libxl_cpuid_policy_list *cpuid,
                                   const char* str);
+#endif
 
 /*
  * Functions for allowing users of libxl to store private data
diff -r 0b66bc83e438 -r ff992de935b8 tools/libxl/libxl_dom.c
--- a/tools/libxl/libxl_dom.c   Thu Oct 28 11:28:34 2010 +0900
+++ b/tools/libxl/libxl_dom.c   Thu Oct 28 14:14:18 2010 +0900
@@ -95,7 +95,9 @@ int libxl__build_post(libxl_ctx *ctx, ui
     xs_transaction_t t;
     char **ents;
     int i;
+#if defined(__i386__) || defined(__x86_64__)
     char *cpuid_res[4];
+#endif
 
 #if defined(__i386__) || defined(__x86_64__)
     xc_cpuid_apply_policy(ctx->xch, domid);
diff -r 0b66bc83e438 -r ff992de935b8 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Thu Oct 28 11:28:34 2010 +0900
+++ b/tools/libxl/xl_cmdimpl.c  Thu Oct 28 14:14:18 2010 +0900
@@ -650,7 +650,10 @@ static void parse_config_data(const char
     const char *buf;
     long l;
     XLU_Config *config;
-    XLU_ConfigList *vbds, *nics, *pcis, *cvfbs, *net2s, *cpuids;
+    XLU_ConfigList *vbds, *nics, *pcis, *cvfbs, *net2s;
+#if defined(__i386__) || defined(__x86_64__)
+    XLU_ConfigList *cpuids;
+#endif
     int pci_power_mgmt = 0;
     int pci_msitranslate = 1;
     int e;
@@ -1096,6 +1099,7 @@ skip_vfb:
         }
     }
 
+#if defined(__i386__) || defined(__x86_64__)
     switch (xlu_cfg_get_list(config, "cpuid", &cpuids, 0, 1)) {
     case 0:
         {
@@ -1173,6 +1177,7 @@ skip_vfb:
     default:
         break;
     }
+#endif /* defined(__i386__) || defined(__x86_64__) */
 
     if (c_info->hvm == 1) {
         /* init dm from c and b */
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] libxl: fix compilation errors for ia64, KUWAMURA Shin'ya <=