]> git.proxmox.com Git - qemu.git/log
qemu.git
14 years agotcg-mips: add guest base support
Aurelien Jarno [Sat, 27 Mar 2010 16:31:04 +0000 (17:31 +0100)]
tcg-mips: add guest base support

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg/mips: implement the not_i32 op the same way as gcc
Aurelien Jarno [Sat, 27 Mar 2010 15:50:55 +0000 (16:50 +0100)]
tcg/mips: implement the not_i32 op the same way as gcc

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg-mips: implement nor
Aurelien Jarno [Sat, 27 Mar 2010 15:32:55 +0000 (16:32 +0100)]
tcg-mips: implement nor

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agobe more specific in -mem-path error messages
Michael Tokarev [Sat, 27 Mar 2010 13:35:37 +0000 (16:35 +0300)]
be more specific in -mem-path error messages

Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoAdd a missing #include for FreeBSD hosts
Juergen Lock [Thu, 25 Mar 2010 21:35:03 +0000 (22:35 +0100)]
Add a missing #include for FreeBSD hosts

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoerror: Move qerror_report() from qemu-error.[ch] to qerror.[ch]
Markus Armbruster [Mon, 22 Mar 2010 09:29:05 +0000 (10:29 +0100)]
error: Move qerror_report() from qemu-error.[ch] to qerror.[ch]

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoerror: Link qemu-img, qemu-nbd, qemu-io with qemu-error.o
Markus Armbruster [Mon, 22 Mar 2010 09:29:04 +0000 (10:29 +0100)]
error: Link qemu-img, qemu-nbd, qemu-io with qemu-error.o

The location tracking interface is used by code shared with qemi-img,
qemu-nbd and qemu-io, so it needs to be available there.  Commit
827b0813 provides it in a rather hamfisted way: it adds a dummy
implementation to qemu-tool.c.

It's cleaner to provide the real thing, and put a few more dummy
monitor functions into qemu-tool.c.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoerror: Make use of error_set_progname() optional
Markus Armbruster [Mon, 22 Mar 2010 09:29:03 +0000 (10:29 +0100)]
error: Make use of error_set_progname() optional

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoerror: Trim includes after "Infrastructure to track locations..."
Markus Armbruster [Mon, 22 Mar 2010 09:29:02 +0000 (10:29 +0100)]
error: Trim includes after "Infrastructure to track locations..."

Missed in commit 827b0813.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoerror: Trim includes in qerror.c
Markus Armbruster [Mon, 22 Mar 2010 09:29:01 +0000 (10:29 +0100)]
error: Trim includes in qerror.c

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoerror: Trim includes after "Move qemu_error & friends..."
Markus Armbruster [Mon, 22 Mar 2010 09:29:00 +0000 (10:29 +0100)]
error: Trim includes after "Move qemu_error & friends..."

Missed in commit 2f792016.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agolinux-user: Use RLIMIT_STACK for default stack size.
Richard Henderson [Fri, 19 Mar 2010 21:21:13 +0000 (14:21 -0700)]
linux-user: Use RLIMIT_STACK for default stack size.

The current default stack limit of 512kB is far too small; a fair
number of gcc testsuite failures (for all guests) are directly
attributable to this.  Using the -s option in every invocation of
the emulator is annoying to say the least.

A reasonable compromise seems to be to honor the system rlimit.
At least on two Linux distributions, this is set to 8MB and 10MB
respectively.  If the system does not limit the stack, then we're
no worse off than before.

At the same time, rename the variable from x86_stack_size and
change the ultimate fallback size from 512kB to 8MB.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-arm: disable PAGE_EXEC for XN pages
Rabin Vincent [Fri, 19 Mar 2010 20:58:03 +0000 (02:28 +0530)]
target-arm: disable PAGE_EXEC for XN pages

Don't set PAGE_EXEC for XN pages, to avoid a bypass of XN protection
checking if the page is already in the TLB.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agofix race between timer firing vs. alarm_timer->pending = 0
Paolo Bonzini [Fri, 19 Mar 2010 10:30:35 +0000 (11:30 +0100)]
fix race between timer firing vs. alarm_timer->pending = 0

The period for Win32 timers is very short and always the same
independent of dynticks, so it's possible that the timer fires
before qemu_run_all_timers has reset alarm_timer->pending to zero.
Reset alarm_timer->pending before rearming.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoqemu-io: Fix return value handling of bdrv_open
Ryota Ozaki [Sat, 20 Mar 2010 07:08:38 +0000 (16:08 +0900)]
qemu-io: Fix return value handling of bdrv_open

