ne2000: switch to symbolic names for pci registers
No functional changes. I verified that the generated binarydoes not change.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Juan Quintela <quintela@redhat.com>Acked-by: Glauber Costa <glommer@gmail.com>
rtl: switch to symbolic names for pci registers
pcnet: switch to symbolic names for pci registers
pci: add more status bits
will be used by eepro100.
eepro100: symbolic names for pci registers
No functional changes. I verified that the generated binarydoes not change in meaningful ways.
piix: symbolic constants
cmd646: symbolic names for pci registers
e1000: switch to symbolic names for pci registers
No functional changes. I verified that the generatedobject binary does not change.
Revert "Revert "pci: interrupt disable bit support""
This reverts commit d587e0787153f0224a6140c5015609963ceaabfb.
ARM PBX-A9 memory map tweaks
Add core tile memeory to the RealView PBX-A9 board. Document thememeory maps that are known to work with the qemu bootloader.
Signed-off-by: Paul Brook <paul@codesourcery.com>
LAN9118 improvements
Implement LAN9118 general purpose timer and PHY interrupts. Fix globalinterrupt status bit.
PPC: Make DCR uint32_t
For what I know DCR is always 32 bits wide, so we should also use uint32_t topass it along the stacks.
This fixes a warning when compiling qemu-system-ppc64 with KVM enabled, makingit compile without --disable-werror
Signed-off-by: Alexander Graf <agraf@suse.de>...
PPC64: Fix alternate timebase
Fix the alternate time base the same way as the default timebase. SPR_ATBLshould return a 64-bit value on 64 bit implementations.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
PPC64: Fix timebase
On PPC we have a 64-bit time base. Usually (PPC32) this is accessed usingtwo separate 32 bit SPR accesses to SPR_TBU and SPR_TBL.
On PPC64 the SPR_TBL register acts as 64 bit though, so we get the full64 bits as return value. If we only take the lower ones, fine. But Linux...
ppc64: Change default machine to mac99
Also change the New World default CPU to 970FX for ppc64,since the G4 is a 32-bit CPU.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>Acked-by: Alexander Graf <agraf@suse.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Multiboot support: Fix rom_copy
ROMs need to be loaded if they are anywhere in the requested area, notonly at the very beginning. This fixes Multiboot with ELF kernels thathave more than one program header.
Signed-off-by: Kevin Wolf <mail@kevin-wolf.de>...
roms: allow roms to be loaded at address 0
It was possible to load roms at address 0, but commit632cf034b401cdd01dae253a8b577fe518e37654 started to forbid that, whichbroke at least ARM versatile.
target-ppc: Initialize OpenPIC properly
When lowering an IRQ line, we search for the line we're supposed to lower.
Usually we run into an optimization there that queues up interrupts. Thisqueue ends with -1. Unfortunately we didn't set the first item to -1....
target-ppc: Use interrupts for escc
When using the escc with Linux, we need interrupts. So instead of creatinga dummy device, let's just map them to the openpic we have anyways.
This makes Linux on PPC64 with console=ttyPZ0 work.
Obviously, this change needs to be reflected in openbios. Patch for that...
hw/openpic.c: replace tabs by spaces
e1000: Don't muck with PCI commmand register
Otherwise, the driver does not work in Linux after the INT_DISABLE changes inPCI.
Michael Tsirkin had a patch to do this, I'm not sure what happened to it.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Make USB hid devices self-powered
Simplifies power budget negotiation.
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
handle SD CMD5 without error messages
From: Juha Riihimäki <juha.riihimaki@nokia.com>Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>Signed-off-by: Riku Voipio <riku.voipio@nokia.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
usb-musb: convert fifo to 8bit and add more registers
Convert musb fifo to 8bit to allow 8/16/32bit access
MUSB allows reading and writing to the fifo in 32/16/8 bitwidth. The Linux kernel does this sometimes, most usually atthe end of writing the packet to allow packet to end at a...
Support PCI based option rom loading
Currently, we preload option roms into the option rom space in memory. Thisprevents DDIM from functioning correctly which severely limits the numberof roms we can support.
This patch introduces a pci_add_option_rom() which registers the...
pci romfiles: add property, add default to PCIDeviceInfo
This patch adds a romfile property to the pci bus. It allows to specifya romfile to load into the rom bar of the pci device. The default valuecomes from a new field in PCIDeviceInfo. The property allows to change...
fw_cfg: make calls typesafe
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
fw_cfg: add API for file transfer.
This patch adds a file transfer interface to fw_cfg. Intended to beused for passing non-pci option roms and vgabios to seabios. Namespaceis modeled after the existing cbfs filesystem support in seabios.
Reading the new FW_CFG_FILE_DIR entry returns a file list....
roms: use new fw_cfg file xfer support.
roms: use fw_cfg for vgabios and option rom loading, additionally todeploying them the traditional way (copy to 0xc0000 -> 0xe0000 range).
roms: remove option rom packing logic
Now that we load the option roms via fw_cfg, we can stop copyingthem to the 0xc000 -> 0xe000. The patch does just that.
Also the rom loader gets simplified as all remaining users of therom loader load the bits at a fixed address so the packing and...
VMware VGA: Only enable dirty log tracking when fifo is disabled
This patch enables dirty log tracking whenever it's needed and disables itwhen it is not.
We unconditionally enable dirty log tracking on reset, restart dirty logtracking when PCI IO regions are remapped, and disable/enable it based on...
vmware: increase cursor buffer size.
The cursor pixmap size we calculate later ends up being 4096 dwordslong by the looks of it. This boots an F12 LiveCD now.
Signed-off-by: Dave Airlie <airlied@linux.ie>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Revert "fdc: fix vmstate variable passed"
Floppy used the io_base address to register savevm region.
This reverts commit 2966b390d0f7cd5e5b971290fcc20685de374228.
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
fdc: fix migration from 0.11
0.11 uses as instance ide io_base, get it back
Fix backcompat for hotplug of SCSI controllers
SCSI controllers have no trouble existing without any attacheddisks. This could be achieved with the (legacy) monitor syntax
pci_add pci_addr=auto storage if=scsi
This is now denied with
scsi requires a backing file/device....
Make sure to enable dirty log tracking for VMware VGA
This is needed for VMware VGA to work properly under KVM.
Fix VMware VGA depth computation
VMware VGA requires that the depth presented to the guest is the same as theDisplaySurface that it renders to. This is because it performs a very simplememcpy() to blit from one surface to another.
We currently hardcode a 24-bit depth. The surface allocator for SDL may, and...
vmware: setup PCI BAR 2 for FIFO as per vmware spec
Make sure to enable dirty tracking of VBE vram mapping
Apparently, VBE maps the VGA vram to a fixed physical location. KVM requiresthat all mappings of the VGA vram have dirty tracking enabled on them. Anyaccess to the VGA vram through the VBE mapping currently fails to result in...
qdev: improve property error reporting.
Add a error message in case we fail to parse a qdev property.
Also make qemu not abort() in case setting a global property can't beset. This used to be a clear programming error. The introduction ofthe -global switch changed that though, so better exit instead (after...
usb-net: use qdev for -usbdevice
Rebased to master, adapted to device renaming by armbru,no other changes.
defaults: split default_drive
Split default_drive into default_{floppy,cdrom,sdcard}.Also add QEMUMachine flags to disable them per machine.
Check rom_load_all() return value.
Check rom_load_all() return value.Also don't make option rom loading failure fatal.
Fix loading of ELF multiboot kernels
The multiboot implementation assumed that there is only one program header(which contains the entry point) and that the entry point is at the start ofthe code. This doesn't hold true generally and caused too little data to be...
qdev: Improve uni-north device names
Switch to the names suggested by Blue Swirl.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Revert "pci: interrupt disable bit support"
This reverts commit 0ea5709a32085f7d14901a09d12bd35f9b267607.
Per discussion with Michael Tsirkin, this is too risky for 0.12
S390: Bail out without KVM
Currently only the S390 KVM target works. To keep users from accidently notusing KVM, let's not even initialize the machine when KVM is not used.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
S390: Don't tell guest we're updating config space
Currently we always set the "config space changed" bit to 1 when triggeringany virtio interrupt. While that worked in 2.6.27, newer kernels interpretthat value as "only the config space changed and nothing else happened"....
S390: Loop through virtio console devices
We used to always create one single virtio console device. This breaks wheneither zero of multiple virtio console devices are requested, so let's usethe same code as on x86.
target-alpha: Add placeholders for missing userspace PALcalls.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
s390: Fix buggy assignment
nd->model keeps dynamically allocated model names.So casting of a constant string is wrong here.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Acked-by: Alexander Graf <agraf@suse.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-alpha: Implement RD/WRUNIQUE in the translator
When emulating user-mode only, there's no reason to exitthe translation block to effect a call_pal. We can generatea move to/from the unique slot directly.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
workaround for cmd646 bmdma register access while no dma is active
This is a workaround only, and is a partial revertof a few changes to BMDMAState which removed pci_devfield on the way.
- cmd646 pci_from_bm() expects bm->unit value tocorrespond with bm data being passed to callback...
s390: typo fix
s390 code has an obvious typo, which results in:hw/s390-virtio.c: At top level:hw/s390-virtio.c:249: error: request for member ‘no_vga’ in something not a structure or union
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Alexander Graf <agraf@suse.de>...
s390: fix build on 32 bit host
Building on 32 bit host we get:hw/s390-virtio.c: In function ‘s390_init’:hw/s390-virtio.c:184: error: integer constant is too large for ‘unsigned long’ type64 bit values must be ULL.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
fdc/sparc32: don't hang on detection under OBP
Stepping through the SS-5's OBP initialization routinesit looks like reading fdc main status register shouldclear the fd interrupt.The patch doesn't fix problems with fdc on sparc platform,it only fixes fdc detection....
Sparc32: implement AFX for SS-5
Implement a stub for the AFX register on SparcStation-5.This stub is needed for running the original SS-5 OBPinstead of OpenBIOS (which allows to boot Solaris 2.5.1and Solaris 2.6 kernels).
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>...
scsi-disk: Inquiry with allocation length of CDB < 36 (v4)
According to the SCSI-2 specification,http://ldkelley.com/SCSI2/SCSI2/SCSI2/SCSI2-08.html#8.2.5 ,"if the allocation length of the command descriptor block (CDB) is toosmall to transfer all of the parameters, the additional length shall...
PCI: Convert pci_device_hot_add() to QObject
Return a QDict with information about the just added device.
This commit should not change user output.
Please, note that this patch does not do error handlingconversion. In error conditions the handler still calls...
Set default console to virtio on S390x
All "normal" system emulation targets in qemu I'm aware of displayoutput on either VGA or serial output.
Our S390x virtio machine doesn't have such kind of legacy hardware. Soinstead we need to default to a virtio console....
pci: don't abort() when trying to hotplug with acpi off.
The PCI bus on x86 requires ACPI for hotplug support, thus disbling ACPIalso disables hotplug for the PCI bus. This patch makes qemu checkwhenever the PCI bus in question can handle hotplug before trying to add...
pci: don't hw_error() when no slot is available.
Current PCI code will simply hw_error() and thus abort in case no freePCI slot is available or the requested PCI slot is already in use byanother device. For the hotplug case this behavior is not acceptable....
scsi: fix drive hotplug.
This patch fills the DriveInfo->unit after hotplugging a scsi disk.It makes a difference when auto-assigning a scsi id, where unit wasleft filled with '-1' instead of the actual scsi id.
With this patch applied the the drive naming logic in drive_init() works...
qdev: also match bus name for global properties
i.e. -global PCI.<property>=<value> will set a default property for allPCI devices. Also works for the compat properties used by machinetypes.
qdev: make compat stuff more generic
This patch renames the compat properties into global properties andmakes them more generic. The compatibility stuff is only one ofmultiple possible users now.
virtio: verify features on load
migrating between hosts which have different featuresmight break silently, if the migration destinationdoes not support some features supported by source.
Prevent this from happening by comparing acked featurebits with the mask supported by the device....
fix rtc-td-hack on host without high-res timers
On hosts without high-res timers it is impossible to inject rtc interruptfaster then 1kHz. Windows sometimes configures RTC to generate 1kHzinterrupts, so we can't inject missed interrupts when running on such...
qdev: Rename USBDevice member devname to product_desc
It's not a device name, it's the USB product description string.
qdev: Separate USB product description from qdev name
Using the qdev name for the product description makes for inconvenientqdev names.
Put the product description in new USBDeviceInfo member product_desc.Make usb_qdev_init() use it. No user or guest visible change, since...
qdev: Replace device names containing whitespace
Device names with whitespace require quoting in the shell and in themonitor. Some of the offenders are also overly long. Some have amore convenient alias, some don't.
The place for verbose device names is DeviceInfo member desc. The...
vmware_vga: add rom file so that it boots.
This just adds the rom file to the vmware SVGA chipset so it boots.
Signed-off-by: Dave Airlie <airlied@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
microblaze: Make boot_info static.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
microblaze: Add missing cpu_reset.
microblaze: Boot and reset fixes.
msix: function mask support
Function mask is a mandatory feature in MSIXspec so not implementing it is a spec violation.Implement.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pci: prepare irq code for interrupt state
This rearranges code in preparation for interrupt stateimplementation.Changes: - split up bus walk away from interrupt handling into a subroutine - change irq_state from an array to bitmask - verify that irq_state values are 0 or 1 on load...
pci: interrupt status bit implementation
interrupt status is a mandatory feature in PCI spec,so devices must implement it to be spec compliant.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Isaku Yamahata <yamahata@valinux.co.jp>
pci: interrupt disable bit support
Interrupt disable bit is mandatory in PCI spec.Implement it to make devices spec compliant.
msix: macro rename for function mask support
rename ENABLE_OFFSET -> CONTROL_OFFSET, sincesame byte includes function mask.This is in preparation for function mask support.
Add S390x virtio machine bus
On S390x we don't want to go through the hassle of emulating real existinghardware, because we don't need to for running Linux.
So let's instead implement a machine that is 100% based on VirtIO which wefortunately implement already....
Add S390x virtio machine description
In order to use the new S390x virtio bus we just introduced, we alsoneed a machine description that sets up the machine according to ourPV specification.
Let's add that machine description and be happy!
Add "static" to please Sparse
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
scsi: fix incorrect ?: use
Fixes OpenBSD build.
eepro100: Allocate a larger buffer for regname()
This should avoid truncating the register name when debugging.
Signed-off-by: David Benjamin <davidben@mit.edu>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
eepro100: Improve debug messages
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: Use some already defined page macros instead of constants
Some PAGE constants were used instead of the macros we already havedefined in internal.h.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: implement stub for audio control/volume read
This implements the audio control or volume read support as needed bysome systems. A Conectiva Parolin system required this to detect an IDEdevice as CD-ROM, through the CDVOLREAD ioctl.
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>...
Fix compile error when LSI_DEBUG is defined
This patch fixes the follow error when LSI_DEBUG is set.
CC libhw64/lsi53c895a.occ1: warnings being treated as errorsqemu/hw/lsi53c895a.c: In function 'lsi_io_mapfunc':qemu/hw/lsi53c895a.c:1932: error: format '%08x' expects type 'unsigned int', but argument 2 has type 'pcibus_t'...
multiboot: Use signed type for negative error numbers
In mb_mod_length a return value is stored that is negative in error case. Withan unsigned type the check goes wrong.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
multiboot: Fix module loading and setting of mmap.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Acked-by: Alexander Graf <agraf@suse.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
e1000: Fix warning from code review
A code review run by Steve Grubb complained about code in e1000.c:
In hw/e1000.c at line 89, vlan is declared to be 4 bytes.At line 382 is an attempt to do a memmove over it with a size of 12.
This was fixed by splitting the memmove in two calls and...
SCSI: Fix Standard INQUIRY data
Vendor identification, product identification and product revision levelshould be padded with spaces without a terminating NULL character, seeSCSI-2 standard, 8.2.5.1 Standard INQUIRY data.
Signed-off-by: Laszlo Ast <laszlo.ast@siemens-enterprise.com>...
targe-ppc: Sync CPU state for KVM
Some recent change made PPC guests always start at address 0x0 because envisn't synced to kvm_state on first bootup.
I'm not sure if this is the correct bugfix, but at least it makes PPC bootagain with KVM enabled.
qemu: make cirrus init value pci spec compliant
PCI memory should be disabled at reset, otherwisewe might claim transactions at address 0.I/O should also be disabled, although for cirrusit is harmless to enable it as we do nothave I/O bar.
Note: bios fix needed for this patch to work...
qemu: cleanup unused macros in cirrus
Cirrus vga has a copy of many PCI macros,and it doesn't even use them. Clean up.We also don't need to override header typeas it is NORMAL by default.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Juan Quintela <quintela@redhat.com>...
Rename DriveInfo.onerror to on_write_error
Either rename variables and functions to refer to write errors (which is whatthey actually do) or introduce a parameter to distinguish reads and writes.
ide: Implement rerror option
virtio-blk: Implement rerror option
live migration: Propagate output monitor to callback handler
In order to allow proper progress reporting to the monitor thatinitiated the migration, forward the monitor reference through themigration layer down to SaveLiveStateHandler.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
savevm: Port to qdev.vmsd all devices that have qdev