[PATCH 2/3][PARAVIRT] Make IO delay a NOP

Anthony Liguori
2007-05-30T14:53:02Z

[-- Attachment #1: Type: text/plain, Size: 26 bytes --]

Regards,

Anthony Liguori

[-- Attachment #2: paravirt-no-iodelay.diff --]
[-- Type: text/x-patch, Size: 874 bytes --]

Subject: [PATCH][PARAVIRT] Make IO delay a NOP for paravirt guests

No delay is required in between PIO operations under KVM guests so make IO
delay a NOP. This was originally part of Ingo Molnar's paravirt series.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Index: kvm/arch/i386/kernel/kvm.c
===================================================================
--- kvm.orig/arch/i386/kernel/kvm.c 2007-05-30 09:30:42.000000000 -0500
+++ kvm/arch/i386/kernel/kvm.c 2007-05-30 09:31:46.000000000 -0500
@@ -28,9 +28,17 @@
static DEFINE_PER_CPU(struct kvm_vcpu_para_state, para_state);
extern unsigned char hypercall_addr[4];

+/*
+ * No need for any "IO delay" on KVM
+ */
+static void kvm_io_delay(void)
+{
+}
+
static void kvm_guest_setup(void)
{
paravirt_ops.name = "KVM";
+ paravirt_ops.io_delay = kvm_io_delay;
paravirt_ops.paravirt_enabled = 1;
}

[-- Attachment #3: Type: text/plain, Size: 184 bytes --]

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org