summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-27win32: add generic RC rules to rules.makPaolo Bonzini2-2/+4
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-26virtio-rng-s390: add properties.KONRAD Frederic1-0/+8
I don't see any reason why these properties are missing. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Note: Need to apply virtio-rng-refactoring first! Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26Utilize selective runtime reg sync for hot code pathsJason J. Herne1-3/+12
Make use of new kvm_s390_get_registers_partial() for kvm_handle_css_inst() and handle_hypercall() since they only need registers from the partial set and they are called quite frequently. Signed-off-by: Jason J. Herne <jjherne@us.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26Allow selective runtime register synchronizationJason J. Herne2-0/+84
We want to avoid expensive register synchronization IOCTL's on the hot path so a new kvm_s390_get_registers_partial() is introduced as a compliment to kvm_arch_get_registers(). The new function is called on the hot path, and kvm_arch_get_registers() is called when we need the complete runtime register state. kvm_arch_put_registers() is updated to only sync the partial runtime set when we've only dirtied the partial runtime set. This is to avoid sending bad data back to KVM if we've only partially synced the runtime register set. Signed-off-by: Jason J. Herne <jjherne@us.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26Common: Add quick access to first boot deviceDominik Dingel2-0/+20
Instead of manually parsing the boot_list as character stream, we can access the nth boot device, specified by the position in the boot order. Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: CCW: Use new, working firmware by defaultAlexander Graf1-1/+1
Since we now have working firmware for s390-ccw in the tree, we can default to it on our s390-ccw machine, rendering it more useful. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: ccw firmware: Add compiled blobAlexander Graf2-0/+1
Now that we have all the source code ready, add a compiled blob into the QEMU source tree, so that people without access to an s390 compiler can run the s390-ccw firmware. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: Get queue config from host.Cornelia Huck2-3/+12
Ask the host about the configuration instead of guessing it. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: Rudimentary error checking.Cornelia Huck1-6/+15
Try to handle at least some of the errors that may happen. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: Enhance drain_irqs().Cornelia Huck1-2/+11
- Use tpi + tsch to get interrupts. - Return an error if the irb indicates problems. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: Detect devices with stsch.Cornelia Huck1-3/+6
stsch is the canonical way to detect devices. As a bonus, we can abort the loop if we get cc 3, and we need to check only the valid devices (dnv set). Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: Fix compile warning in s390 ccw virtio codeChristian Borntraeger1-1/+3
Lets fix this gcc warning: virtio.c: In function ‘vring_send_buf’: virtio.c:125:35: error: operation on ‘vr->next_idx’ may be undefined [-Werror=sequence-point] Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: Take care of the elf->img transitionChristian Borntraeger1-2/+2
We have to call strip with s390-ccw.elf as input and s390-ccw.img as output Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: build s390-ccw rom on s3900 system by defaultChristian Borntraeger1-1/+6
Lets build the s390-ccw rom if on s390. Also fix the separate build folder case. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26s390-ccw.img: replace while loop with a disabled wait on s390 biosChristian Borntraeger3-0/+20
dont waste cpu power on an error condition. Lets stop the guest with a disabled wait. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: ccw firmware: Add MakefileAlexander Graf2-0/+28
This patch adds a makefile, so we can build our ccw firmware. Also add the resulting binaries to .gitignore, so that nobody is annoyed they might be in the tree. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: ccw firmware: Add bootmap interpreterAlexander Graf1-0/+235
On s390, there is an architected boot map format that we can read to boot a certain entry off the disk. Implement a simple reader for this that always boots the first (default) entry. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: ccw firmware: Add glue headerAlexander Graf1-0/+131
Like all great programs, we have to call between different functions in different object files. And all of them need a common ground of defines. Provide a file that provides these defines. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: ccw firmware: Add virtio device driversAlexander Graf3-0/+754
In order to boot, we need to be able to access a virtio-blk device through the CCW bus. Implement support for this. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: ccw firmware: Add sclp outputAlexander Graf2-0/+188
In order to communicate with the user, we need an I/O mechanism that he can read. Implement SCLP ASCII support, which happens to be the default in the s390 ccw machine. This file is missing read support for now. It can only print messages. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: ccw firmware: Add main programAlexander Graf1-0/+56
This C file is the main driving piece of the s390 ccw firmware. It provides a search for a workable block device, sets it as the default to boot off of and boots from it. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: ccw firmware: Add start assemblyAlexander Graf1-0/+16
We want to write most of our code in C, so add a small assembly stub that jumps straight into C code for us to continue booting. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: IPL: Use different firmware for different machinesAlexander Graf4-6/+11
We have a virtio-s390 and a virtio-ccw machine in QEMU. Both use vastly different ways to do I/O. Having the same firmware blob for both doesn't really make any sense. Instead, let's parametrize the firmware file name, so that we can have different blobs for different machines. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: IPL: Support ELF firmwareAlexander Graf1-6/+10
Our firmware blob is always a raw file that we load at a fixed address today. Support loading an ELF blob instead that we can map high up in memory. This way we don't have to be so conscious about size constraints. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26S390: Make IPL reset address dynamicAlexander Graf1-11/+11
We can have different load addresses for different blobs we boot with. Make the reset IP dynamic, so that we can handle things more flexibly. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-04-26gtk: refactor menu creationAnthony Liguori1-37/+56
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-26Merge remote-tracking branch 'stefanha/block' into stagingAnthony Liguori5-71/+390
# By Liu Yuan (4) and others # Via Stefan Hajnoczi * stefanha/block: sheepdog: fix loadvm operation sheepdog: resend write requests when SD_RES_READONLY is received sheepdog: add helper function to reload inode sheepdog: add SD_RES_READONLY result code sheepdog: cleanup find_vdi_name rbd: Fix use after free in rbd_open() block: Disable driver-specific options for 1.5 sheepdog: implement .bdrv_co_is_allocated() sheepdog: use BDRV_SECTOR_SIZE sheepdog: add discard/trim support for sheepdog block/ssh: Require libssh2 >= 1.2.8. Message-id: 1366976682-10251-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-26Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori7-6/+12
# By Ed Maste (2) and others # Via Stefan Hajnoczi * stefanha/trivial-patches: bsd-user: Track change in FreeBSD SYSCTL(9) types virtio: Fix compilation without CONFIG_VHOST_SCSI qemu-doc: Option -ignore-environment removed. s390x: use CONFIG_INT128 to detect __uint128_t linux-user: fix compile error due to stray colon at end of #ifdef line Message-id: 1366975563-16216-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-26sheepdog: fix loadvm operationLiu Yuan1-1/+53
Currently the 'loadvm' opertaion works as following: 1. switch to the snapshot 2. mark current working VDI as a snapshot 3. rely on sd_create_branch to create a new working VDI based on the snapshot This works not the same as other format as QCOW2. For e.g, qemu > savevm # get a live snapshot snap1 qemu > savevm # snap2 qemu > loadvm 1 # This will steally create snap3 of the working VDI Which will result in following snapshot chain: base <-- snap1 <-- snap2 <-- snap3 ^ | working VDI snap3 was unnecessarily created and might be annoying users. This patch discard the unnecessary 'snap3' creation. and implement rollback(loadvm) operation to the specified snapshot by 1. switch to the snapshot 2. delete working VDI 3. rely on sd_create_branch to create a new working VDI based on the snapshot The snapshot chain for above example will be: base <-- snap1 <-- snap2 ^ | working VDI Cc: qemu-devel@nongnu.org Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Liu Yuan <tailai.ly@taobao.com> Reviewed-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26sheepdog: resend write requests when SD_RES_READONLY is receivedMORITA Kazutaka1-1/+59
When a snapshot is taken from out side of qemu (e.g. qemu-img snapshot), write requests to the current vdi return SD_RES_READONLY. In this case, the sheepdog block driver needs to update the current inode to the latest one and resend the write requests. Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26sheepdog: add helper function to reload inodeMORITA Kazutaka1-28/+39
This adds a helper function to update the current inode state with the specified vdi object. Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26sheepdog: add SD_RES_READONLY result codeMORITA Kazutaka1-0/+2
Sheepdog returns SD_RES_READONLY when qemu sends write requests to the snapshot vdi. This adds the result code and makes sd_strerror() print its error reason. Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26sheepdog: cleanup find_vdi_nameMORITA Kazutaka1-7/+8
This makes 'filename' and 'tag' constant variables, and renames 'for_snapshot' to 'lock' to clear how it works. Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26rbd: Fix use after free in rbd_open()Kevin Wolf1-3/+6
Commit a9ccedc3 frees the QemuOpts for the driver-specific options immediately, even though it still needs the filename string that is contained there. This doesn't work. Move the deletion of the QemuOpts to the end of the function where its content isn't needed any more. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26block: Disable driver-specific options for 1.5Kevin Wolf2-5/+115
We don't want to commit to the API yet before everything is worked out. Disable it for the 1.5 release. This commit is meant to be reverted after the 1.5 release. The disabling of the driver-specific options is achieved by applying the old checks while parsing the command line. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26sheepdog: implement .bdrv_co_is_allocated()Liu Yuan1-0/+37
Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Liu Yuan <tailai.ly@taobao.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26sheepdog: use BDRV_SECTOR_SIZELiu Yuan1-6/+5
Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Liu Yuan <tailai.ly@taobao.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26sheepdog: add discard/trim support for sheepdogLiu Yuan1-1/+63
The 'TRIM' command from VM that is to release underlying data storage for better thin-provision is already supported by the Sheepdog. This patch adds the TRIM support at QEMU part. For older Sheepdog that doesn't support it, we return 0(success) to upper layer. Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Liu Yuan <tailai.ly@taobao.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26block/ssh: Require libssh2 >= 1.2.8.Richard W.M. Jones1-20/+4
libssh2 >= 1.2.8 is required to enable this block device (because that version introduced the libssh2_session_handshake call). Change the test to use pkg-config exclusively. If the user requests --enable-libssh2 and the minimum version is not available, then the following error is displayed: $ ./configure --enable-libssh2 ERROR: libssh2 >= 1.2.8 required for --enable-libssh2 If --enable-libssh2 is not specified, then the feature is silently disabled if sufficiently new libssh2 is not available. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26bsd-user: Track change in FreeBSD SYSCTL(9) typesEd Maste1-0/+4
Originally from Garrett Cooper in FreeBSD PR ports/155558 http://www.freebsd.org/cgi/query-pr.cgi?pr=155558 Signed-off-by: Ed Maste <emaste@freebsd.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26virtio: Fix compilation without CONFIG_VHOST_SCSIEd Maste3-0/+6
Signed-off-by: Ed Maste <emaste@freebsd.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26qemu-doc: Option -ignore-environment removed.Thomas Schwinge1-3/+0
Has been removed in commit fc9c54124d134dbd76338a92a91804dab2df8166. Signed-off-by: Thomas Schwinge <thomas@codesourcery.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26s390x: use CONFIG_INT128 to detect __uint128_tGabriel Kerneis1-2/+1
Target s390x uses ad-hoc macro magic to guess if the compiler supports the GCC extension __uint128_t. This patch uses the the dedicated macro CONFIG_INT128 defined by configure instead. This fixes compilation with the CIL source code analyzer, which uses GCC as a preprocessor but does not support __uint128_t. Signed-off-by: Gabriel Kerneis <gabriel@kerneis.info> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26linux-user: fix compile error due to stray colon at end of #ifdef linePeter Maydell1-1/+1
Remove a stray colon from the end of a #ifdef line. Some versions of gcc complain about this: linux-user/syscall.c: In function ‘do_syscall’: linux-user/syscall.c:7606:28: error: extra tokens at end of #ifdef directive [-Werror] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-By: Riku Voipio <riku.voipio@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-26microblaze: Add internal base vectors regEdgar E. Iglesias3-4/+13
Configurable at CPU synthesis/instantiation. Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-26Makefile: Use QEMU_FLAGS for DTC compilationPeter Crosthwaite1-2/+2
Build DTC as QEMU is built. Fixes the issue with mingw build which can't handles DTC's default CFLAGS. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-26Makefile: Don't build shared libfdtPeter Crosthwaite1-1/+1
The submodule DTC should just build and use DTC as static (the whole motivation for using submod is lack of widespread distro support). The .so causes build failures on some platforms, so adjust the make target to just build the static lib. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-04-25Merge remote-tracking branch 'luiz/queue/qmp' into stagingAnthony Liguori3-0/+180
# By Amos Kong # Via Luiz Capitulino * luiz/queue/qmp: monitor: introduce query-command-line-options Message-id: 1366922656-32545-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-25qemu-char: Set foo_tag = 0 when returning FALSE from callbacksHans de Goede1-0/+2
While reviewing some patches I found this problem where tcp_chr_accept does not clear listen_tag when returning FALSE, leading to a double g_source_remove of the underlying source. Not really a problem unless the id gets re-used in between, but still something we should fix. While at it I've also reviewed all the other code in qemu-char.c for similar problems and found that pty_chr_timer has the same problem. Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1366890782-10311-1-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-25Remove unnecessary FreeBSD #includeEd Maste1-4/+0
sys/param.h was included to define __FreeBSD_version, but the conditional using it was removed by commit d05ef160453e98546a4197496dc8a3cb2defac53 (Brad Smith, "Allow clock_gettime() monotonic clock to be utilized on more OS's"), so the include is no longer needed here. Signed-off-by: Ed Maste <emaste@freebsd.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1366906631-2680-1-git-send-email-emaste@freebsd.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>