bdrv_open may return -errno so we have to check
if the return value is '< 0', not '== -1'.

Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoqemu-nbd: Fix invalid usage of the first argument of errx
Ryota Ozaki [Sat, 20 Mar 2010 06:23:23 +0000 (15:23 +0900)]
qemu-nbd: Fix invalid usage of the first argument of errx

errx takes the exit status of a process as the first
argument. Passing errno to it is wrong. Instead the
patch lets errx take EXIT_FAILURE.

Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoqemu-nbd: Fix return value handling of bdrv_open
Ryota Ozaki [Sat, 20 Mar 2010 06:23:22 +0000 (15:23 +0900)]
qemu-nbd: Fix return value handling of bdrv_open

bdrv_open may return -errno so we have to check
if the return value is '< 0', not '== -1'.

Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoballoon: Fix overflow when reporting actual memory size
Adam Litke [Thu, 25 Mar 2010 13:58:17 +0000 (08:58 -0500)]
balloon: Fix overflow when reporting actual memory size

Beginning with its introduction, the virtio balloon has had an overflow error
that causes 'info balloon' to misreport the actual memory size when the balloon
itself becomes larger than 4G.  Use a cast when converting dev->actual from
pages to kB to prevent overflows.

Before:
(qemu) info balloon
balloon: actual=5120
(qemu) balloon 1025
(qemu) info balloon
balloon: actual=1025
(qemu) balloon 1024
(qemu) info balloon
balloon: actual=5120

After:
(qemu) info balloon
balloon: actual=5120
(qemu) balloon 1025
(qemu) info balloon
balloon: actual=1025
(qemu) balloon 1024
(qemu) info balloon
balloon: actual=1024

Signed-off-by: Adam Litke <agl@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agojson-parser: Output the content of invalid keyword
Amos Kong [Wed, 24 Mar 2010 15:12:05 +0000 (23:12 +0800)]
json-parser: Output the content of invalid keyword

When input some invalid word 'unknowcmd' through QMP port, qemu outputs
this error message:
  "parse error: invalid keyword `%s'"

This patch makes qemu output the content of invalid keyword, like:

  "parse error: invalid keyword `unknowcmd'"

Signed-off-by: Amos Kong <akong@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoraw-posix: Better error return values for hdev_create
Kevin Wolf [Fri, 12 Mar 2010 12:52:31 +0000 (13:52 +0100)]
raw-posix: Better error return values for hdev_create

Now that we output an error message according to the returned error code in
qemu-img, let's return the real error codes. "Input/output error" for
everything isn't helpful.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoqemu-options.hx: fix a typo
Aurelien Jarno [Sat, 27 Mar 2010 10:52:05 +0000 (11:52 +0100)]
qemu-options.hx: fix a typo

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoCompile some MIPS devices only once
Blue Swirl [Sat, 27 Mar 2010 07:26:16 +0000 (07:26 +0000)]
Compile some MIPS devices only once

Move CPU specific declarations to a separate file.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoFix build
Blue Swirl [Sat, 27 Mar 2010 06:58:53 +0000 (06:58 +0000)]
Fix build

Actually some systems don't define PAGE_SIZE. Fixes build breakage
by f7736b91c40a617e93505e32dcbd2cb56aad8a23.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile ide/core only once
Blue Swirl [Sat, 27 Mar 2010 06:20:53 +0000 (06:20 +0000)]
Compile ide/core only once

Make win2k install hack unconditional as it is still restricted to
x86 only in vl.c.

Replace TARGET_PAGE_SIZE and 4096 with PAGE_SIZE.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agotarget-s390: Don't compile in virtio-pci
Alexander Graf [Thu, 25 Mar 2010 13:59:02 +0000 (14:59 +0100)]
target-s390: Don't compile in virtio-pci

As soon as virtio-pci.c gets compiled and used on S390 the internal qdev magic
gets confused and tries to give us PCI devices instead of S390 virtio devices.

Since we don't have PCI on S390, we can safely not compile virtio-pci at all.

In order to do this I added a new config option "CONFIG_VIRTIO_PCI" that I
enabled for every platform except S390. Thanks to this the change should be a
complete nop for every other platform.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-ppc: generic PowerPC TBL
Dmitry Ilyevsky [Fri, 26 Mar 2010 00:25:36 +0000 (03:25 +0300)]
target-ppc: generic PowerPC TBL

