aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-03-05cc32rs512: add simulation of the built-in flash controllerHEADmasterHarald Welte1-5/+215
2012-03-05Initial support for the ChipCity CC32RS512 smart cardHarald Welte3-0/+529
The CC32RS512 is a Smart Card SoC, based on an SC100 ARM core, 18kByte RAM and 512kByte FLASH. It contains a number of integrated peripherals such as the ISO7816 Slave Controller, AES,DES, etc. This emulator is just emulating very basic behavior at this point.
2012-03-03w64: fix type casts when calling flush_icache_rangeStefan Weil1-4/+5
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-03cache-utils: Change data type of parameters for flush_icache_rangeStefan Weil1-1/+1
The TCG targets i386 and tci needed a change of the function prototype for w64. This change is currently not needed here, but it can be applied to avoid code differences. Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-03w64: Change data type of parameters for flush_icache_rangeStefan Weil6-6/+13
The TCG targets i386 and tci needed a change of the function prototype for w64. This change is currently not needed for the other TCG targets, but it can be applied to avoid code differences. Cc: Blue Swirl <blauwirbel@gmail.com> Cc: Andrzej Zaborowski <balrogg@gmail.com> Cc: Richard Henderson <rth@twiddle.net> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-03w64: Fix data type of parameters for flush_icache_rangeStefan Weil2-2/+4
flush_icache_range takes two address parameters which must be large enough to address any address of the host. For hosts with sizeof(unsigned long) == sizeof(void *), this patch changes nothing. All currently supported hosts fall into this category. For w64 hosts, sizeof(unsigned long) is 4 while sizeof(void *) is 8, so the use of tcg_target_ulong is needed for i386 and tci (the tcg targets which work with w64). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-03tcg: Rearrange definitions and include statementsStefan Weil1-3/+3
This change makes tcg_target_ulong available in tcg-target.h. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-03w64: Fix size of ram_addr_tStefan Weil1-3/+3
ram_addr_t must be large enough to address any address of the host. For hosts with sizeof(unsigned long) == sizeof(void *), this patch changes nothing. All currently supported hosts fall into this category. For w64 hosts, sizeof(unsigned long) is 4 while sizeof(void *) is 8, so the use of uintptr_t is needed. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-03Merge branch 'upstream' of git://qemu.weilnetz.de/qemuBlue Swirl35-132/+25
* 'upstream' of git://qemu.weilnetz.de/qemu: Move definition of HOST_LONG_BITS to qemu-common.h target-xtensa: Clean includes target-unicore32: Clean includes target-sh4: Clean includes target-s390x: Clean includes target-ppc: Clean includes target-mips: Clean includes target-microblaze: Clean includes target-m68k: Clean includes target-lm32: Clean includes target-i386: Clean includes target-cris: Clean includes target-arm: Clean includes target-alpha: Clean includes Remove macro HOST_LONG_SIZE
2012-03-03usb: Fix signature of stub usb_host_device_openJan Kiszka1-1/+1
This was a breakage of 3741715cf2. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-03Merge branch 'arm-devs.for-upstream' of ↵Blue Swirl9-35/+161
git://git.linaro.org/people/pmaydell/qemu-arm * 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm: hw/arm11mpcore: Fix broken realview_mpcore/arm11mpcore_priv properties arm: add device tree support arm: make sure that number of irqs can be represented in GICD_TYPER. arm: clean up GIC constants
2012-03-03Merge branch 'xtensa' of git://jcmvbkbc.spb.ru/dumb/qemu-xtensaBlue Swirl13-15/+674
* 'xtensa' of git://jcmvbkbc.spb.ru/dumb/qemu-xtensa: target-xtensa: add breakpoint tests target-xtensa: add DEBUG_SECTION to overlay tool target-xtensa: add DBREAK data breakpoints exec: let cpu_watchpoint_insert accept larger watchpoints exec: fix check_watchpoint exiting cpu_loop exec: add missing breaks to the watch_mem_write target-xtensa: add ICOUNT SR and debug exception target-xtensa: implement instruction breakpoints target-xtensa: add DEBUGCAUSE SR and configuration target-xtensa: fetch 3rd opcode byte only when needed target-xtensa: implement info tlb monitor command target-xtensa: define TLB_TEMPLATE for MMU-less cores
2012-03-02hw/arm11mpcore: Fix broken realview_mpcore/arm11mpcore_priv propertiesPeter Maydell1-10/+10
Fix confusion in the Property arrays for the "arm11mpcore_priv" (per-CPU devices for the ARM11MPcore CPU) and "realview_mpcore" (realview-eb board specific device encapsulating CPU and some extra interrupt controllers) -- the num-irq property was defined on the wrong device and the mpcore_rirq_properties were defined as offsets in the wrong structure. The effect was that the realview-eb-mpcore machine would abort on startup trying to allocate an insane amount of memory. (This bug was introduced in the QOM conversion in commit 999e12bb.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-02arm: add device tree supportGrant Likely7-6/+120
If compiled with CONFIG_FDT, allow user to specify a device tree file using the -dtb argument. If the machine supports it then the dtb will be loaded into memory and passed to the kernel on boot. Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> [Peter Maydell: Use machine opt rather than global to pass dtb filename] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-02arm: make sure that number of irqs can be represented in GICD_TYPER.Rusty Russell1-0/+9
We currently assume that the number of interrupts (ITLinesNumber in the architecture reference manual) is divisible by 32, since we present it to the guest when it reads GICD_TYPER (in gic_dist_readb()) as (N / 32) - 1. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-02arm: clean up GIC constantsRusty Russell1-19/+22
Interrupts numbers 0-31 are private to the processor interface, 32-1019 are general interrupts. Add GIC_INTERNAL and substitute everywhere. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> [Peter Maydell: converted some tabs to spaces] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-01Merge remote-tracking branch 'qemu-kvm/memory/urgent' into stagingAnthony Liguori1-3/+12
* qemu-kvm/memory/urgent: kvm: fix unaligned slots
2012-03-01Merge remote-tracking branch 'qemu-kvm/memory/core' into stagingAnthony Liguori9-514/+912
* qemu-kvm/memory/core: (30 commits) memory: allow phys_map tree paths to terminate early memory: unify PhysPageEntry::node and ::leaf memory: change phys_page_set() to set multiple pages memory: switch phys_page_set() to a recursive implementation memory: replace phys_page_find_alloc() with phys_page_set() memory: simplify multipage/subpage registration memory: give phys_page_find() its own tree search loop memory: make phys_page_find() return a MemoryRegionSection memory: move tlb flush to MemoryListener commit callback memory: unify the two branches of cpu_register_physical_memory_log() memory: fix RAM subpages in newly initialized pages memory: compress phys_map node pointers to 16 bits memory: store MemoryRegionSection pointers in phys_map memory: unify phys_map last level with intermediate levels memory: remove first level of l1_phys_map memory: change memory registration to rebuild the memory map on each change memory: support stateless memory listeners memory: split memory listener for the two address spaces xen: ignore I/O memory regions memory: allow MemoryListeners to observe a specific address space ...
2012-03-01Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori20-30/+1468
* qemu-kvm/uq/master: pc-bios: update kvmvapic.bin kvmvapic: Use optionrom helpers optionsrom: Reserve space for checksum kvmvapic: Simplify mp/up_set_tpr kvmvapic: Introduce TPR access optimization for Windows guests kvmvapic: Add option ROM target-i386: Add infrastructure for reporting TPR MMIO accesses Allow to use pause_all_vcpus from VCPU context Process pending work while waiting for initial kick-off in TCG mode Remove useless casts from cpu iterators kvm: Set cpu_single_env only once kvm: Synchronize cpu state in kvm_arch_stop_on_emulation_error()
2012-03-01kvm: fix unaligned slotsAvi Kivity1-3/+12
kvm_set_phys_mem() may be passed sections that are not aligned to a page boundary. The current code simply brute-forces the alignment which leads to an inconsistency and an abort(). Fix by aligning the start and the end of the section correctly, discarding and unaligned head or tail. This was triggered by a guest sizing a 64-bit BAR that is smaller than a page with PCI_COMMAND_MEMORY enabled and the upper dword clear. Signed-off-by: Avi Kivity <avi@redhat.com>
2012-03-01pc-bios: update kvmvapic.binAvi Kivity1-0/+0
Signed-off-by: Avi Kivity <avi@redhat.com>
2012-02-29Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori24-107/+868
* kwolf/for-anthony: (27 commits) qemu-img: fix segment fault when the image format is qed qemu-io: fix segment fault when the image format is qed qemu-tool: revert cpu_get_clock() abort(3) qemu-iotests: Test rebase with short backing file qemu-iotests: 026: Reduce output changes for cache=none qcow2 qemu-iotests: Filter out DOS line endings test: add image streaming tests qemu-iotests: add iotests Python module qemu-iotests: export TEST_DIR for non-bash tests QMP: Add qmp command for blockdev-group-snapshot-sync qapi: Introduce blockdev-group-snapshot-sync command qcow2: Reject too large header extensions qcow2: Fix offset in qcow2_read_extensions block: drop aio_multiwrite in BlockDriver block: remove unused fields in BlockDriverState qcow2: Fix build with DEBUG_EXT enabled ide: fail I/O to empty disk fdc: DIR (Digital Input Register) should return status of current drive... fdc: fix seek command, which shouldn't check tracks fdc: check if media rate is correct before doing any transfer ...
2012-02-29Merge remote-tracking branch 'spice/spice.v49' into stagingAnthony Liguori8-194/+353
* spice/spice.v49: qxl: properly handle upright and non-shared surfaces Error out when tls-channel option is used without TLS spice: use error_report to report errors qxl: add optinal 64bit vram bar qxl: make qxl_render_update async qxl: introduce QXLCookie qxl: remove flipped qxl: require spice >= 0.8.2 qxl: drop qxl_spice_update_area_async definition sdl: remove NULL check, g_malloc0 can't fail qxl: fix spice+sdl no cursor regression
2012-02-29Merge remote-tracking branch 'kraxel/usb.39' into stagingAnthony Liguori20-245/+317
* kraxel/usb.39: (21 commits) usb: Resolve warnings about unassigned bus on usb device creation usb-redir: Return USB_RET_NAK when we've no data for an interrupt endpoint usb-redir: Limit return values returned by iso packets usb-redir: Let the usb-host know about our device filtering usb-redir: Always clear device state on filter reject usb-redir: Fix printing of device version ehci: drop old stuff usb-ehci: Handle ISO packets failing with an error other then NAK libcacard: fix reported ATR length usb-ccid: advertise SELF_POWERED libcacard: link with glib for g_strndup usb-desc: fix user trigerrable segfaults (!config) usb-ehci: sanity-check iso xfers usb: add tracepoint for usb packet state changes. usb-xhci: enable packet queuing usb-uhci: implement packet queuing usb-uhci: process uhci_handle_td return code via switch. usb-uhci: add UHCIQueue usb-uhci: cleanup UHCIAsync allocation & initialization. usb-ehci: fix reset ...
2012-02-29qemu-img: fix segment fault when the image format is qedZhi Yong Wu1-0/+2
[root@f15 qemu]# qemu-img info /home/zwu/work/misc/rh6.img image: /home/zwu/work/misc/rh6.img file format: qed virtual size: 4.0G (4294967296 bytes) disk size: 1.2G cluster_size: 65536 Segmentation fault (core dumped) Today when i were fixing another issue, i found this issue; After simple investigation, i found that the required clock vm_clock is not created for qemu tool. Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29qemu-io: fix segment fault when the image format is qedZhi Yong Wu1-0/+2
[root@f15 qemu]# qemu-io -c info /home/zwu/work/misc/rh6.img format name: qed cluster size: 64 KiB vm state offset: 0.000000 bytes Segmentation fault (core dumped) This reason is same as the former patch Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29qemu-tool: revert cpu_get_clock() abort(3)Stefan Hajnoczi1-1/+1
Despite the fact that the qemu-tool environment has no guest running and vm_clock therefore does not make sense, there is code that gets the vm_clock time even in qemu-tool. Therefore, revert the abort(3) call and just return 0 like we used to. This unbreaks qemu-img/qemu-io with QED and Kevin has also expressed interest in this for qcow2. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29qemu-iotests: Test rebase with short backing fileKevin Wolf2-0/+6
This tests that qemu-img rebase doesn't assume that the backing file has the same size as the image, but considers that it can be smaller. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-02-29qemu-iotests: 026: Reduce output changes for cache=none qcow2Kevin Wolf2-2/+8
qemu-iotests supports the -nocache option which makes the tests run with cache=none. For blkdebug tests with qcow2 this means that we may see test results that differ from cache=writethrough. This patch makes the diff a bit smaller and therefore easier to review. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-02-29qemu-iotests: Filter out DOS line endingsKevin Wolf1-1/+7
This one makes it possible to run qemu-iotests on a Windows build using Wine and get somewhat meaningful results. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-02-29test: add image streaming testsStefan Hajnoczi3-0/+157
This patch adds a test suite for the image streaming feature. It exercises the 'block_stream', 'block_job_cancel', 'block_job_set_speed', and 'query-block-jobs' QMP commands. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29qemu-iotests: add iotests Python moduleStefan Hajnoczi1-0/+164
Block layer tests that involve QMP commands rather than qemu-img or qemu-io are not well-suited for shell scripting. This patch adds a Python module which allows tests to be written in Python instead. The basic API is: VM - class for launching and interacting with a VM QMPTestCase - abstract base class for tests that use QMP qemu_img() - wrapper function for invoking qemu-img qemu_io() - wrapper function for invoking qemu-io imgfmt - the image format under test (e.g. qcow2, qed) test_dir - scratch directory path for temporary files main() - entry point for running tests Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29qemu-iotests: export TEST_DIR for non-bash testsStefan Hajnoczi1-0/+2
Since qemu-iotests may need to create large image files it is possible to specify the test directory. The TEST_DIR variable needs to be exported so non-bash tests can make use of it. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29QMP: Add qmp command for blockdev-group-snapshot-syncJeff Cody1-0/+39
This adds the QMP command for blockdev-group-snapshot-sync. It takes an array in as the input, for the argument devlist. The array consists of the following elements: + device: device to snapshot. e.g. "ide-hd0", "virtio0" + snapshot-file: path & file for the snapshot image. e.g. "/tmp/file.img" + format: snapshot format. e.g., "qcow2". Optional There is no HMP equivalent for the command. Signed-off-by: Jeff Cody <jcody@redhat.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29qapi: Introduce blockdev-group-snapshot-sync commandJeff Cody5-0/+257
This is a QAPI/QMP only command to take a snapshot of a group of devices. This is similar to the blockdev-snapshot-sync command, except blockdev-group-snapshot-sync accepts a list devices, filenames, and formats. It is attempted to keep the snapshot of the group atomic; if the creation or open of any of the new snapshots fails, then all of the new snapshots are abandoned, and the name of the snapshot image that failed is returned. The failure case should not interrupt any operations. Rather than use bdrv_close() along with a subsequent bdrv_open() to perform the pivot, the original image is never closed and the new image is placed 'in front' of the original image via manipulation of the BlockDriverState fields. Thus, once the new snapshot image has been successfully created, there are no more failure points before pivoting to the new snapshot. This allows the group of disks to remain consistent with each other, even across snapshot failures. Signed-off-by: Jeff Cody <jcody@redhat.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29qcow2: Reject too large header extensionsKevin Wolf1-0/+5
Image files that make qemu-img info read several gigabytes into the unknown header extensions list are bad. Just fail opening the image if an extension claims to be larger than the header extension area. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-02-29qcow2: Fix offset in qcow2_read_extensionsKevin Wolf1-3/+2
The spec says that the length of extensions is padded to 8 bytes, not the offset. Currently this is the same because the header size is a multiple of 8, so this is only about compatibility with future changes to the header size. While touching it, move the calculation to a common place instead of duplicating it for each header extension type. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-02-29block: drop aio_multiwrite in BlockDriverPaolo Bonzini2-26/+3
These were never used. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29block: remove unused fields in BlockDriverStatePaolo Bonzini1-5/+0
sync_aiocb is unused since commit ce1a14d (Dynamically allocate AIO Completion Blocks., 2006-08-07). private is unused since commit 56a1493 (drive cleanup fixes., 2009-09-25). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29qcow2: Fix build with DEBUG_EXT enabledKevin Wolf1-1/+0
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29ide: fail I/O to empty diskPaolo Bonzini1-4/+20
Requesting a read or a write operation on an empty disk can lead to QEMU dumping core. Also fix a few braces here and there. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29fdc: DIR (Digital Input Register) should return status of current drive...Hervé Poussineau1-7/+3
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29fdc: fix seek command, which shouldn't check tracksHervé Poussineau1-3/+6
The seek command just sends step pulses to the drive and doesn't care if there is a medium inserted of if it is banging the head against the drive. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29fdc: check if media rate is correct before doing any transferHervé Poussineau1-3/+50
The programmed rate has to be the same as the required rate for the floppy format ; if that's not the case, the transfer should abort. This check can be disabled by using the 'check_media_rate' property. Save media rate value only if media rate check is enabled. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29fdc: add a 'check media rate' property. Not used yetHervé Poussineau2-0/+31
Set it to true for current Qemu versions, and false for previous ones Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29block: add a transfer rate for floppy typesHervé Poussineau4-38/+52
Floppies must be read at a specific transfer rate, depending of its own format. Update floppy description table to include required transfer rate. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29fdc: add CCR (Configuration Control Register) write registerHervé Poussineau1-0/+22
DIR and CCR registers share the same address ; DIR is read-only while CCR is write-only CCR register is used to change media transfer rate, which will be checked in following changes. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29fdc: handle read-only floppies (abort early on write commands)Hervé Poussineau1-0/+11
A real floppy doesn't attempt to write to read-only media either. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29fdc: most control commands do not generate interruptsHervé Poussineau1-6/+6
In fact, only three control commands generate an interrupt: read_id, recalibrate and seek Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-02-29fdc: set busy bit when starting a commandHervé Poussineau1-1/+1
This bit must be active while a command is currently executed. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Kevin Wolf <kwolf@redhat.com>