aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2012-02-06usb-redir: convert to QOMAnthony Liguori1-10/+14
This was missed due to the fact that it's in the top level and it uses 'struct DeviceInfo' instead of 'DeviceInfo' for some strange reason. Tested-by: Benoît Canet <benoit.canet@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-04Fix previous commitBlue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-04usb-bsd: convert to QOMAnthony Liguori1-5/+6
Simple enough. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-04vga: improve documentationBlue Swirl1-0/+12
Add links to chipset docs and FreeVGA site. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-04vga: use constants from vga.hBlue Swirl3-175/+198
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-04vga.h: remove unused stuff and reformatBlue Swirl1-425/+103
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-04Add vga.h unmodified from LinuxBlue Swirl1-0/+481
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-04vga: move Cirrus VGA template to its own fileBlue Swirl4-79/+111
Standard VGA does not use vga_draw_cursor_line_* functions. Move the template to cirrus_vga_template.h. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-04memory: change dirty getting API to take a sizeBlue Swirl9-49/+46
Instead of each device knowing or guessing the guest page size, just pass the desired size of dirtied memory area. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-04Merge branch 'linux-user-for-upstream' of ↵Blue Swirl13-39/+332
git://git.linaro.org/people/rikuvoipio/qemu * 'linux-user-for-upstream' of git://git.linaro.org/people/rikuvoipio/qemu: linux-user: Fix sa_flags byte swaps for mips linux-user: Define TARGET_QEMU_ESIGRETURN for mips64 linux-user: Define TARGET_QEMU_ESIGRETURN for mipsn32 linux-user: Add default configs for mips64[el] linux-user: Add default-configs for mipsn32[el] linux-user: Implement *listxattr syscalls linux-user/syscall.c: Implement f and l versions of set/get/removexattr linux-user: Allow NULL value pointer in setxattr and getxattr linux-user: fix wait* syscall status returns linux-user/strace.c: Correct errno printing for mmap etc linux-user: fix QEMU_STRACE=1 segfault linux-user: add SO_PEERCRED support for getsockopt linux-user/main.c: Add option to user-mode emulation so that user can specify log file name linux-user: fake /proc/self/auxv linux-user: fake /proc/self/stat linux-user: fake /proc/self/maps linux-user: add open() hijack infrastructure linux-user: save auxv length linux-user: stack_base is now mandatory on all targets
2012-02-04w32: Fix build with new net bridge codeStefan Weil1-3/+16
Commit a7c36ee4920ea3acc227a0248dd161693f207357 added code for a net bridge and explicitly said that "this is very Linux centric". Indeed, compilation failed for w32, so the bridge code is now conditional. Hosts which don't support it can simply remove the definition of CONFIG_NET_BRIDGE. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-04Merge branch 'for-upstream' of git://repo.or.cz/qemu/agrafBlue Swirl16-81/+462
* 'for-upstream' of git://repo.or.cz/qemu/agraf: (21 commits) PPC: E500: Populate L1CFG0 SPR PPC: e500mc: Enable processor control PPC: E500: Implement msgsnd PPC: E500: Implement msgclr PPC: Enable doorbell excp handlers PPC: Add CPU feature for processor control PPC: E500: Add doorbell defines PPC: E500: Add some more excp vectors KVM: Fix compilation on non-x86 PPC: booke206: move avail check to tlbwe PPC: booke206: Check for TLB overrun PPC: booke206: Implement tlbilx PPC: booke206: Check for min/max TLB entry size PPC: booke: add tlbnps handling PPC: booke206: allow NULL raddr in ppcmas_tlb_check PPC: rename msync to msync_4xx PPC: e500: msync is 440 only, e500 has real sync PPC: e500mc: add missing IVORs to bitmap PPC: Add IVOR 38-42 PPC: KVM: Update HIOR code to new interface ...
2012-02-03Fix build breakage from last commit.Anthony Liguori1-0/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03s390x: fix -drive in the absence of aliasesAnthony Liguori1-1/+5
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03container: make a decendent of ObjectAnthony Liguori6-44/+39
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - Add license (Paolo)
2012-02-03object: sure up reference countingAnthony Liguori1-2/+14
Now we have the following behavior: 1) object_new() returns an object with ref = 1 2) object_initialize() does not increase the reference count (ref may be 0). 3) object_deref() will finalize the object when ref = 0. it does not free the memory associated with the object. 4) both link and child properties correctly set the reference count. The expected usage is the following: 1) child devices should generally be created via object_initialize() using memory from the parent device. Adding the object as a child property will take ownership of the object and tie the child's life cycle to the parent. 2) If a child device is created via qdev_create() or some other form of object_new(), there must be an object_delete() call in the parent device's finalize function. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03info qdm: do not require a parent_bus to be setAnthony Liguori1-5/+7
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: implement cleanup logic in finalizeAnthony Liguori1-25/+32
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qom: accept any compatible type when setting a link propertyAnthony Liguori1-4/+5
Links had limited utility before as they only allowed a concrete type to be specified. Now we can support abstract types and interfaces which means it's now possible to have a link<PCIDevice>. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qom: move properties from qdev to objectAnthony Liguori14-817/+801
This is mostly code movement although not entirely. This makes properties part of the Object base class which means that we can now start using Object in a meaningful way outside of qdev. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: nuke qdev_init_chardev()Anthony Liguori10-17/+18
I'm sure the intentions were good here, but there's no reason this should be in qdev. Move it to qemu-char where it belongs. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: split out UI portions into a new functionAnthony Liguori4-572/+589
qdev-monitor.c deals with the -device, device_add, and info qdm/qtree interfaces. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: refactor away qdev_create_from_infoAnthony Liguori2-13/+25
Note that the FIXME gets fixed in series 4/4. We need to convert BusState to QOM before we can make parent_bus a link. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: split out common init to instance_initAnthony Liguori1-13/+28
This gets us closer to being able to object_new() a qdev type and have a functioning object verses having to call qdev_create(). Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qom: add new command to search for typesAnthony Liguori4-1/+66
This adds a command that allows searching for types that implement a property. This allows you to do things like search for all available PCIDevices. In the future, we'll also have a standard interface for things with a BlockDriverState property that a PCIDevice could implement. This will enable search queries like, "any type that implements the BlockDevice interface" which would allow management tools to present available block devices without having to hard code device names. Since an object can implement multiple interfaces, one device could act both as a BlockDevice and a NetworkDevice. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: remove baked in notion of aliases (v2)Anthony Liguori6-22/+87
Limit them to the device_add functionality. Device aliases were a hack based on the fact that virtio was modeled the wrong way. The mechanism for aliasing is very limited in that only one alias can exist for any device. We have to support it for the purposes of compatibility but we only need to support it in device_add so restrict it to that piece of code. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - Use a table for aliases (Paolo)
2012-02-03qdev: kill off DeviceInfoAnthony Liguori15-114/+15
It is no longer used in the tree since everything is done natively through QEMU Object Model. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: register all types natively through QEMU Object ModelAnthony Liguori243-2546/+3172
This was done in a mostly automated fashion. I did it in three steps and then rebased it into a single step which avoids repeatedly touching every file in the tree. The first step was a sed-based addition of the parent type to the subclass registration functions. The second step was another sed-based removal of subclass registration functions while also adding virtual functions from the base class into a class_init function as appropriate. Finally, a python script was used to convert the DeviceInfo structures and qdev_register_subclass functions to TypeInfo structures, class_init functions, and type_register_static calls. We are almost fully converted to QOM after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: kill off DeviceInfo listAnthony Liguori3-60/+31
Teach the various bits of code that need to walk through available devices to do so via QOM. Signed-off-by: Anthony Liguori
2012-02-03qom: allow object_class_foreach to take additional parameters to refine searchAnthony Liguori2-2/+17
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: refactor device creation to allow bus_info to be set only in classAnthony Liguori1-23/+19
As we use class_init to set class members, DeviceInfo no longer holds this information. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: allow classes to overload qdev functionsAnthony Liguori1-20/+33
This allows us to drop per-Device registration functions by allowing the class_init functions to overload qdev methods. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: remove info from classAnthony Liguori3-44/+80
Now DeviceInfo is no longer used after object construction. All of the relevant members have been moved to DeviceClass. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03qdev: make DeviceInfo privateAnthony Liguori4-23/+48
Introduce accessors and remove any code that directly accesses DeviceInfo members. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03usb: separate out legacy usb registration from type registrationAnthony Liguori12-26/+39
Type registeration is going to get turned into a QOM call so decouple the legacy support. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-03usb-hid: simplify class initialization a bitAnthony Liguori1-14/+13
We can probably model USBHidDevice as a base class to get even better code sharing but for now, just use a common function to initialize the common class members. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-02linux-user: Fix sa_flags byte swaps for mipsAndreas Färber1-0/+8
sa_flags is uint32_t for mips{,n32,64}, so don't use tswapal(). edited by Riku Voipio: likewise on alpha Reported-by: Khansa Butt <khansa@kics.edu.pk> Suggested-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Ehsan Ul Haq <ehsan.ulhaq@kics.edu.pk> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-02-02linux-user: Define TARGET_QEMU_ESIGRETURN for mips64Andreas Färber1-0/+3
Copied from mips/syscall.h. Signed-off-by: Khansa Butt <khansa@kics.edu.pk> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-02-02linux-user: Define TARGET_QEMU_ESIGRETURN for mipsn32Andreas Färber1-0/+3
Copied from mips/syscall.h. Signed-off-by: Ulrich Hecht <uli@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-02-02linux-user: Add default configs for mips64[el]Andreas Färber2-0/+2
Prepares for mips64[el]-linux-user targets. Signed-off-by: Khansa Butt <khansa@kics.edu.pk> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-02-02linux-user: Add default-configs for mipsn32[el]Andreas Färber2-0/+2
Prepares for mipsn32[el]-linux-user targets. Signed-off-by: Ulricht Hecht <uli@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-02-02linux-user: Implement *listxattr syscallsPeter Maydell1-1/+35
Implement listxattr, flistxattr and llistxattr syscalls. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-02-02linux-user/syscall.c: Implement f and l versions of set/get/removexattrPeter Maydell1-9/+70
Implement the f and l versions (operate on fd, don't follow links) of the setxattr, getxattr and removexattr syscalls. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-02-02linux-user: Allow NULL value pointer in setxattr and getxattrPeter Maydell1-6/+18
It's valid to pass a NULL value pointer to setxattr, so don't fail this case EFAULT. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-02-02linux-user: fix wait* syscall status returnsAlexander Graf1-2/+2
When calling wait4 or waitpid with a status pointer and WNOHANG, the syscall can potentially not modify the status pointer input. Now if we have guest code like: int status = 0; waitpid(pid, &status, WNOHANG); if (status) <breakage> then we have to make sure that in case status did not change we actually return the guest's initialized status variable instead of our own uninitialized. We fail to do so today, as we proxy everything through an uninitialized status variable which for me ended up always containing the last error code. This patch fixes some test cases when building yast2-core in OBS for ARM. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-02-02linux-user/strace.c: Correct errno printing for mmap etcPeter Maydell1-5/+4
Correct the printing of errnos for syscalls which are handled via print_syscall_ret_addr (mmap, mmap2, brk, shmat): errnos are returned as negative returned values at this level, not via the host 'errno' variable. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-02-02linux-user: fix QEMU_STRACE=1 segfaultAlexander Graf2-4/+17
While debugging some issues with QEMU_STRACE I stumbled over segmentation faults that were pretty reproducible. Turns out we tried to treat a normal return value as errno, resulting in an access over array boundaries for the resolution. Fix this by allowing failure to resolve invalid errnos into strings. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-02-02linux-user: add SO_PEERCRED support for getsockoptAkos PASZTORY2-1/+39
Signed-off-by: Akos PASZTORY <akos.pasztory@gmail.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-02-02linux-user/main.c: Add option to user-mode emulation so that user can ↵陳韋任1-0/+7
specify log file name QEMU linux user-mode's default log file name is "/tmp/qemu.log". In order to change the log file name, user need to modify the source code then recompile QEMU. This patch allow user use "-D logfile" option to specify the log file name. Signed-off-by: Chen Wen-Ren <chenwj@iis.sinica.edu.tw> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2012-02-02linux-user: fake /proc/self/auxvAlexander Graf1-0/+30
Gtk tries to read /proc/self/auxv to find its auxv table instead of taking it from its own program memory space. However, when running with linux-user, we see the host's auxv which clearly exposes wrong information. so let's instead expose the guest memory backed auxv tables via /proc/self/auxv as well. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>