X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_decoder.h;h=de00a02125386ba0f754050e6758a9ed55a20752;hb=e70e95962c26832628d586e07f9cd1a2e1852d72;hp=2617913eb2a684ff4c29ad867362eb48e45f4a62;hpb=af355c370ac80f8e19d6375cb3070213c29a92eb;p=palacios.git diff --git a/palacios/include/palacios/vmm_decoder.h b/palacios/include/palacios/vmm_decoder.h index 2617913..de00a02 100644 --- a/palacios/include/palacios/vmm_decoder.h +++ b/palacios/include/palacios/vmm_decoder.h @@ -1,5 +1,25 @@ -#ifndef __VMM_EMULATE_H -#define __VMM_EMULATE_H + +/* + * This file is part of the Palacios Virtual Machine Monitor developed + * by the V3VEE Project with funding from the United States National + * Science Foundation and the Department of Energy. + * + * The V3VEE Project is a joint project between Northwestern University + * and the University of New Mexico. You can find out more at + * http://www.v3vee.org + * + * Copyright (c) 2008, Jack Lange + * Copyright (c) 2008, The V3VEE Project + * All rights reserved. + * + * Author: Jack Lange + * + * This is free software. You are permitted to use, + * redistribute, and modify it as specified in the file "V3VEE_LICENSE". + */ + +#ifndef __VMM_DECODER_H +#define __VMM_DECODER_H #ifdef __V3VEE__ @@ -47,6 +67,15 @@ struct x86_instr { }; +struct basic_instr_info { + uint_t instr_length; + uint_t op_size; + uint_t str_op : 1; + uint_t has_rep : 1; +}; + + + /************************/ /* EXTERNAL DECODER API */ /************************/ @@ -84,11 +113,12 @@ int v3_encode(struct guest_info * info, struct x86_instr * instr, char * instr_b * Gets the operand size for a memory operation * */ -int v3_basic_mem_decode(struct guest_info * info, addr_t instr_ptr, uint_t * size, uint_t * instr_len); - +int v3_basic_mem_decode(struct guest_info * info, addr_t instr_ptr, struct basic_instr_info * instr_info); +/* Removes a rep prefix in place */ +void strip_rep_prefix(uchar_t * instr, int length);