summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-01-11make help output be a little more self-consistentBruce Rogers1-19/+20
Signed-off-by: Bruce Rogers <brogers@novell.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11pc: add rombar to compat properties for pc-0.10 and pc-0.11Gerd Hoffmann1-0/+8
So '-M pc-0.10' and '-M pc-0.11' will use the fw_cfg rom load method by default. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11pci: allow loading roms via fw_cfg.Gerd Hoffmann2-0/+16
This patch adds a pci bus property 'rombar' which specifies whenever the 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 where no pci rom bar is present. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11roms: rework rom loading via fwGerd Hoffmann3-13/+7
This patch changes the way rom loading via fw_cfg is handled. Instead of having pc_init1() call a function which passed all roms to the firmware config we simply pass a pointer to fw_cfg to the rom loader. Advantage: loading roms via firmware works also for devices which are initialized after pc_init1(), i.e. everyting added via -device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11fw_cfg: rom loader tweaks.Gerd Hoffmann1-7/+11
Changes: - make dir argument mandatory, we allways have one anyway (vgaroms or genroms). - check for duplicates, skip loading if found. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11roms: minor fixes and cleanups.Gerd Hoffmann2-17/+26
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. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11pc: add machine type for 0.12Gerd Hoffmann1-1/+17
Add a new machine type for qemu 0.12. Also fixup the 0.11 machine type: msi for virtio-blk-pci was enabled after 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>
2010-01-11Handle TFTP ERROR from clientThomas Horsten1-0/+23
If a PXE client only wants to find out the size of a file, it will open the file and then abort the transfer by sending a TFTP ERROR packet. The ERROR packet should cause qemu to terminate the session. If not, the sessions will soon run out and cause timeouts in the client. Also, if a TFTP session already exists with same IP/UDP port, it should be terminated when a new RRQ is received, instead of creating a duplicate (which will never be used). A patch for gPXE to send the ERROR packet is also being submitted to gPXE. Together they resolve slowness/hanging when booting pxegrub from qemu's internal TFTP server. The patch from Milan Plzik to return after sending OACK is also required for a complete fix. Signed-off-by: Thomas Horsten <thomas@horsten.com> Signed-off-by: Milan Plzik <milan.plzik@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11dmg: fix ->open failureChristoph Hellwig1-14/+14
Currently the dmg image format driver simply opens the images as raw if any kind of failure happens. This is contrarty to the behaviour of all other image formats which just return an error and let the block core deal with it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11virtio-pci: thinko fixMichael S. Tsirkin1-1/+1
Since patch ed757e140c0ada220f213036e4497315d24ca8bct, virtio will sometimes clear all status registers on bus master disable, which loses information such as VIRTIO_CONFIG_S_FAILED bit. This is a result of a patch being misapplied: code uses ! instead of ~ for bit operations as in Yan's original patch. This obviously does not make sense. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11virtio: add features as qdev propertiesMichael S. Tsirkin12-50/+91
Add feature bits as properties to virtio. This makes it possible to e.g. define machine without indirect buffer support, which is required for 0.10 compatibility, or without hardware checksum support, which is required for 0.11 compatibility. Since default values for optional features are now set by qdev, get_features callback has been modified: it sets non-optional bits, and clears bits not supported by host. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11virtio: rename features -> guest_featuresMichael S. Tsirkin6-15/+15
Rename features->guest_features. This is what they are, avoid confusion with host features which we also need to keep around. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11qdev: add bit property typeMichael S. Tsirkin2-7/+66
This adds "bit" property type, which is a boolean stored in a 32 bit integer field, with legal values on and off. Will be used by virtio for feature bits. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11pc-bios: Update README (SeaBIOS)Stefan Weil1-1/+2
The PC BIOS no longer comes from Bochs. This patch updates the related entry. V2 - Modify SeaBIOS description and URL (Thanks to Gleb Natapov for the hint). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11lsi: pass lsi_request to lsi_reselectGerd Hoffmann1-16/+7
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 it using the tag. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11lsi: move dma_len+dma_buf into lsi_requestGerd Hoffmann1-22/+23
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11lsi: move current_dev into lsi_requestGerd Hoffmann1-11/+12
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11lsi: have lsi_request for the whole life time of the request.Gerd Hoffmann1-21/+32
Right now lsi_request is allocated when a request is queued and released when a request is unqueued. With this patch applied the lsi_request is kept for the whole lifetime of the scsi request. Rationale: We can use it for per-request data then. The patch does that already for the request tag. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11lsi: use QTAILQ for lsi_queueGerd Hoffmann1-40/+28
Replace the funky array logic for queued commands with standard qemu list functions. Also rename lsi_queue to lsi_request. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11vmware_vga: Check cursor dimensions passed from guest to avoid buffer overflowRoland Dreier1-0/+7
Check that the cursor dimensions passed from the guest for the DEFINE_CURSOR command don't overflow the available space in the cursor.image[] or cursor.mask[] arrays before copying data from the guest into those arrays. Signed-off-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11remove pending exception on vcpu reset.Gleb Natapov1-0/+1
Without this qemu can even start on kvm modules with events support since default value of exception_injected in zero and this is #DE exception. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11Fix CPU topology initializationJiri Denemark1-4/+4
Late initialization of CPU topology in CPUState prevents KVM guests to actually see the topology. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-11MCE: Fix bug of IA32_MCG_STATUS after system resetHuang Ying1-0/+2
Now, if we inject a fatal MCE into guest OS, for example Linux, Linux will go panic and then reboot. But if we inject another MCE now, system will reset directly instead of go panic firstly, because MCG_STATUS.MCIP is set to 1 and not cleared after reboot. This is does not follow the behavior in real hardware. This patch fixes this via set env->mcg_status to 0 during system reset. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-10PCI: Fix a typoBlue Swirl1-1/+1
Fixes build with PCI_DEBUG defined. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-10Sparc64: increase APB register rangeBlue Swirl1-2/+2
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-09Sparc64: use firmware configuration device for command line storageBlue Swirl1-3/+3
Avoid a ROM conflict. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-09oss: fix fragment settingmalc1-13/+16
Previous patch introduced subtle regression, in cases when OSS_GETVERSION fails the code wasn't falling back to SNDCTL_DSP_SETFRAGMENT. Signed-off-by: malc <av1474@comtv.ru>
2010-01-09oss: issue OSS_GETVERSION ioctl only when neededmalc1-17/+17
Signed-off-by: malc <av1474@comtv.ru>
2010-01-08finish VPATH -> vpath translationPaolo Bonzini4-6/+4
This adds a few more vpath suffixes and points the remaining two paths explicitly to $(SRC_PATH) in order to eliminate the VPATH assignment from config-host.mak. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Cc: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-09oss: refactor code around policy settingmalc1-12/+8
This fixes a problem with a previous patch spotted by Juergen Lock, thanks to him again. Signed-off-by: malc <av1474@comtv.ru>
2010-01-08Makefile: remove obsolete libuser.a ruleBlue Swirl1-4/+1
libuser.a was removed by 0e8c9214ba1d4128cf92442cd343bc3733478261. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-08sparc64: interrupt trap handlingIgor V. Kovalenko3-27/+59
cpu_check_irqs - handle SOFTINT register TICK and STICK timer bits - only check interrupt levels greater than PIL value - handle preemption by higher level traps cpu_exec - handle CPU_INTERRUPT_HARD only if interrupts are enabled - PIL 15 is not special level on sparcv9 Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-08sparc64: move cpu_interrupts_enabled to cpu.hIgor V. Kovalenko2-13/+13
- to be used by cpu_check_irqs Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-08sparc64: add macros to deal with softint and timer interruptIgor V. Kovalenko2-1/+4
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-08sparc64: check for pending irq when pil, pstate or softint is changedIgor V. Kovalenko1-3/+38
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-08sparc64: use helper_wrpil to check pending irq on writeIgor V. Kovalenko3-4/+16
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-08sparc64: add PIL to cpu state dumpIgor V. Kovalenko1-0/+1
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-08sparc64: trace pstate and global register set changesIgor V. Kovalenko1-0/+20
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-08sparc64: change_pstate should have 32bit argumentIgor V. Kovalenko1-3/+3
- pstate is 32bit variable, no need to pass 64bit value around Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-01-08multiboot: Separate multiboot loading into separate fileAdam Lackorzynski4-303/+347
Move multiboot loading code into separate files as suggested by Alex Graf. Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08multiboot: Support arbitrary number of modules.Adam Lackorzynski1-101/+167
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08linuxboot: fix gdt address calculationAvi Kivity1-2/+3
The gdt address calculation in linuxboot.bin is broken in two ways: first it loads %cs into %eax, but that instruction leaves the high bits of %eax undefined and we did not clear them. Secondly, we completely ignore the incorrect %eax, and use the undefined %ebx instead. With these issues fixed, linuxboot works again. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08QMP: Drop wrong assert()Luiz Capitulino1-1/+0
Some commands return a QList of QDicts, which is valid, but will trig the assert(). Just drop it. Reported-by: Nathan Baum <nathan@parenthephobia.org.uk> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08block/vdi: allow disk sizes not multiple of block sizeFrançois Revol1-2/+5
The disk image I created from my old laptop disk with VBoxManage internalcommand converthd obviously was not a multiple of 1MB as when created from scratch. This fixes QEMU refusing it. We still require the size to be a multiple of sector size though. It then boots correctly. Allow opening VDI images with size not multiple of 1MB (as when converted from a raw disk). Signed-off-by: François Revol <revol@free.fr> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08net: add API to disable/enable pollingMichael S. Tsirkin2-0/+11
When vhost is bound to a backend device, we need to stop polling it when vhost is started, and restart polling when vhost is stopped. Add an API for that for use by vhost, and implement in tap backend. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08debugcon: support for debugging consoles (e.g. Bochs port 0xe9)H. Peter Anvin4-1/+142
Add generic support for debugging consoles (simple I/O ports which when written to cause debugging output to be written to a target.) The current implementation matches Bochs' port 0xe9, allowing the same debugging code to be used for both Bochs and Qemu. There is no vm state associated with the debugging port, simply because it has none -- the entire interface is a single, stateless, write-only port. Most of the code was cribbed from the serial port driver. v2: removed non-ISA variants (they can be introduced when/if someone wants them, using code from the serial port); added configurable readback (Bochs returns 0xe9 on a read from this register, mimic that by default) This retains the apparently somewhat controversial user friendly option, however. v3: reimplemented the user friendly option as a synthetic option ("-debugcon foo" basically ends up being a parser-level shorthand for "-chardev stdio,id=debugcon -device isa-debugcon,chardev=debugcon") -- this dramatically reduced the complexity while keeping the same level of user friendliness. v4: spaces, not tabs. v5: update to match current top of tree. Calling qemu_chr_open() already during parsing no longer works; defer until we are parsing the other console-like devices. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08Makefile: Update unmodified config-devices.mak automaticallyStefan Weil1-5/+15
This makes rebuilds after source updates easier for most users (who don't edit config-devices.mak). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08Use vpath directivePaolo Bonzini7-13/+16
The vpath directive has two advantages over the VPATH variable: 1) it allows to skip searching of .o files; 2) the default semantics are to append to the vpath, so there is no confusion between "VPATH=xyz" and "VPATH+=xyz". Since "vpath %.c %.h PATH" is not valid, I'm introducing a wrapper macro to append one or more directories to the vpath. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-08oss: workaround for cases when OSS_GETVERSION is not definedmalc1-1/+12
Thanks to Juergen Lock. Signed-off-by: malc <av1474@comtv.ru>
2010-01-07Sparc32: clear exception_index with -1 valueBlue Swirl1-1/+1
See also 821b19fe923ac49a24cdb4af902584fdd019cee6. Spotted by Artyom Tarasenko and Igor Kovalenko. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>