KVM: x86 emulator: introduce pio in string read ahead.

To optimize "rep ins" instruction do IO in big chunks ahead of time
instead of doing it only when required during instruction emulation.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
Gleb Natapov
2010-03-18 15:20:27 +02:00
committed by Avi Kivity
parent 5cd21917da
commit 7b262e90fc
2 changed files with 48 additions and 5 deletions
+7
View File
@@ -151,6 +151,12 @@ struct fetch_cache {
unsigned long end;
};
struct read_cache {
u8 data[1024];
unsigned long pos;
unsigned long end;
};
struct decode_cache {
u8 twobyte;
u8 b;
@@ -178,6 +184,7 @@ struct decode_cache {
void *modrm_ptr;
unsigned long modrm_val;
struct fetch_cache fetch;
struct read_cache io_read;
};
struct x86_emulate_ctxt {