diff options
author | arun.sharma@intel.com[kaf24] <arun.sharma@intel.com[kaf24]> | 2005-06-30 08:09:03 +0000 |
---|---|---|
committer | arun.sharma@intel.com[kaf24] <arun.sharma@intel.com[kaf24]> | 2005-06-30 08:09:03 +0000 |
commit | b6e9ebda979eed6f7c5f1552060e86c047528934 (patch) | |
tree | 206fe90ef2bca2013cbb064dffe76ed75df926e9 | |
parent | 5ac71a423861d18dade23c2d8b03c80a5656390e (diff) | |
download | xen-b6e9ebda979eed6f7c5f1552060e86c047528934.tar.gz xen-b6e9ebda979eed6f7c5f1552060e86c047528934.tar.bz2 xen-b6e9ebda979eed6f7c5f1552060e86c047528934.zip |
bitkeeper revision 1.1778 (42c3a89fKOC3ZLo9T-f0b9tyflqDzg)
[PATCH] Enable vmxassist for 64 bit.
Enable vmxassist for 64 bit.
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
-rw-r--r-- | tools/firmware/vmxassist/gen.c | 2 | ||||
-rw-r--r-- | tools/firmware/vmxassist/util.c | 2 | ||||
-rw-r--r-- | tools/firmware/vmxassist/vm86.h | 13 | ||||
-rw-r--r-- | xen/arch/x86/vmx.c | 11 | ||||
-rw-r--r-- | xen/include/public/vmx_assist.h | 68 |
5 files changed, 55 insertions, 41 deletions
diff --git a/tools/firmware/vmxassist/gen.c b/tools/firmware/vmxassist/gen.c index f18f77a4f3..298f3f5877 100644 --- a/tools/firmware/vmxassist/gen.c +++ b/tools/firmware/vmxassist/gen.c @@ -20,7 +20,7 @@ #include <stdio.h> #include <stddef.h> #include <stdlib.h> -#include <public/vmx_assist.h> +#include <vm86.h> int main() diff --git a/tools/firmware/vmxassist/util.c b/tools/firmware/vmxassist/util.c index 068ac844b3..d1d836224e 100644 --- a/tools/firmware/vmxassist/util.c +++ b/tools/firmware/vmxassist/util.c @@ -18,7 +18,7 @@ * Place - Suite 330, Boston, MA 02111-1307 USA. */ #include <stdarg.h> -#include <public/vmx_assist.h> +#include <vm86.h> #include "util.h" #include "machine.h" diff --git a/tools/firmware/vmxassist/vm86.h b/tools/firmware/vmxassist/vm86.h index ce09bd9c8d..6ed20c7954 100644 --- a/tools/firmware/vmxassist/vm86.h +++ b/tools/firmware/vmxassist/vm86.h @@ -20,6 +20,19 @@ #ifndef __VM86_H__ #define __VM86_H__ +#ifndef __ASSEMBLY__ +#include <stdint.h> + +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64; +typedef int8_t s8; +typedef int16_t s16; +typedef int32_t s32; +typedef int64_t s64; +#endif + #include <public/vmx_assist.h> #define NR_EXCEPTION_HANDLER 32 diff --git a/xen/arch/x86/vmx.c b/xen/arch/x86/vmx.c index 686bd36969..5ad9082570 100644 --- a/xen/arch/x86/vmx.c +++ b/xen/arch/x86/vmx.c @@ -581,7 +581,7 @@ vmx_world_restore(struct vcpu *d, struct vmx_assist_context *c) */ mfn = phys_to_machine_mapping(c->cr3 >> PAGE_SHIFT); if (mfn != pagetable_get_pfn(d->arch.guest_table)) { - printk("Invalid CR3 value=%lx", c->cr3); + printk("Invalid CR3 value=%x", c->cr3); domain_crash_synchronous(); return 0; } @@ -591,9 +591,9 @@ vmx_world_restore(struct vcpu *d, struct vmx_assist_context *c) * If different, make a shadow. Check if the PDBR is valid * first. */ - VMX_DBG_LOG(DBG_LEVEL_VMMU, "CR3 c->cr3 = %lx", c->cr3); + VMX_DBG_LOG(DBG_LEVEL_VMMU, "CR3 c->cr3 = %x", c->cr3); if ((c->cr3 >> PAGE_SHIFT) > d->domain->max_pages) { - printk("Invalid CR3 value=%lx", c->cr3); + printk("Invalid CR3 value=%x", c->cr3); domain_crash_synchronous(); return 0; } @@ -604,7 +604,7 @@ vmx_world_restore(struct vcpu *d, struct vmx_assist_context *c) * arch.shadow_table should now hold the next CR3 for shadow */ d->arch.arch_vmx.cpu_cr3 = c->cr3; - VMX_DBG_LOG(DBG_LEVEL_VMMU, "Update CR3 value = %lx", c->cr3); + VMX_DBG_LOG(DBG_LEVEL_VMMU, "Update CR3 value = %x", c->cr3); __vmwrite(GUEST_CR3, pagetable_get_paddr(d->arch.shadow_table)); } @@ -669,7 +669,8 @@ int vmx_assist(struct vcpu *d, int mode) { struct vmx_assist_context c; - unsigned long magic, cp; + u32 magic; + unsigned long cp; /* make sure vmxassist exists (this is not an error) */ if (!vmx_copy(&magic, VMXASSIST_MAGIC_OFFSET, sizeof(magic), COPY_IN)) diff --git a/xen/include/public/vmx_assist.h b/xen/include/public/vmx_assist.h index 087391e1ff..b5addf0a7b 100644 --- a/xen/include/public/vmx_assist.h +++ b/xen/include/public/vmx_assist.h @@ -51,47 +51,47 @@ union vmcs_arbytes { * World switch state */ typedef struct vmx_assist_context { - unsigned long eip; /* execution pointer */ - unsigned long esp; /* stack point */ - unsigned long eflags; /* flags register */ - unsigned long cr0; - unsigned long cr3; /* page table directory */ - unsigned long cr4; - unsigned long idtr_limit; /* idt */ - unsigned long idtr_base; - unsigned long gdtr_limit; /* gdt */ - unsigned long gdtr_base; - unsigned long cs_sel; /* cs selector */ - unsigned long cs_limit; - unsigned long cs_base; + u32 eip; /* execution pointer */ + u32 esp; /* stack point */ + u32 eflags; /* flags register */ + u32 cr0; + u32 cr3; /* page table directory */ + u32 cr4; + u32 idtr_limit; /* idt */ + u32 idtr_base; + u32 gdtr_limit; /* gdt */ + u32 gdtr_base; + u32 cs_sel; /* cs selector */ + u32 cs_limit; + u32 cs_base; union vmcs_arbytes cs_arbytes; - unsigned long ds_sel; /* ds selector */ - unsigned long ds_limit; - unsigned long ds_base; + u32 ds_sel; /* ds selector */ + u32 ds_limit; + u32 ds_base; union vmcs_arbytes ds_arbytes; - unsigned long es_sel; /* es selector */ - unsigned long es_limit; - unsigned long es_base; + u32 es_sel; /* es selector */ + u32 es_limit; + u32 es_base; union vmcs_arbytes es_arbytes; - unsigned long ss_sel; /* ss selector */ - unsigned long ss_limit; - unsigned long ss_base; + u32 ss_sel; /* ss selector */ + u32 ss_limit; + u32 ss_base; union vmcs_arbytes ss_arbytes; - unsigned long fs_sel; /* fs selector */ - unsigned long fs_limit; - unsigned long fs_base; + u32 fs_sel; /* fs selector */ + u32 fs_limit; + u32 fs_base; union vmcs_arbytes fs_arbytes; - unsigned long gs_sel; /* gs selector */ - unsigned long gs_limit; - unsigned long gs_base; + u32 gs_sel; /* gs selector */ + u32 gs_limit; + u32 gs_base; union vmcs_arbytes gs_arbytes; - unsigned long tr_sel; /* task selector */ - unsigned long tr_limit; - unsigned long tr_base; + u32 tr_sel; /* task selector */ + u32 tr_limit; + u32 tr_base; union vmcs_arbytes tr_arbytes; - unsigned long ldtr_sel; /* ldtr selector */ - unsigned long ldtr_limit; - unsigned long ldtr_base; + u32 ldtr_sel; /* ldtr selector */ + u32 ldtr_limit; + u32 ldtr_base; union vmcs_arbytes ldtr_arbytes; } vmx_assist_context_t; |