Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282027
b: refs/heads/master
c: d77fe63
h: refs/heads/master
i:
  282025: 7555a77
  282023: 6bd597b
v: v3
  • Loading branch information
Julian Stecklina authored and Avi Kivity committed Dec 27, 2011
1 parent 9355a87 commit 5dc5389
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 60f9a9ef5492cae66aca2ad9873360161320d5af
refs/heads/master: d77fe6354d5b67f4d4eb62a47621da2b3ee3539e
15 changes: 12 additions & 3 deletions trunk/virt/kvm/ioapic.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,18 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len,
(void*)addr, len, val);
ASSERT(!(addr & 0xf)); /* check alignment */

if (len == 4 || len == 8)
switch (len) {
case 8:
case 4:
data = *(u32 *) val;
else {
break;
case 2:
data = *(u16 *) val;
break;
case 1:
data = *(u8 *) val;
break;
default:
printk(KERN_WARNING "ioapic: Unsupported size %d\n", len);
return 0;
}
Expand All @@ -343,7 +352,7 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len,
spin_lock(&ioapic->lock);
switch (addr) {
case IOAPIC_REG_SELECT:
ioapic->ioregsel = data;
ioapic->ioregsel = data & 0xFF; /* 8-bit register */
break;

case IOAPIC_REG_WINDOW:
Expand Down

0 comments on commit 5dc5389

Please sign in to comment.