]> xenbits.xensource.com Git - qemu-xen-3.4-testing.git/commit
Cleanup PCI passthrough code
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 23 Feb 2009 11:33:56 +0000 (11:33 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 23 Feb 2009 11:33:56 +0000 (11:33 +0000)
commitbd0565465675e9f81bbd3d8b2e6177efba04f6ab
treec956a22a806f650a48d5d87b170973e064a4a2d0
parentd42def00dad5cb5bdf2d5a6b10a079cea6060216
Cleanup PCI passthrough code

The patch cleanups the code of PCI passthrough.

- Use LIST_FOREACH(). Don't use lh_first, le_next directly.
- Use pci_{read, write}_block instead of "switch(len) case [124]
  pci_{read, write}_{byte, word, long}();".
- Eliminate duplicate codes using PT_MEARGE_VALUE macro.
- Define PCI_ERR_* macro in pass-through.h if libpci is old.
- Remove the unreasonable loop from pt_aer_reg_{save,restore}.
- Enable pt_aer_reg_{save,restore}, even if libpci is old.
- Fix ro_mask and remove unnecessary pt_xxx_reg_write functions.
- Add "Error:" or "Warning:" to messages.
- Remove verbose messages.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
hw/pass-through.c
hw/pass-through.h
hw/pt-msi.c