summary refs log tree commit diff stats
path: root/hw/serial.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2012-10-03 17:42:58 +0200
committerAvi Kivity <avi@redhat.com>2012-10-22 14:50:08 +0200
commit1c380f9460522f32c8dd2577b2a53d518ec91c6d (patch)
tree49dbad84ac83432d9f727c41647cdcd81373d3ba /hw/serial.c
parent817dcc5368988b023c5e1d3f1444fd370c77c6a9 (diff)
downloadfocaccia-qemu-1c380f9460522f32c8dd2577b2a53d518ec91c6d.tar.gz
focaccia-qemu-1c380f9460522f32c8dd2577b2a53d518ec91c6d.zip
pci: honor PCI_COMMAND_MASTER
Currently we ignore PCI_COMMAND_MASTER completely: DMA succeeds even when
the bit is clear.

Honor PCI_COMMAND_MASTER by inserting a memory region into the device's
bus master address space, and tying its enable status to PCI_COMMAND_MASTER.

Tested using

  setpci -s 03 COMMAND=3

while a ping was running on a NIC in slot 3.  The kernel (Linux) detected
the stall and recovered after the command

  setpci -s 03 COMMAND=7

was issued.

Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'hw/serial.c')
0 files changed, 0 insertions, 0 deletions