From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sheng Yang Subject: [PATCH] KVM: Fix apic_mmio_write return for unaligned write Date: Mon, 6 Jul 2009 11:05:39 +0800 Message-ID: <1246849539-26953-1-git-send-email-sheng@linux.intel.com> Cc: kvm@vger.kernel.org, Sheng Yang To: Avi Kivity Return-path: Received: from mga01.intel.com ([192.55.52.88]:53502 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752104AbZGFDFi (ORCPT ); Sun, 5 Jul 2009 23:05:38 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Some in-famous OS do unaligned writing for APIC MMIO, and the return value has been missed in recent change, then the OS hangs. (it's curious that the compilation warning have been ignored...) Signed-off-by: Sheng Yang --- arch/x86/kvm/lapic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; -- 1.5.4.5