summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2008-11-11Reintroduce migrate-to-exec: support (Charles Duffy)aliguori1-0/+2
KVM's live migration support included support for exec: URLs, allowing system state to be written or received via an arbitrary popen()ed subprocess. This provides a convenient way to pipe state through a compression algorithm or an arbitrary network transport on its way to its destination, and a convenient way to write state to disk; libvirt's qemu driver currently uses migration to exec: targets for this latter purpose. This version of the patch refactors now-common code from migrate-tcp.c into migrate.c. Signed-off-by: Charles Duffy <Charles_Duffy@messageone.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5694 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-11target-alpha: fix syscall error checkaurel321-1/+1
(re-add commit 5689) Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5692 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-11Revert commits 5685 to 5688 committed by mistakeaurel321-1/+1
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5691 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-11target-alpha: fix syscall error checkaurel321-1/+1
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5689 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-09Document bluetooth support in qemu-doc.balrog1-0/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5654 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-09Add qemu_strndup: qemu_strdup with length limit.balrog1-4/+4
Also optimise qemu_strdup by using memcpy - using pstrcpy is usually suboptimal. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5653 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-08Revert r5532, r5536 and a piece of r5531.balrog1-5/+5
The use of strncat and strndup was correct, pstrcpy and pstrdup wasn't. I'll try to restore building on non-gnu OSes in a later commit. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5651 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-08Use an option rom instead of boot sector for -kernelaliguori1-22/+50
Generate an option rom instead of using a hijacked boot sector for kernel booting. This just requires adding a small option ROM header and a few more instructions to the boot sector to take over the int19 vector and run our boot code. A disk is no longer needed when using -kernel on x86. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5650 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-07Use the right format string to printf sector num with DEBUG_IDE.balrog1-2/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5647 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05SM501 emulation for R2D-SH4blueswir14-2/+1246
This patch adds minimum emulation of SM501 multifunction device, whose main feature is 2D graphics. It is one of the peripheral of R2D, the SH4 evaluation board. We can see TUX printed on the QEMU console. Signed-off-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5632 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05Use qemu_ram_allocblueswir12-20/+31
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5630 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-05Add KVM support to QEMUaliguori1-0/+7
This patch adds very basic KVM support. KVM is a kernel module for Linux that allows userspace programs to make use of hardware virtualization support. It current supports x86 hardware virtualization using Intel VT-x or AMD-V. It also supports IA64 VT-i, PPC 440, and S390. This patch only implements the bare minimum support to get a guest booting. It has very little impact the rest of QEMU and attempts to integrate nicely with the rest of QEMU. Even though this implementation is basic, it is significantly faster than TCG. Booting and shutting down a Linux guest: w/TCG: 1:32.36 elapsed 84% CPU w/KVM: 0:31.14 elapsed 59% CPU Right now, KVM is disabled by default and must be explicitly enabled with -enable-kvm. We can enable it by default later when we have had better testing. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5627 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04ETRAX-FS: Make etraxfs_dmac_run local.edgar_igl2-2/+1
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5624 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04ETRAX-FS: Fix DMA warnings.edgar_igl1-8/+11
Signed-off-by: Jan Kiszka <jan.kiszka@web.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5621 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04tc6393xb: non-accelerated FB support (Dmitry Baryshkov).balrog4-8/+207
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5617 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04Tosa: dummy lcd support (Dmitry Baryshkov).balrog1-0/+84
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5616 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04scoop: GPRR reports the state of GPIO lines (Dmitry Baryshkov).balrog1-9/+6
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5615 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04Tosa: disable pxafb as it's not used on tosa (Dmitry Baryshkov).balrog1-1/+1
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5614 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04Tosa: provide correct IRQ to tc6393xb init (Dmitry Baryshkov).balrog1-1/+2
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5613 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04Tosa: emulate LEDs (Dmitry Baryshkov).balrog1-1/+34
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5612 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-04tc6393xb: initial support for nand control (Dmitry Baryshkov).balrog1-23/+221
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5611 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-03Fix RGBT 5:5:5 drawing on pxa2xx lcd (Lars Munch)balrog1-0/+1
This patch fixes the misinterpretaion of the transparency bit for RGBT 5:5:5 mode on pxa2xx LCDC. Signed-off-by: Lars Munch <lars@segv.dk> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5605 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-02More realistic max_cpusblueswir12-15/+8
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5604 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-02Fix loading of unstripped ELF PROM imageblueswir11-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5603 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-02Halt the CPU using a qemu_irqblueswir13-7/+15
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5601 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-01CVE-2008-4539: fix a heap overflow in Cirrus emulationaurel321-4/+3
The code in hw/cirrus_vga.c has changed a lot between CVE-2007-1320 has been announced and the patch has been applied. As a consequence it has wrongly applied and QEMU is still vulnerable to this bug if using VNC. (noticed by Jan Niehusmann) Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5587 c046a42c-6fe2-441c-8c8c-71466251a162
2008-11-01Malta & OMAP: add a name to char devicesaurel323-5/+5
(fixes regression introduced by r5575) Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5585 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-31Implement "info chardev" command. (Gerd Hoffmann)aliguori1-1/+4
This patch makes qemu keep track of the character devices in use and implements a "info chardev" monitor command to print a list. qemu_chr_open() sticks the devices into a linked list now. It got a new argument (label), so there is a name for each device. It also assigns a filename to each character device. By default it just copyes the filename passed in. Individual drivers can fill in something else though. qemu_chr_open_pty() sets the filename to name of the pseudo tty allocated. Output looks like this: (qemu) info chardev monitor: filename=unix:/tmp/run.sh-26827/monitor,server,nowait serial0: filename=unix:/tmp/run.sh-26827/console,server serial1: filename=pty:/dev/pts/5 parallel0: filename=vc:640x480 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5575 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-31Make DMA bottom-half driven (v2)aliguori8-24/+40
The current DMA routines are driven by a call in main_loop_wait() after every select. This patch converts the DMA code to be driven by a constantly rescheduled bottom half. The advantage of using a scheduled bottom half is that we can stop scheduling the bottom half when there no DMA channels are runnable. This means we can potentially detect this case and sleep longer in the main loop. The only two architectures implementing DMA_run() are cris and i386. For cris, I converted it to a simple repeating bottom half. I've only compile tested this as cris does not seem to work on a 64-bit host. It should be functionally identical to the previous implementation so I expect it to work. For x86, I've made sure to only fire the DMA bottom half if there is a DMA channel that is runnable. The effect of this is that unless you're using sb16 or a floppy disk, the DMA bottom half never fires. You probably should test this malc. My own benchmarks actually show slight improvement by it's possible the change in timing could affect your demos. Since v1, I've changed the code to use a BH instead of a timer. cris at least seems to depend on faster than 10ms polling. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5573 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-28Sun4c cleanups (Robert Reif)blueswir11-10/+5
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5568 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-28Set default max_cpus to one.balrog25-38/+12
Clean-up machine definitions. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5566 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-27ETRAX-FS: Process outgoing DMA channels until EOL.edgar_igl1-67/+69
For outgoing DMA channels, keep processing descriptors until hitting end of list. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5553 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-27Move sun4c to its own hwdef (Robert Reif)blueswir11-239/+241
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5549 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-26Fix undeclared symbol warnings from sparseblueswir122-35/+50
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-25Change freeing method because the allocation function was changed in r5532blueswir11-3/+3
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5536 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-25Replace uses of strndup (a GNU extension) with Qemu pstrdupblueswir11-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5532 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-25Replace uses of strncpy (a GNU extension) with Qemu pstrcpyblueswir11-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5531 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-25Fix a bad memcpy length (Bruce Rogers).balrog1-1/+1
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5528 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-24Live migration for Win32 (Hervé Poussineau)aliguori1-1/+1
This patch fixes migration so that it works on Win32. This requires using socket specific calls since sockets cannot be treated like file descriptors on win32. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5525 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-24hw/pc: don't register the memory hole as unassigned twiceaurel321-2/+0
Since revision 5228, we don't register the memory hole (0xa00000 to 0xfffff) anymore. As a consequence, we don't need to register it again as unassigned. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5522 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-24ETRAX-FS: Drop DMA polling for ethernet.edgar_igl1-46/+4
* Drop DMA poll mode. Instead immediately push rx frames straight into the DMA without waiting for DMA_run to poll them of the fifo. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5520 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-22ETRAX-FS: Add support for passing kernel command linesedgar_igl1-2/+15
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5516 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-22ETRAX-FS: Correct booting of elf linux images from ram.edgar_igl1-3/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5515 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-17scsi-generic: correct error managementaurel321-29/+103
this patch allows to fully use a tape device connected to qemu through the scsi-generic interface. Previous patch introduced tape SCSI commands management, this one improve error case management: - the SCSI controller command completion must be called with the status value, not the sense value. In the case of scsi-generic, the SCSI status is given by the field status of sg_io_hdr_t (the value is left shifted by one regarding status codes defined in /usr/include/scsi/scsi.h) - when a read is aborted due to a mark/EOF/EOD/EOM, the len reported to controller can be 0. LSI controller emulation doesn't know how to manage this. A workaround found is to call the completion routine with SCSI_REASON_DONE just after calling it with SCSI_REASON_DATA with len=0. This patch also manages correctly the block size of the tape device. This patch has been tested with a real tape device "HP C5683A", linux guest (debian etch) and tools like "mt", "tar" and "btape". Windows guest is not better supported than before... Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5497 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-13Fix some issues with QEMUFilealiguori1-2/+3
This patch allows QEMUFile's read and write operations to return negative error codes. This is necessary to detect things like closed streams during live migration. It also removes unused code for QEMUFileFD write path. Finally, it makes sure to avoid attempting to flush an output buffer if the file is only being used for input. This was spotted by Uri Lublin. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5474 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-12hw/apic.c: use functions from host-utils.haurel321-35/+3
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5469 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-12Define macro QEMU_GNUC_PREREQ and use itaurel321-2/+3
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5467 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-12Only use __builtin_* with GCC >= 3.4aurel321-2/+2
Fix gcc 3.3 builds, broken in revision 5465. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5466 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-12hw/apic.c: use __builtin funtions instead of assembly codeaurel321-10/+8
Suggested by malc. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5465 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-11Fix some debugging mistakes/leftoversmalc1-2/+0
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5458 c046a42c-6fe2-441c-8c8c-71466251a162