Time base SPRs TBL/TBU should be accessible in user/priv modes for reading
as specified in POWER ISA documentation. Therefore SPRs permissions were
changed in gen_tbl function.

Signed-off-by: Dmitry Ilyevsky <ilyevsky@gmail.com>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg: Disambiguate qemu_ld32u with 32-bit and 64-bit outputs.
Richard Henderson [Fri, 19 Mar 2010 19:00:26 +0000 (12:00 -0700)]
tcg: Disambiguate qemu_ld32u with 32-bit and 64-bit outputs.

Some targets (e.g. Alpha and MIPS64) need to keep 32-bit operands
sign-extended in 64-bit registers (regardless of the "real" sign
of the operand).  For that, we need to be able to distinguish
between a 32-bit load with a 32-bit result and a 32-bit load with
a given extension to a 64-bit result.  This distinction already
exists for the ld* loads, but not the qemu_ld* loads.

Reserve qemu_ld32u for 64-bit outputs and introduce qemu_ld32 for
32-bit outputs.  Adjust all code generators to match.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg: Allow target-specific implementation of NOR.
Richard Henderson [Fri, 19 Mar 2010 20:08:56 +0000 (13:08 -0700)]
tcg: Allow target-specific implementation of NOR.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg: Allow target-specific implementation of NAND.
Richard Henderson [Fri, 19 Mar 2010 20:03:58 +0000 (13:03 -0700)]
tcg: Allow target-specific implementation of NAND.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg: Allow target-specific implementation of EQV.
Richard Henderson [Fri, 19 Mar 2010 20:02:02 +0000 (13:02 -0700)]
tcg: Allow target-specific implementation of EQV.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg: Use not_i32 to implement not_i64.
Richard Henderson [Fri, 19 Mar 2010 19:44:47 +0000 (12:44 -0700)]
tcg: Use not_i32 to implement not_i64.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg: Change TCGType to an enumeration.
Richard Henderson [Fri, 19 Mar 2010 18:36:30 +0000 (11:36 -0700)]
tcg: Change TCGType to an enumeration.

The TCGType name was already used consistently.  Changing it
to an enumeration instead of a set of defines aids debugging.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg: Use TCGCond where appropriate.
Richard Henderson [Fri, 19 Mar 2010 18:26:05 +0000 (11:26 -0700)]
tcg: Use TCGCond where appropriate.

Use the TCGCond enumeration type in the brcond and setcond
related prototypes in tcg-op.h and each code generator.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg: Name the opcode enumeration.
Richard Henderson [Fri, 19 Mar 2010 18:12:29 +0000 (11:12 -0700)]
tcg: Name the opcode enumeration.

Give the enumeration formed from tcg-opc.h a name: TCGOpcode.
Use that enumeration type instead of "int" whereever appropriate.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoremove remaining occurrences AREG[1-9] and TCG_AREG[1-9]
Paolo Bonzini [Fri, 19 Mar 2010 10:31:15 +0000 (11:31 +0100)]
remove remaining occurrences AREG[1-9] and TCG_AREG[1-9]

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agolinux-user: Add the syscall id for pselect6 on ARM
Michael Casadevall [Fri, 26 Mar 2010 15:25:10 +0000 (15:25 +0000)]
linux-user: Add the syscall id for pselect6 on ARM

As this is now supported in newer linux kernels.

Signed-off-by: Michael Casadevall <mcasadevall@ubuntu.com>
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agolinux-user: add inotify_init1 syscall support
Riku Voipio [Fri, 26 Mar 2010 15:25:11 +0000 (15:25 +0000)]
linux-user: add inotify_init1 syscall support

New syscall which gets actively used when you have a
fresh kernel.

Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-arm: Fix handling of AL condition in IT instruction
Johan Bengtsson [Wed, 17 Mar 2010 12:56:07 +0000 (13:56 +0100)]
target-arm: Fix handling of AL condition in IT instruction

Do not try to insert a conditional jump over next instruction when the
condition code is AL as this will trigger an internal error.

