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