qemu
14 years agoQemuOpts: switch over -device.
Gerd Hoffmann [Fri, 31 Jul 2009 10:25:37 +0000 (12:25 +0200)]
QemuOpts: switch over -device.

Make -device switch use the QemuOpts framework.
Everything should continue to work like it did before.

New: "-set device.$id.$property=$value" works.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agoQemuOpts: add -set option
Gerd Hoffmann [Fri, 31 Jul 2009 10:25:36 +0000 (12:25 +0200)]
QemuOpts: add -set option

One use case will be file for drives (no filename quoting issues), i.e.

-drive id=test,if=virtio
-set drive.test.file=/vmdisk/test-virtio.img

It will work for any other option (assuming handled by QemuOpts) though.
Except for id= for obvious reasons ;).

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agoQemuOpts: create qemu-config.h
Gerd Hoffmann [Fri, 31 Jul 2009 10:25:35 +0000 (12:25 +0200)]
QemuOpts: create qemu-config.h

Move drive option description there.
Rename it, give it a qemu_ prefix.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agoQemuOpts: make the drive id actually show up in "info block".
Gerd Hoffmann [Fri, 31 Jul 2009 10:25:34 +0000 (12:25 +0200)]
QemuOpts: make the drive id actually show up in "info block".

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agoQemuOpts: qemu_opts_parse: fix id= parsing
Gerd Hoffmann [Fri, 31 Jul 2009 10:25:33 +0000 (12:25 +0200)]
QemuOpts: qemu_opts_parse: fix id= parsing

We can't use get_param_value(), it can't handle parameters without
'=' in there.  Examples not working because of that:

  -device foo,id=bar
  -device file=/path/image,format=qcow2,snapshot,id=disk0

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agoQemuOpts: add some functions
Gerd Hoffmann [Fri, 31 Jul 2009 10:25:32 +0000 (12:25 +0200)]
QemuOpts: add some functions

qemu_opt_foreach: loop over all QemuOpts entries.
qemu_opts_id: return QemuOpts id.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agoFix symfind.
Laurent Desnogues [Thu, 30 Jul 2009 17:23:49 +0000 (19:23 +0200)]
Fix symfind.

this patch fixes an issue in symfind.

Assume you have the following symbols:

Address  Size
0045bca0 00000080 T s0
0045bd20 00000112 T s1

You'll notice that s1 is s0 + size.

So the current symfind will find that address 0045bd20 belongs to s0
instead of s1.

Laurent

Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agoconfigure: let it find xen headers and libs
Christoph Egger [Thu, 30 Jul 2009 13:33:57 +0000 (15:33 +0200)]
configure: let it find xen headers and libs

Attached patch lets configure find xen headers and libs
with --extra-cflags and --extra-ldlfags option.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agotolower -> qemu_tolower
Christoph Egger [Thu, 30 Jul 2009 13:28:45 +0000 (15:28 +0200)]
tolower -> qemu_tolower

Use qemu_tolower() instead of tolower().
Fixes warning on NetBSD.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agoDo not try to invoke shebang scripts directly (NFS issues)
malc [Sun, 9 Aug 2009 23:40:16 +0000 (03:40 +0400)]
Do not try to invoke shebang scripts directly (NFS issues)

Signed-off-by: malc <av1474@comtv.ru>

14 years agoUse qemu_irq for system_powerdown
Blue Swirl [Sun, 9 Aug 2009 08:42:19 +0000 (08:42 +0000)]
Use qemu_irq for system_powerdown

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

14 years agoSparc32: use qemu_irq for system_powerdown
Blue Swirl [Sun, 9 Aug 2009 07:27:29 +0000 (07:27 +0000)]
Sparc32: use qemu_irq for system_powerdown

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

14 years agoSparc32: move sparc32_dma init to sun4m.c
Blue Swirl [Sat, 8 Aug 2009 21:43:12 +0000 (21:43 +0000)]
Sparc32: move sparc32_dma init to sun4m.c

Also connect ESP and Lance reset signals to DMA.

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

14 years agoSparc32: remove VRAM and NVRAM sizes from hwdef
Blue Swirl [Sat, 8 Aug 2009 21:04:18 +0000 (21:04 +0000)]
Sparc32: remove VRAM and NVRAM sizes from hwdef

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

