tcg-sparc: Implement add2, sub2, mulu2.
Add missing 32-bit double-word support opcodes.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg-sparc: Add tcg_out_arithc.
Add a function to handle the register-vs-immediate test for arithmetic.
Also, adjust the OP_32_64 macro so that it auto-indents properly.Rename the gen_arith32 label to gen_arith, since it handles 64-bitarithmetic as well....
QMP: Don't free async event's 'data'
The monitor_protocol_event() function will free theevent's data, this is wrong as 'data' management is upto the caller.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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>
vnc_refresh: return if vd->timer is NULL
Hi all,calling vnc_update_client in vnc_refresh might have the unlikely sideeffect of setting vd->timer = NULL, if the last vnc client disconnected.In this case we have to return from vnc_refresh without updating the...
dma/sb16: make clang analyzer not complain
Signed-off-by: malc <av1474@comtv.ru>
Sparc64: enable real access to PCI configuration space
Leave the bogus access method used by OpenBIOS in place for now.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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...
dmg: fix ->open failure
Currently the dmg image format driver simply opens the images as rawif any kind of failure happens. This is contrarty to the behaviourof all other image formats which just return an error and let theblock core deal with it.
Signed-off-by: Christoph Hellwig <hch@lst.de>...
Handle TFTP ERROR from client
If a PXE client only wants to find out the size of a file, it willopen 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....
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.
make help output be a little more self-consistent
Signed-off-by: Bruce Rogers <brogers@novell.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Update to SeaBIOS 0.5.1
5da6833 Update version to 0.5.1 669c991 Fix sign error preventing incorrect memory over 4gig calculation. 7e6bd3e Minor - better indent assembler in int1587. 48cf232 Add comment explaining why mptable is in low memory. 643062f Add int1589 support....
pc-bios: Update README (SeaBIOS)
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>
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...
MCE: Fix bug of IA32_MCG_STATUS after system reset
Now, if we inject a fatal MCE into guest OS, for example Linux, Linuxwill go panic and then reboot. But if we inject another MCE now,system will reset directly instead of go panic firstly, becauseMCG_STATUS.MCIP is set to 1 and not cleared after reboot. This is does...
Fix CPU topology initialization
Late initialization of CPU topology in CPUState prevents KVM guests toactually see the topology.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
remove pending exception on vcpu reset.
Without this qemu can even start on kvm modules with events supportsince default value of exception_injected in zero and this is #DEexception.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmware_vga: Check cursor dimensions passed from guest to avoid buffer overflow
Check that the cursor dimensions passed from the guest for theDEFINE_CURSOR command don't overflow the available space in thecursor.image[] or cursor.mask[] arrays before copying data from the...
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.
PCI: Fix a typo
Fixes build with PCI_DEBUG defined.
Sparc64: increase APB register range
Sparc64: use firmware configuration device for command line storage
Avoid a ROM conflict.
oss: fix fragment setting
Previous patch introduced subtle regression, in cases whenOSS_GETVERSION fails the code wasn't falling back toSNDCTL_DSP_SETFRAGMENT.
oss: issue OSS_GETVERSION ioctl only when needed
finish VPATH -> vpath translation
This adds a few more vpath suffixes and points the remaining two pathsexplicitly to $(SRC_PATH) in order to eliminate the VPATH assignmentfrom config-host.mak.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Cc: Juan Quintela <quintela@redhat.com>...
oss: refactor code around policy setting
This fixes a problem with a previous patch spotted by Juergen Lock,thanks to him again.
Makefile: remove obsolete libuser.a rule
libuser.a was removed by 0e8c9214ba1d4128cf92442cd343bc3733478261.
sparc64: interrupt trap handling
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...
sparc64: move cpu_interrupts_enabled to cpu.h
- 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>
sparc64: add macros to deal with softint and timer interrupt
sparc64: check for pending irq when pil, pstate or softint is changed
sparc64: use helper_wrpil to check pending irq on write
sparc64: add PIL to cpu state dump
sparc64: trace pstate and global register set changes
sparc64: change_pstate should have 32bit argument
- pstate is 32bit variable, no need to pass 64bit value around
linuxboot: fix gdt address calculation
The gdt address calculation in linuxboot.bin is broken in two ways: firstit loads %cs into %eax, but that instruction leaves the high bits of %eaxundefined and we did not clear them. Secondly, we completely ignore the...
multiboot: Support arbitrary number of modules.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
multiboot: Separate multiboot loading into separate file
Move multiboot loading code into separate files as suggested by Alex Graf.
Use vpath directive
The vpath directive has two advantages over the VPATH variable:1) it allows to skip searching of .o files; 2) the default semanticsare 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...
Makefile: Update unmodified config-devices.mak automatically
This makes rebuilds after source updates easierfor most users (who don't edit config-devices.mak).
debugcon: support for debugging consoles (e.g. Bochs port 0xe9)
Add generic support for debugging consoles (simple I/O ports whichwhen written to cause debugging output to be written to a target.)The current implementation matches Bochs' port 0xe9, allowing the same...
net: add API to disable/enable polling
When vhost is bound to a backend device, we need to stop polling it whenvhost 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>...
block/vdi: allow disk sizes not multiple of block size
The disk image I created from my old laptop disk with VBoxManageinternalcommand converthd obviously was not a multiple of 1MB as whencreated from scratch. This fixes QEMU refusing it. We still require the...
QMP: Drop wrong assert()
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>
oss: workaround for cases when OSS_GETVERSION is not defined
Thanks to Juergen Lock.
Sparc32: clear exception_index with -1 value
See also 821b19fe923ac49a24cdb4af902584fdd019cee6.
Spotted by Artyom Tarasenko and Igor Kovalenko.
Drop --whole-archive and static libraries
Juan has contributed a cool Makefile infrastructure that enables us to dropstatic libraries completely:
Move shared obj-y definitions to Makefile.objs, prefixed {common-,hw-,user-},and link those object files directly into the executables....
vnc: Fix artifacts in hextile decoding
02c2b87 introduced a regression whereas the foreground color in a hextileupdate was not being properly invalidated leading to artifacts.
It's still necessary to explicitly invalidate the foreground color with aSubrectColoured tile even though we no longer send a foreground color as...
Cocoa: Shutdown when window is closed
The application is not very useful once the guest window is closed.QEMU is not a document-based application; terminating it automaticallysaves the user another action and resembles SDL behavior.
v2:- Use delegate method, suggested by Juha Riihimäki....
Cocoa: Suppress window resize animation
Disable the nice resize animation, to avoid drawing glitchesfollowing a guest's screen size change.
Based on patch by Juha Riihimäki.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>Cc: Juha Riihimäki <juha.riihimaki@nokia.com>...
Cocoa: Use optimized drawing for the window
Default is NO.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>Signed-off-by: malc <av1474@comtv.ru>
Cocoa: Silence type warning
Add const for "qemu" character literal, to avoid:
warning: initialization discards qualifiers from pointer target type
An earlier patch by John proposed to use char5. Since we do not modifythe text and later copy it into malloc'ed memory, marking it as const...
Cocoa: Fix compilation on Mac OS X v10.4 and earlier
NSView's enterFullScreenMode:withOptions: andexitFullScreenModeWithOptions: are available on v10.5and later only. Undefined methods raise warnings andundefined constants result in errors.
Reported by Ryan Schmidt....
Cocoa: Mark the View as opaque
Cf. http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaPerformance/Articles/CustomViews.html
Signed-off-by: Andreas Färber <andreas.faerber@web.de>...
Cocoa: Redraw the View asynchronously
Cocoa: Don't unconditionally show the window
When QEMU was launched in no-graphic, Curses or VNC mode,don't run it as a Cocoa application.
Based on patch by Alexander Graf.
v1:- Avoid type mismatch warning for argv- Drop noCocoa variable- Coding Style changes...
Cocoa: ppc64 host support
Fix integer usage in the Cocoa backend: NSInteger is long on LP64.
http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/doc/uid/20000014-BBCFHHCD...
Cocoa: Silence warning for cocoa_keycode_to_qemu
Make cocoa_keycode_to_qemu static, to avoid:
warning: no previous prototype for ‘cocoa_keycode_to_qemu’
Signed-off-by: Andreas Färber <andreas.faerber@web.de>Cc: John Arbuckle <programmingkidx@gmail.com>...
Cocoa: Silence warning on Big Endian host
LITTLE_ENDIAN is undefined on Big Endian host.
Signed-off-by: Andreas Färber <andreas.faerber@web.de>Cc: John Arbuckle <programmingkidx@gmail.com>Signed-off-by: malc <av1474@comtv.ru>
sparc64: clear exception_index with -1 value
Merge remote branch 'mst/for_anthony' into staging
pass env to raise_exception if called outside of op_helper code
- this fixes stepping with gdb, where do_unassigned_access may be called from gdb handler, outside of generated code
sparc64: switch to MMU global registers in more MMU related traps
- extended range of MMU related traps which use MMU global registers, as listed in Ultrasparc-IIi document- no visible changes, since emulation do not cause added traps
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>...
target-i386: Fix "call im" on x86_64 when executing 32-bit code
Similarly to what is done in 32938e127f50a40844a0fb9c5abb8691aeeccf7efor "jmp im", trunc the immediate to 32-bit when not running in 64-bitmode.
Reported-by: Kevin O'Connor <kevin@koconnor.net>...
loader: don't call realloc(non_null, 0) when no symbols are present
According to C99, realloc(non_null, 0) != free(non_null), that's whyit is forbidden in QEMU.
When there are no symbols, nsyms equals to 0. Free the syms structureand set it to NULL instead of reallocating it with a size of 0....
Sparc64: split DPRINTF into CPUIRQ and EBUS versions
Sparc64: fix compile with DEBUG_IRQ enabled
sdl: print the reason why SDL thinks SDL_Init failed before exiting
Add missing newline at the end of options list
In qemu-kvm this place looks even more "interesting":
-runas user Change to user id user just before starting the VM. -readconfig <file> -writeconfig <file> read/write config file-no-kvm disable KVM hardware virtualization...
Update Sparc64 OpenBIOS image to r649.
Sparc64: move APB PCI memory base to correct location
PCI: Fix bus address conversion
Pass physical addresses to map functions instead of PCI bus addresses.
sparc: make command line available also via firmware configuration device
tcg: Add tcg_unsigned_cond.
Returns an unsigned version of a signed condition;returns the original condition otherwise.
block/bochs: improve format checking
block.c: fix warning with _FORTIFY_SOURCE
CC block.occ1: warnings being treated as errorsblock.c: In function 'bdrv_open2':block.c:400: error: ignoring return value of 'realpath', declared with attribute warn_unused_result
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>...
block/bochs.c: fix warning with _FORTIFY_SOURCE
CC block/bochs.occ1: warnings being treated as errorsblock/bochs.c: In function 'seek_to_sector':block/bochs.c:202: error: ignoring return value of 'read', declared with attribute warn_unused_result...
savevm.c: fix warning with _FORTIFY_SOURCE
CC savevm.occ1: warnings being treated as errorssavevm.c: In function 'file_put_buffer':savevm.c:342: error: ignoring return value of 'fwrite', declared with attribute warn_unused_resultmake: *** [savevm.o] Error 1...
slirp/misc.c: fix warning with _FORTIFY_SOURCE
CC slirp/misc.occ1: warnings being treated as errorsslirp/misc.c: In function 'fork_exec':slirp/misc.c:209: error: ignoring return value of 'write', declared with attribute warn_unused_resultmake: *** [slirp/misc.o] Error 1...
hw/pc.c: fix warnings with _FORTIFY_SOURCE
CC i386-softmmu/pc.occ1: warnings being treated as errors/usr/src/RPM/BUILD/qemu-0.11.92/hw/pc.c: In function 'load_multiboot':/usr/src/RPM/BUILD/qemu-0.11.92/hw/pc.c:614: error: ignoring return value of 'fread', declared with attribute warn_unused_result...
path.c fix warning with _FORTIFY_SOURCE
CC libuser/path.occ1: warnings being treated as errors/usr/src/RPM/BUILD/qemu-0.11.92/path.c: In function 'new_entry':/usr/src/RPM/BUILD/qemu-0.11.92/path.c:49: error: ignoring return value of 'asprintf', declared with attribute warn_unused_result...
PCI: partially revert 2e01c8cf4b076b05013c87723e3fc710b50a0a7a
Bus address conversion was not correct.
PCI: make pci_mem_base private
Make pci_mem_base private to PCIBus. Add a function to set it.
Fix Sparse error: dubious one-bit signed bitfield
Fix Sparse warning: dubious: !x & y
scsi: fix Sparse warning: Initializer entry defined twice
Both REWIND and REZERO_UNIT use 0x01, READ_POSITION and PRE_FETCHshare 0x34.
MAC DBDMA: store register values in native endianness
Store the register values in native endianness, by dropping all theendianness conversion functions, and converting the endianness indbdma_readl/dbdma_writel instead.
Also guard the endianness conversion with TARGET_WORDS_BIGENDIAN to...
Intel CPUs starting from pentium have apic
Intel CPUs starting from pentium have apic. Lets advertise it.
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>