Commit Graph

8397 Commits

Author SHA1 Message Date
Juan Quintela 4f78ef9a90 Use the same structure for list of libs in curses and pthread
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:12 -05:00
Juan Quintela 576edbfa8e Make vnc configure options less verbose.
Rest of libraries don't print themselves

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 19:33:12 -05:00
malc 523e727d46 Remove a hack introduced by d19076faca
Work by Blue Swirl culminating with 5c55ff99fa
made it unnecessary.
2009-08-27 18:04:10 +04:00
Consul 15c875a3cd Fix dsound typos
Dsound currently does not compile due to the typos in the code. This
patch makes it compile again.{PATCH}

Signed-off-by: Alex Ivanov <void@aleksoft.net>
Signed-off-by: malc <av1474@comtv.ru>
2009-08-26 13:55:44 +04:00
Blue Swirl 4e02cd33ea Remove kqemu.c accidentally added by d60efc6b0d
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-25 19:32:42 +00:00
Blue Swirl 462eda24e5 Sparc32: improve interrupt handling
Level 15 interrupts are broadcast to all CPUs, each CPU can clear the
interrupt using the local Clear Pending register.

Update intbit_to_level table.

Don't try to raise level 0 interrupts.

Calculate pending interrupts based on the separate inputs from master
register. Setting or resetting the pending level isn't correct because of
overlap of levels.

Level 14 is always used for CPU timer interrupts, remove the property.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-25 18:29:36 +00:00
Blue Swirl d60efc6b0d Make CPURead/WriteFunc structure 'const'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-25 18:29:31 +00:00
Nathan Froyd fa31af0e63 target-mips: fix conditional moves off fp condition codes
Conditional moves off fp condition codes were using the result of
get_fp_bit to isolate and test the relevant condition code.  However,
get_fp_bit returns the bit number of the condition code, not a
bitmask.  (Compare the use of get_fp_bit in gen_compute_branch1, for
instance.)

Fixed by shifting a bitmask into place using the result of get_fp_bit in
the relevant functions (gen_mov{ci,cf_s,cf_d,cf_ps}).

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-08-25 18:05:27 +02:00
Laurent Desnogues 4e6f6d4c20 ARM back-end: Fix encode_imm
the encode_imm function in tcg/arm/tcg-target.c lacks shift declaration.

Laurent

Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2009-08-25 01:14:14 +02:00
Anthony Liguori 0d6b0b1d81 Make the e1000 the default network adapter for the pc target.
The ne2k is an ancient card that performs pretty terribly under QEMU.  In many
modern OSes, there is no longer drivers available for the ne2k.

Switch the default network adapter to e1000.  This card is more widely
suppported and performs rather well under QEMU.  There may be very old OSes
that had a ne2k driver but not an e1000 driver but I think this is likely the
exception.

I think the average user is better served with an e1000 vs ne2k.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:46:48 -05:00
Nathan Froyd 5ec4d682d2 eliminate errors about unused results in block/vpc.c
These errors come up when compiling with gcc-4.3.3 and some older headers:

/scratch/froydnj/qemu.git/block/vpc.c: In function 'vpc_create':
/scratch/froydnj/qemu.git/block/vpc.c:514: error: value computed is not used
/scratch/froydnj/qemu.git/block/vpc.c:516: error: value computed is not used
/scratch/froydnj/qemu.git/block/vpc.c:517: error: value computed is not used
/scratch/froydnj/qemu.git/block/vpc.c:566: error: value computed is not used

Use memcpy to copy the strings instead of strncpy.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:46:48 -05:00
Gerd Hoffmann 177539e06d virtio-blk: add msi support.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:46:48 -05:00
Gerd Hoffmann aa7116cbc8 qdev/prop: convert isa-bus to helper macros.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:46:48 -05:00
Christoph Hellwig 4dd75c702c make pthreads mandatory
As requested by Anthony make pthreads mandatory.  This means we will always
have AIO available on posix hosts, and it will also allow enabling the I/O
thread unconditionally once it's ready.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:46:47 -05:00
Michael S. Tsirkin 3987e1cf6d qemu: move virtio-pci.o to near pci.o
virtio-pci depends, and will always depend, on pci.c
so it makes sense to keep it in the same makefile,
(unlike the rest of virtio files which should eventually
 be moved out to Makefile.hw).

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:46:47 -05:00
Amit Shah 793cbfb5d1 char: Emit 'CLOSED' events on char device close
Notify users of the char interface whenever the file / connection is
closed.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:21:42 -05:00
Nathan Froyd 0b5c1ce846 cleanup cpu-exec.c, part 0/N: consolidate handle_cpu_signal
handle_cpu_signal is very nearly copy-paste code for each target, with a
few minor variations.  This patch sets up appropriate defaults for a
generic handle_cpu_signal and provides overrides for particular targets
that did things differently.  Fixing things like the persistent (XXX:
use sigsetjmp) should now become somewhat easier.

