X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_config.c;h=5bac0d43882046a65cdd5fa6d77475e7364f9d84;hb=f9bb3db89469169bb5775dc031d89e570c6fed70;hp=5ef7461538949d27d6d8a6f6c53207e8ae94a31e;hpb=f84bd0ca67af7c0a1143d5e279e0af408729128e;p=palacios-OLD.git diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index 5ef7461..5bac0d4 100644 --- a/palacios/src/palacios/vmm_config.c +++ b/palacios/src/palacios/vmm_config.c @@ -1,3 +1,6 @@ +/* Northwestern University */ +/* (c) 2008, Jack Lange */ + #include #include #include @@ -33,6 +36,24 @@ static int passthrough_mem_write(addr_t guest_addr, void * src, uint_t length, v } +/*static int IO_Read(ushort_t port, void * dst, uint_t length, void * priv_data) { + + struct guest_info * info = priv_data; + ulong_t tsc_spread = 0; + ullong_t exit_tsc = 0; + + + *(ulong_t *)(&exit_tsc) = info->vm_regs.rbx; + *(ulong_t *)((&exit_tsc) + 4) = info->vm_regs.rcx; + tsc_spread = info->exit_tsc - exit_tsc; + + PrintError("IOREAD tsc diff = %lu\n",tsc_spread); + info->rip += 3; + + + return 1; +} +*/ int config_guest(struct guest_info * info, void * config_ptr) { @@ -295,6 +316,8 @@ int config_guest(struct guest_info * info, void * config_ptr) { #endif + //v3_hook_io_port(info, 1234, &IO_Read, NULL, info); + info->rip = 0xfff0; info->vm_regs.rsp = 0x0; @@ -357,6 +380,8 @@ int config_guest(struct guest_info * info, void * config_ptr) { v3_hook_io_port(&vm_info, 0x61, &IO_Read, &IO_Write, NULL); v3_hook_io_port(&vm_info, 0x05, &IO_Read, &IO_Write_to_Serial, NULL); + + /* vm_info.cr0 = 0; vm_info.cs.base=0xf000;