Signed-off-by: Johan Bengtsson <teofrastius@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg-hppa: Fix 64-bit argument ordering
Richard Henderson [Sat, 20 Feb 2010 19:32:23 +0000 (11:32 -0800)]
tcg-hppa: Fix 64-bit argument ordering

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg-hppa: Fix const errors in hppa-dis.c
Richard Henderson [Sat, 20 Feb 2010 19:31:31 +0000 (11:31 -0800)]
tcg-hppa: Fix const errors in hppa-dis.c

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoFix bsd-user broken by commit b5ec5ce0e39d6e7ea707d5604a5f6d567dfd2f48
Juergen Lock [Mon, 22 Mar 2010 18:12:43 +0000 (19:12 +0100)]
Fix bsd-user broken by commit b5ec5ce0e39d6e7ea707d5604a5f6d567dfd2f48

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoFix recent pxa270 serial breakage
Lars Munch [Tue, 23 Mar 2010 16:27:01 +0000 (17:27 +0100)]
Fix recent pxa270 serial breakage

This fixes a copy/paste bug introduced in commit
2d48377a8531de63ec1d0c4b9b1959dc4b78356c that pushed TARGET_WORDS_BIGENDIAN
dependency to board level.

Signed-off-by: Lars Munch <lars@segv.dk>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoqemu-error: Avoid build warning.
Edgar E. Iglesias [Tue, 23 Mar 2010 15:13:03 +0000 (16:13 +0100)]
qemu-error: Avoid build warning.

  CC    qemu-error.o
cc1: warnings being treated as errors
/home/edgar/src/c/qemu/git/qemu/qemu-error.c: In function 'error_print_loc':
/home/edgar/src/c/qemu/git/qemu/qemu-error.c:191: error: format not a string literal and no format arguments
make: *** [qemu-error.o] Error 1

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
14 years agopci_host: fix breakage
Aurelien Jarno [Tue, 23 Mar 2010 08:59:54 +0000 (09:59 +0100)]
pci_host: fix breakage

This has been broken by commit 952760bb7bce7fbfe0afcf04fee268745f297b87

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoCompile virtio-pci only once
Blue Swirl [Mon, 22 Mar 2010 20:18:58 +0000 (20:18 +0000)]
Compile virtio-pci only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile sound devices only once
Blue Swirl [Mon, 22 Mar 2010 20:18:40 +0000 (20:18 +0000)]
Compile sound devices only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoFix Sparc64 build
Blue Swirl [Sun, 21 Mar 2010 20:37:50 +0000 (20:37 +0000)]
Fix Sparc64 build

952760bb7bce7fbfe0afcf04fee268745f297b87 missed one change.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile pci_host only once
Blue Swirl [Sun, 21 Mar 2010 19:47:15 +0000 (19:47 +0000)]
Compile pci_host only once

Convert pci_host_conf_register_mmio_noswap(x) to
pci_host_conf_register_mmio(x, 0).

Convert pci_host_conf_register_mmio(x) to
pci_host_conf_register_mmio(x, 1) for big endian hosts, all cases
happen to be BE.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile pcie_host only once
Blue Swirl [Sun, 21 Mar 2010 19:47:14 +0000 (19:47 +0000)]
Compile pcie_host only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile pci only once
Blue Swirl [Sun, 21 Mar 2010 19:47:13 +0000 (19:47 +0000)]
Compile pci only once

Move coalesced_mmio declarations to a more accessible location.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile usb-ohci only once
Blue Swirl [Sun, 21 Mar 2010 19:47:12 +0000 (19:47 +0000)]
Compile usb-ohci only once

Push TARGET_WORDS_BIGENDIAN dependency to board level.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile serial only once
Blue Swirl [Sun, 21 Mar 2010 19:47:11 +0000 (19:47 +0000)]
Compile serial only once

Push TARGET_WORDS_BIGENDIAN dependency to board level.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile ne2000_isa only once
Blue Swirl [Sun, 21 Mar 2010 19:47:10 +0000 (19:47 +0000)]
Compile ne2000_isa only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile isa_mmio only once
Blue Swirl [Sun, 21 Mar 2010 19:47:09 +0000 (19:47 +0000)]
Compile isa_mmio only once

