- 20 Jan, 2011 2 commits
-
-
Isaku Yamahata authored
use qemu_malloc() instead of direct use of malloc(). Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Isaku Yamahata authored
deassert intx on device reset. So far pci_device_reset() is used for system reset. In that case, interrupt controller is reset at the same time so that all irq is are deasserted. But now pci bus reset/flr is supported, and in that case irq needs to be disabled explicitly. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 19 Jan, 2011 1 commit
-
-
Michael S. Tsirkin authored
Patch a6a7005d generated broken device paths. We snprintf with a length shorter than the output, so the last character is discarded and replaced by the null byte. Fix it up by snprintf to a buffer which is larger by 1 byte and then memcpy the data (without the null byte) to where we need it. Reported-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 10 Jan, 2011 1 commit
-
-
Gerd Hoffmann authored
This patch adds a field to PCIDeviceInfo to tag devices as being not hotpluggable. Any attempt to plug-in or -out such a device will throw an error. Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 27 Dec, 2010 1 commit
-
-
Michael S. Tsirkin authored
The device path used for migration is currently broken for for all devices behind a nested bridge. Replace this by a hierarchical list of slot/function numbers, walking the path from root down to device. Add :00 after the domain number so that if there are no nested bridges, this is compatible with what we have now. Note: as pointed out by Gleb, using openfirmware paths might be cleaner, doing this would break compatibility though, and the IDs used are not guest or user visible at all, so breaking the compatibility is probably not worth it. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 24 Dec, 2010 1 commit
-
-
Isaku Yamahata authored
This patch introduce a helper function to get PCIDevice from qdev id. This function will be used later. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 22 Dec, 2010 1 commit
-
-
Isaku Yamahata authored
Support flr: trigger device reset on flr config write. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 19 Dec, 2010 1 commit
-
-
Michael S. Tsirkin authored
Using bus numbers in migration is clearly wrong as they are guest assigned. Not really sure what the right thing to do is, for now stick 0 in there so things keep working for non-nested setups, add a TODO. We also probably have to mark nested bridges as non-migrateable until this is fixed? Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Acked-by:
Alex Williamson <alex.williamson@redhat.com>
-
- 11 Dec, 2010 2 commits
-
-
Gleb Natapov authored
Extend -option-rom command to have additional parameter ,bootindex=. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- 09 Dec, 2010 2 commits
-
-
Michael S. Tsirkin authored
msi depends on pci but pci should not depend on msi. The only dependency we have is a recent addition of pci_msi_ functions, IMO they add little enough to open-code in the small number of users. Follow-up patches add more cleanups. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp>
-
Isaku Yamahata authored
pcie aer needs SERR bit to be writable, and the PCI spec requires this as well. For compatibility, introduce compat global property command_serr_enable and make this bit readonly for a pre 0.14 pc machine. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 24 Nov, 2010 1 commit
-
-
Michael S. Tsirkin authored
Take into account secondary bus reset bit for bus walk: devices behind a reset bus should not respond to configuration cycles. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 22 Nov, 2010 4 commits
-
-
Isaku Yamahata authored
Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Stefan Weil authored
PCI devices with different vendor or device ids sometimes share the same rom code. Only the ids and the checksum differs in a boot rom for such devices. The i825xx ethernet controller family is a typical example which is implemented in hw/eepro100.c. It uses at least 3 different device ids, so normally 3 boot roms would be needed. By automatically patching vendor id and device id (and the checksum) in qemu, all emulated family members can share the same boot rom. VGA bios roms are another example with different vendor and device ids. Only qemu's built-in default rom files will be patched. v2: * Patch also the vendor id (and remove the sanity check for vendor id). v3: * Don't patch a rom file when its name was set by the user. Thus we avoid modifications of unknown rom data. Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Stefan Weil <weil@mail.berlios.de> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
Bits 12 to 15 in bridge control register are reserver and must be read-only zero, curent mask is 0xffff which makes them writeable. Fix this up by using symbolic bit names for writeable bits instead of a hardcoded constant. Fix a comment w1mask -> w1cmask as well. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Isaku Yamahata authored
This patch adds W1C bit support in the initialization/reset of pci status registers. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 16 Nov, 2010 4 commits
-
-
Michael S. Tsirkin authored
This patch fixes hot unplug of cold plugged devices (those present at system start), which got broken by 5beb8ad5 . Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Acked-by:
Cam Macdonell <cam@cs.ualberta.ca> Tested-by:
Cam Macdonell <cam@cs.ualberta.ca> Reported-by:
Cam Macdonell <cam@cs.ualberta.ca>.>
-
Alex Williamson authored
pcibus_dev_print() was erroneously retrieving the device bus number from the secondary bus number offset of the device instead of the bridge above the device. This ends of landing in the 2nd byte of the 3rd BAR for devices, which thankfully is usually zero. Note: pcibus_get_dev_path() copied this code, inheriting the same bug. pcibus_get_dev_path() is used for ramblock naming, so changing it can effect migration. However, I've only seen this byte be non-zero for an assigned device, which can't migrate anyway, so hopefully we won't run into any issues. This patch does not touch pcibus_get_dev_path, as bus number is guest assigned for nested buses, so using it for migration is broken anyway. Fix it properly later. Signed-off-by:
Alex Williamson <alex.williamson@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Michael S. Tsirkin authored
This patch fixes hot unplug of cold plugged devices (those present at system start), which got broken by 5beb8ad5 . Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Acked-by:
Cam Macdonell <cam@cs.ualberta.ca> Tested-by:
Cam Macdonell <cam@cs.ualberta.ca> Reported-by:
Cam Macdonell <cam@cs.ualberta.ca>.>
-
Alex Williamson authored
pcibus_dev_print() was erroneously retrieving the device bus number from the secondary bus number offset of the device instead of the bridge above the device. This ends of landing in the 2nd byte of the 3rd BAR for devices, which thankfully is usually zero. Note: pcibus_get_dev_path() copied this code, inheriting the same bug. pcibus_get_dev_path() is used for ramblock naming, so changing it can effect migration. However, I've only seen this byte be non-zero for an assigned device, which can't migrate anyway, so hopefully we won't run into any issues. This patch does not touch pcibus_get_dev_path, as bus number is guest assigned for nested buses, so using it for migration is broken anyway. Fix it properly later. Signed-off-by:
Alex Williamson <alex.williamson@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 27 Oct, 2010 1 commit
-
-
Michael S. Tsirkin authored
- save/restore must not check w1c bits since they are in fact guest controlled - clear w1c bits on reset Note: for express there are different kinds of reset, some leave part of config space alone. We will likely need a sticky bit mask to implement this. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 19 Oct, 2010 2 commits
-
-
Isaku Yamahata authored
use pci_clear_bit_word() in pci_device_reset() where appropriate. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Isaku Yamahata authored
this patch implements helper functions to handle msi-x and msi uniformly. They will be used later. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 18 Oct, 2010 1 commit
-
-
Isaku Yamahata authored
Clear w1cmask when deleting a pci capability. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 05 Oct, 2010 1 commit
-
-
Stefan Weil authored
multifuction -> multifunction successfull -> successful. Signed-off-by:
Stefan Weil <weil@mail.berlios.de>
-
- 20 Sep, 2010 1 commit
-
-
Isaku Yamahata authored
Implement RW1C register framework. With this patch, it would be easy to implement W1C(Write 1 to Clear) register by just setting w1cmask. Later RW1C register will be used by pcie. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 17 Sep, 2010 1 commit
-
-
Blue Swirl authored
Extract range functions from pci.h. These will be used by later patches by non-PCI devices. Adjust current users. Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- 13 Sep, 2010 3 commits
-
-
Isaku Yamahata authored
Make type uint8_t from int because PCIIORegion::type is uint8_t. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp>
-
Isaku Yamahata authored
Abort when invalid value for region_num is passed to pci_register_bar. That is caller's bug. Abort instead of silently ignoring invalid value. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Isaku Yamahata authored
This patch sorts out invalid use of pcibus_t. In pci_register_bar(), pcibus_t wmask is used. It should, however, be uint64_t because it is used to set pci configuration space value(PCIDevice::wmask) by pci_set_quad() or pci_set_long(). Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 07 Sep, 2010 3 commits
-
-
Isaku Yamahata authored
make pci_parse_devfn() aware of func. With func = NULL it behave as before. This will be used later. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Isaku Yamahata authored
call hotplug callback even when not hotplug case for later use. And move hotplug check into hotplug callback. PCIE slot needs this for card presence detection. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Isaku Yamahata authored
By making pci_add_capability() the special case of pci_add_capability_at_offset() of offset = 0, consolidate pci_add_capability_at_offset() into pci_add_capability(). Cc: Stefan Weil <weil@mail.berlios.de> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 22 Jul, 2010 1 commit
-
-
Isaku Yamahata authored
Move pci bridge related code into pci_bridge.c from pci.c for further enhancement. pci.c is big enough now, so split it out. No code change but exporting some accesser functions. In fact, few pci bridge functions stays in pci.c. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 19 Jul, 2010 1 commit
-
-
Isaku Yamahata authored
move out pci internal structures, PCIBus, PCIBridge and pci_bus_info into private header file, pci_internals.h. This is a preparation. Later pci bridge implementation will be split out form pci.c into pci_bridge.c. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- 11 Jul, 2010 4 commits
-
-
Michael S. Tsirkin authored
bridge config write should trigger updates on the secondary bus. never on the primary bus. Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Isaku Yamahata authored
make pci hotplug callback return value to caller. And when returning error, allocated resources are freed. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Isaku Yamahata authored
Clear interrupt disable bit on reset, according to PCI spec. Fix pci_device_reset() with 64bit BAR. Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Isaku Yamahata authored
Set PCI multi-function bit according to multifunction property. PCI address, devfn ,is exported to users as addr property, so users can populate pci function(PCIDevice in qemu) at arbitrary devfn. It means each function(PCIDevice) don't know whether pci device (PCIDevice[8]) is multi function or not. So this patch allows user to set multifunction bit via property and checks whether multifunction bit is set correctly. Cc: Juan Quintela <quintela@redhat.com> Signed-off-by:
Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-