sim-card
/
qemu
Archived
10
0
Fork 0
Commit Graph

7812 Commits

Author SHA1 Message Date
Anthony Liguori 2152390dca Merge commit 'linux-user/linux-user-for-upstream' into tmp-staging 2009-07-09 15:09:27 -05:00
Paul Brook 94c5495dd1 MIPS signal handling fix
Add explicit padding to MIPS signal frame structures.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-07-09 18:40:15 +01:00
Paul Brook f04dc72f39 Enable MIPS NPTL
Enable NPTL support for MIPS usermode emulation.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-07-09 17:56:24 +01:00
Paul Brook 590bc601d8 MIPS atomic instructions
Implement MIPS ll/sc instructions using atomic compare+exchange.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-07-09 17:45:17 +01:00
Paul Brook ff867ddcbd MIPS usermode TLS register
Implement cpu_set_tls for MIPS.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-07-09 15:07:57 +01:00
Paul Brook 18113962e4 Fix MIPS sys_clone
The clone syscall takes 6 args.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-07-09 13:11:52 +01:00
Gerd Hoffmann d88a76d1d3 qdev: convert ac97.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-07-09 13:07:03 +01:00
Gerd Hoffmann 6806e59567 qdev: convert es1370.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-07-09 13:07:03 +01:00
Gerd Hoffmann 16eaedf266 qdev/pci: misc fixes.
* fix secondary bus setup.
 * use base->name instead of "FIXME" for device name.
   Yes, the device name is redundant.  Only for drivers converted
   to qdev already though.  Once all drivers are converted we can
   and should kill it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-07-09 13:07:03 +01:00
Gerd Hoffmann 042f84d0af qdev: remove DeviceType
The only purpose DeviceType serves is creating a linked list of
DeviceInfo structs.  This removes DeviceType and add a next field to
DeviceInfo instead, so the DeviceInfo structs can be changed that way.
Elimitates a pointless extra level of indirection.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-07-09 13:07:03 +01:00
Gerd Hoffmann 10c4c98ab7 qdev: replace bus_type enum with bus_info struct.
BusInfo is filled with name and size (pretty much like I did for
DeviceInfo as well).  There is also a function pointer to print
bus-specific device information to the monitor.  sysbus is hooked
up there, I've also added a print function for PCI.

Device creation is slightly modified as well:  The device type search
loop now also checks the bus type while scanning the list instead of
complaining thereafter in case of a mismatch.  This effectively gives
each bus a private namespace for device names.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-07-09 13:07:03 +01:00
Gerd Hoffmann 0aab0d3a4a qdev: update pci device registration.
Makes pci_qdev_register take a PCIDeviceInfo struct instead of a bunch
of parameters.  Also adds config_read and config_write callbacks to
PCIDeviceInfo, so drivers needing these can be converted to the qdev
device API too.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-07-09 13:07:02 +01:00
malc e2b19c85ea Remove SDL/ prefix 2009-07-08 18:25:37 +04:00
malc d644f8beaa Add out of memory and zero size argument checks to be consistent with
the qemu_malloc routines
2009-07-08 18:24:05 +04:00
Ulrich Hecht 666bcd913b getrlimit conversion mix-up
Fixes getrlimit implementation that overwrote the result of the syscall
instead of converting it

Signed-off-by: Ulrich Hecht <uli@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-07-08 17:02:28 +03:00
Ulrich Hecht 719f908e3a wrap path for access syscall
Signed-off-by: Ulrich Hecht <uli@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-07-08 17:02:28 +03:00
Ulrich Hecht 98818189ea 64-bit clean socketcall syscall
makes socketcall 64-bit clean so it works on 64-bit big-endian systems

Signed-off-by: Ulrich Hecht <uli@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-07-08 17:02:27 +03:00
Ulrich Hecht 784ccfdb36 pipe argument should not be signed
pipedes is an address, it should not be signed (breaks for addresses
> 0x80000000)