14 years agoSparc32: remove IRQ numbers from hwdef
Blue Swirl [Sat, 8 Aug 2009 20:55:37 +0000 (20:55 +0000)]
Sparc32: remove IRQ numbers from hwdef

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

14 years agoSparc32: move intbit_to_level table back to slavio_intctl.c
Blue Swirl [Sat, 8 Aug 2009 20:36:08 +0000 (20:36 +0000)]
Sparc32: move intbit_to_level table back to slavio_intctl.c

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

14 years agoSparc32: move device instantiation to sun4m.c
Blue Swirl [Sat, 8 Aug 2009 20:24:47 +0000 (20:24 +0000)]
Sparc32: move device instantiation to sun4m.c

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

14 years agoSparc32: Refactor slavio timer
Blue Swirl [Sat, 8 Aug 2009 20:08:15 +0000 (20:08 +0000)]
Sparc32: Refactor slavio timer

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

14 years agoppc_newworld: configure screen size from QEMU command line options
Blue Swirl [Sat, 8 Aug 2009 10:47:15 +0000 (10:47 +0000)]
ppc_newworld: configure screen size from QEMU command line options

Use the FW_CFG interface to send user requested screen size and depth to
OpenBIOS like 7f1aec5f93382eef75920899f4065613aeaf02a2 for ppc_oldworld.

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

14 years agoSparc64: configure screen size from QEMU command line options
Blue Swirl [Sat, 8 Aug 2009 10:44:56 +0000 (10:44 +0000)]
Sparc64: configure screen size from QEMU command line options

Use the FW_CFG interface to send user requested screen size and depth to
OpenBIOS like 7f1aec5f93382eef75920899f4065613aeaf02a2 for ppc_oldworld.

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

14 years agoppc_oldworld: configure screen size from qemu command line options
Laurent Vivier [Sat, 8 Aug 2009 10:19:24 +0000 (10:19 +0000)]
ppc_oldworld: configure screen size from qemu command line options

This patch uses the FW_CFG interface to send user requested screen size
and depth to openbios.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

14 years agoSparc64: replace tsptr with helper routine
Igor Kovalenko [Mon, 3 Aug 2009 19:15:02 +0000 (23:15 +0400)]
Sparc64: replace tsptr with helper routine

tl and tsptr of members sparc64 cpu state must be changed
simultaneously to keep trap state window in sync with current
trap level. Currently translation of store to tl does not change
tsptr, which leads to corrupt trap state on corresponding
trap level.

This patch removes tsptr from sparc64 cpu state and replaces
all uses with call to helper routine.

Changes v0->v1:
- reimplemented helper routine with tcg generator
- on cpu reset trap type and pstate are populated with power-on reset
values, including tl=maxtl

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

14 years agolinux-user: make FUTEX_* calls honor timeout parameter
Nathan Froyd [Mon, 3 Aug 2009 15:43:29 +0000 (08:43 -0700)]
linux-user: make FUTEX_* calls honor timeout parameter

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: malc <av1474@comtv.ru>

14 years agoenable NPTL for ppc-linux-user targets in configure
Nathan Froyd [Mon, 3 Aug 2009 15:43:28 +0000 (08:43 -0700)]
enable NPTL for ppc-linux-user targets in configure

Enabling support for ppc64-linux-user should be easy enough to do later.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: malc <av1474@comtv.ru>

14 years agolinux-user: handle POWERPC_EXCP_STCX
Nathan Froyd [Mon, 3 Aug 2009 15:43:27 +0000 (08:43 -0700)]
linux-user: handle POWERPC_EXCP_STCX

We handle conditional stores as an exception so we can ensure that no
other thread is changing memory out from underneath us.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: malc <av1474@comtv.ru>

14 years agotarget-ppc: add exceptions for conditional stores
Nathan Froyd [Mon, 3 Aug 2009 15:43:26 +0000 (08:43 -0700)]
target-ppc: add exceptions for conditional stores

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: malc <av1474@comtv.ru>

14 years agotarget-ppc: retain l{w,d}arx loaded value
Nathan Froyd [Mon, 3 Aug 2009 15:43:25 +0000 (08:43 -0700)]
target-ppc: retain l{w,d}arx loaded value

