Commit 756975bb authored by Sheng Yang's avatar Sheng Yang Committed by Avi Kivity

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.
Signed-off-by: default avatarSheng Yang <sheng@linux.intel.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 70f93dae
...@@ -834,7 +834,7 @@ static int apic_mmio_write(struct kvm_io_device *this, ...@@ -834,7 +834,7 @@ static int apic_mmio_write(struct kvm_io_device *this,
if (len != 4 || (offset & 0xf)) { if (len != 4 || (offset & 0xf)) {
/* Don't shout loud, $infamous_os would cause only noise. */ /* Don't shout loud, $infamous_os would cause only noise. */
apic_debug("apic write: bad size=%d %lx\n", len, (long)address); apic_debug("apic write: bad size=%d %lx\n", len, (long)address);
return; return 0;
} }
val = *(u32*)data; val = *(u32*)data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment