aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-11-07 15:48:10 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-11-07 15:48:10 +0000
commit1aa6e42118517949a420f1a402e9a9cd2dad273e (patch)
tree2da0a1cae47970099574f9a996424b3ec9e3d0f7 /xen/include
parent25f5b0ff1569004165e5dbdf2872f4e7617a5b60 (diff)
downloadxen-1aa6e42118517949a420f1a402e9a9cd2dad273e.tar.gz
xen-1aa6e42118517949a420f1a402e9a9cd2dad273e.tar.bz2
xen-1aa6e42118517949a420f1a402e9a9cd2dad273e.zip
[HVM] VLAPIC cleanups. vlapic tsruct is statically contained
inside the vcpu structure. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include')
-rw-r--r--xen/include/asm-x86/hvm/vcpu.h2
-rw-r--r--xen/include/asm-x86/hvm/vlapic.h7
2 files changed, 5 insertions, 4 deletions
diff --git a/xen/include/asm-x86/hvm/vcpu.h b/xen/include/asm-x86/hvm/vcpu.h
index 8945916d32..990562cd71 100644
--- a/xen/include/asm-x86/hvm/vcpu.h
+++ b/xen/include/asm-x86/hvm/vcpu.h
@@ -32,7 +32,7 @@ struct hvm_vcpu {
unsigned long hw_cr3; /* value we give to HW to use */
unsigned long ioflags;
struct hvm_io_op io_op;
- struct vlapic *vlapic;
+ struct vlapic vlapic;
s64 cache_tsc_offset;
u64 guest_time;
diff --git a/xen/include/asm-x86/hvm/vlapic.h b/xen/include/asm-x86/hvm/vlapic.h
index b53c9e149b..ed23916649 100644
--- a/xen/include/asm-x86/hvm/vlapic.h
+++ b/xen/include/asm-x86/hvm/vlapic.h
@@ -25,7 +25,10 @@
#define MAX_VECTOR 256
-#define VLAPIC(v) (v->arch.hvm_vcpu.vlapic)
+#define vcpu_vlapic(vcpu) (&(vcpu)->arch.hvm_vcpu.vlapic)
+#define vlapic_vcpu(vpic) (container_of((vpic), struct vcpu, \
+ arch.hvm_vcpu.vlapic))
+#define vlapic_domain(vpic) (vlapic_vcpu(vlapic)->domain)
#define VLAPIC_ID(vlapic) \
(GET_APIC_ID(vlapic_get_reg(vlapic, APIC_ID)))
@@ -51,8 +54,6 @@ struct vlapic {
int timer_pending_count;
int flush_tpr_threshold;
s_time_t timer_last_update;
- struct vcpu *vcpu;
- struct domain *domain;
struct page_info *regs_page;
void *regs;
};