We do this so we can check on the corresponding stc{w,d}x. whether the
value has changed.  It's a poor man's form of implementing atomic
operations and is valid only for NPTL usermode Linux emulation.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: malc <av1474@comtv.ru>

14 years agotarget-ppc: add cpu_set_tls
Nathan Froyd [Mon, 3 Aug 2009 15:43:24 +0000 (08:43 -0700)]
target-ppc: add cpu_set_tls

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: malc <av1474@comtv.ru>

14 years agotarget-ppc: fix cpu_clone_regs
Nathan Froyd [Mon, 3 Aug 2009 15:43:23 +0000 (08:43 -0700)]
target-ppc: fix cpu_clone_regs

We only need to make sure that the clone syscall looks like it
succeeded, not clobber 60% of the register set.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: malc <av1474@comtv.ru>

14 years agoFix Sparse warning about missing prototype
Blue Swirl [Sat, 1 Aug 2009 10:29:42 +0000 (10:29 +0000)]
Fix Sparse warning about missing prototype

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

14 years agoFix Sparse warning about "expression using sizeof on a function"
Blue Swirl [Sat, 1 Aug 2009 10:13:44 +0000 (10:13 +0000)]
Fix Sparse warning about "expression using sizeof on a function"

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

14 years agoAdd missing "static"
Blue Swirl [Sat, 1 Aug 2009 10:13:43 +0000 (10:13 +0000)]
Add missing "static"

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

14 years agoMore NULL pointer fixes
Blue Swirl [Sat, 1 Aug 2009 10:13:20 +0000 (10:13 +0000)]
More NULL pointer fixes

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

14 years agoFix Sparse warnings: "Using plain integer as NULL pointer"
Blue Swirl [Fri, 31 Jul 2009 21:16:51 +0000 (21:16 +0000)]
Fix Sparse warnings: "Using plain integer as NULL pointer"

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

14 years agoPPC: convert Uni-north to qdev: also fixes Mac99 machine crash
Blue Swirl [Fri, 31 Jul 2009 20:23:28 +0000 (20:23 +0000)]
PPC: convert Uni-north to qdev: also fixes Mac99 machine crash

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

14 years agoPPC: convert Grackle to qdev
Blue Swirl [Fri, 31 Jul 2009 20:23:02 +0000 (20:23 +0000)]
PPC: convert Grackle to qdev

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

14 years agoOption rom makefile fixes
Paul Brook [Fri, 31 Jul 2009 12:18:32 +0000 (13:18 +0100)]
Option rom makefile fixes

Fix toplevel option rom makefile rules.

Signed-off-by: Paul Brook <paul@codesourcery.com>

14 years agoSave/restore ARMv6 MMU state
Paul Brook [Thu, 30 Jul 2009 12:33:47 +0000 (13:33 +0100)]
Save/restore ARMv6 MMU state

Correctly save/restore ARMV6 MMU state.

Signed-off-by: Paul Brook <paul@codesourcery.com>

14 years agoesp: fix interrupt register read
Blue Swirl [Fri, 31 Jul 2009 07:26:44 +0000 (07:26 +0000)]
esp: fix interrupt register read

Read of interrupt register should clear it and also sequence step and status.

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

14 years agosparc64 flush pending conditional evaluations before exposing cpu state
Igor Kovalenko [Tue, 28 Jul 2009 21:32:23 +0000 (01:32 +0400)]
sparc64 flush pending conditional evaluations before exposing cpu state

If translation block is interrupted by e.g. mmu exception
we need to compute conditional flags for inclusion into
saved cpu state. Otherwise after return from trap
conditional instructions would use stale psr/xcc data.

Signed-off-by: igor.v.kovalenko@gmail.com

--
Kind regards,
Igor V. Kovalenko

14 years agoFix SDL zooming with pl110 (cf. d3ffcafe25b5966b351ea6100160c2156688f22f)
Blue Swirl [Fri, 31 Jul 2009 06:10:02 +0000 (09:10 +0300)]
Fix SDL zooming with pl110 (cf. d3ffcafe25b5966b351ea6100160c2156688f22f)

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