Previous comments on this patch suggest that the "activate soft MMU for
this block" comments refer to defunct functionality.  I have removed
such blocks for the appropriate targets in this patch.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:21:42 -05:00
Paolo Bonzini 7f79dd281c unify popen/fopen qemu wrappers
While reading Chris's code for fd migration I noticed the duplication
between QEMUFilePopen and QEMUFileStdio.  This fixes it, and makes
qemu_fopen more similar qemu_popen.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:02:55 -05:00
Anthony Liguori a25a0ef51e Only build osdep once
We no longer need hackery to work around kqemu

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:02:55 -05:00
Anthony Liguori 4a1418e07b Unbreak large mem support by removing kqemu
kqemu introduces a number of restrictions on the i386 target.  The worst is that
it prevents large memory from working in the default build.

Furthermore, kqemu is fundamentally flawed in a number of ways.  It relies on
the TSC as a time source which will not be reliable on a multiple processor
system in userspace.  Since most modern processors are multicore, this severely
limits the utility of kqemu.

kvm is a viable alternative for people looking to accelerate qemu and has the
benefit of being supported by the upstream Linux kernel.  If someone can
implement work arounds to remove the restrictions introduced by kqemu, I'm
happy to avoid and/or revert this patch.

N.B. kqemu will still function in the 0.11 series but this patch removes it from
the 0.12 series.

Paul, please Ack or Nack this patch.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:02:55 -05:00
Zachary Amsden 0953a80f04 Add a configure switch to enable / disable all user targets. I felt compelled to do it for symmetry, mostly it is useful to disable user targets when you don't want to build them.
Signed-off-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:42 -05:00
Chris Lalancette 4951f65bd3 Migration via unix sockets.
Implement migration via unix sockets.  While you can fake this using
exec and netcat, this involves forking another process and is
generally not very nice.  By doing this directly in qemu, we can avoid
the copy through the external nc command.  This is useful for
implementations (such as libvirt) that want to do "secure" migration;
we pipe the data on the sending side into the unix socket, libvirt
picks it up, encrypts it, and transports it, and then on the remote
side libvirt decrypts it, dumps it to another unix socket, and
feeds it into qemu.