Push TARGET_WORDS_BIGENDIAN dependency to board level.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile most PCI network cards only once
Blue Swirl [Sun, 21 Mar 2010 19:47:08 +0000 (19:47 +0000)]
Compile most PCI network cards only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile qemu-error only once
Blue Swirl [Sun, 21 Mar 2010 19:47:07 +0000 (19:47 +0000)]
Compile qemu-error only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile async only once
Blue Swirl [Sun, 21 Mar 2010 19:47:07 +0000 (19:47 +0000)]
Compile async only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile fdc only once
Blue Swirl [Sun, 21 Mar 2010 19:47:06 +0000 (19:47 +0000)]
Compile fdc only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile most IDE devices only once
Blue Swirl [Sun, 21 Mar 2010 19:47:05 +0000 (19:47 +0000)]
Compile most IDE devices only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile usb-uhci only once
Blue Swirl [Sun, 21 Mar 2010 19:47:04 +0000 (19:47 +0000)]
Compile usb-uhci only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile vga-isa only once
Blue Swirl [Sun, 21 Mar 2010 19:47:03 +0000 (19:47 +0000)]
Compile vga-isa only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile pcspk only once
Blue Swirl [Sun, 21 Mar 2010 19:47:02 +0000 (19:47 +0000)]
Compile pcspk only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile i8254 only once
Blue Swirl [Sun, 21 Mar 2010 19:47:02 +0000 (19:47 +0000)]
Compile i8254 only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile parallel only once
Blue Swirl [Sun, 21 Mar 2010 19:47:01 +0000 (19:47 +0000)]
Compile parallel only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile vga-pci only once
Blue Swirl [Sun, 21 Mar 2010 19:47:00 +0000 (19:47 +0000)]
Compile vga-pci only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoMove x86 specific PC declarations to a separate file
Blue Swirl [Sun, 21 Mar 2010 19:46:26 +0000 (19:46 +0000)]
Move x86 specific PC declarations to a separate file

x86 definitions (especially CPUState uses) prevent many files from
being compiled within libhw.

Move x86 specific declarations (APIC stuff) to a separate file.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoRevert 'Fix build'
Blue Swirl [Sun, 21 Mar 2010 19:44:06 +0000 (19:44 +0000)]
Revert 'Fix build'

Partially revert 80a1ab598c6960e7a941e38c5d8638c532c585c3.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoRevert "Introduce a default qmp session"
Anthony Liguori [Sun, 21 Mar 2010 19:15:24 +0000 (14:15 -0500)]
Revert "Introduce a default qmp session"

This reverts commit 3290c4aac5b97bb1e3b2b28d94669f2c611ce84a.

Conflicts:

vl.c

14 years agoRevert "qmp: don't make -qmp disable the default monitor"
Anthony Liguori [Sun, 21 Mar 2010 19:14:38 +0000 (14:14 -0500)]
Revert "qmp: don't make -qmp disable the default monitor"

This reverts commit d49f626ed00cecc90fb1ff88da9bdf11e57094d1.

14 years agoRevert "tap: invoke downscript when we exit abnormally"
Anthony Liguori [Sun, 21 Mar 2010 19:13:34 +0000 (14:13 -0500)]
Revert "tap: invoke downscript when we exit abnormally"

This reverts commit 8af8ce4d6116e3d46ad298ca8fe50d3b515b1aac.

14 years agoRevert "Convert atexit users to exit_notifier"
Anthony Liguori [Sun, 21 Mar 2010 19:13:02 +0000 (14:13 -0500)]
Revert "Convert atexit users to exit_notifier"

This reverts commit d7234f4d7e373a708e1df9ab565a71b71b189025.

Conflicts:

hw/xen_machine_pv.c

This should have never been committed.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRevert "Add exit notifiers"
Anthony Liguori [Sun, 21 Mar 2010 19:11:51 +0000 (14:11 -0500)]
Revert "Add exit notifiers"

This reverts commit 3b6304f706ef7eebc0b3b3f3a5093ec75448ee19.

This was mistakenly committed.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix a typo
Blue Swirl [Sun, 21 Mar 2010 12:30:46 +0000 (12:30 +0000)]
Fix a typo

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile disassemblers only once
Blue Swirl [Sun, 21 Mar 2010 08:28:47 +0000 (08:28 +0000)]
Compile disassemblers only once

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agotcg/arm: don't save/restore r7 in prologue/epilogue
Aurelien Jarno [Sat, 20 Mar 2010 11:27:42 +0000 (12:27 +0100)]
tcg/arm: don't save/restore r7 in prologue/epilogue

