From: Sheng Yang <[email protected]>

Some in-famous OS do unaligned writing for APIC MMIO, and the return value
has been missed in recent change, then the OS hangs.

Signed-off-by: Sheng Yang <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>

diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 6f559d6..ccafe0d 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -831,7 +831,7 @@ static int apic_mmio_write(struct kvm_io_device *this,
        if (len != 4 || (offset & 0xf)) {
                /* Don't shout loud, $infamous_os would cause only noise. */
                apic_debug("apic write: bad size=%d %lx\n", len, (long)address);
-               return;
+               return 0;
        }
 
        val = *(u32*)data;
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to