search for: vmi_annotation

Displaying 6 results from an estimated 6 matches for "vmi_annotation".

2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
...ations proc_vmi_info_operations = { + .open = proc_vmi_info_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +#define VDEF(call) #call , +static char *vmi_call_name[] = { + VMI_CALLS +}; +#undef VDEF + +static void print_annotation(struct seq_file *m, struct vmi_annotation *a) +{ + seq_printf(m, "%s %p %d %p %d %d\n", + vmi_call_name[a->vmi_call], a->nativeEIP, a->native_size, + a->translationEIP, a->translation_size, a->nop_size); +} + +static int proc_vmi_annotations_show(struct seq_file *m, void *v) +{ + struct vmi_annotation *s...
2007 Apr 18
1
[RFC, PATCH 21/24] i386 Vmi proc node
...ations proc_vmi_info_operations = { + .open = proc_vmi_info_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; + +#define VDEF(call) #call , +static char *vmi_call_name[] = { + VMI_CALLS +}; +#undef VDEF + +static void print_annotation(struct seq_file *m, struct vmi_annotation *a) +{ + seq_printf(m, "%s %p %d %p %d %d\n", + vmi_call_name[a->vmi_call], a->nativeEIP, a->native_size, + a->translationEIP, a->translation_size, a->nop_size); +} + +static int proc_vmi_annotations_show(struct seq_file *m, void *v) +{ + struct vmi_annotation *s...
2007 Apr 18
3
[RFC, PATCH 4/24] i386 Vmi inline implementation
...XCSTR(vmi_padded_finish) "\n\t" \ + \ + XCSTR(vmi_annotate(VMI_CALL_##call)) "\n\t" \ + \ + :: input ); \ + asm volatile ( "" : output :: clobber ); \ +} while (0) + +#define VMI_NO_INPUT +#define VMI_NO_OUTPUT + +struct vmi_annotation { + unsigned long vmi_call; + unsigned char *nativeEIP; + unsigned char *translationEIP; + unsigned char native_size; + unsigned char translation_size; + char nop_size; + unsigned char pad; +}; + +extern VMI_UINT8 hypervisor_found; +extern VMI_UINT8 hypervisor_timer_found; +extern struct vmi_anno...
2007 Apr 18
3
[RFC, PATCH 4/24] i386 Vmi inline implementation
...XCSTR(vmi_padded_finish) "\n\t" \ + \ + XCSTR(vmi_annotate(VMI_CALL_##call)) "\n\t" \ + \ + :: input ); \ + asm volatile ( "" : output :: clobber ); \ +} while (0) + +#define VMI_NO_INPUT +#define VMI_NO_OUTPUT + +struct vmi_annotation { + unsigned long vmi_call; + unsigned char *nativeEIP; + unsigned char *translationEIP; + unsigned char native_size; + unsigned char translation_size; + char nop_size; + unsigned char pad; +}; + +extern VMI_UINT8 hypervisor_found; +extern VMI_UINT8 hypervisor_timer_found; +extern struct vmi_anno...
2007 Apr 18
7
[RFC, PATCH 5/24] i386 Vmi code patching
...PUSH_EDX 0x52 +#define MNEM_PUSH_EBX 0x53 +#define MNEM_PUSH_ESP 0x54 +#define MNEM_PUSH_EBP 0x55 +#define MNEM_PUSH_ESI 0x56 +#define MNEM_PUSH_EDI 0x57 +#define MNEM_OPSIZE 0x66 +#define MNEM_LEA 0x8d +#define MNEM_NOP 0x90 +#define MNEM_CALL_NEAR 0xe8 + +static inline void patch_call_site(struct vmi_annotation *a, unsigned char *eip) +{ + unsigned long call = a->vmi_call; + unsigned char *dest = (unsigned char *)(&((VROMCallTable *)vmi_rom)->vromCall[call]); + *(unsigned long *)(eip+1) = dest-eip-5; +} + +static void fixup_translation(struct vmi_annotation *a) +{ + unsigned char *c, *start, *en...
2007 Apr 18
7
[RFC, PATCH 5/24] i386 Vmi code patching
...PUSH_EDX 0x52 +#define MNEM_PUSH_EBX 0x53 +#define MNEM_PUSH_ESP 0x54 +#define MNEM_PUSH_EBP 0x55 +#define MNEM_PUSH_ESI 0x56 +#define MNEM_PUSH_EDI 0x57 +#define MNEM_OPSIZE 0x66 +#define MNEM_LEA 0x8d +#define MNEM_NOP 0x90 +#define MNEM_CALL_NEAR 0xe8 + +static inline void patch_call_site(struct vmi_annotation *a, unsigned char *eip) +{ + unsigned long call = a->vmi_call; + unsigned char *dest = (unsigned char *)(&((VROMCallTable *)vmi_rom)->vromCall[call]); + *(unsigned long *)(eip+1) = dest-eip-5; +} + +static void fixup_translation(struct vmi_annotation *a) +{ + unsigned char *c, *start, *en...