kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] KVM: Fix apic_mmio_write return for unaligned write
@ 2009-07-06  3:05 Sheng Yang
  2009-07-06  7:27 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Sheng Yang @ 2009-07-06  3:05 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm, Sheng Yang

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 <sheng@linux.intel.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] KVM: Fix apic_mmio_write return for unaligned write
  2009-07-06  3:05 [PATCH] KVM: Fix apic_mmio_write return for unaligned write Sheng Yang
@ 2009-07-06  7:27 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-07-06  7:27 UTC (permalink / raw)
  To: Sheng Yang; +Cc: kvm

On 07/06/2009 06:05 AM, Sheng Yang wrote:
> Some in-famous OS do unaligned writing for APIC MMIO, and the return value
> has been missed in recent change, then the OS hangs.
>
>    

Applied, thanks.

> (it's curious that the compilation warning have been ignored...)
>    

Yes, need to be more careful.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-06  7:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-06  3:05 [PATCH] KVM: Fix apic_mmio_write return for unaligned write Sheng Yang
2009-07-06  7:27 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).