[PATCH] Update qemu_cfg_read to use "rep insb".

Aug. 26, 2010
3:46 a.m.
Use rep insb instead of manual loop - the host may be able to optimize the rep insb instruction. --- src/paravirt.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/paravirt.c b/src/paravirt.c index da72c71..ca646d4 100644 --- a/src/paravirt.c +++ b/src/paravirt.c @@ -24,8 +24,7 @@ qemu_cfg_select(u16 f) static void qemu_cfg_read(u8 *buf, int len) { - while (len--) - *(buf++) = inb(PORT_QEMU_CFG_DATA); + insb(PORT_QEMU_CFG_DATA, buf, len); } static void -- 1.7.2.2
5416
Age (days ago)
5416
Last active (days ago)
0 comments
1 participants
participants (1)
-
Kevin O'Connor