eepro100: Fix boot ROM support
eepro100: Add missing .exit initialisation
Some devices did not have an initialisation valuefor entry ".exit". This is fixed here.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
serial: Add interface to set reference oscillator frequency
Many (most?) serial interfaces have a programmableclock which provides the reference frequency ("baudbase").So a fixed baudbase which is only set once can be wrong.
omap1.c is an example which could use the new interface...
Makefile: Prettify logging
Replace GEN config-all-devices.makby GEN config-all-devices.mak
Like this, the logging output is column aligned.
microblaze: Move the kcmdline out of the way.
Avoids rom overlap conflicts.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
microblaze: Restore env when raising unmapped bus access.
microblaze: Unbreak reset.
Initialize synthesis config registers at reset to cope with the newcpu_reset sequences.
Fix ARM MCore secondary cpu boot
Make MPCore secondary cpu initialization work with the new resethandling. Also change the inital FLAG value from 3 to zero to matchrecent kenrels.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Reject late rom loading
rom_+add_file/rom_add_blob only work correctly if called beforeload_all_roms. Enforce this rather than silently accepting and puttingthe rom in the wrong place at reset.
Fix ARM system emulation
Since 45a50b1 load_image_targphys should only be called once.ARM boards incorrectly call it every time the system is reset.
QemuOpts: dump config.
Add a function to write the QemuOpts configuration to a git-styleconfig file.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QemuOpts: parse config from file.
Add functions to parse QemuOpts from a git-style config file.
QemuOpts: command line switches for the config file.
Adds -readconfig and -writeconfig command line switches to read/writeQemuOpts from config file.
In theory you should be able to do:
qemu < machine config cmd line switches here > -writeconfig vm.cfg...
Added imlpementation for qemu_error for non-qemu executables
Now qemu_error can be called also from shared files, e.g. block.c.
Signed-off-by: Naphtali Sprei <nsprei@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Documentation: Add documentation for -chardev
Adds documentation for all -chardev backends.
Signed-off-by: Matthew Booth <mbooth@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Documentation: Move image format descriptions to own section
The description of the image formats is too long to be a subitem of a parameterdescription. It will become even longer when we include the options provided bythe respective format.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
Documentation: Don't mention old qemu-img options
The old options are still supported for compatibility, but they areinconsistent (for example create -b vs. convert -B for backing files) andincomplete (-F only exists for create) which tends to confuse people. Remove...
Documentation: Add options to image format descriptions
Explain the existing format specific options that can be used with qemu-imgcreate/convert -o ...
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QemuOpts: add find_list()
Factor out the QemuOptsList search code for upcoming users.
eepro100: Improve support for different devices
pci: use range helper functions.
clean up pci_default_write_config() by the range helper functions.
Suggested by Michael S. Tsirkin <mst@redhat.com>Cc: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: teach pci_default_config_write() ROM bar for normal/bridge device .
When updated ROM expantion address of header type 0, it missedto update mappings.Add PCI_ROM_ADDRESS check whether to call pci_update_mappings()Also update pci mapping when PCI_ROM_ADDRESS1 is written for header type 1....
pci: initialize pci config headers depending it pci header type.
- Only sets default subsystem id for header type 00.(normal header type) because header type 01 doesn't have subsystem id, and uses the register for other purpose. So setting default subsystem id doesn't make sense....
pci: cosmetic on pci_upadte_mappings()
Remove one indentation of pci_update_mappings.Just for cosmetics, no logic change.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: factor out pci_for_each_device().
split out device iteration logic from pci_for_each_device().factored out function, pci_for_each_device_under_bus() will be used later.
pci: implement pci bridge filtering.
This patch implements pci bridge filtering.
TODO: currently almost all the map funcions assumesfiltered_size size and addr & ~(size - 1) addr.However with bridge filtering, they aren't always true.Teach them such cases, such that filtered_size < size and...
pci/monitor: print out bridge's filtering values and so on.
make pci_info_device() print out bridge's filtering value likeio base/limit, subbus and subordinate bus.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Michael S. Tsirkin <mst@redhat.com>...
pci: 64bit bar support.
implemented pci 64bit bar support.The tricky bit is pci_update_mapping().An OS is allowed to set the BAR such that OS can't address the areapointed by BAR. It doesn't make sense, though.In that case, don't map the BAR.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
pci: remove bus_num member from struct PCIBus.
Since It can be retrieved from pci configuration space,the member is unnecessary.
pci: make pci configuration transaction more accurate.
This patch sorts out/enhances pci code to track pci bus topologymore accurately.- Track host bus bridge with pci domain number. Although the current qemu implementation supports only pci domian 0 yet....
pci: factor out the conversion logic from io port address into pci device.
factor out the logic which converts io port address into pci deviceand offset in PCI configuration space.
pci: move pci host stuff from pci.c to pci_host.c
Move pci host stuff from pci.c to pci_host.c.And add some comments.Later pcie host bridge functions will be defined in pcie_host.cnot to bloat pci.c.
pci_host: change the signature of pci_data_{read, write}.
change the first argument, void opaque to PCIBus *sof the pci_data_{read, write}.They aren't used as direct callback so the argument typedon't have to be void. So change it to the right type....
vmstate: introduce VMSTATE_BUFFER_UNSAFE_INFO.
VMSTATE_BUFFER_UNSAFE_INFO for as a buffer with specified VMStateInfo.It will be used later.
pci: pcie host and mmcfg support.
This patch adds common routines for pcie host bridge and pcie mmcfg.This will be used by q35 based chipset emulation.
pci: add helper functions to check ranges overlap.
add helper function to check ranges overlap suggested byMichael S. Tsirkin <mst@redhat.com>.His original suggestion was to use [first, last], however I chosento use offset, length pair, i.e. [offset, offset + length)...
pci_host: consolidate pci config address access.
consolidate pci_config address access into pci_host.c
pci: introduce pcibus_t to represent pci bus address/size instead of uint32_t
This patch is preliminary for 64 bit BAR support.Introduce dedicated type, pcibus_t, to represent pci bus address/sizeinstead of uint32_t.Later this type will be changed to uint64_t....
pci: introduce FMT_PCIBUS for printf format for pcibus_t.
This patch is preliminary for 64bit BAR.Later pcibus_t will be changed from uint32_t to uint64_t.Introduce FMT_PCIBUS for printf format for pcibus_t.
pci: typedef pcibus_t as uint64_t instead of uint32_t.
This patch is preliminary for 64bit bar.For 64bit bar support, change pcibus_t which representspci bus addr/size from uint32_t to uint64_t.And also change FMT_pcibus for printf.
In pci_update_mapping() checks 32bit overflow....
pci: s/PCI_ADDRESS_SPACE_/PCI_BASE_ADDRESS_SPACE_/ to match pci_regs.h
make constants for pci base address match pci_regs.h byrenaming PCI_ADDRESS_SPACE_xxx to PCI_BASE_ADDRESS_SPACE_xxx.
pci: clean up of pci_default_read_config.
This patch cleans up pci_default_read_config() removingugly length and range check.
Suggested by "Michael S. Tsirkin" <mst@redhat.com>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Michael S. Tsirkin <mst@redhat.com>...
pci: make pci_bar() aware of header type 1.
make pci_bar() aware of header type 1. When PCI_ROM_SLOTit should return PCI_ROM_ADDRESS1 (!= PCI_ROM_ADDRESS)
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...
pci: use helper functions to access pci config space.
use pci_[gs]et_{byte, word, long}() to access pci configurationspace.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci/bridge: clean up of pci_bridge_initfn()
- use symbolic constant- use helper function pci_set_xxx()- removed lines which initializes to 0. It is unnecessary because it is already zeroed.- add some comments on command registers.
Some initial values are suspicious because they seems to...
pci: clean up pci_init_wmask()
use pci_set_word() for pci command register.
pci: fix PCI_DPRINTF() wrt variadic macro.
add missing ## in PCI_DPRINTF() to compile.
pci: introduce constant PCI_NUM_PINS for the number of interrupt pins, 4.
introduce constant PCI_NUM_PINS for the number of interrupt pins, 4.and use it.
pci: use PCI_SLOT() and PCI_FUNC().
use PCI_SLOT() and PCI_FUNC() where appropriate instead ofdirect use of bit operation.
pci: define a constant to represent a unmapped bar and use it.
define a constant to represent a unmapped bar instead of -1 and use it.
pci: helper functions to access PCIDevice::config
add helper functions to get/set PCIDevice::configThose will be used later.
qemu-img: Allow creating zero sized images
A size of 0 should be valid and cannot be treated as "missing value". Use -1for this purpose instead.
whitelist host virtio networking features
This patch is a followup to 8eca6b1bc770982595db2f7207c65051572436cb,fixing crashes when guests with 2.6.25 virtio drivers have saturatedvirtio network connections.
https://bugs.edge.launchpad.net/ubuntu/+source/qemu-kvm/+bug/458521...
Makefile: make qemu-img dependant on config-host.h
Since config-host.h is generated by the Makefile (1215c6e76),building (only) qemu-img fails:
[user@f12-uri qemu]$ make distclean (or git clone qemu)[user@f12-uri qemu]$ ./configure ...[user@f12-uri qemu]$ make qemu-img...
scsi: move scsi.h -> esp.h
scsi: move scsi-disk.h -> scsi.h
Makefile: make qemu-io dependent on config-host.h
This is needed also for qemu-io, but not for qemu-nbd.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: Tag isa-fdc, PIIX3 IDE and PIIX4 IDE as no-user
These devices are created automatically, and attempting to createanother one with -device fails with "qemu: hardware error:register_ioport_write: invalid opaque".
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
Configurable block format whitelist
We have code for a quite a few block formats. While I trust that allof these formats are useful at least for some people in somecircumstances, some of them are of a kind that friends don't letfriends use in production....
tap: disable draining queue in one go
If qemu_send_packet_async() returns zero, it means the packet has beenqueued and the sent callback will be invoked once it has been flushed.
This is only possible where the NIC's receive() handler returns zeroand promises to notify the networking core that room is available in its...
net: disable receiving if client returns zero
If a receiver returns zero, that means its queue is full and it willnotify us when room is available using qemu_flush_queued_packets().
Take note of that and disable that receiver until it flushes its queue....
net/queue: queue packets even if sender doesn't supply a callback
Now that we disable any receiver whose queue is full, we do not requiresenders to handle a zero return by supplying a sent callback.
This is a second step towards allowing can_receive() handlers to return...
virtio-net: split the has_buffers() logic from can_receive()
We should only return zero from receive() for a condition which we'llget notification of when it changes. Currently, we're returning zeroif the guest driver is not ready, but we won't ever flush our queue...
tap: drain queue in tap_send()
Okay, let's try re-enabling the drain-entire-queue behaviour, with adifference - before each subsequent packet, use qemu_can_send_packet()to check that we can send it. This is similar to how we check beforepolling the tap fd and avoids having to drop a packet if the receiver...
qcow2: Allow qcow2 disk images with size zero
Images with disk size 0 may be used forVM snapshots, but not to save normal block data.
It is possible to create such images usingqemu-img, but opening them later fails.
So even "qemu-img info image.qcow2" is not...
Added readonly flag to -drive command
This is a slightly revised patch for adding readonly flag to the -drive command.Even though this patch is "stand-alone", it assumes a previous related patch (in Anthony staging tree), that passesthe readonly attribute of the drive to the guest OS, applied first....
Pass the drive's readonly attribute to the guest OS
Implemented for virtio-blk and for scsi
(x86/Sparc/PPC)-user: fix cpu_copy
b55a37c981914aa8ecd21b9a2a2fb37f39b917c5 moved the call to cpu_resetto user emulators. But cpu_copy also initializes a CPU structure, so add thecall also there.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
IDE: Fix reset handling
Problem: x86 systems could not survive a few system_resets.
Clear most of IDE state when reset. Implement the missing reset handlers.
user: move CPU reset call to main.c for x86/PPC/Sparc
PPC: rename cpu_ppc_reset to cpu_reset for consistency
Sparc64/x86: remove unneeded calls to device reset
PPC: remove unneeded calls to device reset
sparc32 (mostly): remove unneeded calls to device reset
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,...
vga: fix line comparison
Line counter doesn't wrap.
Signed-off-by: malc <av1474@comtv.ru>
vga: Respect Line Compare Register in text modes
Unbreaks setup screen of Act1/PL
Sparc: fix carry flag handling (Solaris bootblk fix)
The page 108 of the SPARC Version 8 Architecture Manual describesthat addcc and addxcc shall compute carry flag the same way.The page 110 claims the same about subcc and subxcc instructions.This patch fixes carry computation in corner cases and removes redundant code....
hw/sd: Support SDHC size cards
This patch adds SHDC support (-sd sd.img, where sd.img islarger than 1GB) to qemu.
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Fix the build when srcdir objdir
You would only see this error on a fresh clone when srcdir objdir. configurewill fail because roms/pcbios doesn't exist.
git submodule integration doesn't cleanup very well when switching betweenbranches so you'll get an roms/pcbios directory from normal operations if you...
Unbreak Linux build
commit 71f4effce79ec0485586963ea764f2c212c72f26 Author: Alexander Graf <agraf@suse.de> Date: Fri Oct 30 22:27:00 2009 +0100
Unbreak tap compilation on OS X
Broke the build on Linux due to a bad #if guard
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Update gpxe roms to have BANNER_TIMEOUT=0
Currently compiling the tap sources breaks on Mac OS X. This is because of:
1) tap-linux.h requiring Linux includes 2) typos 3) missing #includes
This patch adds what's necessary to compile tap happily on Mac OS X....
Revert "Fall back to network boot as the last possible boot option"
This reverts commit 94ca5a985919cca312c505bbb0c824d175cc6bb8.
Switch pc bios from pc-bios to seabios
SeaBIOS is a port of pc-bios to GCC. Besides using a more modern tool chain,SeaBIOS introduces a number of new features including PMM support, betterBEV and BCV support, and better PnP support.
Switch from etherboot to gPXE
etherboot is deprecated and not under active development anymore.
Remove e1000 rom loading hack
The gPXE rom supports BEV properly.
Fall back to network boot as the last possible boot option
This is similiar to the default with most bare metal systems.
virtio-net: fix macaddr config regression
This commit:
commit 97b15621 virtio: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
makes a guest using virtio-net see an empty macaddr because we never...
Update SeaBIOS to latest upstream
Remove aio_ctx from paio_* interface
The context parameter in paio_submit isn't used anyway, so there is no reasonwhy block drivers should need to remember it. This also avoids passing a LinuxAIO context to paio_submit (which doesn't do any harm as long as the parameter...
qemu/virtio: make wmb compiler barrier + comments
wmb must be at least a compiler barrier, even without SMP.Further, we likely need some rmb()/mb() as well:I have not audited the code but lguest has mb(),add a comment for now.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
qemu/msix: fix table access issues
Fixes a couple of issues with msix table access:- With misbehaving guests, misaligned 4 byte access could overflow msix table and cause qemu to segfault. Since PCI spec requires host to only issue dword-aligned accesses, as a fix,...
Add *CFLAGS to LINK in rules.mak
Sometimes when linking with gcc to get a predictable result you are suggested to also apply the compiler flags to the linker command.
For reference, please read:http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Link-Options.html...
usb-host: use qdev for -usbdevice + rework.
Changes:
usb: print attached status in info qtree
serial: Support additional serial speed values
serial: Add missing bit
Serial frames always start with a start bit.This bit was missing in frame size calculation.
usb-storage: use qdev for -usbdevice
Hook up usb_msd_init.
Also rework handling of encrypted block devices,move the code out vl.c.