There is no need to save r7, it is used to store the address
of the env structure and is not modified by GCC.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg/arm: fix load/store definitions for 32-bit targets
Aurelien Jarno [Sat, 20 Mar 2010 11:10:20 +0000 (12:10 +0100)]
tcg/arm: fix load/store definitions for 32-bit targets

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg: protect div2 in tcg/tcg-opc.h
Aurelien Jarno [Fri, 19 Mar 2010 22:15:32 +0000 (23:15 +0100)]
tcg: protect div2 in tcg/tcg-opc.h

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoFix a typo which broke Xen build
Blue Swirl [Sat, 20 Mar 2010 08:55:06 +0000 (08:55 +0000)]
Fix a typo which broke Xen build

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoFix mingw32 build
Blue Swirl [Sat, 20 Mar 2010 08:26:27 +0000 (08:26 +0000)]
Fix mingw32 build

mkdir() only takes path argument on mingw32:

  CC    i386-softmmu/vl.o
/src/qemu/vl.c: In function 'qmp_add_default':
/src/qemu/vl.c:3763: error: too many arguments to function 'mkdir'
/src/qemu/vl.c:3769: error: too many arguments to function 'mkdir'

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoFix build
Blue Swirl [Sat, 20 Mar 2010 08:11:01 +0000 (08:11 +0000)]
Fix build

CC    curses.o
cc1: warnings being treated as errors
/src/qemu/curses.c: In function 'curses_display_init':
/src/qemu/curses.c:341: error: initialization from incompatible pointer type

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoIntroduce a default qmp session
Anthony Liguori [Wed, 17 Mar 2010 22:37:03 +0000 (17:37 -0500)]
Introduce a default qmp session

Basically, -qmp unix:%{home}/.qemu/qmp/%{uuid}.sock,server,nowait

%{uuid} will be -uuid if it's specified, otherwise, if libuuid is available,
we generate a uuid.  If it's not available, we don't create one.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqmp: don't make -qmp disable the default monitor
Anthony Liguori [Wed, 17 Mar 2010 19:52:30 +0000 (14:52 -0500)]
qmp: don't make -qmp disable the default monitor

Instead, we introduce a default_qmp flag.  We don't use it yet, but will in the
next patch.

This has a user-visible impact as specifying just -qmp will now also show a
monitor on the 'vc'.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agotap: invoke downscript when we exit abnormally
Anthony Liguori [Wed, 17 Mar 2010 23:00:45 +0000 (18:00 -0500)]
tap: invoke downscript when we exit abnormally

Right now, downscript is not invoked reliably.  If you execute 'quit' from the
monitor, it won't be invoked.

This fixes that by converting tap to use an exit_notifier to execute the
downscript.  In this case, allowing an exit notifier to include state is
critically important for the conversion.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoConvert atexit users to exit_notifier
Anthony Liguori [Wed, 17 Mar 2010 22:59:26 +0000 (17:59 -0500)]
Convert atexit users to exit_notifier

All of these users have global state so we really don't see a benefit from
exit_notifier.  However, using exit_notifier means that there's one less
justification for having global state in the first place.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd exit notifiers
Anthony Liguori [Wed, 17 Mar 2010 22:44:48 +0000 (17:44 -0500)]
Add exit notifiers

Like atexit() but with state

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agosdl: use mouse mode notifier
Anthony Liguori [Wed, 10 Mar 2010 15:42:58 +0000 (09:42 -0600)]
sdl: use mouse mode notifier

Today we poll the mouse mode whenever there is a mouse movement.  There is a
subtle usability problem with this though.

If we're in relative mode and grab is enabled, when we change to absolute mode,
we break grab.  This gives a user a seamless transition when the new pointer
is enabled.

But because we poll for mouse change, this grab break won't occur until the user
attempts to move the mouse.  By using notifiers, the grab break happens as soon
as possible.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoinput: make vnc use mouse mode notifiers
Anthony Liguori [Wed, 10 Mar 2010 15:38:29 +0000 (09:38 -0600)]
input: make vnc use mouse mode notifiers

When we switch to absolute mode, we send out a notification (if the client
supports it).  Today, we only send this notification when the client sends us
a mouse event and we're in the wrong mode.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoExpose whether a mouse is an absolute device via QMP and the human monitor.
Anthony Liguori [Wed, 10 Mar 2010 02:58:07 +0000 (20:58 -0600)]
Expose whether a mouse is an absolute device via QMP and the human monitor.

