summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-05-01S390: fix kernel_commandline handlingChristian Borntraeger1-1/+1
The current handling of kernel parameters is broken. The pointer is always valid, even if no -kernel or -append is specified. We must check if the kernel rom address is valid instead, otherwise qemu might segfault. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-05-01Remove stray HOST_LONG_SIZEmalc1-1/+1
Signed-off-by: malc <av1474@comtv.ru>
2012-05-01pc-bios: update OpenBIOS imagesBlue Swirl4-1/+1
Update OpenBIOS images to SVN r1056. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-05-01configure: Add libraries for qemu-ga on SolarisAndreas Färber1-1/+3
Move socket-related Solaris libraries to $solarisnetlibs and use them for both $LIBS and $libs_qga. Fixes build on illumos without --disable-guest-agent. Signed-off-by: Lee Essen <lee.essen@nowonline.co.uk> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-05-01qemu-ga: Implement alternative to O_ASYNCAndreas Färber1-1/+17
ga_channel_open() was using open flag O_ASYNC for SIGIO-driven I/O. This breaks on illumos, so fall back to POSIX I_SETSIG ioctl (SIGPOLL). Signed-off-by: Lee Essen <lee.essen@nowonline.co.uk> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-05-01main-loop: Calculate poll timeout using timeout argumentStefan Weil1-1/+5
The timeout argument was unused up to now, but it can be used to reduce the poll_timeout when it is infinite (negative value) or larger than timeout. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-05-01vga: Don't switch to 1 x 1 character text screenStefan Weil1-0/+4
Initially, vga_get_text_resolution returns a text resolution of 1 x 1 (vga register values are 0). This is visible during MIPS Malta boot with SDL. It also occurs with the i386 or x86_64 system emulation when it runs in single step mode: QEMU changes the size of the SDL window to the smallest possible value which is supported by the window manager. As this is not the calculated size, QEMU switches to scaled mode. When the BIOS or the VGA driver sets the normal text resolution, the window stays small and displays microscopic characters. Ignoring text resolutions of 1 x 1 or less avoids these problems. A similar workaround already exists for too large resolutions. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-05-01memory: move functions is_romd and section_addr to memory APIBlue Swirl3-14/+29
Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-05-01cputlb: prepare private memory API for public consumptionBlue Swirl3-51/+47
Fold is_ram_rom and is_ram_rom_romd() into callers. Change is_romd() and section_addr() to take MemoryRegion instead of MemoryRegionSection for consistency and use memory_region_ prefix. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-05-01cputlb: move TLB handling to a separate fileBlue Swirl5-376/+443
Move TLB handling and softmmu code load helpers to cputlb.c, compile only for softmmu targets. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-05-01exec: prepare for splittingBlue Swirl2-67/+92
Make s_cputlb_empty_entry 'const'. Rename tlb_flush_jmp_cache() to tb_flush_jmp_cache(). Refactor code to add cpu_tlb_reset_dirty_all(), memory_region_section_get_iotlb() and memory_region_is_unassigned(). Remove unused cpu_tlb_update_dirty(). Fix coding style in areas to be moved. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-05-01Merge branch 'maintainers-up' of git://repo.or.cz/qemu/afaerberBlue Swirl1-9/+32
* 'maintainers-up' of git://repo.or.cz/qemu/afaerber: MAINTAINERS: Document all stable trees MAINTAINERS: Fix SCM tree for virtio-9p MAINTAINERS: Indicate type of SCM MAINTAINERS: Fix TCI file pattern MAINTAINERS: Fix virtio-9p file pattern MAINTAINERS: Fix PC file pattern
2012-05-01Merge branch 'cocoa-for-upstream' of git://repo.or.cz/qemu/afaerberBlue Swirl18-5439/+9
* 'cocoa-for-upstream' of git://repo.or.cz/qemu/afaerber: Drop darwin-user configure: add '--disable-cocoa' switch raw-posix: Do not use CONFIG_COCOA macro
2012-05-01Merge branch 'prep-up' of git://repo.or.cz/qemu/afaerberBlue Swirl6-46/+43
* 'prep-up' of git://repo.or.cz/qemu/afaerber: prep: Move int-ack register from PReP to Raven PCI emulation prep: Initialize PC speaker isa: Add isa_bus_from_device() method fdc: Parametrize ISA base, IRQ and DMA i82378/i82374: Do not create DMA controller twice
2012-05-01Merge branch 'qom-cpu-rest.v1' of git://github.com/afaerber/qemu-cpuBlue Swirl14-150/+615
* 'qom-cpu-rest.v1' of git://github.com/afaerber/qemu-cpu: Makefile: Simplify compilation of target-*/cpu.c target-mips: Start QOM'ifying CPU init target-mips: QOM'ify CPU target-m68k: Add QOM CPU subclasses target-m68k: Start QOM'ifying CPU init target-m68k: QOM'ify CPU reset target-m68k: QOM'ify CPU target-sh4: Start QOM'ifying CPU init target-sh4: QOM'ify CPU reset target-sh4: QOM'ify CPU MAINTAINERS: Downgrade target-mips and target-sh4 to Odd Fixes MAINTAINERS: Downgrade target-m68k to Odd Fixes
2012-05-01iohandler: Use bool for boolean struct member and remove holesStefan Weil1-2/+2
Using bool reduces the size of the structure and improves readability. Two holes in the structure were removed. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-05-01async: Use bool for boolean struct members and remove a holeStefan Weil1-3/+3
Using bool reduces the size of the structure and improves readability. A hole in the structure was removed. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-05-01configure: Fix creation of symbolic links for MinGW toolchainStefan Weil1-11/+10
The MinGW toolchain on w32/w64 hosts does not create symbolic links, but implements 'ln -s' similar to 'cp -r'. In incremental out of tree builds, this resulted in files which were not updated when their counterparts in the QEMU source tree changed. Especially for Makefile* this happened very often. With this patch, the 'symlinked' files are now always updated for out of tree builds. Similar code was already used for the symbolic link of libcacard/Makefile. The symlink macro always removes the target before it is created again, therefore the rm command for libcacard/Makefile was redundant and is removed now. Macro symlink is also used with directories. To remove them on w32 hosts, a recursive rm is needed. v2: Quote arguments in shell function symlink, and also quote any argument which is passed to symlink and which contains macros. This should reduce the chance of accidents caused by rm -rf. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-05-01Drop darwin-userAndreas Färber17-5434/+1
It's been orphaned, not compiling for a long time and despite Apple's drop of their Rosetta ppc emulation technology with Mac OS X Lion no one has stepped up to fix it. Testing necessary changes wrt QOM'ification thus is impossible, so we might as well remove it completely. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2012-05-01configure: add '--disable-cocoa' switchPavel Borzenkov1-1/+4
When SDL support is disabled, there is no way to build QEMU without Cocoa support on MacOS X. This patch adds '--disable-cocoa' switch and allows to build QEMU without both SDL and Cocoa frontends. Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com> [AF: Adapt help output] Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2012-05-01raw-posix: Do not use CONFIG_COCOA macroPavel Borzenkov1-4/+4
Use __APPLE__ and __MACH__ macros instead of CONFIG_COCOA to detect Mac OS X host. The patch is based on Ben Leslie's patch: http://patchwork.ozlabs.org/patch/97859/ Signed-off-by: Ben Leslie <benno@benno.id.au> Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2012-04-30prep: Move int-ack register from PReP to Raven PCI emulationHervé Poussineau2-36/+17
Register is one byte-wide (as per specification), so there is no need to specify endianness. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> [AF: Limit access validity to size 1] Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2012-04-30qemu-ga: persist tracking of fsfreeze state via filesystemMichael Roth2-47/+174
Currently, qemu-ga may die/get killed/go away for whatever reason after guest-fsfreeze-freeze has been issued, and before guest-fsfreeze-thaw has been issued. This means the only way to unfreeze the guest is via VNC/network/console access, but obtaining that access after-the-fact can often be very difficult when filesystems are frozen. Logins will almost always hang, for instance. In many cases the only recourse would be to reboot the guest without any quiescing of volatile state, which makes this a corner-case worth giving some attention to. A likely failsafe for this situation would be to use a watchdog to restart qemu-ga if it goes away. There are some precautions qemu-ga needs to take in order to avoid immediately hanging itself on I/O, however, namely, we must disable logging and defer to processing/creation of user-specific logfiles, along with creation of the pid file if we're running as a daemon. We also need to disable non-fsfreeze-safe commands, as we normally would when processing the guest-fsfreeze-freeze command. To track when we need to do this in a way that persists between multiple invocations of qemu-ga, we create a file on the guest filesystem before issuing the fsfreeze, and delete it when doing the thaw. On qemu-ga startup, we check for the existance of this file to determine the need to take the above precautions. We're forced to do it this way since a more traditional approach such as reading/writing state to a dedicated state file will cause access/modification time updates, respectively, both of which will hang if the file resides on a frozen filesystem. Both can occur even if relatime is enabled. Checking for file existence will not update the access time, however, so it's a safe way to check for fsfreeze state. An actual watchdog-based restart of qemu-ga can itself cause an access time update that would thus hang the invocation of qemu-ga, but the logic to workaround that can be handled via the watchdog, so we don't address that here (for relatime we'd periodically touch the qemu-ga binary if the file $qga_statedir/qga.state.isfrozen is not present, this avoids qemu-ga updates or the 1 day relatime threshold causing an access-time update if we try to respawn qemu-ga shortly after it goes away) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2012-04-30qemu-ga: add a whitelist for fsfreeze-safe commandsMichael Roth5-33/+140
Currently we rely on fsfreeze/thaw commands disabling/enabling logging then having other commands check whether logging is disabled to avoid executing if they aren't safe for running while a filesystem is frozen. Instead, have an explicit whitelist of fsfreeze-safe commands, and consolidate logging and command enablement/disablement into a pair of helper functions: ga_set_frozen()/ga_unset_frozen() Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2012-04-30qemu-ga: improve recovery options for fsfreezeMichael Roth2-64/+101
guest-fsfreeze-thaw relies on state information obtained from guest-fsfreeze-freeze to determine what filesystems to unfreeze. This is unreliable due to the fact that that state does not account for FIFREEZE being issued by other processes, or previous instances of qemu-ga. This means in certain situations we cannot thaw filesystems even with a responsive qemu-ga instance at our disposal. This patch allows guest-fsfreeze-thaw to be issued unconditionally. It also adds some additional logic to allow us to thaw filesystems regardless of how many times the filesystem's "frozen" refcount has been incremented by any guest processes. Also, guest-fsfreeze-freeze now operates atomically: on success all freezable filesystems are frozen, and on error all filesystems are thawed. The ambiguous "GUEST_FSFREEZE_STATUS_ERROR" state is no longer entered. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2012-04-30Makefile: Simplify compilation of target-*/cpu.cAndreas Färber1-15/+1
All targets except for ppc now have a standalone cpu.c file. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-04-30target-mips: Start QOM'ifying CPU initAndreas Färber2-1/+9
Move code not dependent on mips_def_t from cpu_mips_init() into a QOM initfn, as a start. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Richard Henderson <rth@twiddle.net>
2012-04-30target-mips: QOM'ify CPUAndreas Färber5-1/+142
Embed CPUMIPSState as first member of QOM MIPSCPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Richard Henderson <rth@twiddle.net>
2012-04-30target-m68k: Add QOM CPU subclassesAndreas Färber2-90/+137
Move code from cpu_m68k_set_model() into model-specific initfns and inline the remaining parts into cpu_m68k_init(). Let m68k_cpu_list() print CPU classes alphabetically except for "any". Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Laurent Vivier <Laurent@Vivier.EU> Tested-by: Laurent Vivier <Laurent@Vivier.EU>
2012-04-30target-m68k: Start QOM'ifying CPU initAndreas Färber2-1/+10
Move model-independent code from cpu_m68k_init() into a QOM initfn. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Laurent Vivier <Laurent@Vivier.EU> Tested-by: Laurent Vivier <Laurent@Vivier.EU>
2012-04-30target-m68k: QOM'ify CPU resetAndreas Färber2-17/+17
Move code from cpu_state_reset() into QOM m68k_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Laurent Vivier <Laurent@Vivier.EU> Tested-by: Laurent Vivier <Laurent@Vivier.EU>
2012-04-30target-m68k: QOM'ify CPUAndreas Färber5-8/+137
Embed CPUM68KState as first member of QOM M68kCPU. Drop cpu_m68k_close() in favor of object_delete(). Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Laurent Vivier <Laurent@Vivier.EU> Tested-by: Laurent Vivier <Laurent@Vivier.EU>
2012-04-30target-sh4: Start QOM'ifying CPU initAndreas Färber2-2/+11
Move code from cpu_sh4_init() into a QOM initfn. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-04-30target-sh4: QOM'ify CPU resetAndreas Färber2-21/+22
Move code from cpu_state_reset() to QOM superh_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2012-04-30target-sh4: QOM'ify CPUAndreas Färber5-1/+136
Embed CPUSH4State as first member of SuperHCPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2012-04-30MAINTAINERS: Downgrade target-mips and target-sh4 to Odd FixesAndreas Färber1-2/+2
Patches are not being handled, so let's downgrade to Odd Fixes. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Aurélien Jarno <aurelien@aurel32.net>
2012-04-30MAINTAINERS: Downgrade target-m68k to Odd FixesAndreas Färber1-1/+1
m68k patches are not being handled, so let's downgrade to Odd Fixes. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Paul Brook <paul@codesourcery.com>
2012-04-28prep: Initialize PC speakerHervé Poussineau1-0/+4
Speaker init has been added in 506b7ddf889312659b36c667f7ae17bc9e909418, but audio subsystem init was missing. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2012-04-28isa: Add isa_bus_from_device() methodHervé Poussineau1-0/+5
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2012-04-28fdc: Parametrize ISA base, IRQ and DMAHervé Poussineau1-7/+10
Keep the PC values as defaults but allow to override them for PReP. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Reviewed-by: Markus Armbruster <armbru@redhat.com>
2012-04-28i82378/i82374: Do not create DMA controller twiceHervé Poussineau2-3/+7
This fixes a crash in PReP emulation when using DMA controller to access floppy drive. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2012-04-28main-loop: Fix build for w32 and w64Stefan Weil1-3/+4
This patch fixes a build regression with MinGW which was introduced by commit 7c7db75576bd5a31508208f153c5aada64b2c8df. The 3rd argument of g_main_context_query must point to a gint value. Using a pointer to an uint32_t value is wrong. The timeout argument of function os_host_main_loop_wait was never used for w32 / w64. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-04-28configure: Don't build bsd-user on Mac OS X by defaultAndreas Färber1-1/+1
Fixes the build when combined with the drop of darwin-user. Enthusiasts can still try building it using --enable-bsd-user. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Cc: Bernhard Walle <bernhard@bwalle.de> Tested-by: Bernhard Walle <bernhard@bwalle.de> [Mac OS 10.7.3] Acked-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-04-28softfloat: Replace int16 type with int_fast16_tAndreas Färber4-71/+69
Based on the following Coccinelle patch: @@ typedef int16, int_fast16_t; @@ -int16 +int_fast16_t Avoids a workaround for AIX. Add typedef for pre-10 Solaris. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: malc <av1474@comtv.ru> Cc: Ben Taylor <bentaylor.solx86@gmail.com> Tested-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-04-28softfloat: Replace uint16 type with uint_fast16_tAndreas Färber2-7/+7
Based on the following Coccinelle patch: @@ typedef uint16, uint_fast16_t; @@ -uint16 +uint_fast16_t Fixes the build of the Cocoa frontend on Mac OS X and avoids a workaround for AIX. For pre-10 Solaris include osdep.h. Reported-by: Pavel Borzenkov <pavel.borzenkov@gmail.com> Reported-by: Rui Carmo <rui.carmo@gmail.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Juan Pineda <juan@logician.com> Cc: malc <av1474@comtv.ru> Cc: Ben Taylor <bentaylor.solx86@gmail.com> Tested-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-04-28target-mips: Move definition of uint_fast{8, 16}_t to osdep.hAndreas Färber2-7/+6
osdep.h is included via qemu-common.h. Prepares for use of [u]int_fast*_t types in softfloat code. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Ben Taylor <bentaylor.solx86@gmail.com> Cc: Aurélien Jarno <aurelien@aurel32.net> Cc: Peter Maydell <peter.maydell@linaro.org> Tested-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-04-28softfloat: Fix mixups of int and int16Andreas Färber1-2/+2
normalizeFloat{32,64}Subnormal() expect the exponent as int16, not int. This went unnoticed since int16 and uint16 were both typedef'ed to int. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-04-28Merge branch 'target-arm.for-upstream' of ↵Blue Swirl6-23/+19
git://git.linaro.org/people/pmaydell/qemu-arm * 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm: target-arm: Make SETEND respect bswap_code (BE8) setting target-arm: Move A9 config_base_address reset value to ARMCPU target-arm: Change cpu_arm_init() return type to ARMCPU
2012-04-28Merge branch 'timer' of git://qemu.weilnetz.de/qemuBlue Swirl2-74/+33
* 'timer' of git://qemu.weilnetz.de/qemu: qemu-timer: Optimize data structures qemu-timer: Remove function alarm_has_dynticks qemu-timer: Use bool, false, true for boolean values qemu-timer: Remove unused function qemu_alarm_pending qemu-timer: Remove redundant include statements
2012-04-27Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori11-70/+151
* qmp/queue/qmp: qapi: fix qmp_balloon() conversion qemu-iotests: add block-stream speed value test case block: add 'speed' optional parameter to block-stream block: change block-job-set-speed argument from 'value' to 'speed' block: use Error mechanism instead of -errno for block_job_set_speed() block: use Error mechanism instead of -errno for block_job_create()