KVM: Fix apic_mmio_write return for unaligned write
PATCH 1/1 KVM: Fix apic_mmio_write return for unaligned write
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 <[email protected]>
--- arch/x86/kvm/lapic.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/lapic.c +1 -1
@@ -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;
Signature · 1 line
1.5.4.5
Avi Kivity
AppliedQuoted 4 lines · 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.
Applied, thanks.
Quoted 2 lines
(it's curious that the compilation warning have been ignored...)
Yes, need to be more careful.
Signature · 1 line
error compiling committee.c: too many arguments to function