Add vgabios build rules to roms/Makefile
This patch adds some glue to roms/Makefile to build vgabios binaries forqemu. It covers both the lgpl'ed vgabios implementation used by qemutraditionally and the new seabios implementation.
The purpose of this patch is to (a) document the vgabios build process...
megasas: disable due to build breakage
The Buildbot has detected a new failure on builder default_i386_rhel61 whilebuilding qemu.
Full details are available at: http://buildbot.b1-systems.de/qemu/builders/default_i386_rhel61/builds/304
The proper fix is non-trivial so let's disable the build by default until it's...
Merge remote-tracking branch 'mjt/mjt-iov2' into staging
Merge remote-tracking branch 'quintela/migration-anthony-v2' into staging
Merge remote-tracking branch 'kiszka/queues/slirp' into staging
slirp: Improve error reporting of inaccessible smb directories
Instead of guessing, print the error code returned by access.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
slirp: Enforce host-side user of smb share
Windows 7 (and possibly other versions) cannot connect to the sambashare if the exported host directory is not world-readable. This can beresolved by forcing the username used for access checks to the oneunder which QEMU and smbd are running....
slirp: add 'cmd:' target for guestfwd
When using guestfwd=, Qemu only connects the virtual server's TCP portto a single chardev. This is useless in most cases, as we usually wantto have more than a single connection from the guest to the outside world....
slirp: Ensure smbd and shared directory exist when enable smb
Users may pass the following parameters to qemu: $ qemu-kvm -net nic -net user,smb= ... $ qemu-kvm -net nic -net user,smb ... $ qemu-kvm -net nic -net user,smb=bad_directory ...
In these cases, qemu started successfully while samba server...
Merge remote-tracking branch 'kwolf/for-anthony' into staging
qtest: Tidy up temporary files properly
Each test litters /tmp with several files: a pid file and twosockets. Tidy up.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: Factor bdrv_read_unthrottled() out of guess_disk_lchs()
To prepare move of guess_disk_lchs() into hw/, where it pokingBlockDriverState member io_limits_enabled directly would be unclean.
Merge remote-tracking branch 'kraxel/usb.55' into staging
Merge remote-tracking branch 'bonzini/scsi-next' into staging
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
fdc: rewrite seek and DSKCHG bit handling
This bit is cleared on every successful seek to a different track (cylinder).The seek is also called on revalidate or on read/write/format commands whichalso clear the DSKCHG bit.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>...
fdc: fix interrupt handling
If you call the SENSE INTERRUPT STATUS command while there is no interruptwaiting you get as result unknown command.
Fixed status0 register handling for read/write/format commands.
fdc_test: update media_change test
After rewrite DSKCHG bit handling the test has to be updated. Nowis needed to seek to different track to clear DSKCHG bit.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
fdc_test: introduce test_sense_interrupt
Calling sense interrupt status while there is no interrupt shouldreturn invalid command (0x80).
Read command should always returns in st0 seek_end bit set to 1.
fdc: Drop broken code for user-defined floppy geometry
bdrv_get_floppy_geometry_hint() fails to store through its parameterdrive when bs has a geometry hint. Makes fd_revalidate() assignrandom crap to drv->drive.
Has been broken that way for ages. Harmless, because:...
sheepdog: split outstanding list into inflight and pending
outstanding_list_head is used for both pending and inflight requests.This patch splits it and improves readability.
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
sheepdog: traverse pending_list from the first for each time
The pending list can be modified in other coroutine contextsd_co_rw_vector, so we need to traverse the list from the first againafter we send the pending request.
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>...
blkdebug: remove sync i/o events
These are unused, except (by mistake more or less) in QED.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blkdebug: tiny cleanup
blkdebug: pass getlength to underlying file
This is required when using blkdebug with raw format. Unlike qcow2/QED,raw asks blkdebug for the length of the file, it doesn't get it froma header.
blkdebug: store list of active rules
This prepares for the next patch, where some active rules may actuallynot trigger depending on input to readv/writev. Store the active rulesin a SIMPLEQ (so that it can be emptied easily with QSIMPLEQ_INIT), andfetch the errno/once/immediately arguments from there....
blkdebug: optionally tie errors to a specific sector
This makes blkdebug scripts more powerful, and independent of theexact sequence of operations performed by streaming.
raw: hook into blkdebug
block: copy over job and dirty bitmap fields in bdrv_append
While these should not be in use at the time a transaction is started,a command in the prepare phase of a transaction might have added them,so they need to be brought over.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
block: introduce bdrv_swap, implement bdrv_append on top of it
The new function can be made a bit nicer than bdrv_append. It swaps thewhole contents, and then swaps back (using the usual t=a;a=b;b=t idiom)the fields that need to stay on top. Thus, it does not need explicit...
qcow2: fix #ifdef'd qcow2_check_refcounts() callers
The DEBUG_ALLOC qcow2.h macro enables additional consistency checksthroughout the code. This makes it easier to spot corruptions that areintroduced during development. Since consistency check is an expensive...
qcow2: preserve free_byte_offset when qcow2_alloc_bytes() fails
When qcow2_alloc_clusters() error handling code was introduced in commit5d757b563d59142ca81e1073a8e8396750a0ad1a, the value of free_byte_offsetwas clobbered in the error case. This patch keeps free_byte_offset at 0...
blockdev: warn when copy_on_read=on and readonly=on
If the image is read-only then it's not possible to copy read data intoit. Therefore copy-on-read is automatically disabled for read-onlyimages.
Up until now this behavior was silent, add a warning so the user knows...
sheepdog: fix dprintf format strings
This fixes warnings about dprintf format in debug mode.
sheepdog: restart I/O when socket becomes ready in do_co_req()
Currently, no one reenters the yielded coroutine. This fixes it.
sheepdog: use coroutine based socket functions in coroutine context
This removes blocking network I/Os in coroutine context.
sheepdog: make sure we don't free aiocb before sending all requests
This patch increments the pending counter before sending requests, andmake sures that aiocb is not freed while sending them.
usb: fix interface initialization
zero is a valid interface number, so don't use it when resetting theendpoints.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-host: add trace events for iso xfers
Replace iso transfer fprintf's with trace points. Also rename existingtracepoints so they all match usb_host_iso_*.
usb-ehci: Fix an assert whenever isoc transfers are used
hcd-ehci.c is missing an usb_packet_init() call for the ipacket UsbPacketit uses for isoc transfers, triggering an assert (taking the entire vm down)in usb_packet_setup as soon as any isoc transfers are done by a high speed...
ehci: Kick async schedule on wakeup in the non companion case
Commit 0f588df8b3688b00e77aabaa32e26ece5f19bd39, added codeto ehci_wakeup to kick the async schedule on wakeup, but the elsewas positioned wrong making it trigger for devices which are routed...
usb-redir: Correctly handle the usb_redir_babble usbredir status
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb: split endpoint init and reset
Create a new usb_ep_reset() function to reset endpoint state, withoutre-initialiting the queues, so we don't unlink in-flight packets justbecause usb-host has to re-parse the descriptor tables.
ehci: don't flush cache on doorbell rings.
Commit 4be23939ab0d7019c7e59a37485b416fbbf0f073 makes ehci instantlyzap any unlinked queue heads when the guest rings the doorbell.
While hacking up uas support this turned out to be a problem. The linuxkernel can unlink and instantly relink the very same queue head, thereby...
ehci: fix ehci_qh_do_overlay
Use ehci_flush_qh to make sure we touch inly the fields the hc isallowed to touch.
ehci: fix td writeback
Only write back the dwords the hc is supposed to update. Should notmake a difference in theory as the guest must not touch the td whileit is active to avoid races. But it is still more correct.
bitops.h: Add functions to extract and deposit bitfields
Add functions deposit32(), deposit64(), extract32() and extract64()to extract and deposit bitfields in 32 and 64 bit words. Based onideas by Jia Liu and Avi Kivity.
Suggested-by: Jia Liu <proljc@gmail.com>...
target-i386: make it clearer that op table accesses don't overrun
Rephrase some of the expressions used to select an entryin the SSE op table arrays so that it's clearer that theydon't overrun the op table array size.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
target-i386: Remove confusing X86_64_DEF macro
The X86_64_DEF macro is a confusing way of making some termsin a conditional only appear if TARGET_X86_64 is defined. Weonly use it in two places, and in both cases this is for makingthe same test, so abstract that check out into a function...
target-i386: Remove unused macros
Commit 11f8cdb removed all the uses of the X86_64_ONLYmacro. The BUGGY_64() macro has been unused for a long time:it originally marked some ops which couldn't be enabledbecause of issues with the pre-TCG code generation scheme....
.gitignore update
Makes sure the following files are ignored:
libcacard/.libs/ libcacard/libcacard.la libcacard/libcacard.pc libcacard/libcacard/ libcacard/osdep.lo libcacard/oslib-posix.lo libcacard/qemu-thread-posix.lo libcacard/qemu-timer-common.lo...
Merge branch 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm
target-i386: Fix compilation with --enable-debug
commit c4baa0503d9623f1ce891f525ccd140c598bc29a improved SSE tabletype safety which now raises compiler errors when latest QEMU wasconfigured with --enable-debug.
Fix this by splitting the SSE tables even further to separate...
hw/cadence_gem: Make rx_desc_addr and tx_desc_addr uint32_t
Make the state fields rx_desc_addr and tx_desc_addr uint32_t;this matches the VMStateDescription, and also conforms to howhardware works: the registers don't magically become largerif the device is attached to a CPU with a larger physical...
i.MX31: Interrupt Controller
Implement the Freescale i.MX31 advanced vectored interrupt controller, at leastto the extent it is used by Linux 3.x
Vectors are not implemented.
Signed-off-by: Philip O'Sullivan <philipo@ok-labs.com>Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au>...
i.MX31: KZM-ARM11-01 evaluation board
Board support for Kyoto Micro's KZM-ARM11-01, an evaluation board builtaround the Freescale i.MX31.
Signed-off-by: Philip O'Sullivan <philipo@ok-labs.com>Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
i.MX: UART support
Implement the Freescale i.MX UART. This uart is used in a variety ofSoCs, including some by Motorola, as well as in the Freescale i.MXseries.
This patch gives only a `bare-bones' implementation, enough to run Linuxor OKL4, but that's about it....
i.MX31: Clock Control Module
For Linux to be able to work out how fast its clocks are going, sothat timer ticks come approximately at the right time, it needs tobe able to query the clock control module (CCM).
This is the start of a CCM implementation. It currently knows only about...
i.MX31: Timers
Implement the timers on the Freescale i.MX31 SoC.This is not a complete implementation, but gives enough forLinux to boot and run. In particular external triggers, which arenot useful under QEMU, are not implemented.
Signed-off-by: Philip O'Sullivan <philipo@ok-labs.com>...
hw/exynos4210.c: Fix misleading initialization of IROM mirror
We want to mirror whole IROM and should pass zero instead ofEXYNOS4210_IROM_BASE_ADDR (though it equals to zero too) sincememory_region_init_alias takes an offset within an originalregion as an argument....
Exynos4: add RTC device
Signed-off-by: Oleg Ogurtsov <o.ogurtsov@samsung.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/exynos4210_pwm.c: Fix STOP status in tick handler.
START/STOP bit was not cleaned correctly.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
ARM: hw/exynos4210_mct.c: Fix a bug which hangs Linux kernel.
After some long period of time Linux kernel hanged due toptimer_get_count may return 0 before timer interrupt occurs,thus, causing FRC to jump back in time
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>...
virtio-scsi: do not crash on adding buffers to the event queue
The event queue is not supported yet and the handler does nothave to do much anyway when buffers are added. However, thehandler is called unconditionally by the virtio layer, and thisresults in a crash as soon as buffers are added to the event...
scsi: Fix data length == SCSI_SENSE_BUF_SIZE
Fix the edge case where the sense data length is exactly the sameas SCSI_SENSE_BUF_SIZE.This makes SCSI requests work that use all of the available 95 bytesense data.
Signed-off-by: Christian Hoff <christian.hoff@de.ibm.com>...
scsi: Fix LOAD_UNLOAD
Change operation code of LOAD_UNLOAD command to 0x1b as described insection 7.3 of the SCSI Stream Commands spec.
Signed-off-by: Christian Hoff <christian.hoff@de.ibm.com>Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>...
scsi: Ensure command and transfer lengths are set for all SCSI devices
scsi-generic relies on those values to be correct, so it is important thatthose values are initialized properly for all device types.
Reported-by: Christian Hoff <christian.hoff@de.ibm.com>...
scsi: Add basic support for SCSI media changer commands.
This adds basic support for SCSI media changer commands.Not all commands are supported as of now, but enough to coverbasic functionality.
scsi: Fix transfer length for READ POSITION commands.
The transfer length depends on the specific service actioncode, as defined in the SCSI stream commands spec section 7.7.Up to now only the extended form was supported.
megasas: LSI Megaraid SAS HBA emulation
This patch adds an emulation for the LSI Megaraid SAS 8708EM2 HBA.I've tested it to work with Linux, Windows Vista, and Windows7.
Signed-off-by: Hannes Reinecke <hare@suse.de>[ Squashed trivial changes from Andreas Faerber, rebased over IOMMU...
configure: Remove help for --disable-vnc-thread, --enable-vnc-thread
Commit 2624bab836662d37f08336408a99d97652fc9c4d removed theseconfigure arguments. Now the help text for both is removed, too.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
cpu-common.h: Remove a pointless ifndef CONFIG_USER_ONLY
Remove an ifndef CONFIG_USER_ONLY guard that was pointlessbecause it is already inside an if !defined(CONFIG_USER_ONLY).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Acked-by: Andreas Färber <afaerber@suse.de>...
cpu-common.h: Remove unnecessary guard on including targphys.h
There's no need to make the include of targphys.h conditionalon whether TARGET_PHYS_ADDR_BITS is defined, because targphys.hitself checks that and does nothing if it isn't.
scsi: add a qdev property for the disk's WWN
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
atapi: implement READ DISC INFORMATION
This command is not necessary for CD-ROM and DVD-ROM, but some versions ofudev trip on its absence.
Cc: Kevin Wolf <kwolf@redhat.com>Cc: Markus Armbruster <armbru@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scsi-disk: implement READ DISC INFORMATION
ISCSI: Add SCSI passthrough via scsi-generic to libiscsi
Update iscsi to allow passthrough of SG_IO scsi commands when the iscsidevice is forced to be scsi-generic.
Implement both bdrv_ioctl() and bdrv_aio_ioctl() in the iscsi backend,emulate the SG_IO ioctl and pass the SCSI commands across to the...
ISCSI: force use of sg for SMC and SSC devices
If the device we open is a SMC or SSC device, then force the use of sg. Wedont have any medium changer or tape emulation so only passthrough viareal sg or scsi-generic via iscsi would work anyway.
Forcing sg also makes qemu skip trying to read from the device to guess...
megasas: Add header file
This patch adds the header file for megasas.
Signed-off-by: Hannes Reinecke <hare@suse.de>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scsi: simplify handling of the VPD page length field
The last four bytes of the thin provisioning page were cut out.
dirty bitmap: abstract its use
Always use accessors to read/set the dirty bitmap.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Maintain the number of dirty pages
Calculate the number of dirty pages takes a lot on hosts with lotsof memory. Just maintain how many pages are dirty.
Exit loop if we have been there too long
Checking each 64 pages is a random magic number as good as any other.We don't want to test too many times, but on the other hand,qemu_get_clock_ns() is not so expensive either. We want to be surethat we spent less than 50ms (half of buffered_file timer), if we...
Only calculate expected_time for stage 2
ram_save_remaining() is an expensive operation when there is a lot of memory.So we only call the function when we need it.
Add migration_end function
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Add spent time for migration
We add time spent for migration to the output of "info migrate" command. 'total_time' means time since the start fo migration ifmigration is 'active', and total time of migration if migration iscompleted. As we are also interested in transferred ram when...
Add tracepoints for savevm section start/end
This allows to know how long each section takes to save.
An awk script like this tells us sections that takes more that 10ms
$1 ~ /savevm_state_iterate_end/ { /* Print savevm_section_end line when > 10ms duration */...
No need to iterate if we already are over the limit
If buffers are full, don't iterate, just exit.
Only TCG needs TLB handling
Refactor the code that is only needed for tcg to an static function.Call that only when tcg is enabled. We can't refactor to a dummyfunction in the kvm case, as qemu can be compiled at the same timewith tcg and kvm.
Add debugging infrastructure
Add save_block_hdr function
Signed-off-by: Benoit Hudzia <benoit.hudzia@sap.com>Signed-off-by: Petter Svard <petters@cs.umu.se>Signed-off-by: Aidan Shribman <aidan.shribman@sap.com>Signed-off-by: Orit Wasserman <owasserm@redhat.com>
Add MigrationParams structure
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Add missing check for host_from_stream_offset return value for RAM_SAVE_FLAG_PAGE
bsd-user: fix build
Link in oslib objects also for BSD user, but avoid using the version ofqemu_vmalloc() defined in oslib-posix.c.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
x86: split off SVM helpers
Move SVM helpers to svm_helper.c.
x86: split off SMM helpers
Move SMM helpers to smm_helper.c.
x86: split off misc helpers
Move various functions to misc_helper.c.
x86: split off memory access helpers
Move memory access helpers to mem_helper.c.
x86: rename op_helper.c to seg_helper.c
Rename what is remaining of op_helper.c to seg_helper.c.
x86: split off integer helpers
Move integer and bit field helpers to int_helper.c.