lkml.org 
[lkml]   [2008]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 15/54] KVM: Add ifdef in irqchip struct for x86 only structures
Date
From: Jerone Young <jyoung5@us.ibm.com>

This patch fixes a small issue where sturctures:
kvm_pic_state
kvm_ioapic_state

are defined inside x86 specific code and may or may not
be defined in anyway for other architectures. The problem
caused is one cannot compile userspace apps (ex. libkvm)
for other archs since a size cannot be determined for these
structures.

Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
---
include/linux/Kbuild | 2 +-
include/linux/kvm.h | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 9abf5a8..805c2a7 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -98,7 +98,6 @@ header-y += iso_fs.h
header-y += ixjuser.h
header-y += jffs2.h
header-y += keyctl.h
-header-y += kvm.h
header-y += limits.h
header-y += lock_dlm_plock.h
header-y += magic.h
@@ -254,6 +253,7 @@ unifdef-y += kd.h
unifdef-y += kernelcapi.h
unifdef-y += kernel.h
unifdef-y += keyboard.h
+unifdef-y += kvm.h
unifdef-y += llc.h
unifdef-y += loop.h
unifdef-y += lp.h
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index b751552..f0bebd6 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -51,8 +51,10 @@ struct kvm_irqchip {
__u32 pad;
union {
char dummy[512]; /* reserving space */
+#ifdef CONFIG_X86
struct kvm_pic_state pic;
struct kvm_ioapic_state ioapic;
+#endif
} chip;
};

--
1.5.3.7


\
 
 \ /
  Last update: 2008-01-01 16:43    [W:0.225 / U:7.272 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site