Signed-off-by: Ulrich Hecht <uli@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-07-08 17:02:27 +03:00
Riku Voipio 67ba57f63d configure: remove bogus linux-user check
linux-user=yes is not a reliable identifier that linux-user targets
have been selected. user targets can be selected via --target-list
as well.
2009-07-08 17:01:08 +03:00
vibi sreenivasan 7b8118e823 linux-user/syscall.c: remove warning: ‘array’ may be used uninitialized in this function
Removes the following warning

CC    i386-linux-user/syscall.o
cc1: warnings being treated as errors
/media/nfs/qemu/linux-user/syscall.c: In function ‘do_syscall’:
/media/nfs/qemu/linux-user/syscall.c:2219: warning: ‘array’ may be used uninitialized in this function

Signed-off-by: Vibi Sreenivasan <vibi_sreenivasan@cms.com>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-07-08 17:01:08 +03:00
Arnaud Patard 917507b01e linux-user: check some parameters for some socket syscalls.
This patch is fixing following issues :

- commit 8fea36025b was applied to
  do_getsockname instead of do_accept.
- Some syscalls were not checking properly the memory addresses passed
  as argument
- Add check before syscalls made for cases like do_getpeername() where
  we're using the address parameter after doing the syscall
- Fix do_accept to return EINVAL instead of EFAULT when parameters
  invalid to match with linux behaviour

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-07-08 17:01:08 +03:00
Arnaud Patard fd4d81dd04 linux-user: increment MAX_ARG_PAGES
There's a error When doing something like that :
find / -type f -print0 | xargs -0 echo

[ done in a arm chroot with qemu-arm and linux binfmt stuff or with
find / -type f -print0 | qemu-arm -L <path> <path>/usr/bin/xargs -0
echo ]

Doing this outsite qemu is fine. The problem was the huge number of
parameters. Increasing MAX_ARG_PAGES is fixing that.

While I was at it, I've modified linux-user/main.c to report error code
of loader_exec. It helps to debug/know what's wrong.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-07-08 17:01:08 +03:00
Blue Swirl e8d2a88755 Fix the PCI header type of APB
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-05 20:33:02 +00:00
Blue Swirl e36f587715 Update OpenBIOS images to r505
For Sparc64, this fixes the PCI bridge configuration bugs revealed by the
improved bridge handling (b7ee1603c1).

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-05 18:50:32 +00:00
Blue Swirl 98846d73cb Fix Sparse warning
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-05 08:11:39 +00:00
Blue Swirl 8676188b75 Work around Solaris gas problem
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-03 19:25:29 +00:00
Blue Swirl 600309b610 Rename target_cpu to target_arch2
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-03 17:44:00 +00:00
Jan Kiszka cbbfacc668 monitor: Fix typo in documentation
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2009-07-03 17:23:39 +00:00
Nathan Froyd 98070ce00f target-mips: fix MADD and MSUB/MSUBU instructions
MADD was not correctly writing to HI.

MSUB/MSUBU are specified as `HI||LO - product', not `product - HI||LO'.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-07-03 03:28:20 +02:00
Stefan Weil 7d69c52ed8 Fix hxtool.
When converting from hx to texi format, hxtool (or to be
more precise sh which interprets hxtool) used standard
shell expansion of wildcards while writing lines to the
output.

Thus, something like "Password: ********"
looked very different in the generated documentation.

