block: eject_device(): Use error_set()
Also drops the leftover 'mon' argument.
This is a preparation for the next commits which will port theeject and change commands to the QAPI.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: Convert eject
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
monitor: expose readline state
HMP is now implemented in terms of QMP. The monitor has a bunch of logic todeal with HMP right now like readline support. Export it from the monitor sowe can consume it in hmp.c.
In short time, hmp.c will take over all of the readline bits....
qapi: Introduce change-vnc-password
New QMP command to change the VNC password.
qerror: Extend QERR_DEVICE_ENCRYPTED
Include the name of the encrypted file.
vnc: Simplify vnc_display_password()
Drop the qerror_report() call from it and let its callers set the errorthemselves. This also allows for dropping the 'ret' variable.
qapi: Convert set_password
qapi: Convert expire_password
pxa2xx_keypad: fix unbalanced parenthesis.
Breakage introduced by me when ammending a previous patch, sorry.
hw/arm_boot.c: Make SMP boards specify address to poll in bootup loop
The secondary CPU bootloader in arm_boot.c holds secondary CPUs in apen until the primary CPU releases them. Make boards specify theaddress to be polled to determine whether to leave the pen (it was...
hw/sysbus.h: Increase maximum number of device IRQs.
Samsung exynos4210 Interrupt Combiner needs 512 IRQ sources.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
pxa2xx_keypad: make single automatic scans work
u-boot uses single automatic scans and polling inpxa2xx_keypad driver, so clear KPC_AS bit immediatelyand update keys state even if KPC_AS and KPC_ASACT arecleared.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>...
pxa2xx_lcd: fix palette parser
Pallete entry size for 16bpp format is 2 bytes, not 4
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
seabios: Update to release 1.6.3.1
User visible changes in seabios: - Probe HPET existence (fix for -no-hpet) - Probe PCI existence (fix for -machine isapc) - usb: fix boot paths
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
isapc: Fix segfault during initialization
Obviously, linking the RTC device state to the PIIX does not belong intothe common path that is shared with the isapc.
kvm: flush the dirty log when unregistering a slot
Otherwise, the dirty log information is lost in the kernel forever.
Fixes opensuse-12.1 boot screen, which changes the vga windows rapidly.
Signed-off-by: Avi Kivity <avi@redhat.com>
target-arm: Fix errors in decode of M profile CPS
Fix errors in the decode of M profile CPS: * the decode of the I (affects PRIMASK) and F (affects FAULTMASK) bits was reversed * the FAULTMASK system register number is 19, not 17
This fixes an issue reported as LP:913925....
arm: Add dummy support for co-processor 15's secure config register
Signed-off-by: Rob Herring <rob.herring@calxeda.com>Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
prepare for future GPLv2+ relicensing
All files under GPLv2 will get GPLv2+ changes starting tomorrow.event_notifier.c and exec-obsolete.h were only ever touched by Red Hatemployees and can be relicensed now.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qdev: Add a 'free' method to disassociate chardev from qdev device
When a device is removed, remove the association with a chardev, if any,so that the chardev can be re-used later for other devices.
Reported-by: Qunfang Zhang <qzhang@redhat.com>Fix-suggested-by: Markus Armbruster <armbru@redhat.com>...
virtio-console: no need to remove char handlers explicitly
qdev is now equipped (thanks to the last commit) to disassociatechardevs from the qdev devices on the devices going away. So doing itin the virtio-console driver is not necessary.
Since that was the only thing being done in the qdev exit method, drop...
vectorize is_dup_page
is_dup_page is already proceeding in 32-bit chunks. Changing itto 16 bytes using Altivec or SSE is easy.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: extract declarations out of hw/hw.h
virtio-blk: refuse SG_IO requests with scsi=off
QEMU does have a "scsi" option (to be used like -devicevirtio-blk-pci,drive=foo,scsi=off). However, it onlymasks the feature bit, and does not reject the commandif a malicious guest disregards the feature bits and...
rtc: clear non-PF bits when reinjecting on ack
When an rtc interrupt is reinjected immediately after being acked,other interrupts should not be reinjected, so do clear their bits.
Also, if the periodic interrupts have been disabled before acking,do not reinject, as the guest might get very confused!...
ptimer: move declarations to ptimer.h
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: fix device_del by refactoring reference counting
Commit 8eb0283 broken device_del by having too overzealous reference countingchecks. Move the reference count checks to qdev_free(), make sure to removethe parent link on free, and decrement the reference count on property removal....
rtc: fix 12-hour mode
Hours in 12-hour mode are in the 1-12 range, not 0-11.
rtc: raise AF bit when the alarm is encountered but AIE=0
rtc: raise PF bit when the periodic timer triggers but PIE=0
Merge remote-tracking branch 'stefanha/trivial-patches' into HEAD
target-i386: fix compilation with --enable-debug-tcg
Commit 2355c16e74ffa4d14e7fc2b4a23b055565ac0221 introduced a new ldmxcsrhelper taking an i32 argument, but the helper is actually passed a long.Fix that by truncating the long to i32.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hmp: Fix freeing of PciInfoList
Remember the original PciInfoList in info_list and usethe info variable to traverse the list.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
virtfs-proxy-helper: Fix compilation on newer systems
Include file attr/xattr.h is not available on "newer" systems(for example Fedora 12 or Debian Squeeze).
See comments in qemu-xattr.h for more information.This file handles the system dependencies automatically....
virtfs-proxy-helper: Clean include files
The common standard include files are already included via qemu-common.h,and for the socket related include files there is qemu_socket.h, so thecode can be reduced by some lines.
Signed-off-by: Stefan Weil <sw@weilnetz.de>...
virtfs-proxy-helper: Add missing printf format attribute
Every function with printf like arguments must have it(see file HACKING), so add it.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
bt-host: add missing break statement
The switch statement in bt_host_read() is missing a break in one case.Andrzej Zaborowski <andrew.zaborowski@intel.com> confirmed that this isnot an intentional fall-through.
Reviewed-by: Stefan Weil <sw@weilnetz.de>...
configure: Modify detection of supported warning options
Reversing the order of the warning options and -Werror is importantwhen clang is used instead of gcc. It changes nothing for gcc.
tcg-arm: fix a typo in comments
ARM still doesn't support 16GB buffers in 32-bit modes, replace the16GB by 16MB in the comment.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Spelling fixes in comments and documentation
Codespell detected these new spelling issues.
vvfat: avoid leaking file descriptor in commit_one_file()
Reported-by: Dr David Alan Gilbert <davidagilbert@uk.ibm.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
vnc: fix no-lock-key-sync strncmp() length
The no-lock-key-sync option is being parsed incorrectly because of anoutdated strcmp() length value. Use the correct length so that invalidoption names do not match.
Reported-by: Dr David Alan Gilbert <davidagilbert@uk.ibm.com>...
omap_dss: correct chip1 index in RFBI_READ/RFBI_STATUS
The RFBI_READ/RFBI_STATUS code incorrectly uses chip0 when it shouldbe using chip1. Andrzej Zaborowski <balrog@zabor.org> confirmed thisbug since I don't know this code well.
Add 'fall through' comments to case statements without break
These comments are used by static code analysis tools and in code reviewsto avoid false warnings because of missing break statements.
The case statements handled here were reported by coverity....
cris: Update paths to match the move of tests/cris
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
check-qstring: remove check.h include
Reported-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
cleanup, Remove duplicated code
These two blocks of code are exactly the same, remove one.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
cleanup, save a syscall
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Support for UDP unicast network backend
Signed-off-by: Benjamin MARSILI <mlspirat42@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
MAINTAINERS: update tracing repo git URL
I have moved git hosting services.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
test: eliminate libcheck tests and have make check use gtester
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
check-qstring: convert to gtest
check-qlist: convert to gtest
check-qjson: convert to gtest
check-qjson: enable disabled tests
gtest does the right thing here so there's no need to comment these tests out.
build: split unit test builds to a separate makefile fragment
check-qdict: convert to gtest
check-qfloat: convert to gtest
check-qint: convert to gtest
Fix qapi code generation fix
The fixes to qapi code generation had multiple bugs:- the Null class used to drop output was missing some methods- in some scripts it was never instantiated, leading to a None return, which is missing even more methods- the --source and --header options were swapped...
vga: optimize ppm_save() divisions
ppm_save() spends upwards of 50% of its time doing divisions. Replace themwith shifts.
Reviewed-by: Alon Levy <alevy@redhat.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
tests: mv tests/* -> tests/tcg
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
microblaze: Break the tb at memory barriers
etraxfs-dma: Model metadata and eop
- Send EOP flags to the out channels.- Send data descriptor metadata to the out channels.
Signed-off-by: Lars Persson <larper@axis.com>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
microblaze: Add support for the clz insn
microblaze: Emulate the hw stackprotector
target-i386: fix {min,max}{pd,ps,sd,ss} SSE2 instructions
minpd, minps, minsd, minss and maxpd, maxps, maxsd, maxss SSE2instructions have been broken when switching target-i386 to softfloat.It's not possible to use comparison instructions on float types anymore...
target-i386: fix round{pd,ps,sd,ss} SSE2 instructions
roundps and roundss SSE2 instructions have been broken when switchingtarget-i386 to softfloat. They use float64_round_to_int to convert afloat32, and while the implicit conversion from float32 to float64 was...
target-i386: fix dpps and dppd SSE2 instructions
The helpers implemented dpps and dppd SSE instructions are not passingthe correct argument types to the softfloat functions. While they dowork anyway providing a correct behaviour, this patch fixes that....
target-i386: fix SSE rounding and flush to zero
SSE rounding and flush to zero control has never been implemented. Howevergiven that softfloat-native was using a single state for FPU and SSE andgiven that glibc is setting both FPU and SSE state in fesetround(), this...
wm8750: Fix calculation of number of array elements
Coverity says that the division by sizeof(*s->rate) might be wrong.I think that coverity is right.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
elf: Improve symbol lookup (optimize, fix for bsd-user)
Coverity complained about local variable key which was only partiallyinitiated. Only key.st_value was set. As this was also the only partof key which was used in function symfind, the code could be optimized...
hw/integratorcp: Simplify flash remap code
Use the new memory mutator API to simplify the flash remap code;this allows us to drop the flash_mapped flag.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Andreas Färber <afaerber@suse.de>...
hw/integratorcp: Fix sense of REMAP bit
Fix the sense of the REMAP bit: 0 should mean "map flash",1 should mean "map RAM".
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Merge branch 's390-next' of git://repo.or.cz/qemu/agraf
PPC: Fix linker scripts on ppc hosts
When compiling qemu statically with multilib on PPC, we hit thesame issue that commit 845f2c2812d9ed24b36c02a3d06ee83aeafe8b49is fixing. Do the same here.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-sh4: ignore ocbp and ocbwb instructions
ocbp and ocbwb controls the writeback of a cache line to memory. Theyare supposed to do nothing in case of a cache miss. Given QEMU onlypartially emulate caches, it is safe to ignore these instructions.
This fixes a kernel oops when trying to access an rtl8139 NIC with...
tcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointer
On ARM, in Thumb mode r7 is used for the framepointer; this meantthat we would fail to compile in debug mode because we were using r7for TCG_AREG0. Shift to r6 instead to avoid this clash....
cris-dis: Clean memory allocation
The old code used sizeof(const struct cris_opcode **) where it shouldhave used sizeof(const struct cris_opcode *). As both sizes give thesame value, the resulting binary was ok, but static code analyzerslike coverity and clang complained....
Merge remote-tracking branch 'qemu-kvm/fix-vhost-after-memory-listener' into staging
vhost: improve region filtering
vhost memory management doesn't care about non-memory (e.g. PIO) or non-RAMregions. Adjust the filtering to reflect that, and move it earlier so itapplies to mem_sections too.
Signed-off-by: Avi Kivity <avi@redhat.com>...
vhost: fix mem_sections memory corruption
A memset() used to delete an entry in an array did not take into accountthe array element's size.
Signed-off-by: Avi Kivity <avi@redhat.com>Acked-by: Michael S. Tsirkin <mst@redhat.com>
vhost: fix incorrect userspace address
MemoryListener::region_add() gives us a slice of a MemoryRegion, not aregion. Adjust the userspace address to reflect that.
Fix vmstate_register_ram() for rom/device regions
rom/device regions have a ram_addr that is composed of both an I/O handler(low bits) and RAM region (high bits); but qemu_ram_set_idstr() expects justa RAM region. Mask the I/O handler to make it happy....
memory: Fix adjust_endianness()
Commit a621f38de85598a13d8d8524d1a94fc6a1818215 (Direct dispatchthrough MemoryRegion) moved byte swaps to a central function.
Add a missing break, so that long-sized byte swaps don't abort.
Signed-off-by: Andreas Färber <afaerber@suse.de>...
memory: Fix memory_region_wrong_endianness()
Since commit be675c972088eba210e18dc125613e9f205a6bfb (memory: moveendianness compensation to memory core) it was checking forTARGET_BIG_ENDIAN instead of TARGET_WORDS_BIGENDIAN, thereby notswapping correctly for Big Endian targets....
kvm: fix build error in ppc kvm due to memory_region_init_ram_ptr() change
Commit c5705a772 ("vmstate, memory: decouple vmstate from memory API") changedthe signature of memory_region_init_ram_ptr() but did not update a caller inthe ppc kvm module. Fix....
Merge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm
Merge branch 'ppc-next' of git://repo.or.cz/qemu/agraf
sm501: Fix size of color_reg
color_reg is expected to hold 32 bit values, so it was too small.
This bug was reported by coverity:
hw/sm501.c:624:result_independent_of_operands:color_reg >> 16 is 0 regardless of the values of its operands.This occurs as the bitwise first operand of '&'....
malta: Fix regression (i8259 interrupts did not work)
Commit 5632ae46d5bda798e971dae48ebb318ac2c3686a passes the addressof i8259 to qemu_irq_proxy. i8259 is an auto variable with undefinedvalue outside of mips_malta_init.
This made the interrupt proxy unusable: either QEMU crashes, or...
target-sh4: Fix operands for fipr, ftrv instructions
Coverity complained about right shifts of opcode (16, 18) which werelarger than the size of opcode (16 bit).
Using the correct shift values fixes this.
Cc: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Stefan Weil <sw@weilnetz.de>...
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
virtio-9p-proxy: Fix typo causing compile failure on 32 bit hosts
Fix a compile failure on 32 bit hosts (integer constant is too largefor 'unsigned long' type) by correcting a typo where the mask usedfor filling in the second f_fsid word had too many 'F's in it....
qemu-nbd: drop loop which can never loop
For some reason nbd_client_thread() has a do..while loop which can neverloop, the condition is bogus because we would take a goto instead. Dropthe loop.
Make python mandatory
The QEMU build depends on Python so make it an explicit requirement.
Reviewed-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
configure: CONFIG_QEMU_INTERP_PREFIX only for user mode
configure: Fix test for supported host CPU type
The test for whether the host CPU is supported had several problems: * the attempt to fall back to TCI was done as a duplicate test, very late (so "--cpu foo" would fail early but "--cpu unicore32" would fail late, differently, and after configure had already...
gdbstub: Fix fd leak in gdbserver_open() error path
Fix a leak of a file descriptor in error exit paths ingdbserver_open().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
net/socket.c: Fix fd leak in net_socket_listen_init() error paths
Fix a leak of a file descriptor due to missing closesocket() callsin error paths in net_socket_listen_init().