14 years agoe1000.c doesn't properly emulate EERD and ICS registers
Bill Paul [Wed, 29 Jul 2009 17:22:55 +0000 (10:22 -0700)]
e1000.c doesn't properly emulate EERD and ICS registers

Once again, the emulation of the EERD and ICS registers in e1000.c is
incorrect. Nobody has noticed this before because none of the Intel-written
e1000 drivers use these registers, and all of the independently written open
source drivers copy Intel's example, so they don't use them either.
Regardless, these registers are documented in the programmer's manuals, and
their emulated behavior doesn't match the verified behavior of real hardware,
so any software that does use them doesn't function correctly.

-Bill

Signed-off-by: Bill Paul <wpaul@windriver.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoqemu-option: fix parse_option_number().
Gerd Hoffmann [Wed, 29 Jul 2009 08:39:59 +0000 (10:39 +0200)]
qemu-option: fix parse_option_number().

It works much better when parse_option_number actually
returns the number parsed ...

Common breakage resulting from this bug is that
'qemu -hda foo.img -cdrom bar.iso' stops working
(cdrom isn't there).

Cc: Avi Kivity <avi@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoqdev: convert all vga devices.
Gerd Hoffmann [Tue, 28 Jul 2009 16:18:00 +0000 (18:18 +0200)]
qdev: convert all vga devices.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoqdev/core: add monitor command to list all drivers
Gerd Hoffmann [Wed, 29 Jul 2009 11:12:24 +0000 (13:12 +0200)]
qdev/core: add monitor command to list all drivers

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoqdev: factor out qdev_print_devinfo.
Gerd Hoffmann [Wed, 29 Jul 2009 11:12:23 +0000 (13:12 +0200)]
qdev: factor out qdev_print_devinfo.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoFix VM state change handlers running out of order
Markus Armbruster [Tue, 28 Jul 2009 18:33:41 +0000 (14:33 -0400)]
Fix VM state change handlers running out of order

When a VM state change handler changes VM state, other VM state change
handlers can see the state transitions out of order.

bmdma_map(), scsi_disk_init() and virtio_blk_init() install VM state
change handlers to restart DMA.  These handlers can vm_stop() by
running into a write error on a drive with werror=stop.  This throws
the VM state change handler callback into disarray.  Here's an example
case I observed:

0. The virtual IDE drive goes south.  All future writes return errors.

1. Something encounters a write error, and duly stops the VM with
   vm_stop().

2. vm_stop() calls vm_state_notify(0).

3. vm_state_notify() runs the callbacks in list vm_change_state_head.
   It contains ide_dma_restart_cb() installed by bmdma_map().  It also
   contains audio_vm_change_state_handler() installed by audio_init().

4. audio_vm_change_state_handler() stops audio stuff.

5. User continues VM with monitor command "c".  This runs vm_start().

6. vm_start() calls vm_state_notify(1).

7. vm_state_notify() runs the callbacks in vm_change_state_head.

8. ide_dma_restart_cb() happens to come first.  It does its work, runs
   into a write error, and duly stops the VM with vm_stop().

9. vm_stop() runs vm_state_notify(0).

10. vm_state_notify() runs the callbacks in vm_change_state_head.

11. audio_vm_change_state_handler() stops audio stuff.  Which isn't
   running.

12. vm_stop() finishes, ide_dma_restart_cb() finishes, step 7's
   vm_state_notify() resumes running handlers.

13. audio_vm_change_state_handler() starts audio stuff.  Oopsie.

Fix this by moving the actual write from each VM state change handler
into a new bottom half (suggested by Gleb Natapov).

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agovnc: fix copyrect screen corruption
Gerd Hoffmann [Mon, 27 Jul 2009 15:10:48 +0000 (17:10 +0200)]
vnc: fix copyrect screen corruption

When sending a copyrect command to the vnc client, we must also update
the local server surface.  Otherwise the server's and the client's idea
of the screen content run out of sync and screen updates don't work
correctly.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoRemove the virtio-{blk, console}-pci-0-10 device types
Mark McLoughlin [Thu, 30 Jul 2009 10:29:13 +0000 (11:29 +0100)]
Remove the virtio-{blk, console}-pci-0-10 device types

These are now unused.

However, perhaps the idea is that when we add -device, they will be
useful? In that case, we should add virtio-net-pci-0-10 too.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoRemove the pc-0-10 machine type
Mark McLoughlin [Thu, 30 Jul 2009 10:29:12 +0000 (11:29 +0100)]
Remove the pc-0-10 machine type

We have the pc-0.10 machine type now which does exactly the same
thing.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agofix migration to obey -S
Paolo Bonzini [Mon, 27 Jul 2009 21:17:51 +0000 (23:17 +0200)]
fix migration to obey -S

Since migration returns right away, starting the VM right
after calling qemu_start_incoming_migration is wrong even
if -S is not passed.  We have to do this after migration
has completed.

Cc: Glauber Costa <glommer@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoalsa: add host suspend/resume support
Bjørn Mork [Thu, 30 Jul 2009 07:44:26 +0000 (09:44 +0200)]
alsa: add host suspend/resume support

Both input and output streams may be in SND_PCM_STATE_SUSPENDED
after the host is suspended and resumed, meaning "Hardware is
suspended".  snd_pcm_readi() and snd_pcm_writei() will return
-ESTRPIPE if called while the stream is in this state.

Call snd_pcm_resume() to enable audio output and capture after
host resume.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: malc <av1474@comtv.ru>

14 years agoDefine ENOTSUP anywhere it isn't defined
Anthony Liguori [Tue, 28 Jul 2009 20:48:31 +0000 (15:48 -0500)]
Define ENOTSUP anywhere it isn't defined

I confused ENOTSUP with ENOTSUPP.  Juan's original patch was correct.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoRevert "Fake dirty loggin when it's not there"
Anthony Liguori [Mon, 27 Jul 2009 20:23:59 +0000 (15:23 -0500)]
Revert "Fake dirty loggin when it's not there"

This reverts commit bd8367761236cd5c435598aeb2f1b8240c09b059.

PPC should just implement dirty logging so we can avoid all the fall-out from
this changeset.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoFix out of tree build broken by 791e08c753a9f9be3c3880b4ea83b6dfa4b6ccad
Blue Swirl [Mon, 27 Jul 2009 19:59:36 +0000 (19:59 +0000)]
Fix out of tree build broken by 791e08c753a9f9be3c3880b4ea83b6dfa4b6ccad

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

14 years agoFix typo WIN32 -> _WIN32
Anthony Liguori [Mon, 27 Jul 2009 19:55:25 +0000 (14:55 -0500)]
Fix typo WIN32 -> _WIN32

This was spotted by Juan Quintela

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoset SEARCH_PATH for the linker script from output of ld --verbose -v
Juan Quintela [Wed, 22 Jul 2009 20:37:40 +0000 (22:37 +0200)]
set SEARCH_PATH for the linker script from output of ld --verbose -v

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agogenerate LDFLAGS for *-linux-user and *-bsd-user in a single place in configure
Juan Quintela [Wed, 22 Jul 2009 20:37:39 +0000 (22:37 +0200)]
generate LDFLAGS for *-linux-user and *-bsd-user in a single place in configure

Remove lots of duplicate code in the process

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoour build system don't support mips little endian linux-user or bsd-user
Juan Quintela [Wed, 22 Jul 2009 20:37:38 +0000 (22:37 +0200)]
our build system don't support mips little endian linux-user or bsd-user

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoDon't build option roms on Mac OS X
Juan Quintela [Tue, 21 Jul 2009 12:11:22 +0000 (14:11 +0200)]
Don't build option roms on Mac OS X

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agomultiboot.bin is a generated file
Juan Quintela [Tue, 21 Jul 2009 12:11:21 +0000 (14:11 +0200)]
multiboot.bin is a generated file

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agouse cc-option for optionrom
Juan Quintela [Tue, 21 Jul 2009 12:11:20 +0000 (14:11 +0200)]
use cc-option for optionrom

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoUse quiet-command for building optionrom
Juan Quintela [Tue, 21 Jul 2009 12:11:19 +0000 (14:11 +0200)]
Use quiet-command for building optionrom

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agomove cc-option definition to rules.mak
Juan Quintela [Tue, 21 Jul 2009 12:11:18 +0000 (14:11 +0200)]
move cc-option definition to rules.mak

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoGenerate config-host.h from config-host.mak
Juan Quintela [Mon, 27 Jul 2009 14:13:25 +0000 (16:13 +0200)]
Generate config-host.h from config-host.mak

Generate CONFIG_AUDIO_DRIVERS.  Order is important here, because the
first driver in the list is the one used by default.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agorename USE_NPTL to CONFIG_USE_NPTL
Juan Quintela [Mon, 27 Jul 2009 14:13:24 +0000 (16:13 +0200)]
rename USE_NPTL to CONFIG_USE_NPTL

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agorename NEEDS_LIBSUNMATH to CONFIG_NEEDS_LIBSUNMATH
Juan Quintela [Mon, 27 Jul 2009 14:13:23 +0000 (16:13 +0200)]
rename NEEDS_LIBSUNMATH to CONFIG_NEEDS_LIBSUNMATH

Once there fix a place where it was misspelled

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agodefine ENOTSUP the same that the other errors
Juan Quintela [Mon, 27 Jul 2009 14:13:22 +0000 (16:13 +0200)]
define ENOTSUP the same that the other errors

aliguori: ENOTSUP is not 4096 universally, only on OpenBSD

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agotest if xen is enabled only once
Juan Quintela [Mon, 27 Jul 2009 14:13:21 +0000 (16:13 +0200)]
test if xen is enabled only once

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agosimplify fdt libs selection
Juan Quintela [Mon, 27 Jul 2009 14:13:20 +0000 (16:13 +0200)]
simplify fdt libs selection

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agosimplify vde libs selection
Juan Quintela [Mon, 27 Jul 2009 14:13:19 +0000 (16:13 +0200)]
simplify vde libs selection

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agosimplify brlapi selection
Juan Quintela [Mon, 27 Jul 2009 14:13:18 +0000 (16:13 +0200)]
simplify brlapi selection

Use same style that everythnig else

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agosimplify curses library selection
Juan Quintela [Mon, 27 Jul 2009 14:13:17 +0000 (16:13 +0200)]
simplify curses library selection

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoDefine and use xen libs in a single place
Juan Quintela [Mon, 27 Jul 2009 14:13:16 +0000 (16:13 +0200)]
Define and use xen libs in a single place

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoindent with 2 spaces sdl tests
Juan Quintela [Mon, 27 Jul 2009 14:13:15 +0000 (16:13 +0200)]
indent with 2 spaces sdl tests

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoremove sdl_static. Just do the right thing if static is yes
Juan Quintela [Mon, 27 Jul 2009 14:13:14 +0000 (16:13 +0200)]
remove sdl_static. Just do the right thing if static is yes

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agotarget_softmmu is undefined at that point
Juan Quintela [Mon, 27 Jul 2009 14:13:13 +0000 (16:13 +0200)]
target_softmmu is undefined at that point

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoinstead of setup sdl_x11 just add -lX11 to sdl_libs
Juan Quintela [Mon, 27 Jul 2009 14:13:12 +0000 (16:13 +0200)]
instead of setup sdl_x11 just add -lX11 to sdl_libs

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoCalculate sdl_libs and sdl_flags and use them everywhere
Juan Quintela [Mon, 27 Jul 2009 14:13:11 +0000 (16:13 +0200)]
Calculate sdl_libs and sdl_flags and use them everywhere

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agosdl_config value was always sdl-config
Juan Quintela [Mon, 27 Jul 2009 14:13:10 +0000 (16:13 +0200)]
sdl_config value was always sdl-config

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agothe else part of this test is obsolete We are testing for sdl = yes inside the else...
Juan Quintela [Mon, 27 Jul 2009 14:13:09 +0000 (16:13 +0200)]
the else part of this test is obsolete We are testing for sdl = yes inside the else part of the test if sdl = yes

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoUse CONFIG_POSIX to simplify Makefile
Juan Quintela [Mon, 27 Jul 2009 14:13:08 +0000 (16:13 +0200)]
Use CONFIG_POSIX to simplify Makefile

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoAdd CONFIG_POSIX
Juan Quintela [Mon, 27 Jul 2009 14:13:07 +0000 (16:13 +0200)]
Add CONFIG_POSIX

We need a way to define posix-like (a.k.a. no win32)

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agorename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN
Juan Quintela [Mon, 27 Jul 2009 14:13:06 +0000 (16:13 +0200)]
rename WORDS_BIGENDIAN to HOST_WORDS_BIGENDIAN

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agorename DEBUG_EXEC to CONFIG_DEBUG_EXEC
Juan Quintela [Mon, 27 Jul 2009 14:13:05 +0000 (16:13 +0200)]
rename DEBUG_EXEC to CONFIG_DEBUG_EXEC

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agorename DEBUG_TCG to CONFIG_DEBUG_TCG
Juan Quintela [Mon, 27 Jul 2009 14:13:04 +0000 (16:13 +0200)]
rename DEBUG_TCG to CONFIG_DEBUG_TCG

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agorename HAVE_BYTESWAP_H to CONFIG_BYTESWAP_H
Juan Quintela [Mon, 27 Jul 2009 14:13:03 +0000 (16:13 +0200)]
rename HAVE_BYTESWAP_H to CONFIG_BYTESWAP_H

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agorename HAVE_GPROF to TARGET_GPROF
Juan Quintela [Mon, 27 Jul 2009 14:13:02 +0000 (16:13 +0200)]
rename HAVE_GPROF to TARGET_GPROF

Use was not consistent, in Makefile was TARGET_GPROF and in *h HAVE_GPROF

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agorename HAVE_MACHINE_BSWAP_H to CONFIG_MACHINE_BSWAP_H
Juan Quintela [Mon, 27 Jul 2009 14:13:01 +0000 (16:13 +0200)]
rename HAVE_MACHINE_BSWAP_H to CONFIG_MACHINE_BSWAP_H

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agorename HAVE_FNMATCH_H to CONFIG_FNMATCH
Juan Quintela [Mon, 27 Jul 2009 14:13:00 +0000 (16:13 +0200)]
rename HAVE_FNMATCH_H to CONFIG_FNMATCH

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agorename HAVE_IOVEC to CONFIG_IOVEC
Juan Quintela [Mon, 27 Jul 2009 14:12:59 +0000 (16:12 +0200)]
rename HAVE_IOVEC to CONFIG_IOVEC

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agorename HAVE_PREADV to CONFIG_PREADV
Juan Quintela [Mon, 27 Jul 2009 14:12:58 +0000 (16:12 +0200)]
rename HAVE_PREADV to CONFIG_PREADV

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agodefine MAP_ANONYMOUS if it is not defined in qemu-common.h
Juan Quintela [Mon, 27 Jul 2009 14:12:57 +0000 (16:12 +0200)]
define MAP_ANONYMOUS if it is not defined in qemu-common.h

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agorename HOST_BSD to CONFIG_BSD
Juan Quintela [Mon, 27 Jul 2009 14:12:56 +0000 (16:12 +0200)]
rename HOST_BSD to CONFIG_BSD

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoO_LARGEFILE is already set in qemu-common.h
Juan Quintela [Mon, 27 Jul 2009 14:12:55 +0000 (16:12 +0200)]
O_LARGEFILE is already set in qemu-common.h

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agofix indententation
Juan Quintela [Mon, 27 Jul 2009 14:12:54 +0000 (16:12 +0200)]
fix indententation

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoRefactor code to remove one #ifdef CONFIG_FDT
Juan Quintela [Mon, 27 Jul 2009 14:12:53 +0000 (16:12 +0200)]
Refactor code to remove one #ifdef CONFIG_FDT

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoRename HAVE_FDT to CONFIG_FDT and define it also in Makefile
Juan Quintela [Mon, 27 Jul 2009 14:12:52 +0000 (16:12 +0200)]
Rename HAVE_FDT to CONFIG_FDT and define it also in Makefile

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agoAdd -static in configure if needed
Juan Quintela [Mon, 27 Jul 2009 14:12:51 +0000 (16:12 +0200)]
Add -static in configure if needed

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

14 years agomore specific config.mak can overwrote more general config.mak
Juan Quintela [Mon, 27 Jul 2009 14:12:50 +0000 (16:12 +0200)]
more specific config.mak can overwrote more general config.mak

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>