summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-06-01Monitor: Drop QMP documentation from codeLuiz Capitulino9-368/+0
Previous commit added QMP documentation to the qemu-monitor.hx file, it's is a copy of this information. While it's good to keep it near code, maintaining two copies of the same information is too hard and has little benefit as we don't expect client writers to consult the code to find how to use a QMP command. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01QMP: Introduce commands documentationJan Kiszka5-4/+1376
One of the most important missing feature in QMP today is its supported commands documentation. The plan is to make it part of self-description support, however self-description is a big task we have been postponing for a long time now and still don't know when it's going to be done. In order not to compromise QMP adoption and make users' life easier, this commit adds a simple text documentation which fully describes all QMP supported commands. This is not ideal for a number of reasons (harder to maintain, text-only, etc) but does improve the current situation. To avoid at least divering from the user monitor help and texi snippets, QMP bits are also maintained inside qemu-monitor.hx, and hxtool is extended to generate a single text file from them. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01monitor: Reorder info documentationJan Kiszka1-90/+96
Push the doc fragments for the info command to the end of qemu-monitor.hx. This helps to establish a proper layout in the upcoming QMP documentation. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01Merge remote branch 'mst/for_anthony' into HEADAnthony Liguori4-32/+33
2010-06-01vnc: move size-changed check into the vnc_desktop_resize function.Gerd Hoffmann1-6/+5
This make sure we send a desktop resize message only in case we actually have to, using the new variables which track the clients desktop size. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01vnc: don't send invalid screen updates.Gerd Hoffmann1-2/+6
Don't send updates for screen areas which are outside the clients desktop. May happed with vnc clients which don't support the desktop resize message. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01vnc: keep track of client desktop sizeGerd Hoffmann2-3/+9
Add two new variables to keep track of the vnc clients desktop size. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01vnc: send desktopresize event as reply to set encodingsGerd Hoffmann1-0/+1
In case the desktop did resize while the vnc connection setup was still in progress the client isn't informed about it. Send a desktop resize event as soon as the client told us it can handle deskop resize via set encodings message to make sure the client us up to date. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01vnc: factor out vnc_desktop_resize()Gerd Hoffmann1-8/+16
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01Add support for depth 15 to qemu_default_pixelformat()Gerd Hoffmann1-0/+16
Makes qemu_default_pixelformat(15) return pixelformat filled for 15 bit color depth (16 bpp, 5 bits for red,green,blue each, 1 bit unused). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01check for active_console before using itGerd Hoffmann1-1/+1
Other vga_hw_* functions do the same. Fixes a segmentation fault. Trigger: boot with -nodefaults, then connect via vnc. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01Add dependency of JSON unit tests on config-host.hJan Kiszka1-0/+2
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01migration: Fix calculation of bytes_transferredPierre Riteau1-9/+12
When a page with all identical bytes is transferred, it is counted as a full page (TARGET_PAGE_SIZE) although only one byte is actually sent. Fix this by changing ram_save_block() to return the number of bytes sent instead of a boolean value. This makes bandwidth estimation, and consequently downtime estimation, more precise. Signed-off-by: Pierre Riteau <Pierre.Riteau@irisa.fr> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01virtio-serial-bus: fix ports_map allocation on initAlon Levy1-1/+2
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>
2010-06-01resent: x86/cpuid: Add kvm32 CPU modelAndre Przywara1-0/+14
Create a kvm32 CPU model that describes a least common denominator for 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>
2010-06-01vnc: tight: add palette encodingCorentin Chary1-12/+425
Add palette tight encoding. Palette encoding will try to count the number of colors for a given rectangle, and if this number is low enough (< 256) it will send the palette + the rectangle with indexed colors. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01vnc: add support for tight fill encodingCorentin Chary1-2/+255
Fill encoding detects rectangles using only one color and send only one pixel value. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01vnc: add basic tight supportCorentin Chary7-4/+498
Add support for tight encoding [1]. This patch only add support for "basic" tight compression without any filter. [1] http://tigervnc.org/cgi-bin/rfbproto#tight-encoding. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01vnc: return the number of rectanglesCorentin Chary4-16/+26
Some encodings like tight supports tiling (spliting in multiple sub-rectangles). So we needed a way to tell vnc_update_client() how much rectangles are in the buffer. zlib, raw and hextile always send a full rectangle. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01vnc: remove a memory leak in zlibCorentin Chary3-0/+11
Makes sure we free all ressources used in zlib encoding (zlib stream and buffer). Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01vnc: add buffer_free()Corentin Chary2-8/+11
Add a buffer_free() helper to free vnc buffers and remove some duplicated code in vnc_disconnect_finish(). Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01vnc: don't clear zlib stream on set_encodingCorentin Chary3-7/+0
On init, values are already NULL, but we shouldn't try to reset them each time a client send a set encoding command because this break everything. For example, libvncclient re-send a set encoding command if the framebuffer is resized. This fix framebuffer resizing for zlib encoding. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01vnc: adjust compression zstream levelCorentin Chary2-1/+9
Adjust zlib compression level if needed by calling deflateParams. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01vnc: only use a single zlib streamCorentin Chary2-8/+6
According to http://tigervnc.org/cgi-bin/rfbproto#zlib-encoding zlib encoding only uses a single stream. Current implementation defines 4 streams but only uses the first one. Remove them and only use a single stream. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01vnc: really call zlib if we want zlibCorentin Chary1-1/+1
send_framebuffer_update() was calling hextile instead of zlib since commit 70a4568fe0c5a64adaa3da5030b7109e5199e692. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01vnc: explain why set_encodings loop is reversedCorentin Chary1-0/+5
Add a small comment to explain why we need to start from the end of the array to set the right prefered encoding. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01Revert "vnc: set the right prefered encoding"Corentin Chary1-10/+4
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. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-31ioapic: improve debuggingBlue Swirl1-6/+10
Add a DPRINTF macro, use it also to see irq deliveries. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-31Fix leul_to_cpu on big endian hostsAlexander Graf1-1/+1
Commit 213acd2e introduced leul_to_cpu with a special code path for big endian hosts. Unfortunately that code used preprocessor magic that didn't work. This patch replaces the explicit ##s by glue() which is proven to work reliably, enabling me to compile qemu on ppc again. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-31arm: fix arm kernel boot for non zero start addrLars Munch9-30/+1
Booting an arm kernel has been broken a while when booting from non zero start address. This is due to the order of events: board init loads the kernel and sets register 15 to the start address and then qemu_system_reset reset the cpu making register 15 zero again. This patch fixes the usage of the register 15 start address trick in combination with arm_load_kernel. Signed-off-by: Lars Munch <lars@segv.dk> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-31target-ppc: remove useless lineThomas Monjalon1-1/+0
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>
2010-05-31target-ppc: fix RFI by clearing some bits of MSRThomas Monjalon2-4/+3
Since commit 2ada0ed, "Return From Interrupt" is broken for PPC processors because 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. But some bits of SRR1 are interrupt-specific and are not used for MSR saving. This is the specification (ISA 2.06) at chapter 6.4.3 (Interrupt Processing): "2. Bits 33:36 and 42:47 of SRR1 or HSRR1 are loaded with information specific to the interrupt type. 3. Bits 0:32, 37:41, and 48:63 of SRR1 or HSRR1 are loaded with a copy of the corresponding bits of the MSR." Below is a representation of MSR bits which are not saved: 0:15 16:31 32 33:36 37:41 42:47 48:63 ——— | ——— | — X X X X — — — — — X X X X X X | ———— 0000 0000 | 7 | 8 | 3 | F | 0000 History: In the initial Qemu implementation (e1833e1), the mask 0x783F0000 was used for saving MSR in SRR1. But all the bits 32:47 were cleared during RFI restoring. This was wrong. The commit 2ada0ed explains that this breaks Altivec. Indeed, bit 38 (for Altivec support) must be saved and restored. The change of 2ada0ed was to restore all the bits of SRR1 to MSR. But it's also wrong. Explanation: As an example, let's see what's happening after a TLB miss. According to the e300 manual (E300CORERM table 5-6), the TLB miss interrupts set the bits 44-47 for KEY, I/D, WAY and S/L. These bits are specifics to the interrupt and must not be copied into MSR at the end of the interrupt. With the current implementation, a TLB miss overwrite bits POW, TGPR and ILE. Fix: It shouldn't be needed to filter-out bits on MSR saving when interrupt occurs. Specific bits overwrite MSR ones in SRR1. But at the end of interrupt (RFI), specifics bits must be cleared before restoring MSR from SRR1. The mask 0x783F0000 apply here. Discussion: The bits of the mask 0x783F0000 are cleared after an interrupt. I cannot find a specification which talks about this but I assume it is the truth since Linux can run this way. Maybe it's not perfect but it's better (works for e300). Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-31pci-hotplug: make them aware of pci domain.Isaku Yamahata3-4/+26
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>
2010-05-31msix: remove duplicated defines.Isaku Yamahata1-8/+0
remove defines which are already defined in pci_regs.h Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-31pci.h: remove unused constants.Isaku Yamahata1-11/+0
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> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-31pci: add const to pci_is_express(), pci_config_size().Isaku Yamahata1-2/+2
add const to pci_is_express(), pci_config_size(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-31pci: clean up of pci_set_default_subsystem_id().Isaku Yamahata1-7/+5
Use pci accessor function. don't return value because it always return 0 and the caller doesn't check the return value. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-30mc146818rtc: improve debuggingBlue Swirl1-2/+20
Add a separate flag for debugging coalesced interrupts. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29sparc32 SuperSPARC MMU Breakpoint Action register (SS-20 OBP fix)Artyom Tarasenko1-0/+1
SuperSPARC MMU Breakpoint Action register is used by OBP at boot The patch allows booting Solaris and some other OS with SPARCStation-20 OBP. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29pc: improve debuggingBlue Swirl1-0/+12
Add a DPRINTF macro and use it for ISA and PIC interrupts. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29apic: improve debuggingBlue Swirl1-13/+30
Add a DPRINTF macro. Use TARGET_FMT_plx for printing target_phys_addr_t items. Add a separate flag for debugging coalescing interrupts. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29i8259: improve debuggingBlue Swirl1-12/+11
Add a DPRINTF macro. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29sparc64: fix user emulator buildBlue Swirl1-0/+2
Accesses with _nucleus prefix are not available when building user emulators: CC sparc64-linux-user/op_helper.o cc1: warnings being treated as errors /src/qemu/target-sparc/op_helper.c: In function 'helper_ldda_asi': /src/qemu/target-sparc/op_helper.c:3063: error: implicit declaration of function 'ldq_nucleus' Avoid making such accesses. Fixes breakage by 54a3c0f032abf93d1cedc75456af75401ac10360. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29Pad iommu with an empty slot (necessary for SunOS 4.1.4)Artyom Tarasenko1-1/+13
On the real hardware (SS-5, LX) the MMU is not padded, but aliased. Software shouldn't use aliased addresses, neither should it crash when it uses (on the real hardware it wouldn't). Using empty_slot instead of aliasing can help with debugging such accesses. Signed-off-by: Artyom Tarasenko <atar4qemu@googlemail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29sparc64: fix 128-bit atomic load from nucleus context v1Igor V. Kovalenko1-5/+5
- change 128-bit atomic loads to reference nucleus context v0->v1: dropped disassembler change Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29Pre-allocate guest address spacePaul Brook5-8/+183
Allow pre-allocation of the guest virtual address space in usermode emulation. Signed-off-by: Paul Brook <paul@codesourcery.com>
2010-05-28alpha-linux-user: Fill in SI_CODE for SIGSEGV.Richard Henderson1-1/+2
Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28linux-user: Use qemu-malloc.c.Richard Henderson2-53/+2
Since we're no longer setting PAGE_RESERVED, there's no need to implement qemu_malloc via mmap. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28Use calloc in qemu_mallocz.Richard Henderson1-4/+4
Avoids the memset if the allocator has gotten new zeroed storage from the operating system. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28linux-user: Fix compilation with DEBUG definedRiccardo Magliocchetti1-1/+1
Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>