summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-08-15prep: Use pc87312 device instead of collection of random ISA devicesHervé Poussineau4-32/+12
We can't however replace the built-in IDE controller, as the one in pc87312 is only single-channel and can use only IRQ 14. Therefore the pc87312's IDE function gets disabled via the config property. PReP emulation also gains a parallel port emulation this way. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> [AF: Use TYPE_PC87312 constant, add to ppc64-softmmu and to MAINTAINERS] Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2012-08-15prep: Add pc87312 Super I/O emulationHervé Poussineau4-0/+461
This provides floppy and IDE controllers as well as serial and parallel ports. However, dynamic configuration of devices is not yet supported. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> [AF: QOM'ify, split out header, create CharDriverState if absent] Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2012-08-15prep: Include devices for ppc64 as wellAndreas Färber1-0/+3
Allows running qemu-system-ppc64 -M prep for consistency. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Acked-by: Hervé Poussineau <hpoussineau@reactos.org>
2012-08-15win32: provide separate macros for weak decls and definitionsAnthony Liguori5-5/+21
mingw32 seems to want the declaration to also carry the weak attribute. Strangely, gcc on Linux absolutely does not want the declaration to be marked as weak. This may not be the right fix, but it seems to do the trick. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-15Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori10-13/+20
* stefanha/trivial-patches: ivshmem, qdev-monitor: fix order of qerror parameters iov_send_recv(): Handle zero bytes case even if OS does not framebuffer: Fix spelling in comment (leight -> height) Spelling fix in comment (peripherans -> peripherals) docs: Fix spelling (propery -> property) trace: Fix "Qemu" -> "QEMU" cputlb.c: Fix out of date comment ehci: fix assertion typo Makefile: Avoid explicit list of directories in clean target
2012-08-15Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori22-96/+776
* kwolf/for-anthony: qemu-iotests: Fix 030 after switch to GenericError block: Flush parent to OS with cache=unsafe iscsi: Fix NULL dereferences / races between task completion and abort monitor: Clean up fd sets on monitor disconnect block: Enable qemu_open/close to work with fd sets block: Convert close calls to qemu_close block: Convert open calls to qemu_open block: Prevent detection of /dev/fdset/ as floppy qapi: Introduce add-fd, remove-fd, query-fdsets qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsg
2012-08-15Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori3-19/+42
* qemu-kvm/uq/master: update-linux-headers.sh: Pull in asm-generic/kvm_para.h kvmvapic: Disable if there is insufficient memory kvm: i8254: Finish time conversion fix kvm: i8254: Cache kernel clock offset in KVMPITState
2012-08-15Merge remote-tracking branch 'stefanha/tracing' into stagingAnthony Liguori3-24/+14
* stefanha/tracing: trace/simple: Replace asprintf by g_strdup_printf trace/simple: Fix compiler warning for 32 bit hosts trace: avoid pointer aliasing in trace_record_finish() trace: drop unused TraceBufferRecord->next_tbuf_idx field trace: remove unnecessary write_to_buffer() typecasting trace: rename TraceRecordHeader to TraceLogHeader
2012-08-15ivshmem, qdev-monitor: fix order of qerror parametersAlberto Garcia2-2/+3
Now that the QERR_ macros no longer contain a json dictionary, the order of some parameters needs to be fixed for them to appear correctly. Signed-off-by: Alberto Garcia <agarcia@igalia.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15iov_send_recv(): Handle zero bytes case even if OS does notPeter Maydell1-0/+7
POSIX allows sendmsg() and recvmsg() to fail EMSGSIZE if passed a zero msg.msg_iovlen (in particular the MacOS X implementation will do this). Handle the case where iov_send_recv() is passed a zero byte count explicitly, to avoid accidentally depending on the OS to treat zero msg_iovlen as a no-op. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15framebuffer: Fix spelling in comment (leight -> height)Stefan Weil1-1/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15Spelling fix in comment (peripherans -> peripherals)Stefan Weil1-1/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15docs: Fix spelling (propery -> property)Stefan Weil1-1/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15trace: Fix "Qemu" -> "QEMU"Stefan Weil1-1/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15cputlb.c: Fix out of date commentPeter Maydell1-1/+3
The comment about the return address from get_page_addr_code() was well out of date as phys_ram_base has not existed for some time. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15ehci: fix assertion typoAlejandro Martinez Ruiz1-1/+1
Signed-off-by: Alejandro Martinez Ruiz <alex@securiforest.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15Makefile: Avoid explicit list of directories in clean targetPeter Maydell1-5/+2
Avoid having an explicit list of directories in the 'clean' target by using 'find' to remove all .o and .d files instead. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15qemu-iotests: Fix 030 after switch to GenericErrorKevin Wolf1-4/+2
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15block: Flush parent to OS with cache=unsafeKevin Wolf1-1/+2
Commit 29cdb251 already added a comment that no unnecessary flushes to disk will occur, this patch makes the code even get to the point of the comment. This is mostly theoretical because in practice we only stack one format on top of one protocol, the former implementing flush_to_os and the latter only flush_to_disk. It starts to matter when drivers that are not on top implement flush_to_os. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15iscsi: Fix NULL dereferences / races between task completion and abortStefan Priebe1-32/+23
Signed-off-by: Stefan Priebe <s.priebe@profihost.ag> Acked-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-15monitor: Clean up fd sets on monitor disconnectCorey Bryant1-1/+22
Fd sets are shared by all monitor connections. Fd sets are considered to be in use while at least one monitor is connected. When the last monitor disconnects, all fds that are members of an fd set with no outstanding dup references are closed. This prevents any fd leakage associated with a client disconnect prior to using a passed fd. Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-15block: Enable qemu_open/close to work with fd setsCorey Bryant9-5/+251
When qemu_open is passed a filename of the "/dev/fdset/nnn" format (where nnn is the fdset ID), an fd with matching access mode flags will be searched for within the specified monitor fd set. If the fd is found, a dup of the fd will be returned from qemu_open. Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-15block: Convert close calls to qemu_closeCorey Bryant8-24/+30
This patch converts all block layer close calls, that correspond to qemu_open calls, to qemu_close. Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-15block: Convert open calls to qemu_openCorey Bryant6-28/+26
This patch converts all block layer open calls to qemu_open. Note that this adds the O_CLOEXEC flag to the changed open paths when the O_CLOEXEC macro is defined. Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-15block: Prevent detection of /dev/fdset/ as floppyCorey Bryant1-1/+3
Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-15qapi: Introduce add-fd, remove-fd, query-fdsetsCorey Bryant3-0/+409
This patch adds support that enables passing of file descriptors to the QEMU monitor where they will be stored in specified file descriptor sets. A file descriptor set can be used by a client like libvirt to store file descriptors for the same file. This allows the client to open a file with different access modes (O_RDWR, O_WRONLY, O_RDONLY) and add/remove the passed fds to/from an fd set as needed. This will allow QEMU to (in a later patch in this series) "open" and "reopen" the same file by dup()ing the fd in the fd set that corresponds to the file, where the fd has the matching access mode flag that QEMU requests. The new QMP commands are: add-fd: Add a file descriptor to an fd set remove-fd: Remove a file descriptor from an fd set query-fdsets: Return information describing all fd sets Note: These commands are not compatible with the existing getfd and closefd QMP commands. Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-15qemu-char: Add MSG_CMSG_CLOEXEC flag to recvmsgCorey Bryant1-2/+10
Set the close-on-exec flag for the file descriptor received via SCM_RIGHTS. Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-14update-linux-headers.sh: Pull in asm-generic/kvm_para.hPeter Maydell1-0/+5
Add asm-generic/kvm_para.h to the set of non-architecture specific KVM kernel headers we copy into QEMU. This header may be included by an architecture's kvm_para.h header. Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-08-14kvmvapic: Disable if there is insufficient memoryJan Kiszka1-1/+3
We need at least 1M of RAM to map the option ROM. Otherwise, we will corrupt host memory or even crash: $ qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 -m 640k Segmentation fault (core dumped) Reported-and-tested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-08-14kvm: i8254: Finish time conversion fixJan Kiszka1-4/+10
0cdd3d1444 fixed reading back the counter load time from the kernel while assuming the kernel would always update its load time on writing the state. That is only true for channel 1, and so pit_get_channel_info returned wrong output pin states for high counter values. Fix this by applying the offset also on kvm_pit_put. Now we also need to update the offset when we write the state while the VM is stopped as it keeps on changing in that state. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-08-14kvm: i8254: Cache kernel clock offset in KVMPITStateJan Kiszka1-14/+24
To prepare the final fix for clock calibration issues with the in-kernel PIT, we want to cache the offset between vmclock and the clock used by the in-kernel PIT. So far, we only need to update it when the VM state changes between running and stopped because we only read the in-kernel PIT state while the VM is running. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-08-14Merge remote-tracking branch 'origin/master' into stagingAnthony Liguori25-1792/+1978
* origin/master: linux-user: ARM: Ignore immediate value for svc in thumb mode linux-user: Use init_guest_space when -R and -B are specified linux-user: Factor out guest space probing into a function flatload: fix bss clearing linux-user: make host_to_target_cmsg support SO_TIMESTAMP cmsg_type linux-user: make do_setsockopt support SOL_RAW ICMP_FILTER socket option linux-user: pass sockaddr from host to target x86: switch to AREG0 free mode x86: avoid AREG0 in segmentation helpers x86: avoid AREG0 for misc helpers x86: use wrappers for memory access helpers x86: avoid AREG0 for SMM helpers x86: avoid AREG0 for SVM helpers x86: avoid AREG0 for integer helpers x86: avoid AREG0 for condition code helpers x86: avoid AREG0 for FPU helpers linux-user: Move target_to_host_errno_table[] setup out of ioctl loop linux-user: Fix SNDCTL_DSP_MAP{IN, OUT}BUF ioctl definitions linux-user: Fix incorrect TARGET_BLKBSZGET, TARGET_BLKBSZSET
2012-08-14Merge branch 'linux-user.next' of git://git.linaro.org/people/pmaydell/qemu-armBlue Swirl8-92/+206
* 'linux-user.next' of git://git.linaro.org/people/pmaydell/qemu-arm: linux-user: ARM: Ignore immediate value for svc in thumb mode linux-user: Use init_guest_space when -R and -B are specified linux-user: Factor out guest space probing into a function flatload: fix bss clearing linux-user: make host_to_target_cmsg support SO_TIMESTAMP cmsg_type linux-user: make do_setsockopt support SOL_RAW ICMP_FILTER socket option linux-user: pass sockaddr from host to target linux-user: Move target_to_host_errno_table[] setup out of ioctl loop linux-user: Fix SNDCTL_DSP_MAP{IN, OUT}BUF ioctl definitions linux-user: Fix incorrect TARGET_BLKBSZGET, TARGET_BLKBSZSET
2012-08-14linux-user: ARM: Ignore immediate value for svc in thumb modeAlexander Graf1-2/+1
When running in thumb mode, Linux doesn't evaluate the immediate value of the svc instruction, but instead just always assumes the syscall number to be in r7. This fixes executing go_bootstrap while building go for me. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-08-14linux-user: Use init_guest_space when -R and -B are specifiedMeador Inge3-44/+56
Roll the code used to initialize the guest memory space when -R or -B is used into 'init_guest_space' and then call 'init_guest_space' from the driver. This way the reserved guest memory space can be probed for. Calling 'mmap' just once as is currently done is not guaranteed to succeed since the host address space validation might fail. Signed-off-by: Meador Inge <meadori@codesourcery.com> [PMM: Fixed minor whitespace errors.] Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-08-14linux-user: Factor out guest space probing into a functionMeador Inge2-33/+90
Signed-off-by: Meador Inge <meadori@codesourcery.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-08-14flatload: fix bss clearingMike Frysinger1-1/+1
The current bss clear logic assumes the target mmap address and host address are the same. Use g2h to translate from the target address space to the host so we can call memset on it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-08-14linux-user: make host_to_target_cmsg support SO_TIMESTAMP cmsg_typeJing Huang1-4/+16
Signed-off-by: Jing Huang <jing.huang.pku@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-08-14linux-user: make do_setsockopt support SOL_RAW ICMP_FILTER socket optionJing Huang1-0/+20
Signed-off-by: Jing Huang <jing.huang.pku@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-08-14linux-user: pass sockaddr from host to targetJing Huang1-3/+13
Signed-off-by: Jing Huang <jing.huang.pku@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-08-14x86: switch to AREG0 free modeBlue Swirl11-200/+151
Add an explicit CPUX86State parameter instead of relying on AREG0. Remove temporary wrappers and switch to AREG0 free mode. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-14x86: avoid AREG0 in segmentation helpersBlue Swirl4-160/+150
Add an explicit CPUX86State parameter instead of relying on AREG0. Rename remains of op_helper.c to seg_helper.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-14x86: avoid AREG0 for misc helpersBlue Swirl4-83/+84
Add an explicit CPUX86State parameter instead of relying on AREG0. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-14x86: use wrappers for memory access helpersBlue Swirl3-103/+126
Switch to wrapped versions of memory access functions. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-14x86: avoid AREG0 for SMM helpersBlue Swirl4-13/+6
Add an explicit CPUX86State parameter instead of relying on AREG0. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-14x86: avoid AREG0 for SVM helpersBlue Swirl4-115/+110
Add an explicit CPUX86State parameter instead of relying on AREG0. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-14x86: avoid AREG0 for integer helpersBlue Swirl5-71/+88
Add an explicit CPUX86State parameter instead of relying on AREG0. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-14x86: avoid AREG0 for condition code helpersBlue Swirl10-169/+179
Add an explicit CPUX86State parameter instead of relying on AREG0. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-14x86: avoid AREG0 for FPU helpersBlue Swirl8-876/+968
Make FPU helpers take a parameter for CPUState instead of relying on global env. Introduce temporary wrappers for FPU load and store ops. Remove wrappers for non-AREG0 code. Don't call unconverted helpers directly. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-14Merge remote-tracking branch 'kraxel/seabios-5a02306' into stagingAnthony Liguori2-0/+0
* kraxel/seabios-5a02306: update seabios to latest master