sparc64: fix tag access register on mmu traps
- set mmu tag access register on FAULT and PROT traps as well
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
vnc: tight: don't forget last pixel in tight_encode_indexed_rect
A simple patch would have been to just remove count = 1, but thisone also replace the while (count-) with a for(i = 0; i < count; i++)which I believe is more easy to understand.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>...
vnc: tight: don't forget the third color
While couting color, if the third color was only present onetime it wasn't added to the palette.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc: add missing target for vnc-encodings-*.o
vnc-encodings-*.c dependencies where missing.
monitor: Reorder info documentation
Push the doc fragments for the info command to the end ofqemu-monitor.hx. This helps to establish a proper layout in the upcomingQMP documentation.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QMP: Introduce commands documentation
One of the most important missing feature in QMP today is itssupported commands documentation.
The plan is to make it part of self-description support, howeverself-description is a big task we have been postponing for a...
Monitor: Drop QMP documentation from code
Previous commit added QMP documentation to the qemu-monitor.hxfile, it's is a copy of this information.
While it's good to keep it near code, maintaining two copies ofthe same information is too hard and has little benefit as we...
Merge remote branch 'mst/for_anthony' into HEAD
vnc: don't send invalid screen updates.
Don't send updates for screen areas which are outside the clientsdesktop. May happed with vnc clients which don't support the desktopresize message.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc: move size-changed check into the vnc_desktop_resize function.
This make sure we send a desktop resize message only in case we actuallyhave to, using the new variables which track the clients desktop size.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
vnc: factor out vnc_desktop_resize()
vnc: send desktopresize event as reply to set encodings
In case the desktop did resize while the vnc connection setup was stillin progress the client isn't informed about it. Send a desktop resizeevent as soon as the client told us it can handle deskop resize via set...
vnc: keep track of client desktop size
Add two new variables to keep track of the vnc clients desktop size.
check for active_console before using it
Other vga_hw_* functions do the same.Fixes a segmentation fault. Trigger: boot with -nodefaults,then connect via vnc.
Add support for depth 15 to qemu_default_pixelformat()
Makes qemu_default_pixelformat(15) return pixelformat filled for 15 bitcolor depth (16 bpp, 5 bits for red,green,blue each, 1 bit unused).
Revert "vnc: set the right prefered encoding"
This patch was wrong, because the loop was already reversed,so the first encoding was correctly set at the end of the loopp.
This reverts commit 14eb8b6829ad9dee7035de729e083844a425f274.
vnc: explain why set_encodings loop is reversed
Add a small comment to explain why we need to start fromthe end of the array to set the right prefered encoding.
vnc: really call zlib if we want zlib
send_framebuffer_update() was calling hextile instead of zlibsince commit 70a4568fe0c5a64adaa3da5030b7109e5199e692.
vnc: only use a single zlib stream
According to http://tigervnc.org/cgi-bin/rfbproto#zlib-encodingzlib encoding only uses a single stream. Current implementation defines4 streams but only uses the first one. Remove them and only use a singlestream.
vnc: adjust compression zstream level
Adjust zlib compression level if needed by calling deflateParams.
vnc: don't clear zlib stream on set_encoding
On init, values are already NULL, but we shouldn't tryto reset them each time a client send a set encodingcommand because this break everything. For example,libvncclient re-send a set encoding command if the...
vnc: add buffer_free()
Add a buffer_free() helper to free vnc buffers andremove some duplicated code in vnc_disconnect_finish().
vnc: remove a memory leak in zlib
Makes sure we free all ressources used in zlib encoding (zlib streamand buffer).
vnc: return the number of rectangles
Some encodings like tight supports tiling (spliting inmultiple sub-rectangles). So we needed a way to tellvnc_update_client() how much rectangles are in the buffer.
zlib, raw and hextile always send a full rectangle....
vnc: add basic tight support
Add support for tight encoding [1]. This patch only add supportfor "basic" tight compression without any filter.
[1] http://tigervnc.org/cgi-bin/rfbproto#tight-encoding.
vnc: add support for tight fill encoding
Fill encoding detects rectangles using only one color and send onlyone pixel value.
vnc: tight: add palette encoding
Add palette tight encoding. Palette encoding will try to count the numberof colors for a given rectangle, and if this number is low enough(< 256) it will send the palette + the rectangle with indexed colors.
resent: x86/cpuid: Add kvm32 CPU model
Create a kvm32 CPU model that describes a least common denominatorfor KVM capable guest CPUs. Useful for migration purposes.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-serial-bus: fix ports_map allocation on init
Fix for too small allocation to ports_map
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
migration: Fix calculation of bytes_transferred
When a page with all identical bytes is transferred, it is countedas a full page (TARGET_PAGE_SIZE) although only one byte is actuallysent. Fix this by changing ram_save_block() to return the number ofbytes sent instead of a boolean value. This makes bandwidth...
Add dependency of JSON unit tests on config-host.h
ioapic: improve debugging
Add a DPRINTF macro, use it also to see irq deliveries.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix leul_to_cpu on big endian hosts
Commit 213acd2e introduced leul_to_cpu with a special code path for big endianhosts. Unfortunately that code used preprocessor magic that didn't work.
This patch replaces the explicit ##s by glue() which is proven to work reliably,...
arm: fix arm kernel boot for non zero start addr
Booting an arm kernel has been broken a while when booting from non zero startaddress. This is due to the order of events: board init loads the kernel andsets register 15 to the start address and then qemu_system_reset reset the cpu...
target-ppc: remove useless line
This line was a bit clear.The next lines set or reset this bit (LE) depending of another bit (ILE).So the first line is useless.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-ppc: fix RFI by clearing some bits of MSR
Since commit 2ada0ed, "Return From Interrupt" is broken for PPC processorsbecause some interrupt specifics bits of SRR1 are copied to MSR.
SRR1 is a save of MSR during interrupt.During RFI, MSR must be restored from SRR1....
pci-hotplug: make them aware of pci domain.
add helper function which converts root bus to pci domain.make them aware of pci domain.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pci: clean up of pci_set_default_subsystem_id().
Use pci accessor function.don't return value because it always return 0 andthe caller doesn't check the return value.
pci: add const to pci_is_express(), pci_config_size().
add const to pci_is_express(), pci_config_size().
pci.h: remove unused constants.
So remove unused constants,PCI_STATUS_RESERVED_MASK_LO, PCI_STATUS_RESERVED_MASK_HI,PCI_COMMAND_RESERVED, PCI_COMMAND_RESERVED_MASK_HI.They were used once, but they aren't used anymore.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
msix: remove duplicated defines.
remove defines which are already defined in pci_regs.h
mc146818rtc: improve debugging
Add a separate flag for debugging coalesced interrupts.
sparc32 SuperSPARC MMU Breakpoint Action register (SS-20 OBP fix)
SuperSPARC MMU Breakpoint Action register is used by OBP at boot
The patch allows booting Solaris and some other OS withSPARCStation-20 OBP.
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>...
pc: improve debugging
Add a DPRINTF macro and use it for ISA and PIC interrupts.
apic: improve debugging
Add a DPRINTF macro. Use TARGET_FMT_plx for printing target_phys_addr_titems. Add a separate flag for debugging coalescing interrupts.
i8259: improve debugging
Add a DPRINTF macro.
sparc64: fix user emulator build
Accesses with _nucleus prefix are not available when building useremulators: CC sparc64-linux-user/op_helper.occ1: warnings being treated as errors/src/qemu/target-sparc/op_helper.c: In function 'helper_ldda_asi':...
Pad iommu with an empty slot (necessary for SunOS 4.1.4)
On the real hardware (SS-5, LX) the MMU is not padded, but aliased.Software shouldn't use aliased addresses, neither should it crashwhen it uses (on the real hardware it wouldn't). Using empty_slot...
sparc64: fix 128-bit atomic load from nucleus context v1
- change 128-bit atomic loads to reference nucleus contextv0->v1: dropped disassembler changeSigned-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Pre-allocate guest address space
Allow pre-allocation of the guest virtual address space in usermode emulation.
Signed-off-by: Paul Brook <paul@codesourcery.com>
alpha-linux-user: Fill in SI_CODE for SIGSEGV.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Use calloc in qemu_mallocz.
Avoids the memset if the allocator has gotten new zeroedstorage from the operating system.
linux-user: Use qemu-malloc.c.
Since we're no longer setting PAGE_RESERVED, there's no need toimplement qemu_malloc via mmap.
linux-user: Fix compilation with DEBUG defined
Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix hw/gt64xxx.c compilation with DEBUG defined
Use TARGET_FMT_plx as format placeholder for target_phys_addr_t
Fix typo in balloon help
Fix launchpad #563883
musicpal: Drop redundant reset call
Reset is now triggered after init, no need for explicit calls anymore.
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
doc: Update monitor info subcommands
The "info blockstats" documentation was copy-pasted as "info block" instead of "info blockstats". The documentation for "commands", "jit","numa", "qdm", and "roms" is missing. This patch resolves these issuesin qemu-monitor.hx....
Fix overflow in i440fx_init()
The ram_size parameter can be larger than an int, so it may be truncated.
Fix by using the correct type.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
arm: prevent coprocessor IO reset
This prevent coprocessor IO structure from being reset on cpu reset. This wasa problem for PXA which uses coprocessor 6 and 14.
Signed-off-by: Lars Munch <lars@segv.dk>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
tcg: Use INDEX_op_qemu_ld32 for 32-bit results.
vhost_net.c: v2 Fix build failure introduced by 0bfcd599e3f5c5679cc7d0165a0a1822e2f60de2
Fix build failure introduced by 0bfcd599e3f5c5679cc7d0165a0a1822e2f60de2
The format statement expects unsigned long on x86_64, but receivesunsigned long long, so gcc exits with an error....
Make cache=unsafe the default for -snapshot
When using -snapshot we don't care about data integrity of the cow fileat all, so let's disable flushing there and squeeze out the last dropof performance we could possibly get.
Signed-off-by: Alexander Graf <agraf@suse.de>...
sparc64: clean up pci bridge map
- remove unused host state and store pci bus pointer only- do not map host state access into unused 1fe.10000000 range- reorder pci region registration- assign pci i/o region to isa_mem_base
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>...
sparc64: rename sun4u cpu to Ultrasparc IIi
Add cache=unsafe parameter to -drive
Usually the guest can tell the host to flush data to disk. In some cases wedon't want to flush though, but try to keep everything in cache.
So let's add a new cache value to -drive that allows us to set the cachepolicy to most aggressive, disabling flushes. We call this mode "unsafe",...
use new cursor struct + functions for vmware vga and sdl.
vnc: rich cursor support.
Uses VNC_ENCODING_RICH_CURSOR. Adding XCURSOR support should bepossible without much trouble. Shouldn't be needed though asRICH_CURSOR is a superset of XCURSOR.
sdl: Do not disable screensaver by default
Unless we are running in full-screen mode, QEMU's SDL window should notdisable the host's screensaver. The user can still change this behaviourby setting the environment variable SDL_VIDEO_ALLOW_SCREENSAVER as...
Virtio-net: Replace the hardcode 6 with defined ETN_ALEN
hw/virtio-net.h: #define ETH_ALEN 6ETH_ALEN was defined by commit 7967406801aa897fae83caad3278ac85a342adaa
Signed-off-by: Amos Kong <akong@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix error handling in qemu_read_config_file
We need to close the file even in error case. While at it, make the callerscatch all kind of errors. ENOENT is allowed for default config files, theyare optional.
Reported-by: Luiz Capitulino <lcapitulino@redhat.com>...
cursor: add cursor functions.
Add a new cursor type to console.h and a bunch of functions todeal with cursors the (new) cursor.c file.
Merge remote branch 'kwolf/for-anthony' into staging
Merge remote branch 'qmp/for-anthony' into staging
microblaze: Handle new elf mach nr for sysemu.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
lsi: Fix value overflow in request tag processing
This fixes a mismerge of 64d564094cac5f72eeaeb950c442b773a00d3586 (wrongpatch version): We need to mask the tag value properly to obtain itsdevice ID.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
sparc64: flush translations on mmu context change
- two pairs of softmmu indexes bind softmmu tlb to cpu tlb in fault handlers using value of DMMU primary and secondary context registers, so we need to flush softmmu translations when context registers are changed...
sparc64: fix mmu context at trap levels above zero
- cpu_mmu_index return MMU_NUCLEUS_IDX if trap level is not zero- cpu_get_tb_cpu_state: store trap level and primary context in flags this allows to restart code translation when address translation is changed...
sparc64: fix dump_mmu to look for global bit in tte value instead of tag
sparc64: fix pstate privilege bits
- refactor code to handle hpstate only if available for current cpu- conditionally set hypervisor bit in hpstate register- reorder softmmu indices so user accessable ones go first, translation context macros supervisor() and hypervisor() adjusted as well...
sparc64: generate data access exception on RW violation
- separate PRIV and PROT handling- DPRINTF_MMU macro to clean up debug code- dump mmu_idx, trap level and mmu context registers along with address translation values
sparc32 protect read-only bits in DMA CSR registers
On a real hardware changing read-only bits has no effectUse a mask common for SCSI and Ethernet registers. The crucialbit is DMA_INTR, because setting or clearing it may producespurious interrupts.
This patch allows booting Solaris 2.3...
vmstate: fix breakage by 7e72abc382b700a72549e8147bdea413534eeedc
cirrus_post_load() will be executed twice when loading vm states and then thewrong physical memory will be registered. This issue may lead to crash qemu.
Signed-off-by: TeLeMan <geleman@gmail.com>...
Fix -device help and documentation
Commit 6616b2ad reverted commit 40ea285c. Looks like a mismerge tome.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Acked-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix tarbin Makefile rule
The 'tarbin' Makefile rule doesn't include qemu-system-sparc64, butshould do, now that sparc64-softmmu is in the default target list.
The rule attempts to tar up binaries that were not built if a targetlist was passed to the configure script -- in which case, it will...
hxtool: Add syntax error detection
Add basic imbalance detection for STEXT/ETEXI.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix TEXI section mark imbalance in qemu-img-cmd.hx
Put dependency files in proper subdir
This seems to resolve subtle breakages of our build system:
Dependency files generated for targets like 'dir/foo.o' were saved as'foo.d'. Now, if there was also a target 'foo.o', one of the dependencyfile was overwritten. Concrete example: libhw*/macio.o vs....
Clean libhw subdirs as well
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Acked-by: Paolo Bonzini <pbonzini@redhat.com>Acked-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix %lld or %llx printf format use
Compile dma only once
Use a qemu_irq to request CPU exit.
7 compilations less for the full build.
pckbd: improve debugging
Compile pckbd only once
Use a qemu_irq to indicate A20 line changes. Move I/O port 92to pckbd.c.
linux-user: do not warn for missing pselect6
Libc will fallback gracefully if pselect6 is not available. Thus putpselect6 to nowarn until the atomicity issues of the original pselect6patch are dealt with.
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>...
tcg: Initialize the prologue after GUEST_BASE is fixed.
This will allow backends to make intelligent choices about howto implement GUEST_BASE.
tcg-hppa: Load GUEST_BASE as an immediate.
Now that the prologue is generated after GUEST_BASE is fixed,we can load it as an immediate, and also avoid reserving theregister if it isn't necessary.
tcg-ia64: Fix some register usage issues.
(1) The output registers were not marked call-clobbered, even though they can be modified by called functions.(2) The thread pointer was not marked reserved.(3) R4-R6 are call-saved, but not saved by the prologue. Rather than...
tcg-ia64: Load GUEST_BASE into a register.
Saves one bundle per memory operation.
alpha-linux-user: Fix sigsuspend parameters.
Alpha passes the signal set in a register, not by reference.
alpha-linux-user: Fix sigprocmask.
Alpha passes oldset by value in a register, and returns the newsetas the return value; as compared to the standard implementation inwhich both are passed by reference. This requires being able todistinguish negative return values that are not errors. Do this in...