ia64/xen-unstable

view xen/include/asm-x86/ldt.h @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents 7f1a36b834e1
children
line source
2 #ifndef __ARCH_LDT_H
3 #define __ARCH_LDT_H
5 #ifndef __ASSEMBLY__
7 static inline void load_LDT(struct vcpu *v)
8 {
9 struct desc_struct *desc;
10 unsigned long ents;
12 if ( (ents = v->arch.guest_context.ldt_ents) == 0 )
13 {
14 __asm__ __volatile__ ( "lldt %%ax" : : "a" (0) );
15 }
16 else
17 {
18 desc = (!is_pv_32on64_vcpu(v)
19 ? this_cpu(gdt_table) : this_cpu(compat_gdt_table))
20 + LDT_ENTRY - FIRST_RESERVED_GDT_ENTRY;
21 _set_tssldt_desc(desc, LDT_VIRT_START(v), ents*8-1, 2);
22 __asm__ __volatile__ ( "lldt %%ax" : : "a" (LDT_ENTRY << 3) );
23 }
24 }
26 #endif /* !__ASSEMBLY__ */
28 #endif
30 /*
31 * Local variables:
32 * mode: C
33 * c-set-style: "BSD"
34 * c-basic-offset: 4
35 * tab-width: 4
36 * indent-tabs-mode: nil
37 * End:
38 */