vnc: tight: don't forget do at the last color
While using indexed colors, the last color was never added to the palette.Triggered with ubuntu livecd.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vnc: tight: remove a memleak in send_jpeg_rect()
buf was never freed.
vnc: tight add PNG encoding
Introduce a new encoding: VNC_ENCODING_TIGHT_PNG [1] (-269) with a newtight filter VNC_TIGHT_PNG (0x0A). When the client tells it supports the Tight PNGencoding, the server will use tight, but will always send encoding pixels using...
vnc: tight: specific zlib level and filters for each compression level
Disable png filters for lower compression levels. This should lowerthe CPU consumption and reduce encoding time.
vnc: tight: stop using qdict for palette stuff
Profiling with callgrind seems to show that a lot of time is spentin the palette code (mostly due to memory allocation and qdict to intconversion).
This patch adds a VncPalette implementation. The palette is stored...
vnc: encapsulate encoding members
This will allow to implement the threaded VNC server in amore cleaner way.
vnc: fix tight png memory leak
The tight.png buffer was never released.
qemu-thread: add qemu_mutex/cond_destroy and qemu_mutex_exit
Add some missing functions in qemu-thread. Currently qemu-threadis only used for io-thread but it will used by the vnc server soonand we need those functions instead of calling pthread directly....
vnc: threaded VNC server
Implement a threaded VNC server using the producer-consumer model.The main thread will push encoding jobs (a list a rectangles to update)in a queue, and the VNC worker thread will consume that queue and sendframebuffer updates to the output buffer....
vnc: rename vnc-encoding-* vnc-enc-*
For the same reason that we don't use vnc-authentication-sasl.c butvnc-auth-sals.c. Because it's tooooo long.
ui: move all ui components in ui/
Move sdl, vnc, curses and cocoa UI into ui/ to cleanupthe root directory. Also remove some unnecessary explicittargets from Makefile.
aliguori: fix build when srcdir != objdir
Signed-off-by: Corentin Chary <corentincj@iksaif.net>...
vnc: tight: add JPEG and gradient subencoding with smooth image detection
Add gradient filter and JPEG compression with an heuristic to detect howlossy the comppression will be. This code has been adapted fromlibvncserver/tight.c.
JPEG support can be enabled/disabled at compile time with --enable-vnc-jpeg...
vnc: JPEG should be disabled if the client don't set tight quality
Disable JPEG compression by default and only enable it if theVNC client has sent the requested quality.
vnc: add lossy option
The lossy option can be used to enable lossy compressionmethods like gradient or jpeg. This patch disable them bydefault.
Revert "ide save/restore current transfer fields"
This reverts commit 42ee76fe82093ba914f0dc83d2decbcf68866144.
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: add subsections code
This commit adds subsections for each device section.Subsections is the way to handle information that don't need to be sentto de destination of a migration because its values are not needed. It isthe way to handle optional information. Notice that only the source can...
ide: fix migration in the middle of pio operation
ide: fix migration in the middle of a bmdma transfer
It reintroduces Revert "ide save/restore pio/atapi cmd transfer fields and io buffer"
but using subsections. Added bonus is the addition of ide_dummy_transfer_stopto transfer_end_table, that was missing....
Initial documentation for migration
Revert "ide save/restore pio/atapi cmd transfer fields and io buffer"
This reverts commit ed487bb1d69040b9dac64a4fc076d8dd82b131d6.
The conflicts are due to commit 4fc8d6711aff7a9c11e402c3d77b481609f9f486that is a fix to the ide_drive_pre_save() function. It reverts both...
Merge remote branch 'mst/for_anthony' into staging
etrax: Update ethernet mgm-ctrl reg on writes
Some SW drivers dont keep track of what they've written anddepend on the HW latching write contents for laterread+modify+write sequences.
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
target-i386: use gen_update_cc_op()
This patch simplifies target-i386/translate.c a bit by replacing somecode with gen_update_cc_op()
Signed-off-by: Jun Koi <junkoi2004@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Close socket file descriptor when qemu_accept fails
Signed-off-by: Shahar Havivi <shaharh@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
add cscope.* to .gitignore
we have "make cscope", therefore that makes sense to have cscope.* in.gitignore.
slirp: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types
There is no need to have a second set of integral types.Replace them by the standard types from stdint.h.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
slirp: Remove declarations which are no longer needed
The previous patches replaced u_int8_t, u_int16_t, u_int32_t, u_int64_tby standard int types from stdint.h,so we can now remove their declarations which are no longer needed.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
tests: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types
block: Replace u_int8_t, u_int16_t, u_int32_t, u_int64_t by standard int types
mips: more fixes to the MIPS interrupt glue logic
Commit 36388314febad3d7675ab919287f03733a560ff6 moved most of theinterrupt logic to cpu-exec.c. Remove the remaining useless codeand fix software interrupts.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
microblaze: Remove unused members from the disas context
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
microblaze: Speed up base + index addressing mode
Speed up reg + reg addressing mode when any of the regs is r0.
microblaze: Use setcond for conditional branches
Use setcond for evaluating the condition for branches.In the future, we could do better for branches withoutdelay slots.
microblaze: Improve branch with small immediates
Slight improvements of conditional branches with smallimmediate offsets.
remove dead code
this patch removes unused function cpu_restore_state_copy().
Signed-off-by: Jun Koi <junkoi2004@gmail.com>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
use symbol for DisasContext->is_jmp
This patch replaces constant value assigned for (DisasContext*)->is_jmp with DISAS_TB_JUMP.
mips: Correct MIPS interrupt glue logic for icount
When hw interrupt pending bits in CP0_Cause are set, the CPU shouldsee the hw interrupt line as active. The CPU may or may not take theinterrupt based on internal state (global irq mask etc) but the glue...
microblaze: Pass a ucontext * as 3rd sighandler arg
There is disagreement between microblaze glibc and the kernelto what the third arg of signal handlers should point to.
Change QEMU linux-user to match the kernel port. glibc patchesare pending.
e1000: Fix wrong microwire EEPROM state initialization
This change fixes initialization of e1000's microwire EEPROM internalstate values so that qemu's e1000 emulation works on NetBSD,which doesn't use Intel's em driver but has its own wm driverfor the Intel i8254x Gigabit Ethernet....
scsi: Dequeue requests before invoking completion callback
The request completion callback of the LSI controller may start the nextrequest that can use the same tag as the completed one. As the latter isstill enqueued at that point, scsi_send_command will complain about the...
Declare code_gen_ptr, code_gen_max_blocks 'static'
Both values are only used in exec.c, so there is no needto make them globally available.
Fix cpu_unlink_tb race
If a signal hit after the env->exit_request check but before cpu_execupdated env->current_tb, cpu_unlink_tb called from the signal handerwill not unlink the current TB. This may leave us stuck in a guest loopif no further unlink is invoked....
Init qemu_system_cond
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Acked-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Fix cpu_exit for tcp_cpu_exec
If a cpu_exit request is pending, ensure that we leave the CPU loopquickly. For this purpose, keep the global exit_request pending untilwe are about to leave tcg_cpu_exec. Also, immediately break out of theSMP loop if the request is set, do not run till the end of the chain....
Fix qemu_wait_io_event processing in io-thread mode
When checking for I/O events in the tcg CPU loop, make sure that wecall qemu_wait_io_event_common for all CPUs, not only the current one.Otherwise pause_all_vcpus may lock up or run_on_cpu requests may starve....
Drop redundant global cur_cpu variable
Rename tcg_cpu_exec and tcg_has_work
These functions are also used for kvm under !CONFIG_IOTHREAD, having'tcg' in their name is just misleading.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Acked-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com>...
Rework debug exception processing for gdb use
Guest debugging is currently broken under CONFIG_IOTHREAD. The reason isinconsistent or even lacking signaling the debug events from the sourceVCPU to the main loop and the gdbstub.
This patch addresses the issue by pushing this signaling into a...
linux-user: display cpu list.
As it is done for qemu-system with "-cpu ?", when cpu_list_id() is missingfor a target, call cpu_list() instead.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
virtio-serial: Fix compat property name
Starting with qemu -M pc-0.12 -device virtio-serial
results in
-device virtio-serial: Property 'virtio-serial-pci.max_nr_ports' not found
The property name 'max_ports' is incorrectly named 'max_nr_ports'. Fixthat....
Introduce proper compiler barrier
Define barrier() as optimization barrier and replace (potentiallyunreliable) asm("") fences.
Sparc32: reserve addresses for unimplemented devices on SS-20
Use empty_slot to reserve addresses for several unimplemented devices so they won't fault. - BPP (parallel port), DBRI (audio), SX (pixel processor), and vsimms (framebuffer)OBP for SS-20 either assumes these devices exist or probes without expecting faults....
vhost: fix miration during device start
We need to know ring layout to allocate log buffer.So init rings first.
Also fixes a theoretical memory-leak-on-error.
https://bugzilla.redhat.com/show_bug.cgi?id=615228
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
e1000: fix access 4 bytes beyond buffer end
We do range check for size, and get size as buffer,but copy size + 4 bytes (4 is for FCS).Let's copy size bytes but put size + 4 in length.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
e1000: secrc support
Add support for secrc field. Reportedly needed by old RHEL guests.
target-ppc: fix power mode checking on 7400/7410
Only the PowerPC 7440/7450 family don't support DOZE mode. PowerPC7400 and 7410 support it.
target-mips: fix xtlb exception for loongson
Loongson 2E and 2F use the same entry for xtlb and tlb exception, atoffset 0x000.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Merge remote branch 'origin/master' into staging
microblaze: Correct signal frame setup.
Pass the context in r7.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Merge remote branch 'kwolf/for-anthony' into staging
Make default invocation of block drivers safer (v3)
CVE-2008-2004 described a vulnerability in QEMU whereas a malicious user couldtrick the block probing code into accessing arbitrary files in a guest. Tomitigate this, we added an explicit format parameter to -drive which disabling...
hw/bonito: remove incorrect pci_mem_base setting
This mistake makes PCI devices can't work correctly.
Signed-off-by: Huacai Chen <zltjiangshi@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
qemu-options: add documentation for stdio signal=on|off
Commit 5989020bc11f8ba448d6fb79f4562f882a693d89 introduced a chardevoption to disable signals on stdio. Add the corresponding documentation.
Update OpenBIOS images
Update PPC, Sparc32 and Sparc64 OpenBIOS images to r821.
target-ppc: add vexptefp instruction
softfloat: add float32_exp2()
qemu-img: Fix copy+paste bug in documentation
Replace rebase by resize in documentation of resize command.
Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Block migration fail, ignore error from bdrv_getlength
When there is no block driver associate with BlockDriverState bdrv_getlengthreturns -ENOMEDIUM that cause block migration to fail
Signed-off-by: Shahar Havivi <shaharh@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
virtio-pci: Check for virtio_blk_init() failure
It can't actually fail now, but the next commit will change that.
s390_virtio_blk_init() already checks for failure, butvirtio_blk_init_pci() doesn't. Fix that.
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
virtio-blk: Fix virtio-blk-s390 to require drive
Move the check from virtio_blk_init_pci(), where it protects onlyvirtio-blk-pci, to virtio_blk_init(). Without that, virtio-blk-s390initializes without a drive. I figure that can lead to null pointerdereferences....
ide scsi virtio-blk: Reject empty drives unless media is removable
Disks without media make no sense. For SCSI, a Linux guest kernelcomplains during boot. I didn't try other combinations.
scsi-generic doesn't need the additional check, because it already...
pc: Avoid registering zero sized memory
No need to call cpu_register_physical_memory() for a zero sized area.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-9p: Avoid SEGV when log file couldn't be opened
While running in debug mode if 9P server is unable to open the log fileit results in a SEGV deep down in glibc:
Program received signal SIGSEGV, Segmentation fault.0x008fca8c in fwrite () from /lib/libc.so.6...
virtio-serial: Check if virtio queue is ready before consuming data
If a virtio-serial port is removed before the guest comes up andinitialises the virtqueues, qemu exits with the message
Guest moved used index from 0 to 61440
This happens because we try to clear any pending buffers from the...
virtio-serial: Assert for virtio queue ready before virtqueue operations
In addition to the previous fix for calling do_flush_queued_data() onlywhen the virtqueue is ready, ensure do_flush_queued_data() gets a vqthat's suitably initialised.
Signed-off-by: Amit Shah <amit.shah@redhat.com>...
Update SeaBIOS
- 17d3e46 smbios: Allow all fields to be set via qemu_cfg_smbios_load_field() - 0d6b8d5 seabios: pciinit: use pci device initializer helper function. - 968d3a8 seabios: pci: introduce helper function to initialize a given device. - 4e0daae virtio: Clear interrupt status register in virtio-blk...
pci/multi function bit: fix vt82c686.c.
The file, vt82c686.c, was added after the change set ofb80d4a9887fa4b6cc63f8c3a13ab2a45054d3e5c andfecb93c45c749a4c994d8d12bdee17ce2012de9eare created, but before the patch series was commit.So similar fix is needed to vt82c686.c....
Merge branch 'master' into pci
target-sh4: Add support for ldc & stc with sgr
Add support for the following missing priviledged intructions:
For SH4:- stc sgr, Rn- stc.l sgr, @-Rn
For SH4A:- ldc Rm, sgr- ldc.l @Rm+, sgr
Signed-off-by: Alexandre Courbot <gnurou@gmail.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-sh4: Split the LDST macro into 2 sub-macros
The LDST macro is used to generate ldc and stc instructions that work with aspecific register. However, the SGR register only supports stc up to SH4A,which supports both stc and ldc. This patch creates two sub-macros named LD...
pci hotplug: make pci hotplug return value to caller
make pci hotplug callback return value to caller.And when returning error, allocated resources are freed.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
virtio-net: correct packet length math
We were requesting too much when checking bufferlength: size already includes host header length.
Further, we should not exit if we get a packet thatis too long, since this might not be under controlof the guest. Just drop the packet....
pci: fix bridge update
bridge config write should trigger updateson the secondary bus. never on the primary bus.
rtl8139: address TODOs
Make rtl8139 spec compliant, fixing reset valuesfor command register.
vmware_vga: fix reset value for command register
Make init value for this register match the spec.BAR address is 0 at init, so enabling itonly works by chance.
pcnet: address TODOs
pcnet enables memory/io on init, whichdoes not make sense as BAR values are wrong.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Tested-by: Jan Kiszka <jan.kiszka@siemens.com>
pci hotplug: make pci_device_hot_remove() static
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pci: fix pci_device_reset
Clear interrupt disable bit on reset, according to PCI spec.Fix pci_device_reset() with 64bit BAR.
AppleSMC device emulation
Intel Macs have a chip called the "AppleSMC" which they use to controlcertain Apple specific parts of the hardware, like the keyboard backgroundlight.
That chip is also used to store a key that Mac OS X uses to decrypt binaries....
Documentation: Fix spelling bugs
rewuired -> requiredths -> this
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Makefile: Not every shell support {}
So interpret it by hand.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Makefile: add fsdev/*.{o,d} to clean
There were fsdev/qemu-fsdev.{o,d} not removed at "make clean".
pci: set PCI multi-function bit appropriately.
Set PCI multi-function bit according to multifunction property.PCI address, devfn ,is exported to users as addr property,so users can populate pci function(PCIDevice in qemu)at arbitrary devfn.It means each function(PCIDevice) don't know whether pci device...
pci: set multifunction property for normal device.
use pci_create_simple_multifunction() for normal device which setsmultifunction bit.At the moment, only pc_piix.c and mips_malta.c uses multifunctiondevices with piix3/4 pci-isa bridge.And other boards don't populate those devices....
pci_bridge: make pci bridge aware of pci multi function bit.
make pci bridge aware of pci multi function property and let pci genericcode to set the bit.
Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pci: introduce multifunction property.
introduce multifunction property.Also introduce new convenient device creation function whichwill be used later.
For bisectability this patch doesn't do anything, but sets the propertyresulting in no functional changes....
qdev: implement qdev_prop_set_bit().
implement qdev_prop_set_bit().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pci: remove PCIDeviceInfo::header_type
replace PCIDeviceInfo::header_type with is_bridgeas suggested by Michael S. Tsirkin <mst@redhat.com>