vvfat: Fix partition table
Unless parameter ":floppy:" is given, vvfat creates a virtual imagewith DOS MBR defining a single partition which holds the FAT filesystem. The size of the virtual image depends on the width of theFAT: 32 MiB (CHS 64, 16, 63) for 12 bit FAT, 504 MiB (CHS 1024, 16,...
vvfat: Do not clobber the user's geometry
vvfat creates a virtual VFAT filesystem with a certain logicalgeometry that depends on its options. It sets the "geometry hint" tothis geometry. It is the only block driver to do this.
The geometry hint is about about physical geometry, and used only by...
qtest: Add hard disk geometry test
So far covers only IDE and tests only CMOS contents.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hd-geometry: Move disk geometry guessing back from block.c
Commit f3d54fc4 factored it out of hw/ide.c for reuse. Sensible,except it was put into block.c. Device-specific functionality shouldbe kept in device code, not the block layer. Move it tohw/hd-geometry.c, and make stylistic changes required to keep...
hd-geometry: Add tracepoints
hd-geometry: Unnest conditional in hd_geometry_guess()
hd-geometry: Factor out guess_chs_for_size()
hd-geometry: Clean up gratuitous goto in hd_geometry_guess()
sheepdog: always use coroutine-based network functions
This reduces some code duplication.
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
sheepdog: do not blindly memset all read buffers
Only buffers that map to unallocated blocks need to be zeroed.
Signed-off-by: Christoph Hellwig <hch@lst.de>Acked-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
fdc: Move floppy geometry guessing back from block.c
Commit 5bbdbb46 moved it to block.c because "other geometry guessingfunctions already reside in block.c". Device-specific functionalityshould be kept in device code, not the block layer. Move it back....
audio: Unbreak capturing in mixemu case
Signed-off-by: malc <av1474@comtv.ru>
qemu-log: fix x86 and user logging
5726c27fa913296aafab9f50b912cea5b3709271 brokex86 specific options and user emulation specific stdio buffering.
Always enable all log items. They may not be useful for non-x86 targets,but there's no harm either.
Fix user emulation buffering by passing around a flag....
Merge branch 'trivial-patches' of git://github.com/stefanha/qemu
vga: Implement blinking of text cursor
Let the text cursor blink at 1.875 Hz, the original VGA cursorfrequency. No timer is used, instead we rely on the fact that thedisplay is updated periodically.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
console: Implementing blinking of cursor
Let the text console cursor blink at 2 HZ.
configure: add -Werror to QEMU_CFLAGS early
We want all configure tests pass with -Werror if it is enabled. So weneed to update QEMU_CFLAGS early on to make sure we also pass it in toall the compile test jobs.
This fixes a warning-became-error bug in nss for me with the default...
monitor: Use TARGET_PRI*PHYS to avoid TARGET_PHYS_ADDR_BITS ifdef
Now we have TARGET_PRI*PHYS for printing target_phys_addr_t values,we can use them in monitor.c rather than having duplicate codein two arms of a TARGET_PHYS_ADDR_BITS ifdef.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
hw/sh_serial: Use TARGET_PRIxPHYS rather than %x for physaddr
Switch a format string from %x to TARGET_PRIxPHYS so that it willcontinue to work even if target_phys_addr_t is changedto 64 bits in the future.
hw/omap.h: Use TARGET_PRIxPHYS to define OMAP_FMT_plx
Use the new TARGET_PRIxPHYS macro to avoid the need to define anOMAP_FMT_plx macro whose expansion depends directly onTARGET_PHYS_ADDR_BITS.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Acked-by: Andreas Färber <afaerber@suse.de>...
targphys.h: Define TARGET_PRI*PHYS format specifier macros
Define a set of TARGET_PRI*PHYS format specifier macros for workingwith target_phys_addr_t types. These follow the standard patternfor such macros, and are more flexible than TARGET_FMT_plx, which...
disas: Fix printing of addresses in disassembly
In our disassembly code, the bfd_vma type is always 64 bits,even if the target's virtual address width is only 32 bits. Thismeans that when we print out addresses we need to truncate themto 32 bits, to avoid odd output which has incorrectly sign-extended...
esp: add AMD PCscsi emulation (PCI SCSI adapter)
The PCI version is supported in lots of Operating Systems,and has been successfully tested on:- MS DOS 6.22 (using DC390 driver)- MS Windows 3.11 (using DC390 driver)- MS Windows 98 SE (using default driver)...
pci: add some stubs
Cc: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
esp: use trace framework instead of stderr output
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
esp: split esp code into generic chip emulation and sysbus layer
esp: use hba_private field instead of a complex cast
esp: support future change of chip_id
esp: implement Reset ATN command
esp: implement Disable selection command
esp: delay Transfer Information command if dma is not enabled
The same mechanism is already in place for some select commands.
esp: execute select commands immediately when it is a non-dma command
Merge branch 's390-for-upstream' of git://repo.or.cz/qemu/agraf
Merge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm
megasas: mark mfi_frame_desc as 'static'
Suggested by blue swirl. Patch is on top of Paolo'sscsi-next tree.
Signed-off-by: Hannes Reinecke <hare@suse.de>Cc: Paolo Bonzini <pbonzini@redhat.com>Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
bitops: Fix documentation
Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
vnc: add a more descriptive error message
Currently qemu outputs some low-level error in qemu-sockets.cwhen failed to start vnc server.eg. 'getaddrinfo(127.0.0.1,5902): Name or service not known'
Some libvirt users could not know what's happened with this...
qemu-keymaps: Finnish keyboard mapping broken
As mentioned in http://bugs.debian.org/660154 , finnish keyboard mappingis kind of broken. Fix it as Timo Sirainen suggests in #660154.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
make: Remove 'build-all' rule
It is not needed, because the 'all' rule does the same.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
target-arm: Implement privileged-execute-never (PXN)
Implement the privileged-execute-never (PXN) translation table bit.It is implementation-defined whether this is implemented, so we giveit its own ARM_FEATURE_ flag. LPAE requires PXN, so add also anLPAE feature flag and the implication logic, as a placeholder...
target-arm: Extend feature flags to 64 bits
Extend feature flags to 64 bits, as we've just run out of spacein the 32 bit integer we were using for them.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm: Add AMAIR0, AMAIR1 LPAE cp15 registers
Add implementations of the AMAIR0 and AMAIR1 LPAEAuxiliary Memory Attribute Indirection Registers.These are implementation defined and we choose toimplement them as RAZ/WI, matching the Cortex-A7and Cortex-A15....
target-arm: Add 64 bit variants of DBGDRAR and DBGDSAR for LPAE
LPAE extends the DBGDRAR and DBGDSAR debug registers to 64 bits; weonly implement these as dummy RAZ versions; provide dummies forthe 64 bit accesses as well.
target-arm: Add 64 bit PAR, TTBR0, TTBR1 for LPAE
Under LPAE, the cp15 registers PAR, TTBR0 and TTBR1 are extendedto 64 bits, with a 64 bit (MRRC/MCRR) access path to read thefull width of the register. Add the state fields for the tophalf and the 64 bit access path. Actual use of the top half of...
target-arm: Use target_phys_addr_t in get_phys_addr()
In the implementation of get_phys_addr(), consistently usetarget_phys_addr_t to hold the physical address rather thanuint32_t.
target-arm: Implement long-descriptor PAR format
Implement the different format of the PAR when long descriptortranslation tables are in use. Note that we assume thatget_phys_addr() returns a long-descriptor format DFSR value onfailure if long descriptors are in use; this added subtlety tips...
target-arm: Implement TTBCR changes for LPAE
Implement the changes to the TTBCR register required for LPAE: * many fewer bits should be RAZ/WI * since TTBCR changes can result in a change of ASID, we must flush the TLB on writes to it
target-arm: Add support for long format translation table walks
Implement the actual table walk code for LPAE's long formattranslation tables.
target-arm: Fix TCG temp handling in 64 bit cp writes
Fix errors in the TCG temp handling in the 64 bit coprocessorwrite path: we were reusing a 32 bit temp after it had beenfreed by store_reg(), and failing to free a 64 bit temp.
This bug has no visible effect at this point because there...
hw/imx_avic.c: Avoid format error when target_phys_addr_t is 64 bits
Add a missing cast to avoid gcc complaining about format stringerrors when printing an expression based on a target_phys_addr_t.
ARM: Make target_phys_addr_t 64 bits and physaddrs 40 bits
Make target_phys_addr_t 64 bits for ARM targets, and setTARGET_PHYS_ADDR_SPACE_BITS to 40. This should have no effect for ARMboards where physical addresses really are 32 bits (except perhaps a...
target-arm: Fix typo that meant TTBR1 accesses went to TTBR0
Fix a copy-and-paste error in the register description for TTBR1that meant it was a duplicate of TTBR0 rather than affecting thecorrect bit of CPU state.
target-arm: Fix some copy-and-paste errors in cp register names
Fix a couple of cases where cp register names were copy-and-pasted.These are harmless since we don't use the name for anything (exceptdebugging convenience) but could be confusing.
target-arm: Fix CP15 based WFI
The coprocessor register rework broke cp15 based WFI instructions.We incorrectly fall through the normal register write case, whichincorrectly adds a forced block termination. We've already donea special version of this (DISAS_WFI), so return immediately....
qemu_find_file: check name as a straight path even if it has no '/'
Make qemu_find_file() check for the passed in name as a straightpathname even if it doesn't have any path separator character in it.This means that "-bios foo", "-dtb foo" etc will find a file 'foo'...
iov: Fix do_send_recv() for MinGW (also fixes a build breakage)
Commit 25e5e4c7 broke compilation for non POSIX hosts (e.g. MinGW)because it partially replaced "ret" by "count".
It also changed the handling of EINTR in a wrong way.
The patch restores the old code for these two changes....
s390: autodetect map private
By default qemu will use MAP_PRIVATE for guest pages. This will writeprotect pages and thus break on s390 systems that dont support this feature.Therefore qemu has a hack to always use MAP_SHARED for s390. But MAP_SHAREDhas other problems (no dirty pages tracking, a lot more swap overhead etc.)...
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.
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.
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...