summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-08-117-30/+30
|\ | | | | | | | | | | | | * stefanha/trivial-patches: target-arm: Fix typos in comments arm: translate: comment typo - s/middel/middle/ vl.c: Exit QEMU early if no machine is found
| * target-arm: Fix typos in commentsPeter Maydell2012-08-106-24/+24
| | | | | | | | | | | | | | | | Fix a variety of typos in comments in target-arm files. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * arm: translate: comment typo - s/middel/middle/Peter A. G. Crosthwaite2012-08-101-1/+1
| | | | | | | | | | | | | | Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * vl.c: Exit QEMU early if no machine is foundDunrong Huang2012-08-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We check whether the variable machine is NULL or not before accessing it. If machine is NULL, exit QEMU with an error, this can avoids a segfault error. Markus Armbruster <armbru@redhat.com> adds that the segfault can be reproduced as follows: $ qemu-system-xtensa -cpu help Signed-off-by: Dunrong Huang <riegamaths@gmail.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2012-08-1115-45/+155
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kwolf/for-anthony: qemu-iotests: skip 039 with ./check -nocache block: add BLOCK_O_CHECK for qemu-img check qcow2: mark image clean after repair succeeds qed: mark image clean after repair succeeds blockdev: flip default cache mode from writethrough to writeback virtio-blk: disable write cache if not negotiated virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE qemu-iotests: Save some sed processes ahci: Fix sglist memleak in ahci_dma_rw_buf() ahci: Fix ahci cdrom read corruptions for reads > 128k virtio-blk: fix use-after-free while handling scsi commands
| * | qemu-iotests: skip 039 with ./check -nocacheStefan Hajnoczi2012-08-102-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | When the qemu-io --nocache option is used the 039 test case cannot abort QEMU at a point where the image is dirty. Skip the test case. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | block: add BLOCK_O_CHECK for qemu-img checkStefan Hajnoczi2012-08-105-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Image formats with a dirty bit, like qed and qcow2, repair dirty image files upon open with BDRV_O_RDWR. Performing automatic repair when qemu-img check runs is not ideal because the bdrv_open() call repairs the image before the actual bdrv_check() call from qemu-img.c. Fix this "double repair" since it leads to confusing output from qemu-img check. Tell the block driver that this image is being opened just for bdrv_check(). This skips automatic repair and qemu-img.c can invoke it manually with bdrv_check(). Update the golden output for qemu-iotests 039 to reflect the new qemu-img check output. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qcow2: mark image clean after repair succeedsStefan Hajnoczi2012-08-101-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dirty bit is cleared after image repair succeeds in qcow2_open(). Move this into qcow2_check() so that all callers benefit from this behavior when fix mode is enabled. This is necessary so qemu-img check can call .bdrv_check() and mark the image clean. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qed: mark image clean after repair succeedsStefan Hajnoczi2012-08-103-8/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dirty bit is cleared after image repair succeeds in qed_open(). Move this into qed_check() so that all callers benefit from this behavior when fix=true. This is necessary so qemu-img check can call .bdrv_check() and mark the image clean. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | blockdev: flip default cache mode from writethrough to writebackPaolo Bonzini2012-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now all major device models (IDE, SCSI, virtio) can choose between writethrough and writeback at run-time, and virtio will even revert to writethrough if the guest is not capable of sending flushes. So we can change the default to writeback at last. Tested, for lack of a better idea, with a breakpoint on bdrv_open and all cache choices one by one. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | virtio-blk: disable write cache if not negotiatedPaolo Bonzini2012-08-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the guest does not support flushes, we should run in writethrough mode. The setting is temporary until the next reset, so that for example the BIOS will run in writethrough mode while Linux will run with a writeback cache. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | virtio-blk: support VIRTIO_BLK_F_CONFIG_WCEPaolo Bonzini2012-08-102-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with the spec. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qemu-iotests: Save some sed processesKevin Wolf2012-08-101-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of building a huge pipeline, just pass all expressions to a single sed process. Suggested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
| * | ahci: Fix sglist memleak in ahci_dma_rw_buf()Jason Baron2012-08-102-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed that in hw/ide/ahci:ahci_dma_rw_buf() we do not free the sglist. Thus, I've added a call to qemu_sglist_destroy() to fix this memory leak. In addition, I've adeed a call in qemu_sglist_destroy() to 0 all of the sglist fields, in case there is some other codepath that tries to free the sglist. Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | ahci: Fix ahci cdrom read corruptions for reads > 128kJason Baron2012-08-102-7/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While testing q35, which has its cdrom attached to the ahci controller, I found that the Fedora 17 install would panic on boot. The panic occurs while squashfs is trying to read from the cdrom. The errors are: [ 8.622711] SQUASHFS error: xz_dec_run error, data probably corrupt [ 8.625180] SQUASHFS error: squashfs_read_data failed to read block 0x20be48a I was also able to produce corrupt data reads using an installed piix based qemu machine, using 'dd'. I found that the corruptions were only occuring when then read size was greater than 128k. For example, the following command results in corrupted reads: dd if=/dev/sr0 of=/tmp/blah bs=256k iflag=direct The > 128k size reads exercise a different code path than 128k and below. In ide_atapi_cmd_read_dma_cb() s->io_buffer_size is capped at 128k. Thus, ide_atapi_cmd_read_dma_cb() is called a second time when the read is > 128k. However, ahci_dma_rw_buf() restart the read from offset 0, instead of at 128k. Thus, resulting in a corrupted read. To fix this, I've introduced 'io_buffer_offset' field in IDEState to keep track of the offset. I've also modified ahci_populate_sglist() to take a new 3rd offset argument, so that the sglist is property initialized. I've tested this patch using 'dd' testing, and Fedora 17 now correctly boots and installs on q35 with the cdrom ahci controller. Signed-off-by: Jason Baron <jbaron@redhat.com> Tested-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | virtio-blk: fix use-after-free while handling scsi commandsAvi Kivity2012-08-101-0/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | The scsi passthrough handler falls through after completing a request into the failure path, resulting in a use after free. Reproducible by running a guest with aio=native on a block device. Reported-by: Stefan Priebe <s.priebe@profihost.ag> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori2012-08-118-42/+163
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/scsi-next: scsi-disk: add support for the UNMAP command scsi-disk: improve out-of-range LBA detection for WRITE SAME scsi-disk: more assertions and resets for aiocb virtio-scsi: do not compare 32-bit QEMU tags against 64-bit virtio-scsi tags iscsi: Pick default initiator-name based on the name of the VM iscsi: reorganize code for parse_initiator_name iscsi: do not leak initiator_name
| * | scsi-disk: add support for the UNMAP commandPaolo Bonzini2012-08-091-1/+92
| | | | | | | | | | | | | | | | | | | | | | | | The unmap command can reuse the same infrastructure as MODE SELECT for reading the descriptor list into memory. The descriptors are processed sequentially. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi-disk: improve out-of-range LBA detection for WRITE SAMEPaolo Bonzini2012-08-091-1/+2
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi-disk: more assertions and resets for aiocbPaolo Bonzini2012-08-091-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Leaving the aiocb to a non-NULL value leads to an assertion failure when rerror/werror are set to stop or enospc, and the operation is retried. scsi-disk checks that the aiocb member is NULL before filling it. This patch correctly resets the aiocb to NULL values everywhere, and adds the dual assertion that the aiocb was non-NULL before calling bdrv_acct_done. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | virtio-scsi: do not compare 32-bit QEMU tags against 64-bit virtio-scsi tagsPaolo Bonzini2012-08-091-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a problem in handling task management functions in virtio-scsi. The cause of the problem is a mismatch between the size of the tag in QEMU (32-bit) and virtio-scsi (64-bit). Changing the QEMU size is hard because the migration format uses 32 bits to store the tag; so just don't use the QEMU tag (virtio-scsi only uses the tag for task management functions anyway) and look up the full 64-bit tag in the hba_private field. The reproducer is a bit obscure. If you cause an I/O timeout (for example with rerror=stop and doing 'cont' on the monitor continuously without fixing the error), sooner or later the guest will try to abort the command and reissue it. At this point, QEMU will report _two_ errors instead of one when you hit 'c', because the first error has not been canceled correctly. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | iscsi: Pick default initiator-name based on the name of the VMRonnie Sahlberg2012-08-096-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch updates the iscsi layer to automatically pick a 'unique' initiator-name based on the name of the vm in case the user has not set an explicit iqn-name to use. Create a new function qemu_get_vm_name() that returns the name of the VM, if specified. This way we can thus create default names to use as the initiator name based on the guest session. If the VM is not named via the '-name' command line argument, the iscsi initiator-name used wiull simply be iqn.2008-11.org.linux-kvm If a name for the VM was specified with the '-name' option, iscsi will use a default initiatorname of iqn.2008-11.org.linux-kvm:<name> These names are just the default iscsi initiator name that qemu will generate/use only when the user has not set an explicit initiator name via the commandlines or config files. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
| * | iscsi: reorganize code for parse_initiator_namePaolo Bonzini2012-08-081-12/+9
| | | | | | | | | | | | | | | | | | | | | Merge the occurrences of the "iqn.2008-11.org.linux-kvm" string to avoid duplication. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | iscsi: do not leak initiator_namePaolo Bonzini2012-08-081-17/+16
| | | | | | | | | | | | | | | | | | | | | The argument of iscsi_create_context is never freed by libiscsi, which in fact calls strdup on it. Avoid a leak. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | | configure: fix double check tests with ClangBlue Swirl2012-08-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Configuring with Clang compiler with -Werror would not work after improved checks: /tmp/qemu-conf--25992-.c:4:32: error: self-comparison always evaluates to true [-Werror,-Wtautological-compare] int main(void) { return preadv == preadv; } /tmp/qemu-conf--25992-.c:13:26: error: self-comparison always evaluates to true [-Werror,-Wtautological-compare] return epoll_create1 == epoll_create1; /tmp/qemu-conf--25992-.c:3:13: error: explicitly assigning a variable of type 'char **' to itself [-Werror,-Wself-assign] environ = environ; Avoid the errors by adjusting the tests. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | configure: Check for -Werror causing failures when compiling testsPeter Maydell2012-08-111-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for checking whether test case code can compile without warnings, by recompiling each successful test with -Werror. If the -Werror version doesn't pass, we bail out. This gives us the same level of visibility of warnings in test code as --enable-werror provides for the main compile. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | exec.c: fix dirty bitmap reallocationIgor Mitsyanko2012-08-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For each newly created RAM block, dirty bitmap is reallocated with g_realloc, which doesn't make any promises on initial content of new extra data in returned buffer. In theory, we initialize this new data with cpu_physical_memory_set_dirty_range() call. The problem is, cpu_physical_memory_set_dirty_range() has a side effect of incrementing ram_list.dirty_pages variable, but only for pages which are not already dirty. And page "cleanliness" is determined using the same not yet uninitialized dirty bitmap we've just reallocated. This results in inconsistency between real dirty page number and value in ram_list.dirty_pages variable, which in turn could (and will) result in errors during VM migration. Zero initialize new dirty bitmap bytes to fix this problem. Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | Makefile: add qapi.py dependenciesStefan Hajnoczi2012-08-111-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 427a1a2cb1d35b83b6302886f46289f6d617134d ("qapi: avoid reserved keywords") modifies qapi.py, which is used by qapi-types.py and other Python scripts. Because Makefile has no dependencies for qapi.py the qapi code generator will not be rerun and the following build error is produced: net/slirp.c: In function ‘net_init_slirp’: net/slirp.c:721:50: error: ‘NetdevUserOptions’ has no member named ‘q_restrict’ Fix this issue by adding the missing qapi.py dependencies. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Add a minimal curses screen supportGuan Xuetao2012-08-111-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a minimal curses screen support for unicore32-softmmu. We assume 80*30 screen size to minimize the implementation. Two problems are not solved, but they are innocuous. 1. curses windows will be blank when switching to monitor screen and back 2. backspace is not handled yet v1->v2: add extra handler for '\r' Signed-off-by: Zhang Mengchi <zhangmengchi@mprc.pku.edu.cn> Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32: Close dump-option of cpu_dump_state_ucf64 functionGuan Xuetao2012-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | Since of tedious output, we close dump-option of cpu_dump_state_ucf64 function. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32: Disintegrate cpu_dump_state_ucf64 functionGuan Xuetao2012-08-111-16/+25
| | | | | | | | | | | | | | | | | | | | | This patch disintegrates cpu_dump_state_ucf64 function from cpu_dump_state. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32: Split UniCore-F64 instruction helpers from helper.cGuan Xuetao2012-08-113-330/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch just splits ucf64 instruction simulation helpers from helper.c. Also, two checkpatch warnings are solved. v1->v2: adjust copyright information for new ucf64_helper.c Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Add is_default setting for puv3 machineGuan Xuetao2012-08-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch sets is_default to 1 for puv3 machine, so that find_default_machine() returns puv3 machine. Thanks Dunrong for pointing it out. Cc: Dunrong Huang <riegamaths@gmail.com> Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Add maintainer information for UniCore32 machineGuan Xuetao2012-08-111-0/+8
| | | | | | | | | | | | | | | Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Add ps2 supportGuan Xuetao2012-08-112-0/+6
| | | | | | | | | | | | | | | | | | | | | This patch adds ps2/keyboard support, and enables CONFIG_PCKBD. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Add puv3 dma supportGuan Xuetao2012-08-113-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds puv3 dma (Direct Memory Access) support, include dma device simulation for kernel booting. v1->v2: Add initialization to ret in puv3_dma_read. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Add puv3 pm supportGuan Xuetao2012-08-113-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds puv3 pm (power management) support, include pm device simulation for kernel booting. Thank Blue Swirl for pointing out the missing "break". v1->v2: Add initialization to ret in puv3_pm_read. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Add puv3 gpio supportGuan Xuetao2012-08-113-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds puv3 gpio (General Purpose Input/Output) support, include gpio device simulation and its interrupt support. v1->v2: Add initialization to ret in puv3_gpio_read. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Add puv3 ostimer supportGuan Xuetao2012-08-114-0/+156
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds puv3 ostimer support, include os timer device simulation and ptimer support in puv3 machine. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Add puv3 interrupt supportGuan Xuetao2012-08-113-1/+160
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds puv3 interrupt support, include interrupt controler device simulation and interrupt handler in puv3 machine. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Add puv3 soc/board supportGuan Xuetao2012-08-114-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | This patch only add puv3 soc/board support, which introduces puv3 machine description, and specifies console type. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Make sure that kernel can access user spaceGuan Xuetao2012-08-111-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | As a matter of course, we need to access user space in kernel code, so we need to correct load/store decoders to indicate correct memory region. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Implement softmmu specific functionsGuan Xuetao2012-08-112-5/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements softmmu specific functions, include tlb_fill, switch_mode, do_interrupt and uc32_cpu_handle_mmu_fault. So the full exception handlers and page table walking could work now. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | target-unicore32: Drop UC32_CPUID macrosAndreas Färber2012-08-111-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Any code that depends on a particular CPU type can now go through callbacks on the QOM UniCore32CPUClass. Signed-off-by: Andreas Färber <afaerber@suse.de Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Make UniCore32 cpuid & exceptions correct and runableGuan Xuetao2012-08-114-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch initializes the cpuid to exactly correct value because linux kernel will check it. In addition, the exception types are specified in proper situations. Then it could make exceptions generated correctly and timely. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Add coprocessor 0(sysctrl) and 1(ocd) instruction supportGuan Xuetao2012-08-113-49/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coprocessor 0 is system control coprocessor, and we need get/set its contents. Also, all cache/tlb ops shoule be implemented here, but just ignored with no harm. Coprocessor 1 is OCD (on-chip-debugger), which is used for faked console, so we could output chars to this console without graphic card. TODO: curses display should be added lator for screen output. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | unicore32-softmmu: Add unicore32-softmmu build supportGuan Xuetao2012-08-1110-15/+106
| |/ |/| | | | | | | | | | | | | | | | | | | This patch adds unicore32-softmmu build support, include configure, makefile, arch_init, and all missing functions needed by softmmu. Although all missing functions are empty, unicore32-softmmu could be build successfully. By 20120804: change QEMU_ARCH_UNICORE32 to 0x4000 Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | handle device help before accelerator set upBruce Rogers2012-08-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A command line device probe using just -device "?" gets processed after qemu-kvm initializes the accelerator. If /dev/kvm is not present, the accelerator check will fail (kvm is defaulted to on), which causes libvirt to not be set up to handle qemu guests. Moving the device help handling before the accelerator set up allows the device probe to work in this configuration and libvirt succeeds in setting up for a qemu hypervisor mode. Signed-off-by: Bruce Rogers <brogers@suse.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | Merge branch 'x86cpu_qom_tcg_v2' of git://github.com/imammedo/qemuBlue Swirl2012-08-096-27/+15
|\ \ | | | | | | | | | | | | | | | | | | | | | * 'x86cpu_qom_tcg_v2' of git://github.com/imammedo/qemu: target-i386: move tcg initialization into x86_cpu_initfn() cleanup cpu_set_debug_excp_handler target-xtensa: drop usage of prev_debug_excp_handler target-i386: drop usage of prev_debug_excp_handler
| * | target-i386: move tcg initialization into x86_cpu_initfn()Igor Mammedov2012-06-253-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | In order to make cpu object not depended on external ad-hoc initialization routines, move tcg initialization from cpu_x86_init inside cpu object "x86_cpu_initfn()". Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
OpenPOWER on IntegriCloud