History | View | Annotate | Download (17.6 kB)
isa: Pass i/o address space to isa_bus_new
Not used yet, but at least we're provided with the correct region.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
piix_pci: wrap memory update in a transaction
The code will remap all PAMs, even if just one is updated, resultingin reduced performance. Wrap in a transaction to detect that thoseother PAMs have not changed.
Reviewed-by: Richard Henderson <rth@twiddle.net>...
pci_host: convert conf index and data ports to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
Revert "Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging"
This reverts commit 8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d, reversingchanges made to 444dc48298c480e42e15a8fe676be737d8a6b2a1.
From Avi:
Please revert the entire pull (git revert 8ef9ea85a2cc1) while I work this...
440fx: fix PAM, PCI holes
The current implementation of PAM and the PCI holes is broken in severalways:
- PCI BARs are not restricted to the PCI hole (a BAR may hide memory) - PCI devices do not respect PAM (if a PCI device maps a region while PAM maps the region to RAM, the request will be honored)...
pci: pass I/O address space to new PCI bus
This lets us register BARs in the I/O address space.
Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: pass address space to pci bus when created
This is now done sloppily, via get_system_memory(). Eventually callerswill be converted to stop using that.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/piix_pci.c: Fix PIIX3-xen to initialize ids
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Merge remote-tracking branch 'mst/for_anthony' into staging
Conflicts: hw/usb-uhci.c
xen: fix interrupt routing
Compared to the last version I only added a comment to the code.
- remove i440FX-xen and i440fx_write_config_xenwe don't need to intercept pci config writes to i440FX anymore;
- introduce PIIX3-xen and piix3_write_config_xen...
Merge remote-tracking branch 'origin/master' into pci
Conflicts: hw/virtio-pci.c
hw/piix_pci.c: convert to PCIDeviceInfo to initialize ids
use PCIDeviceInfo to initialize ids.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
piix_pci: fix piix3_set_irq_pic()
If pic_irq is greater than 7, the irq level is always 0 on 32bits.
Signed-off-by: TeLeMan <geleman@gmail.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
piix_pci: Introduces Xen specific call for irq.
This patch introduces Xen specific call in piix_pci.
The specific part for Xen is in write_config, set_irq and get_pirq.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>...
piix_pci: load path clean up
The previous patch didn't change the behavior when load,it resulted in ugly code. This patch cleans it up.
With this patch, pic irq lines are manipulated when loaded.It is expected that it won't change the behaviour because...
piix_pci: optimize set irq path
optimize irq routing in piix_pic.c which has been a TODO.So far piix3 tracks each pirq level and checks whether a given pic pins isasserted by seeing if each pirq is mapped into the pic pin.This is independent on irq routing, but data path is on slow path....
piix_pci: eliminate PIIX3State::pci_irq_levels
PIIX3State::pci_irq_levels are redundant which is already tracked byPCIBus layer. So eliminate them.
Cc: Juan Quintela <quintela@redhat.com>Cc: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
piix: tag as not hotpluggable.
This patch tags all pci devices which belong to the piix3/4 chipsets asnot hotpluggable (Host bridge, ISA bridge, IDE controller, ACPI bridge).
Acked-by: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
Introduce fw_name field to DeviceInfo structure.
Add "fw_name" to DeviceInfo to use in device path building. Incontrast to "name" "fw_name" should refer to functionality deviceprovides instead of particular device model like "name" does.
Signed-off-by: Gleb Natapov <gleb@redhat.com>...
Introduce range.h
Extract range functions from pci.h. These will be used by later patchesby non-PCI devices. Adjust current users.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pci: set PCI multi-function bit appropriately.
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...
pci: set multifunction property for normal device.
use pci_create_simple_multifunction() for normal device which setsmultifunction bit.At the moment, only pc_piix.c and mips_malta.c uses multifunctiondevices with piix3/4 pci-isa bridge.And other boards don't populate those devices....
pci: don't overwrite multi functio bit in pci header type.
Don't overwrite pci header type.Otherwise, multi function bit which pci_init_header_type() setsappropriately is lost.Anyway PCI_HEADER_TYPE_NORMAL is zero, so it is unnecessary to zerowhich is already zero cleared....
Fix overflow in i440fx_init()
The ram_size parameter can be larger than an int, so it may be truncated.
Fix by using the correct type.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
pc, i440fx: Make smm enable/disable function i440fx independent.
make cpu_smm_update() generic to be independent on i440fx byregistering a callback.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw: better i440 emulation
updated version of an old patchhttp://xenon.stanford.edu/~eswierk/misc/qemu-linuxbios/qemu-piix-ram-size.patchthat together withhttp://www.mail-archive.com/linuxbios@linuxbios.org/msg02390.html(which is already in coreboot trunk) allows coreboot to autodetect the amount of RAM within qemu/kvm from a register in i440 northbridge....
piix_pci: use range helper function
use range helper function in i440fx_write_config().
piix_pci: add link to i440fx data sheet.
add link to i440fx data sheet.
piix_pci: define symbolic value for PAM0, PAM6 and SMRAM.
Define symbolic value in i440fx configuration spacefor 0x59, 0x5f and 0x7f and use them.
savevm: Port to qdev.vmsd all devices that have qdev
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: shorten pci_host_{conf, data}_register_xxx function a bit.
pci_host_data_register_io_memory and its variants are too long a bit.So shorten them. Now they arepci_host_{conf, data}_register_{mmio, mmio_noswap, ioport}()
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
pci_host: consolidate pci config address access.
consolidate pci_config address access into pci_host.c
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci_host.h: move functions in pci_host.h into .c file.
split static functions in pci_host.h into pci_host.c andpci_host_template.h.Later a structures declared in pci_host.h, PCIHostState, will be used.However pci_host.h doesn't allow to include itself easily. This patches...
v3: don't call reset functions on cpu initialization
There is absolutely no need to call reset functions when initializingdevices. Since we are already registering them, calling qemu_system_reset()should suffice. Actually, it is what happens when we reboot the machine,...
New qdev_init_nofail()
Like qdev_init(), but terminate program via hw_error() instead ofreturning an error value.
Use it instead of qdev_init() where terminating the program on failureis okay, either because it's during machine construction, or because...
piix_pci: kill PIIX3IrqState
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: add version_id argument to post_load
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
vmstate: rename run_after_load() -> post_load()
This naming was used in kvm tree, and is easier to remember
piix3: use new vmstate infrastructure
pci_irq_levels[] belong to PIIX3State
With previous cleanups, now it is possible to put it where it belongs
Update SaveVM versions
Now that we have all fields belonging to a PCIDevice, save each fieldon the device that it belongs. This means moving pci_irq_levelsfrom PCII440FXState to PIIX3State.Old formats are loaded, but we only save on the new saner format....
i440fx: use new vmstate infrastructure
Create PIIX3State instead of using PCIDevice for PIIX3
Introduce PIIX3IrqState for piix3 irq's state
Fold piix3_init() intto i440fx_init
i440fx_init will now work properly if we don't setup piix3
We can add piix3_dev now to PIIX3IrqState
Save irq_state into PCII440FXState
Use PCII440FXState instead of generic PCIDevice
Move smm_enabled and isa_memory_mappings to PCII440FXState
We want the argument pass to set_irq to be opaque
piix_pci want to pass more things that the pic
piix4 don't use pci_irq_levels at all
Split piix4 support from piix_pci.c
Now mips_malta uses piix4 and pc's use piix_pci definitions
qdev: add return value to init() callbacks.
Sorry folks, but it has to be. One more of these invasive qdev patches.
We have a serious design bug in the qdev interface: device initcallbacks can't signal failure because the init() callback has noreturn value. This patch fixes it....
qdev/isa: make the piix isa bridge register an isa bus.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-Id:
qdev/pci: hook up i440fx.
Hook i44fx pcihost into sysbus.Convert Host bridge and ISA bridge pci devices to qdev.Tag as no-user.
Revert "Introduce reset notifier order"
This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (andupdates later added users of qemu_register_reset), we solved theproblem it originally addressed less invasively.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
Call piix4_reset() on system reset.
Also zero pci_irq_levels on reset to avoid stuck irq after reset.
Based on 15a1956af94e36105494f782a752698103addf63 by Gleb Natapov.
Call piix3_reset() on system reset.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Yaniv Kamay <ykamay@redhat.com>
Add common BusState
Implement and use a common device bus state. The main side-effect isthat creating a bus and attaching it to a parent device are no longerseparate operations. For legacy code we allow a NULL parent, but thatshould go away eventually....
use PCI_HEADER_TYPE.
use symbolic value instead of 0x0e and related value.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Delete some unused macros detected with -Wp,-Wunused-macros use
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6856 c046a42c-6fe2-441c-8c8c-71466251a162
Add and use #defines for PCI device classes
This patch adds and uses #defines for PCI device classes and subclases,using a new pci_config_set_class() function, similar to the recentlyadded pci_config_set_vendor_id() and pci_config_set_device_id().
Change since v1: fixed compilation of hw/sun4u.c...
Define PCI vendor and device IDs in pci.h (Stuart Brady)
This patch defines PCI vendor and device IDs in pci.h (matching thosefrom Linux's pci_ids.h), and uses those definitions where appropriate.
Change from v1: Introduces pci_config_set_vendor_id() / pci_config_set_device_id()...
Fix undeclared symbol warnings from sparse
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162
Use correct types to enable > 2G support, based on a patch fromAnthony Liguori.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4265 c046a42c-6fe2-441c-8c8c-71466251a162
Revert "Use correct types to enable > 2G support" (r4238), it isnot yet ready.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4240 c046a42c-6fe2-441c-8c8c-71466251a162
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4238 c046a42c-6fe2-441c-8c8c-71466251a162
Add missing initial values for PIIX3 function 0 (PIRQRC)
(Sebastian Herbszt)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4116 c046a42c-6fe2-441c-8c8c-71466251a162
SCI fixes
(Anthony Liguori)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4081 c046a42c-6fe2-441c-8c8c-71466251a162
Save/load PCI-device, PCI-bus and PIIX3 irq-related state (patches by Uri 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
Remove leftover support for 82371FB (Step A1), by Carlo Marcelo ArenasBelon.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3787 c046a42c-6fe2-441c-8c8c-71466251a162
Add statics and missing #includes for prototypes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3683 c046a42c-6fe2-441c-8c8c-71466251a162
Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
Enable ACPI interrupts, by Igor Lvovsky.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3419 c046a42c-6fe2-441c-8c8c-71466251a162
find -type f | xargs sed -i 's/[\t ]$//g' # on most files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
Unify IRQ handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
Add support for 82371FB (Step A1) and Improved support for 82371SB(Function 1), by Carlo Marcelo Arenas Belon.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2353 c046a42c-6fe2-441c-8c8c-71466251a162
PIIX4 support, by Aurelien Jarno.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2317 c046a42c-6fe2-441c-8c8c-71466251a162
Devfn number for the PIIX3 southbridge, by Aurelien Jarno.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2315 c046a42c-6fe2-441c-8c8c-71466251a162
implement i440 instead of i450 ISA memory mappings to be compatible with Bochs
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2177 c046a42c-6fe2-441c-8c8c-71466251a162
moved PCI init to BIOS - added ISA memory mapping registers and SMM support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2174 c046a42c-6fe2-441c-8c8c-71466251a162
Implement sun4u PCI IRQ routing.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).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2165 c046a42c-6fe2-441c-8c8c-71466251a162
PCI save/restore changes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2115 c046a42c-6fe2-441c-8c8c-71466251a162
Rearrange PCI host emulation code.Add ARM PCI emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1916 c046a42c-6fe2-441c-8c8c-71466251a162