For QMP, we just add an attribute which is backwards compatible.  For the human
monitor, we add (absolute) to the end of the line.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd notifier for mouse mode changes
Anthony Liguori [Tue, 9 Mar 2010 19:25:00 +0000 (13:25 -0600)]
Add notifier for mouse mode changes

Right now, DisplayState clients rely on polling the mouse mode to determine
when the device is changed to an absolute device.  Use a notification list to
add an explicit notification.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd kbd_mouse_has_absolute()
Anthony Liguori [Tue, 9 Mar 2010 20:26:40 +0000 (14:26 -0600)]
Add kbd_mouse_has_absolute()

kbd_mouse_is_absolute tells us whether the current mouse handler is an absolute
device.  kbd_mouse_has_absolute tells us whether we have any device that is
capable of absolute input.

This lets us tell a user that they have configured an absolute device but that
the guest is not currently using it.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRewrite mouse handlers to use QTAILQ and to have an activation function
Anthony Liguori [Wed, 10 Mar 2010 02:52:22 +0000 (20:52 -0600)]
Rewrite mouse handlers to use QTAILQ and to have an activation function

And convert usb-hid to use it (to avoid regression with bisection)

Right now, when we do info mice and we've added a usb tablet, we don't see it
until the guest starts using the tablet.  We implement this behavior in order
to provide a means to delay registration of a mouse handler since we treat
the last registered handler as the current handler.

This is a usability problem though as we would like to give the user feedback
that they've either 1) not added an absolute device 2) there is an absolute
device but the guest isn't using it 3) we have an absolute device and it's
active.

By using QTAILQ and having an explicit activation function that moves the
handler to the front of the queue, we can implement the same semantics as
before with respect to automatically switching to usb tablet while providing
the user with a whole lot more information.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd support for generic notifier lists
Anthony Liguori [Tue, 9 Mar 2010 19:16:14 +0000 (13:16 -0600)]
Add support for generic notifier lists

Notifiers are data-less callbacks and a notifier list is a list of registered
notifiers that all are interested in a particular event.

We'll use this in a few patches to implement mouse change notification.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
v1 -> v2
 - Do not do memory allocations by placing list nodes in notifier

14 years agoRevert "usb-linux: remove unreachable default in switch statement"
Anthony Liguori [Wed, 17 Mar 2010 21:00:24 +0000 (16:00 -0500)]
Revert "usb-linux: remove unreachable default in switch statement"

This reverts commit 3c9c706c3b66d838942aba53c0d3fdcdf06c7423.

This breaks build (gcc 4.3.2):
    CC    usb-linux.o
 cc1: warnings being treated as errors
 /src/qemu/usb-linux.c: In function 'usb_linux_update_endp_table':
 /src/qemu/usb-linux.c:759: error: 'type' may be used uninitialized in
 this function

Reported-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoHandle deleted IOHandlers in a single buffer
Juan Quintela [Thu, 11 Mar 2010 16:55:41 +0000 (17:55 +0100)]
Handle deleted IOHandlers in a single buffer

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agobt: remove bt_host_read_poll()
Juan Quintela [Thu, 11 Mar 2010 16:55:40 +0000 (17:55 +0100)]
bt: remove bt_host_read_poll()

It allways returned true, that is the equivalent of not having the
callback.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agorename IOCanRWHandler to IOCanReadHandler
Juan Quintela [Thu, 11 Mar 2010 16:55:39 +0000 (17:55 +0100)]
rename IOCanRWHandler to IOCanReadHandler

It was always only used for reads

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoremove useless cast
Juan Quintela [Thu, 11 Mar 2010 16:55:38 +0000 (17:55 +0100)]
remove useless cast

values are already pointers, no need to cast them to void *

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoConvert io handlers to QLIST
Juan Quintela [Thu, 11 Mar 2010 16:55:37 +0000 (17:55 +0100)]
Convert io handlers to QLIST

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoCODING_STYLE: Reserve qemu_ prefix for library wrappers
Avi Kivity [Thu, 11 Mar 2010 14:48:43 +0000 (16:48 +0200)]
CODING_STYLE: Reserve qemu_ prefix for library wrappers

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix OpenBSD linker warning
Blue Swirl [Thu, 18 Mar 2010 20:48:19 +0000 (20:48 +0000)]
Fix OpenBSD linker warning

qemu-option.o(.text+0x20f8): In function `qemu_opts_from_qdict_1':
/src/qemu/qemu-option.c:813: warning: strcpy() is almost always misused, please use strlcpy()

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>