ldt.h
来自「xen虚拟机源代码安装包」· C头文件 代码 · 共 40 行
H
40 行
#ifndef __ARCH_LDT_H#define __ARCH_LDT_H#ifndef __ASSEMBLY__static inline void load_LDT(struct vcpu *v){ unsigned int cpu; struct desc_struct *desc; unsigned long ents; if ( (ents = v->arch.guest_context.ldt_ents) == 0 ) { __asm__ __volatile__ ( "lldt %%ax" : : "a" (0) ); } else { cpu = smp_processor_id(); desc = (!is_pv_32on64_vcpu(v) ? gdt_table : compat_gdt_table) + __LDT(cpu) - FIRST_RESERVED_GDT_ENTRY; _set_tssldt_desc(desc, LDT_VIRT_START(v), ents*8-1, 2); __asm__ __volatile__ ( "lldt %%ax" : : "a" (__LDT(cpu)<<3) ); }}#endif /* !__ASSEMBLY__ */#endif/* * Local variables: * mode: C * c-set-style: "BSD" * c-basic-offset: 4 * tab-width: 4 * indent-tabs-mode: nil * End: */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?