summaryrefslogtreecommitdiffstats
path: root/hw/pci.c
Commit message (Collapse)AuthorAgeFilesLines
* Separate virtio PCI codePaul Brook2009-05-181-1/+1
| | | | | | Split the PCI host bindings from the VRing transport implementation. Signed-off-by: Paul Brook <paul@codesourcery.com>
* Virtio-net qdev conversionPaul Brook2009-05-141-1/+0
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* PCI network qdev conversionPaul Brook2009-05-141-17/+18
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* PCI qdev supportPaul Brook2009-05-141-7/+48
| | | | Signed-off-by: Paul Brook <paul@codesourcery.com>
* minor fix of pci_register_bus()Isaku Yamahata2009-05-031-0/+1
| | | | | | keep first_bus linked list correct. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* use PCI_HEADER_TYPE.Isaku Yamahata2009-05-031-1/+2
| | | | | | use symbolic value instead of 0x0e and related value. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
* Make PCI config status register read-onlyaliguori2009-04-101-0/+4
| | | | | | | | | From the documentation I can find, this register is supposed to be read-only. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7070 c046a42c-6fe2-441c-8c8c-71466251a162
* monitor: Rework API (Jan Kiszka)aliguori2009-03-051-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the monitor API and prepare it for decoupled terminals: term_print functions are renamed to monitor_* and all monitor services gain a new parameter (mon) that will once refer to the monitor instance the output is supposed to appear on. However, the argument remains unused for now. All monitor command callbacks are also extended by a mon parameter so that command handlers are able to pass an appropriate reference to monitor output services. For the case that monitor outputs so far happen without clearly identifiable context, the global variable cur_mon is introduced that shall once provide a pointer either to the current active monitor (while processing commands) or to the default one. On the mid or long term, those use case will be obsoleted so that this variable can be removed again. Due to the broad usage of the monitor interface, this patch mostly deals with converting users of the monitor API. A few of them are already extended to pass 'mon' from the command handler further down to internal functions that invoke monitor_printf. At this chance, monitor-related prototypes are moved from console.h to a new monitor.h. The same is done for the readline API. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6711 c046a42c-6fe2-441c-8c8c-71466251a162
* Parse full PCI device addresses (Markus Armbruster)aliguori2009-02-111-0/+77
| | | | | | | | | | | This code parses full PCI device addresses. It then rejects domains other than zero, because these are not supported in QEMU. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6609 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: warn if PCI region is not power of two (Marcelo Tosatti)aliguori2009-02-111-0/+7
| | | | | | | | | | Otherwise the PCI size for such regions can be calculated erroneously. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6604 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: add pci_unregister_device (Marcelo Tosatti)aliguori2009-02-111-5/+42
| | | | | | | | | | | | | Unregister the pci device, unassign its IO and memory regions, and free associated data. Add a callback so drivers can free device state. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6603 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: return PCIDevice on net device init and record devfn (Marcelo Tosatti)aliguori2009-02-111-4/+11
| | | | | | | | | | | | | | Change the PCI network drivers init functions to return the PCIDev, to inform which slot has been hot-plugged. Also record PCIDevice structure on NICInfo to locate for release on hot-removal. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6593 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: add pci helper functions (Marcelo Tosatti)aliguori2009-02-111-0/+20
| | | | | | | | | | Add pci_find_bus/pci_find_device to be used by PCI hotplug. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6592 c046a42c-6fe2-441c-8c8c-71466251a162
* hw: remove error handling from qemu_malloc() callers (Avi Kivity)aliguori2009-02-051-2/+0
| | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
* Add and use #defines for PCI device classesblueswir12009-02-011-2/+1
| | | | | | | | | | | | | This patch adds and uses #defines for PCI device classes and subclases, using a new pci_config_set_class() function, similar to the recently added pci_config_set_vendor_id() and pci_config_set_device_id(). Change since v1: fixed compilation of hw/sun4u.c Signed-off-by: Stuart Brady <stuart.brady@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6491 c046a42c-6fe2-441c-8c8c-71466251a162
* Add Simba device IDblueswir12009-01-271-5/+5
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6465 c046a42c-6fe2-441c-8c8c-71466251a162
* Make pci_nic_init() use qemu_setup_nic_model() (Mark McLoughlin)aliguori2009-01-131-25/+35
| | | | | | | | | | | | | | Add a table of PCI NIC models to pass to qemu_setup_nic_model(). While we're at it, also add a corresponding table of NIC init functions. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6287 c046a42c-6fe2-441c-8c8c-71466251a162
* PCI: Mask writes to RO bits in the command reg of PCI config spaceaurel322008-12-181-0/+3
| | | | | | | | | | The Command register in the PCI config space has some read-only bits. Any writes to those bits should be masked out. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6092 c046a42c-6fe2-441c-8c8c-71466251a162
* PCI: Mask writes to RO bits in the status reg of PCI config spaceaurel322008-12-181-0/+11
| | | | | | | | | | The Status register in the PCI config space has some read-only bits. Any writes to those bits should be masked out. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6091 c046a42c-6fe2-441c-8c8c-71466251a162
* virtio-net supportaliguori2008-12-171-1/+4
| | | | | | | | | | | | This adds virtio-net support. This is based on the virtio-net driver that exists in kvm-userspace. This also adds a new qemu_sendv_packet which virtio-net requires. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6073 c046a42c-6fe2-441c-8c8c-71466251a162
* pci: add default pci subsystem id for all devices (Gerd Hoffman)aliguori2008-12-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This sets a default PCI subsystem ID for all emulated PCI devices. PCI specs require this, so do it. In many cases it is enougth to know the PCI ID to handle a device correctly. Sometimes a device driver must identify the exact piece of hardware (via PCI Subsystem ID) though. What does this patch to qemu devices: Right now the emulated PCI devices have no PCI subsystem ID, only the PCI ID. The discussed patch sets a default PCI subsystem ID for all emulated devices. Which will make the qemu devices look pretty much like in the laptop case: all PCI subsystem IDs will point to qemu by default. If a driver emulates a very specific piece of hardware where it has to emulate more than just the PCI chip, it can overwrite the PCI subsystem ID without problems. The es1370 driver does that for example. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5986 c046a42c-6fe2-441c-8c8c-71466251a162
* KVM: Coalesced MMIO supportaliguori2008-12-091-0/+1
| | | | | | | | | | | | | | | | | | MMIO exits are more expensive in KVM or Xen than in QEMU because they involve, at least, privilege transitions. However, MMIO write operations can be effectively batched if those writes do not have side effects. Good examples of this include VGA pixel operations when in a planar mode. As it turns out, we can get a nice boost in other areas too. Laurent mentioned a 9.7% performance boost in iperf with the coalesced MMIO changes for the e1000 when he originally posted this work for KVM. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5961 c046a42c-6fe2-441c-8c8c-71466251a162
* Make PCI class description tables constblueswir12008-10-021-2/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5400 c046a42c-6fe2-441c-8c8c-71466251a162
* E1000 NIC emulation (Nir Peleg, patch from Dor Laor).balrog2008-02-031-1/+3
| | | | | | | Applied %s/^\([^I ]*\)^I/\1 /g on e1000.c and added e1000 to help message. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3949 c046a42c-6fe2-441c-8c8c-71466251a162
* Save/load PCI-device, PCI-bus and PIIX3 irq-related state (patches by Uri ↵balrog2007-12-091-2/+49
| | | | | | | | | Lublin. Note that other PCI bridges are not fixed here. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3793 c046a42c-6fe2-441c-8c8c-71466251a162
* Add statics and missing #includes for prototypes.pbrook2007-11-181-3/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162
* Break up vl.h.pbrook2007-11-171-1/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
* find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in ↵ths2007-09-171-5/+5
| | | | | | the regex. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
* find -type f | xargs sed -i 's/[\t ]$//g' # on most filesths2007-09-161-21/+21
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
* New option -net nic,model=? (Mark Glines)blueswir12007-05-271-0/+4
| | | | | | | Network documentation update (Mark Glines) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2880 c046a42c-6fe2-441c-8c8c-71466251a162
* Know about more PCI device classes.ths2007-04-141-0/+27
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2663 c046a42c-6fe2-441c-8c8c-71466251a162
* Unify IRQ handling.pbrook2007-04-071-3/+6
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
* Eepro100 emulation, by Stefan Weil.ths2007-04-021-0/+6
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2584 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix typo in PCI bridge code.ths2007-03-061-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2470 c046a42c-6fe2-441c-8c8c-71466251a162
* Devfn number for network PCI cards, by Aurelien Jarno.ths2007-01-101-4/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2314 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix PCI config space overflow, by Herbert Xu.ths2006-12-101-8/+16
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2238 c046a42c-6fe2-441c-8c8c-71466251a162
* PCI IRC routing fix.pbrook2006-09-281-3/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2185 c046a42c-6fe2-441c-8c8c-71466251a162
* Implement sun4u PCI IRQ routing.pbrook2006-09-241-11/+92
| | | | | | | | Allow multiple PCI busses and PCI-PCI bridges. Fix bugs in Versatile PCI implementation. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2166 c046a42c-6fe2-441c-8c8c-71466251a162
* PCI shared IRQ fix (original patch by andrzej zaborowski).pbrook2006-09-241-2/+14
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2165 c046a42c-6fe2-441c-8c8c-71466251a162
* PCI save/restore changesbellard2006-08-171-7/+8
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2115 c046a42c-6fe2-441c-8c8c-71466251a162
* Add SCSI controller class.pbrook2006-08-101-0/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2106 c046a42c-6fe2-441c-8c8c-71466251a162
* pcnet nic support (Antony T Curtis)bellard2006-07-041-0/+2
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2036 c046a42c-6fe2-441c-8c8c-71466251a162
* Use lookup table for PCI class descriptions.pbrook2006-05-211-12/+24
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1927 c046a42c-6fe2-441c-8c8c-71466251a162
* Rearrange PCI host emulation code.pbrook2006-05-131-1394/+28
| | | | | | | Add ARM PCI emulation. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1916 c046a42c-6fe2-441c-8c8c-71466251a162
* Initialize PCI BAR config data.pbrook2006-04-181-0/+7
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1824 c046a42c-6fe2-441c-8c8c-71466251a162
* do not test reserved config bitsbellard2006-04-021-5/+0
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1795 c046a42c-6fe2-441c-8c8c-71466251a162
* Allow selection of emulated network card.pbrook2006-02-051-0/+14
| | | | | | | rtl8139 emulation. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1745 c046a42c-6fe2-441c-8c8c-71466251a162
* cpu_single_env usage fixbellard2005-11-211-6/+6
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1644 c046a42c-6fe2-441c-8c8c-71466251a162
* sparc64 fixes (Blue Swirl)bellard2005-07-231-0/+247
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1514 c046a42c-6fe2-441c-8c8c-71466251a162
* correct PCI ID for PREP PCI host bridge - added Grackle PCI host bridgebellard2005-06-051-61/+104
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1450 c046a42c-6fe2-441c-8c8c-71466251a162
OpenPOWER on IntegriCloud