The patch disables this unwanted wildcard expansion.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
2009-07-02 17:54:34 +00:00
Jan Kiszka 6ad8702a77 Use ctz64 in favor of ffsll
Not all host platforms support ffsll.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2009-07-02 17:07:08 +00:00
malc 1447379b13 Respect the standard 2009-07-02 18:20:33 +04:00
Blue Swirl 3da6abd472 Use pstrcpy and pstrcat to avoid OpenBSD linker warning
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-01 20:29:39 +00:00
Blue Swirl 97b35e359c Suppress a GCC warning
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-01 19:30:50 +00:00
Blue Swirl 6cb9c6d36f Fix breakage by obsolete _P() for good
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-01 19:11:17 +00:00
Blue Swirl 22d091b38d Fix sdl_zoom compile problems on OpenBSD
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-01 18:49:34 +00:00
Blue Swirl d43277c534 Fix missing strnlen problems
Fix missing strnlen (a GNU extension) problems by using qemu_strnlen
used for user emulators also for system emulators.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-01 18:24:44 +00:00
malc 57a943c41f Fix typo
Signed-off-by: malc <av1474@comtv.ru>
2009-06-30 18:47:48 +04:00
Paul Brook 9c7f170e50 Remove bogus -Werror
Revert rules.mak changes from aba800a.  These should not have been here
to start with.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-06-30 12:10:52 +01:00
Markus Armbruster 7d4c3d535c Replace -no-virtio-balloon by -balloon
We want to do (at least) two things to the virtio-balloon device:
suppress it, and control its PCI address.  Option -no-virtio-balloon
lets us do only the former.  To get the latter, replace
-no-virtio-balloon with

    -balloon none   disable balloon device
    -balloon virtio[,addr=str]
                    enable virtio balloon device (default)

Syntax suggested by Anthony Liguori.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:08 -05:00
Jan Kiszka 74efd61a75 slirp: tftp: Relax filename format check
[ Applies on top of my recently posted slirp series. ]

Allow tftp requests with filenames that do not start with a slash.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:08 -05:00
Jan Kiszka 229609dd45 sdl: Fix memory leakage
Valgrind was so kind to remark that no one bothers to release keycodes
after use and that something is fishy about cleaning up the requested
keyboard descriptor. With this patch applied, we no longer leak about
12k during startup.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:08 -05:00
Jan Kiszka 059b8b1eb6 KVM: x86: Refactor persistent CPU state
This patch aligns the KVM-related layout and encoding of the CPU state
to be saved to disk or migrated with qemu-kvm. The major differences are
reordering of fields and a compressed interrupt_bitmap into a single
number as there can be no more than one pending IRQ at a time.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:08 -05:00
Jan Kiszka 3a31f36a07 x86: Factor out pc_new_cpu
At this point, this refactoring looks like overkill. But we will need it
for CPU hotplugging, and qemu-kvm already carries it. Merging it early
would help qemu-kvm when rebasing against upstream.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:08 -05:00
Jan Kiszka 15dfcd454c monitor: Refactor acl commnds
Refactor the ACL monitor interface to make full use of the monitor
command dispatcher. This also gives proper help formatting and command
completion. Note that 'acl allow' and 'acl deny' were combined to
'acl_add aclname match allow|deny [index]' for consistency reasons.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:08 -05:00
Jan Kiszka f3353c6bc3 monitor: Add completion for help command
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:08 -05:00
Jan Kiszka a08d43677f Revert "Introduce reset notifier order"
This reverts commit 8217606e6e (and
updates later added users of qemu_register_reset), we solved the
problem it originally addressed less invasively.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:08 -05:00
Jan Kiszka a62acdc0cc monitor: Make pci_add device options truely optional
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:07 -05:00
Jan Kiszka 8d2ba1fb9c kvm: Rework VCPU synchronization
During startup and after reset we have to synchronize user space to the
in-kernel KVM state. Namely, we need to transfer the VCPU registers when
they change due to VCPU as well as APIC reset.

This patch refactors the required hooks so that kvm_init_vcpu registers
its own per-VCPU reset handler and adds a cpu_synchronize_state to the
APIC reset. That way we no longer depend on the new reset order (and can
drop this disliked interface again) and we can even drop a KVM hook in
main().

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:07 -05:00
Jan Kiszka e9283f8b88 monitor: Drop pci_addr prefix from hotplug commands
The "pci_addr=" prefix currently required by pci_add/remove and
drive_add has no practical use. Drop it, but still silently accept it
for backward compatibility.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:07 -05:00