summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Introduce -machine command option.Anthony PERARD2011-05-085-12/+120
| | | | | | | | | | | | | | | | | | | This option gives the ability to switch one "accelerator" like kvm, xen or the default one tcg. We can specify more than one accelerator by separate them by a colon. QEMU will try each one and use the first whose works. So, ./qemu -machine accel=xen:kvm:tcg which would try Xen support first, then KVM and finally TCG if none of the other works. By default, QEMU will use TCG. But we can specify another default in the global configuration file. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Alexander Graf <agraf@suse.de>
* irq: Privatize CPU_INTERRUPT_NMI.Richard Henderson2011-05-085-5/+7
| | | | | | | | This interrupt name is used by i386, CRIS, and MicroBlaze. Copy the name into each target. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-i386: Privatize some i386-specific interrupt names.Richard Henderson2011-05-083-7/+8
| | | | | | | SMI, VIRQ, INIT, SIPI, and MCE are all only used by the i386 port. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-arm: Privatize CPU_INTERRUPT_FIQ.Richard Henderson2011-05-083-2/+4
| | | | | | | This interrupt name was only used by the ARM port. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* irq: Remove CPU_INTERRUPT_TIMER.Richard Henderson2011-05-082-2/+0
| | | | | | | It is no longer used anywhere. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-sparc: Do not check CPU_INTERRUPT_TIMER.Richard Henderson2011-05-081-3/+0
| | | | | | | This bit is never set, therefore we should not read it either. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-mips: Do not check CPU_INTERRUPT_TIMER.Richard Henderson2011-05-081-4/+0
| | | | | | | This bit is never set, therefore we should not read it either. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* irq: Introduce and use CPU_INTERRUPT_SSTEP_MASK.Richard Henderson2011-05-082-4/+9
| | | | | | | | | | This mask contains all of the bits that should be ignored while single stepping in the debugger. The mask contains 2 bits that are not currently cleared, but are also never set. The bits are included in the mask for consistency in handling of the CPU_INTERRUPT_TGT_EXT_N bits. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* irq: Introduce CPU_INTERRUPT_TGT_* defines.Richard Henderson2011-05-082-12/+59
| | | | | | | | | | These defines will be place-holders for cpu-specific functionality. Generic code will, at the end of the patch series, no longer have to concern itself about how SMI, NMI, etc should be handled. Instead, generic code will know only that the interrupt is internal or external. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge remote-tracking branch 'mst/for_anthony' into stagingAnthony Liguori2011-05-0519-298/+545
|\
| * Merge remote branch 'origin/master' into pciMichael S. Tsirkin2011-05-05393-6353/+32099
| |\ | | | | | | | | | | | | Conflicts: exec.c
| * | CPUPhysMemoryClient: Pass guest physical address not region offsetAlex Williamson2011-05-051-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we're trying to get a newly registered phys memory client updated with the current page mappings, we end up passing the region offset (a ram_addr_t) as the start address rather than the actual guest physical memory address (target_phys_addr_t). If your guest has less than 3.5G of memory, these are coincidentally the same thing. If there's more, the region offset for the memory above 4G starts over at 0, so the set_memory client will overwrite it's lower memory entries. Instead, keep track of the guest phsyical address as we're walking the tables and pass that to the set_memory client. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | CPUPhysMemoryClient: Fix typo in phys memory client registrationAlex Williamson2011-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we register a physical memory client, we try to walk the page tables, calling the set_memory hook for every entry. Effectively playing catchup for the client for everything already registered. With this type, we only walk the 2nd entry of the l1 table, typically missing all of the registered memory. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | pci: Add class 0x403 as 'audio controller'Jan Kiszka2011-05-051-0/+1
| | | | | | | | | | | | | | | | | | | | | Used by HD audio controllers like our intel-hda. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | MSI: Robust resource releaseJan Kiszka2011-05-053-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | msi_init may fail, so we need to check on uninit if the cap was actually installed. This also avoids that the users need to check. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | eepro100: Support 32 bit read/write access to flash registerStefan Weil2011-05-051-0/+9
| | | | | | | | | | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | eepro100: Support byte read access to general control registerStefan Weil2011-05-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | The general control register is a byte register. Add support for byte reads. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | eepro100: Support byte/word read/write access to MDI control registerStefan Weil2011-05-051-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDI control is a 32 bit register, but may be read or written using 8 or 16 bit access. Data is latched when the MSB is written. Add support for byte/word read/write access. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | eepro100: Support byte/word writes to pointer registerStefan Weil2011-05-051-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | pointer is a 32 bit register, but may be written using 8 or 16 bit writes. Add support for byte/word writes. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | eepro100: Support byte/word writes to port addressStefan Weil2011-05-051-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | port is a 32 bit register, but may be written using 8 or 16 bit writes. Add support for byte/word writes. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | eepro100: Fix endianness issuesStefan Weil2011-05-051-44/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like other Intel devices, e100 (eepro100) uses little endian byte order. This patch was tested with these combinations: i386 host, i386 + mipsel guests (le-le) mipsel host, i386 guest (le-le) i386 host, mips + ppc guests (le-be) mips host, i386 guest (be-le) mips and mipsel hosts were emulated machines. v2: Use prefix for new functions. Add the same prefix to stl_le_phys. Fix alignment of mem (needed for word/dword reads/writes). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | eepro100: Pad received short framesStefan Weil2011-05-051-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QEMU sends frames smaller than 60 bytes to ethernet nics. Such frames are rejected by real NICs and their emulations. To avoid this behaviour, other NIC emulations pad received frames. This patch enables this workaround for eepro100, too. All related code is marked with CONFIG_PAD_RECEIVED_FRAMES, so we can drop this in case QEMU's networking code is ever changed. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | eepro100: Remove unused structure elementStefan Weil2011-05-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cppcheck reports that 'packet' is unused. It was only used to calculate the size of the preceding data. Removing it saves a lot of stack space (local variable rx). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | eepro100: Remove type casts which are no longer neededStefan Weil2011-05-051-7/+6
| | | | | | | | | | | | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | eepro100: Avoid duplicate debug messagesStefan Weil2011-05-051-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | When DEBUG_EEPRO100 was enabled, unsupported writes were logged twice. Now logging in eepro100_write1 and eepro100_write2 is similar to the logging in eepro100_write4 (which already was correct). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | wdt_i6300esb: convert to pci_register_bar_simple()Avi Kivity2011-04-071-27/+15
| | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | usb-ohci: convert to pci_register_bar_simple()Avi Kivity2011-04-071-9/+1
| | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | pcnet-pci: convert to pci_register_bar_simple()Avi Kivity2011-04-071-15/+1
| | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | ich/ahci: convert to pci_register_bar_simple()Avi Kivity2011-04-073-14/+1
| | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | hda-intel: convert to pci_register_bar_simple() (partial)Avi Kivity2011-04-071-11/+1
| | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | hda-intel: convert to pci_register_bar_simple()Avi Kivity2011-04-071-10/+1
| | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | eepro100: convert to pci_register_bar_simple()Avi Kivity2011-04-071-30/+13
| | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | cirrus-vga: convert to pci_register_bar_simple()Avi Kivity2011-04-071-11/+2
| | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | rtl8139: convert to pci_register_bar_simple()Avi Kivity2011-04-071-10/+1
| | | | | | | | | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | pci: add pci_register_bar_simple() APIAvi Kivity2011-04-072-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | This is similar to pci_register_bar(), but automatically registers a single memory region spanning the entire BAR. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | cirrus_vga: flag on-device ram for dirty loggingMichael S. Tsirkin2011-04-071-5/+11
| | | | | | | | | | | | Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | vhost: optimize out no-change assignmentMichael S. Tsirkin2011-04-071-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | Cirrus VGA (at least) calls register memory region with the same values again and again. The registration in vhost-net slows this a lot, optimize by checking that the same data is already registered. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | vhost: skip memory which needs dirty loggingMichael S. Tsirkin2011-04-061-0/+4
| | | | | | | | | | | | | | | | | | | | | vhost doesn't support write logging (except for migration), anyway. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | kvm: halve number of set memory calls for vgaMichael S. Tsirkin2011-04-061-23/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use the new api to reduce the number of these (expensive) system calls. Note: using this API, we should be able to get rid of vga_dirty_log_xxx APIs. Using them doesn't affect the performance though because we detects the log_dirty flag set and ignores the call. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | cpu: add set_memory flag to request dirty loggingMichael S. Tsirkin2011-04-064-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | Pass the flag to all cpu notifiers, doing nothing at this point. Will be used by follow-up patches. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | piix_pci: load path clean upIsaku Yamahata2011-04-011-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 the interrupts are level: at the moment e.g. pci devices already reassert interrupts on load. Test: - rung linux as guest and use flooding ping (ping -f) to host in order to trigger interrupts for e1000 emulated. - savevm/loadvm and see guest kept running after loadvm. To be honest, I'm not sure that ping -f caused enough interrupts because Linux e1000 driver supports NAPI. TODO: test more OSes, stress test with save/load, live-migration Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | piix_pci: optimize set irq pathIsaku Yamahata2011-04-011-17/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 is asserted by seeing if each pirq is mapped into the pic pin. This is independent on irq routing, but data path is on slow path. Given that irq routing is rarely changed and asserting pic pins is on data path, the path that asserts pic pins should be optimized and chainging irq routing should be on slow path. The new behavior with this patch series is to use bitmap which is addressed by pirq and pic pins with a given irq routing. When pirq is asserted, the bitmap is set and see if the pic pins is asserted by checking the bitmaps. When irq routing is changed, rebuild the bitmap and re-assert pic pins. test: - create VM with 4 e1000 nics in different pci slots (i.e. fn=0 for each e1000) Thus those e1000's INTA are connected to each PIRQ[A-D]. - run linux as guest and saw each devices triggers interrupt by seeing /proc/interrupts. And then confirmed that each PIRQ[A-D] surely asserted interrupts. Because irq 10 and 11 are shared by 4 e1000's, it only one NIC is activated with ifconfig ethN up/down when counting interrupts. 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>
| * | piix_pci: eliminate PIIX3State::pci_irq_levelsIsaku Yamahata2011-04-011-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PIIX3State::pci_irq_levels are redundant which is already tracked by PCIBus 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> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | pci: add accessor function to get irq levelsIsaku Yamahata2011-04-012-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce accessor function to know INTx levels. It will be used later by q35. Although piix_pci tracks the intx line levels, it can be eliminated by this helper function. 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>
| * | cirrus_vga: remove unneeded resetStefan Weil2011-03-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | cirrus_reset is already called by the reset framework, so there is no need to call it in cirrus_init_common. 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>
* | | Merge remote-tracking branch 'kraxel/usb.7.pull' into stagingAnthony Liguori2011-05-058-149/+445
|\ \ \
| * | | usb: mass storage fixGerd Hoffmann2011-05-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initialize scsi_len with zero when starting a new request, so any stuff leftover from the previous request is cleared out. This may happen in case the data returned by the scsi command doesn't fit into the buffer provided by the guest. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | usb: move complete callback to port opsGerd Hoffmann2011-05-047-34/+34
| | | |
| * | | musb: get musb state via container_of()Gerd Hoffmann2011-05-041-20/+34
| | | |
| * | | ohci: get ohci state via container_of()Gerd Hoffmann2011-05-041-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
OpenPOWER on IntegriCloud