summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-02-05Add a scatter-gather list type and accessors (Avi Kivity)aliguori3-1/+72
Scatter-gather lists are used extensively in dma-capable devices; a single data structure allows more code reuse later on. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6522 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-05Add debug, savevm and reset support for UniNorthblueswir12-1/+54
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6521 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-05Use qemu_ram_allocblueswir11-6/+10
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6520 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-05target-ppc: add vrlogefp instructionaurel323-0/+12
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6519 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-05soft-float: add float32_log2() and float64_log2()aurel322-0/+95
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6518 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-04Properly initialize len argument of sysctl and include stdio.h (perror)malc1-0/+2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6517 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-04target-ppc: fix previous commitaurel321-1/+4
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6516 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-04target-ppc: use the new float constantsaurel321-12/+6
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6515 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-04softfloat: add a 1.0 constant for float32 and float64aurel321-0/+2
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6514 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-04Add vcf{u,s}x instructionsaurel323-0/+17
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6513 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-04Add vrfi{m,n,p,z} instructionsaurel323-0/+26
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6512 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-04Add various NaN-handling macrosaurel321-0/+21
These simplify the implementation of the floating-point Altivec instructions and reduce clutter. Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6511 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-03Partialy fix mmap at EOF for large pagesize targets in user-mode.edgar_igl1-2/+37
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6510 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-03Remove accidental addition of local patch.aliguori1-1/+0
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6509 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-03Make mtvscr use a helperaurel323-5/+15
Do this so we can set float statuses once per mtvscr, rather than once per Altivec instruction. Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6508 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-03Add calls to initialize VSCR on appropriate machinesaurel321-0/+22
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6507 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-03Rename spe_status to vec_statusaurel322-57/+59
Only one of Altivec and SPE will be available on a given chip. Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6506 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-03Add f field to ppc_avr_taurel321-0/+1
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6505 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-03SH4: Fix warning when compiling sh7750_regnames.caurel321-0/+1
This patch fixes a warning when compiling sh7750_regnames.c which is caused by sh7750_regnames.h (which contains the prototype of regname()) not being included. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6504 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-03linux-user: Remove incorrect break;aurel321-1/+0
Reported-By: Laurent Desnogues <laurent.desnogues@gmail.com> Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6503 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-03Fix compilation of PPC64 targets with DEBUG_TCGV enabledaurel321-3/+3
The attached patch fixes compilation of PPC64 targets with DEBUG_TCGV enabled. Signed-off-by: Stuart Brady <stuart.brady@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6502 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-02Add phenom CPU descriptor (Alexander Graf)aliguori1-0/+28
As part of my ongoing effort to make nested SVM useful, I started working to get VMware ESX run inside KVM. VMware couples itself pretty tightly to the CPUID, so it's a good idea to emulate a machine that officially supports SVM and should thus exploit the powers of nested virtualization. This patch adds a Phenom CPU identifier, that resembles a real-world phenom CPU as closely as possible. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6501 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-02Implement FFXSR (Alexander Graf)aliguori1-8/+20
Newer AMD CPUs have the FFXSR capability. This leaves out XMM register in FXSAVE/FXRESTORE when in CPL=0 and 64-bit mode. This is required for Hyper-V. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6500 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-02Add zlib encoding support (Alexander Graf)aliguori1-0/+109
This patch adds zlib encoding support for VNC. It basically runs the raw traffic through zlib, providing a pretty good compression ratio. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6499 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-02Move the framebuffer update package out (Alexander Graf)aliguori1-4/+2
Currently the send_framebuffer_update_raw and send_framebuffer_update_hextile respectively send a send_framebuffer_update packet themselves. We need to reuse send_framebuffer_update_raw for zlib encoding though, so let's move it out. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6498 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-02Move buffer functions up (Alexander Graf)aliguori1-33/+33
We will need to use buffer functions in code that will end up being below the current buffer functions. In order to not introduce any function stub defines, let's just move them up. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6497 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-02Add some tight awareness to vnc.c (Alexander Graf)aliguori1-2/+21
This patch enables the vnc server to understand fundamental tight extensions. It changes from a "Hextile or not" scheme when sending framebuffer updates to a "preferred encoding", namely the last one set. While this is not perfect, as actually a list of "preferred encodings" should be kept, it's good enough for now. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6496 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-02Fix invalid #if in vnc.c when debugging is enabled (Alexander Graf)aliguori1-1/+1
While running with debugging enabled, I found an #if testing for an undefined value, not defined(value). This patch fixes that. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6495 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-02Use VNC protocol defines (Alexander Graf)aliguori1-47/+50
Now that we have nice defines for all sorts of constants, let's use them! This patch also takes the "feature variables", currently called has_* into a single feature int. This way adding new features is a lot easier and doesn't clutter the VncState struct. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6494 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-02Split VNC defines to vnc.h (Alexander Graf)aliguori3-35/+114
The VNC protocol contains quite some constants, some of which are currently hardcoded in the vnc.c code. This is not exactly pretty. Let's move all those constants out to vnc.h, so they are clearly separated. While at it, I also included other defines that will be used later in this patch series. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6493 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-01Replace noreturn with QEMU_NORETURNmalc8-12/+12
Thanks to Robert Riebisch for analysis [1] [1] http://marc.info/?l=qemu-devel&m=123352293319271&w=2 git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6492 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-01Add and use #defines for PCI device classesblueswir134-86/+81
This patch adds and uses #defines for PCI device classes and subclases, using a new pci_config_set_class() function, similar to the recently added pci_config_set_vendor_id() and pci_config_set_device_id(). Change since v1: fixed compilation of hw/sun4u.c Signed-off-by: Stuart Brady <stuart.brady@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6491 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-01Update #defines for PCI vendor and device IDs from OpenBIOS and Linuxblueswir18-16/+27
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6490 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-30PowerPC: IDE DB-DMA supportaurel324-23/+156
This patches allows powermac IDE interface to use DB-DMA. This implementation uses only synchronous I/O. Signed-off-by: Laurent Vivier <Laurent@lvivier.info> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6489 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-30PowerPC: mac-io DB-DMA supportaurel325-35/+844
This patch adds powermac Descriptor-Based DMA. It is used by mac-io based IDE, ethernet, sounds and serial devices. Signed-off-by: Laurent Vivier <Laurent@lvivier.info> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6488 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-30pl031: remove unused variableaurel321-1/+0
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6487 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-30linux-user: fix signal.c warningaurel321-4/+4
This patch fixes: linux-user/signal.c:1403: warning: no previous prototype for 'do_sigreturn_v1' linux-user/signal.c:1473: warning: no previous prototype for 'do_sigreturn_v2' linux-user/signal.c:1511: warning: no previous prototype for 'do_rt_sigreturn_v1' linux-user/signal.c:1552: warning: no previous prototype for 'do_rt_sigreturn_v2' by making the appropriate functions static. Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6486 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-30linux-user: identify running binary in /proc/self/exeaurel323-3/+16
Some applications like to test /proc/self/exe to find out who they are. Fake the result of readlink() for them. Use realpath() to return full path to binary (which the links /proc/self/exe are) Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6485 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-30linux-user: Add generic env variable handlingaurel324-17/+304
Adds support for qemu to modify target process environment variables using -E and -U commandline switches. This replaces eventually the -drop-ld-preload flag. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Riku Voipio <riku.voipio@iki.fi> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6484 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-30target-ppc: Fix struct target_stat64 for 32-bit hostaurel321-2/+3
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6483 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-30target-sh4: Fix struct target_stat64 for 64-bit hostaurel321-1/+1
Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6482 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-30linuw-user fix: read() and acct() on NULL argumentsaurel321-8/+16
Returning efault in these cases is not correct. Originally proposed by Thayne Harbaugh in 2007: http://www.mail-archive.com/qemu-devel@nongnu.org/msg14658.html Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6481 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-30linux-user: don't crash with null nameaurel321-1/+1
From Thayne Harbaugh. path() may be called with null string, don't bother trying to remap in that case. Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6480 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-30linux-user: return EINVAL on incorrect sockaddraurel321-2/+31
From: Lauro Ramos Venancio <lauro.venancio@gmail.com> Fixes ltp test accept01 Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6479 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-30linux-user: fix accept(2) with NULL peeraurel321-0/+3
Based on scratchbox2 patch by Mika Westerberg Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6478 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-29Allow usb tablet to be used with vmware-vga hwcursor.balrog1-2/+4
Assume that in absolute mode the guest cursor always follows host cursor and there's no need to move host cursor. This avoids a strange feedback loop. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6477 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-29Fix absolute mode mice.balrog1-1/+3
width and height were never set which means that host coordinates were divided by -1 instead of (width - 1) / 0x7fff. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6476 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-29check SCSI read/write requests against max LBA (Rik van Riel)aliguori1-0/+18
The bdrv layer uses a signed offset. Furthermore, block-raw-posix only seeks when that offset is positive. Passing a negative offset to block-raw-posix can result in data being written at the current seek cursor's position. It may be possible to exploit this to seek to the end of the disk and extend the virtual disk by writing data to a negative sector offset. After a reboot, this could lead to the guest having a larger disk than it had before. Close the hole by sanity checking the lba against the size of the disk. Signed-off-by: Rik van Riel <riel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6475 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-29Fix a typo in ext2_feature_name (Carl-Daniel Hailfinger)aliguori1-1/+1
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6474 c046a42c-6fe2-441c-8c8c-71466251a162
2009-01-29Use new logging API in reset handling (Jan Kiszka)aliguori1-1/+1
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6473 c046a42c-6fe2-441c-8c8c-71466251a162