The implementation is straightforward and looks very similar to
migration-exec.c and migration-tcp.c

Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:42 -05:00
Avi Kivity 1632dc6a8f Route IOAPIC interrupts via ISA bus
Instead of calling the IOAPIC from the PIC, raise IOAPIC irqs via the ISA bus.
As a side effect, IOAPIC lines 16-23 are enabled.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:42 -05:00
Avi Kivity 1452411b25 Route PC irqs to ISA bus instead of i8259 directly
A PC has its motherboard IRQ lines connected to both the PIC and IOAPIC.
Currently, qemu routes IRQs to the PIC which then calls the IOAPIC, an
incestuous arrangement.  In order to clean this up, create a new ISA IRQ
abstraction, and have devices raise ISA IRQs (which in turn raise the i8259
IRQs as usual).

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:41 -05:00
Alexandre Bique 21d4e8e3ef Makefile: fixed rule TAGS
- still works if the build dir is not the src dir
- use find instead of *.c block/*.c etc...

Signed-off-by: Alexandre Bique <alexandre.bique@citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:41 -05:00
Jes Sorensen 6b35e7bf48 QEMU set irq0override in fw_cfg
Hi,

After discussing the issue with Avi, Gleb and a couple others on irq,
we came to the conclusion that it is preferred to have QEMU request
features from the BIOS, rather than notifying the BIOS that it is
running on QEMU or KVM. This way memory ranges can change etc. and
an older BIOS will continue to work on newer QEMU if it receives the
info as a fw_cfg value.

This one also matches what qemu-kvm does for irq0override, except I
haven't made it configurable. I leave that as an exercise for whoever
would be interested in switching off irq0override.

Thanks,
Jes

Set irq0 override in fw_cfg, informing the BIOS that QEMU expects
override on irq0. This matches qemu-kvm, and will help sharing a
single BIOS binary.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:41 -05:00
Brian Wheeler e8b5439495 SMART ATA Functionality
For the lulz I implemented basic SMART functionality in ide.c.  smartctl
on linux recognizes it just fine and starting self tests with it
complete successfully.

Signed-off-by: Brian Wheeler <bdwheele@indiana.edu>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:41 -05:00
Stefan Weil 7dc3fa0913 Add missing linefeed in error message
The error message for an unknown network device given to
monitor command set_link looks better with a terminating
linefeed.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:40 -05:00
Zachary Amsden 861767594b Clean up VGA type selection; far too many variables being used to track one state leads to confusion if new variables are added.
Signed-off-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:40 -05:00
Zachary Amsden 52c18be9e9 When using stdio monitor and VNC display, one can set or clear a VNC password; this should set or turn off VNC authentication as well.
Signed-off-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:40 -05:00
Zachary Amsden 7ef923310a Don't segfault when changing VNC password on an SDL display.
Signed-off-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:40 -05:00
Chris Lalancette 9075000958 Fix detached migration with exec.
When trying to do detached migration with exec, I found that
the monitor wouldn't always return in a timely manner.  I
tracked this down to exec_start_outgoing_migration.  It
appeared we were setting the fd to NONBLOCK'ing, but in
point of fact we weren't.

This bugfix should also go onto the stable 0.10 branch

Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:40 -05:00
Avi Kivity 6b99dadc4a Do not disable autostart for live migration
If the user does not want autostart, they can specify -S.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:39 -05:00
Stefano Stabellini 04a52b4120 make vga screen_dump use DisplayState properly
Hi all,
currently the vga screen_dump code doesn't use the DisplayState
interface properly and tries to replace it temporarily while taking the
screenshot.
A better approach is to register a DisplayChangeListener, call
vga_hw_update, and finally write the ppm in the next call from dpy_update.

Testing is appreciated.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-24 08:01:39 -05:00
malc b6f6d0e2f8 Restore consistent formatting
Signed-off-by: malc <av1474@comtv.ru>
2009-08-24 15:18:40 +04:00
Juan Quintela e5944641ab es1370: Remove unused indirection of PCIES1370State and ES1370State
Signed-off-by: Juan Quintela <quintela@redhat.com>
2009-08-24 15:15:31 +04:00
Blue Swirl 2a1704a71d Fix device name completion for 'eject'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-23 20:10:28 +00:00
Andrzej Zaborowski 4445b0a624 Revert my commit c00a9de060
was incorrect.
2009-08-23 19:00:58 +02:00
Torsten Duwe 8d30b794ce Fix segfault of qemu-system-arm with PXA target
qemu-system-arm (0.10.5) segfaults when invoked with a PXA machine target,
e.g. -M tosa. The reason is fairly obvious:

Signed-off-by: Torsten Duwe <duwe@lst.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrzej Zaborowski <balrogg@gmail.com>
2009-08-23 18:08:14 +02:00
Reimar Döffinger 699960b272 sdl.c: support 32 bpp cursors
Hello,
currently when a 32 bpp cursor gets defined the result is all-black in
the areas that are not transparent (you'll get a 32 bpp cursor if you
use my previous patch to allow vmware_vga to use a 32 bpp framebuffer).
This is because the switch in sdl.c lacks a 32 bpp case.
The thing I am unsure about though is which byte is the unused one and
should be skipped, the first or the last - for the black-and-white
cursors I tested it doesn't make a difference...

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Andrzej Zaborowski <balrogg@gmail.com>
2009-08-23 18:03:34 +02:00
Reimar Döffinger c00a9de060 Use corect depth from DisplaySurface in vmware_vga.c
Hello,
for what I can tell, there is no way for vmware_vga to work correctly
right now. It assumes that the framebuffer bits-per-pixel and the one
from the DisplaySurface are identical (it uses directly the VRAM from
vga.c), but it always assumes 3 bytes per pixel, which is never possible
with the current version of DisplaySurface.
Attached patch fixes that by using ds_get_bits_per_pixel.
2009-08-23 18:00:33 +02:00
Andrzej Zaborowski 13f59cbfe3 Remove the unnecessary and only global in musicpal.c 2009-08-23 17:44:20 +02:00
Andrzej Zaborowski 7ef6e71c59 Merge with balrog@git.sv.gnu.org:/srv/git/qemu.git 2009-08-23 17:19:44 +02:00
Andrzej Zaborowski d074769c5a Make musicpal.c use the I2C device and the Marvell 88w8618 audio device
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Andrzej Zaborowski <balrogg@gmail.com>
2009-08-23 15:51:14 +02:00
Andrzej Zaborowski ef07b49145 Extract the Marvell 88w8618 audio device from musicpal.c
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Andrzej Zaborowski <balrogg@gmail.com>
2009-08-23 15:44:15 +02:00
Andrzej Zaborowski 3ead03bd0a Extract musicpal.c I2C bitbanging code and make it gpio aware
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Andrzej Zaborowski <balrogg@gmail.com>
2009-08-23 15:38:50 +02:00
Benoit Canet 343ec8e485 Musicpal qdev conversion: gpio (except I2C part), keyboard and lcd
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>
Signed-off-by: Andrzej Zaborowski <balrogg@gmail.com>
2009-08-23 14:38:07 +02:00
Blue Swirl d453c2c32e Sparc32: fix monitor commands 'info pic' and 'info irq'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-23 12:23:30 +00:00
Blue Swirl 7432ff5d6b Rearrange to suppress gcc 3.3.5 warning about unused variable
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-23 06:12:54 +00:00
Igor Kovalenko 9c9c310a54 def-helper.h allow helpers returning pointers
This change allows to define helpers returning pointers.
This looks like a typo in original commit.

Signed-off-by: igor.v.kovalenko@gmail.com
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-22 17:23:55 +00:00