sh7750: handle MMUCR TI bit
When the MMUCR TI bit is set, all the UTLB and ITLB entries should beflushed.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Merge remote branch 'qemu-kvm/uq/master' into staging-tmp
SH4/R2D: fix poweroff
The write the the PA_POWOFF register is currently ignored. Fix that bycalling qemu_system_shutdown_request() when a poweroff is requested.
dec: actually implement PCI bridging
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
esp: use CamelCaseFunc for function types
fw_cfg: don't use reserved _ prefix
fdc: don't use reserved _ prefix
fdc: don't use reserved _t suffix
escc: don't use reserved _t suffix
m48t59: don't use reserved _t suffix
Do not use dprintf
dprintf is already claimed by POSIX1, and on at least one systemis implemented as a macro
[1] http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html
Signed-off-by: malc <av1474@comtv.ru>
mips/malta: fix typo
PCI: show also host bridge data in "info pci" output
PCI: fix multiple bridge problems
When several PCI bridges were in use, monitor command "info pci" wouldenter into infinite loop. Buses behind the bridge were not discoverablebecause secondary and subordinate bus numbers were not used properly.Other buses were not found because bus search terminated on first miss....
Refactor DEC 21154 PCI bridge
It's currently not used by PPC machines. Refactor so that also Sparc64machines can use it.
KVM: Make vmport KVM-compatible
The vmport "device" accesses the VCPU registers, so it requires propercpu_synchronize_state. Add it to vmport_ioport_read, which alsosynchronizes vmport_ioport_write.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
qdev: Fix exit code for -device ?
Help was shoehorned into device creation, qdev_device_add(). Sincehelp doesn't create a device, it returns NULL, which looks to callersjust like failed device creation. Monitor handler do_device_add()doesn't care, but main() exits unsuccessfully....
Revert "qdev: Add help for property value"
This reverts commit 922910ce42d15bdb7c2347436b1b5798b5401de4.
The commit has four issues:
Revert "qdev: Add help for device properties"
This reverts commit 2ba6edf0dd740166632df80caa85992b20791a68.
The commit has two issues:
qdev: Add help for device properties
Option "-device DRIVER,?" and monitor command "device_add DRIVER,?" print the supported properties instead of creating a device. Theformer also terminates the program.
This is commit 2ba6edf0 (just reverted) done right....
qdev: Add rudimentary help for property value
This provides the same information as reverted commit 2ba6edf0. Notmuch, just better than nothing.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
sparc64: implement basic IOMMU/interrupt handling
Also add reset control.
Sparc64: byte swap IO port access
This requires an updated OpenBIOS image.
virtio-blk: Fix restart after read error
Current code assumes that only write requests are ever going to be restarted.This is wrong since rerror=stop exists. Instead of directly starting writes,use the same request processing as used for new requests....
virtio-blk: Fix error cases which ignored rerror/werror
If an I/O request fails right away instead of getting an error only in thecallback, we still need to consider rerror/werror.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-serial-bus: Fix bus initialisation and allow for bus identification
This commit enables one to use multiple virtio-serial devices and toassign ports to arbitrary devices like this:
-device virtio-serial,id=foo -device virtio-serial,id=bar \ -device virtserialport,bus=foo.0,name=foo \...
cirrus: Properly re-register cirrus_linear_io_addr on vram unmap
This fixes CONFIG_FB_CIRRUS for Linux guests and probably much more:
When switching away from linearly mapped vram, we also have to restorethe I/O handlers for the LFB.
This regression was once introduced by commit 2bec46dc97....
virtio_blk: Factor virtio_blk_handle_request out
We need a function that handles a single request. Create one by splitting outcode from virtio_blk_handle_output.
sparc64: reimplement tick timers v4
sparc64 timer has tick counter which can be set and read,and tick compare value used as deadline to fire timer interrupt.The timer is not used as periodic timer, instead deadlineis set each time new timer interrupt is needed....
pflash: Buffer block writes
Buffer block writes to avoid flushing every word access onto backingstorage device. This significantly speeds up flash emulation for flashesconnected through an 8 or 16-bit bus combined with backing storage (-pflash).
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
virtio: Add memory statistics reporting to the balloon driver
When using ballooning to manage overcommitted memory on a host, a system forguests to communicate their memory usage to the host can provide informationthat will minimize the impact of ballooning on the guests. The current method...
win32: pair qemu_memalign() with qemu_vfree()
Win32 suffers from a very big memory leak when dealing with SCSI devices.Each read/write request allocates memory with qemu_memalign (ieVirtualAlloc) but frees it with qemu_free (ie free).Pair all qemu_memalign() calls with qemu_vfree() to prevent such leaks....
PCI: fix bridge configuration
PCI bridges' qdev info structures must indicate bridge header type,otherwise critical bridge registers (esp. PCI_PRIMARY_BUS,PCI_SECONDARY_BUS, PCI_SUBORDINATE_BUS) will not be writable.
PCI: Convert pci_info() to QObject
The returned QObject is a QList of all buses. Each bus isrepresented by a QDict, which has a key with a QList of allPCI devices attached to it. Each device is represented bya QDict.
As has happended to other complex conversions, it's hard to...
PCI: do_pci_info(): PCI bridge devices support
This commit completes the do_pci_info() conversion toQObject by adding support to PCI bridge devices.
This is done by recursively adding devices in the"pci_bridge" key.
IMPORTANT: This code is being added separately because I could...
ide save/restore current transfer fields
If migration takes place between write of the bmdma address register andwrite of the command register (to initiate DMA), the destination willnot properly start the DMA op, hanging the guest:
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen...
virtio-console: Rename virtio-serial.c back to virtio-console.c
This file was renamed to ease the reviews of the recent changesthat went in.
Now that the changes are done, rename the file back to its originalname.
Signed-off-by: Amit Shah <amit.shah@redhat.com>...
When called with property "?", a list of supportedproperties will be printed (instead of an error message).
This is useful for command lines like qemu -device e1000,?and was already standard for other options like model=?...
qdev: Add help for property value
When called with property value "?",a help text will be printed (instead of an error message).
This is useful for command lines like qemu -device e1000,mac=?and is already standard for other command line options....
check pipe() return value
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Sparc64: fix initrd
Fix HdrS offsets for Sparc64. The initrd address must be offset byKERNBASE.
Use rom_ptr mechanism to actually write to the kernel image.
pflash: Dont open memarea for full IO if already done.
When wcycle is non zero the area is already opened for readable IO.Avoiding the re-registration of the memarea significantly speeds upthe flash emulation. In particular for flashes connected through 8 or...
pflash: Reduce writebuf len for 8-bit flashes.
Flashes connected through an 8 bit bus cannot handle write bufferslarger than 256 bytes.
pflash: Remove dead code, no functional changes.
microblaze: The petalogix s3adsp board uses intel flashes
Sparc32: fix free-run timer
According to Sun4M System Architecture Manual chapter 5.3.2, a limitof 0 will not generate interrupts.
Musicpal: Fix descriptor walk in eth_send
Commit 930c86820e introduced a regression to eth_send: eth_tx_desc_putmanipulates the host's tx descriptor copy before writing it back, buttwo lines down the descriptor is evaluated again, leaving us with aninvalid next address if host and guest endianness differ. So this was...
Musicpal: Fix wm8750 I2C address
Commit b3a219883e uncovered that we attached the Wolfson with an I2Caddress shifted left by one. Fixing this makes sound work again forthe Musicpal.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>Signed-off-by: malc <av1474@comtv.ru>
Sparc64: fix PCI probe problems
Byte swap PCI config values.
Remove old bogus PCI config mechanism so that device 0:0.0 can be probed.This requires OpenBIOS r667.
reduce number of reinjects on ACK
Windows 7 BSODs under load with HAL_RTC_IRQF_WILL_NOT_CLEAR error.
It happens here:hal!HalpRtcUnmaskClock:8281b93a 8bff mov edi,edi8281b93c 56 push esi8281b93d 33f6 xor esi,esi...
virtio: Remove duplicate macro definition for max. virtqueues, bump up the max
VIRTIO_PCI_QUEUE_MAX is redefined in hw/virtio.c. Let's just keep it inhw/virtio.h.
Also, bump up the value of the maximum allowed virtqueues to 64. This isin preparation to allow multiple ports per virtio-console device....
virtio-console: qdev conversion, new virtio-serial-bus
This commit converts the virtio-console device to create a newvirtio-serial bus that can host console and generic serial ports. Thefile hosting this code is now called virtio-serial-bus.c.
The virtio console is now a very simple qdev device that sits on the...
virtio-serial-bus: Maintain guest and host port open/close state
Via control channel messages, the guest can tell us whether a port gotopened or closed. Similarly, we can also indicate to the guest of hostport open/close events.
virtio-serial-bus: Add a port 'name' property for port discovery in guests
The port 'id' or number is internal state between the guest kernel andour bus implementation. This is invocation-dependent and isn't part ofthe guest-host ABI.
To correcly enumerate and map ports between the host and the guest, the...
virtio-serial-bus: Add ability to hot-unplug ports
Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-serial: Add a 'virtserialport' device for generic serial port support
This commit adds a simple chardev-based serial port. Any data the guestsends is forwarded to the chardev and vice-versa.
Sample uses for such a device can be obtaining info from the guest like...
virtio-serial: Use MSI vectors for port virtqueues
This commit enables the use of MSI interrupts for virtqueuenotifications for ports. We use nr_ports + 1 (for control channel) msientries for the ports, as only the in_vq operations need an interrupt on...
Clean-up a little bit the RW related bits of BDRV_O_FLAGS. BDRV_O_RDONLY gone (and so is BDRV_O_ACCESS). Default value for bdrv_flags (0/zero) is READ-ONLY. Need to explicitly request READ-WRITE.
Instead of using the field 'readonly' of the BlockDriverState struct for passing the request,...
Fix QEMU_WARN_UNUSED_RESULT
Since commit 747bbdf7 QEMU_WARN_UNUSED_RESULT is never defined as it isconditional on a define from config-host.h which is included only later.Include that file earlier to get the warnings back.
Reactivating it unfortunately leads to some warnings about unused qdev_init...
ide: device version property
This patch adds a new property named 'ver' to ide-drive which allows tospecify the version which the virtual disk/cdrom should report to theguest. By default this is the qemu version (i.e. 0.12). usage:
-drive if=none,id=disk,file=......
scsi: device version property
This patch adds a new property named 'ver' to scsi-disk which allows tospecify the version which the virtual disk/cdrom should report to theguest. By default this is the qemu version (i.e. 0.12). usage:
pc: add driver version compat properties
This patch adds compat property entries for ide-disk.ver andscsi-disk.ver to pc-0.10 and pc-0.11. With this patch appliedthe scsi and ide disks report "0.10" and "0.11" as version whenyou start qemu with "-M pc-0.10" or "-M pc-0.11"....
eepro100: Fix multicast support
This patch is a step to synchronize my maintainer versionof eepro100.c (git://repo.or.cz/qemu/ar7.git) with the...
rtl8139: fix clang reporting unused assignment of VLAN tagging data
Currently we do not implement VLAN tagging for rtl8139(C+),still data is read from ring buffer headers.
- augment unused assignment with TODO item- cast txdw1 to void for now
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>...
eepro100: Restructure code (new function tx_command)
Handling of transmit commands is rather complex,so about 80 lines of code were moved from functionaction_command to the new function tx_command.
The two new values "tx" and "cb_address" in theeepro100 status structure made this possible without...
Sparc32: improve DMA controller IRQ debugging
ESP: improve IRQ debugging
sparc32 do not clear interrupts when masking
nand: Correct random data reads.
Random reading depends on having the last row/page latched and not beeingclobbered between read and any following random reads.
Also, s->iolen must be updated when loading the io/data register withrandomly accessed flash data....
sh: sm501: Add hardware cursor feature
This patch adds hardware cursor feature to SM501 graphics chip emulation,to make the graphic console more useful for QEMU SH4 users.
Signed-off-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
virtio: net: remove dead assignment
clang-analyzer points out value assigned to 'len' is not used.
hw/vga.c: remove dead assignment
clang-analyzer points out a redundant assignment.
virtio-blk: remove dead variable in virtio_blk_handle_scsi
As pointed out by clang size is only ever written to, but never actuallyused.
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pcnet: remove dead nested assignment, spotted by clang
Although the value stored to 'addr' is used in the enclosing expression,the value is never actually read from 'addr'.
Probably a typo.
Sparc32: remove dead increment, spotted by clang
Sparc32: remove a variable used only for debugging to avoid a clang warning
Sparc32: remove unused env/envs variables, spotted by clang
pci: Add missing 'const' in argument to pci_get_xxx
pci_get_byte, pci_get_word, pci_get_long and pci_get_quadall take a const uint8_t pointer, because they only readthe configuration data.
Their prototypes should reflect this fact.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
eepro100: Update ROM file support
Use new way to associate ROM files to devices.
Currently, there is only a ROM file for i82559erincluded in QEMU, so the patch does not add.romfile for the other devices.
When flexible mode is fixed in eepro100, adding...
eepro100: Fix initial value for PCI_STATUS
The numerical value was wrong (0x2800 instead of 0x0280)which indeed did not make sense.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
virtio-net: mac property is mandatory
Mac feature bit isn't going to work as all network cards already have a'mac' property to set the mac address. Remove it from mask and add inget_features.
Reported-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
Sparc64: Fix PCI config accessor order
Fix by Igor Kovalenko.
qdev: fix thinko leading to guest crashes
Without this fix, guest crashes with drive=virtio.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
dma/sb16: make clang analyzer not complain
Sparc64: enable real access to PCI configuration space
Leave the bogus access method used by OpenBIOS in place for now.
virtio-pci: thinko fix
Since patch ed757e140c0ada220f213036e4497315d24ca8bct, virtio willsometimes clear all status registers on bus master disable, which losesinformation such as VIRTIO_CONFIG_S_FAILED bit. This is a result ofa patch being misapplied: code uses ! instead of ~ for bit...
pc: add machine type for 0.12
Add a new machine type for qemu 0.12.
Also fixup the 0.11 machine type: msi for virtio-blk-pci was enabledafter the 0.11 release, so turn it off in the 0.11 machine type.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
roms: minor fixes and cleanups.
Changes: - Drop extra file argument from rom_add_file(). - Drop fw_dir check in do_info_roms, we allways have a dir name. - code style fixes.
fw_cfg: rom loader tweaks.
Changes: - make dir argument mandatory, we allways have one anyway (vgaroms or genroms). - check for duplicates, skip loading if found.
roms: rework rom loading via fw
This patch changes the way rom loading via fw_cfg is handled.Instead of having pc_init1() call a function which passed allroms to the firmware config we simply pass a pointer to fw_cfgto the rom loader.
Advantage: loading roms via firmware works also for devices which...
pci: allow loading roms via fw_cfg.
This patch adds a pci bus property 'rombar' which specifies wheneverthe pci rom should be loaded via pci rom bar (default) or via fw_cfg.The later can be used for compatibility with older qemu versions whereno pci rom bar is present....
pc: add rombar to compat properties for pc-0.10 and pc-0.11
So '-M pc-0.10' and '-M pc-0.11' will use the fw_cfg rom load methodby default.
qdev: add bit property type
This adds "bit" property type, which is a boolean stored in a 32 bitinteger field, with legal values on and off. Will be used by virtio forfeature bits.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Gerd Hoffmann <kraxel@redhat.com>...
virtio: rename features -> guest_features
Rename features->guest_features. This iswhat they are, avoid confusion withhost features which we also need to keep around.
virtio: add features as qdev properties
Add feature bits as properties to virtio. This makes it possible to e.g. definemachine without indirect buffer support, which is required for 0.10compatibility, or without hardware checksum support, which is required for 0.11...
lsi: use QTAILQ for lsi_queue
Replace the funky array logic for queued commands with standardqemu list functions. Also rename lsi_queue to lsi_request.
lsi: have lsi_request for the whole life time of the request.
Right now lsi_request is allocated when a request is queued and releasedwhen a request is unqueued. With this patch applied the lsi_request iskept for the whole lifetime of the scsi request....
lsi: move current_dev into lsi_request
lsi: move dma_len+dma_buf into lsi_request
lsi: pass lsi_request to lsi_reselect
All callers of lsi_reselect have a lsi_request struct at hand anyway.So just pass it directly instead of having lsi_reselect search for itusing the tag.