Commit Graph

7801 Commits (590bc601d800d16a77676926898019f7285bd615)

Author SHA1 Message Date
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
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
Kevin Wolf 3b88e52b41 qcow2: Cache refcount blocks during snapshot creation
The really time consuming part of snapshotting is to adjust the reference count
of all clusters. Currently after each adjusted cluster the refcount block is
written to disk.

Don't write each single byte immediately to disk but cache all writes to the
refcount block and write them out once we're done with the block.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:07 -05:00
Kevin Wolf 22afa7b5b6 block-raw: Allow pread beyond the end of growable images
When using O_DIRECT, qcow2 snapshots didn't work any more for me. In the
process of creating the snapshot, qcow2 tries to pwrite some new information
(e.g. new L1 table) which will often end up being after the old end of the
image file. Now pwrite tries to align things and reads the old contents of the
file, read returns 0 because there is nothing to read after the end of file and
pwrite is stuck in an endless loop.

This patch allows to pread beyond the end of an image file. Whenever the
given offset is after the end of the image file, the read succeeds and fills
the buffer with zeros.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:07 -05:00
Juan Quintela ae95ade0cd make tags useful for block drivers and hardaware devices
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:07 -05:00
Juan Quintela b6271b484c Substitute ifdef CONFIG_FOO by sound-obj-
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:07 -05:00
Juan Quintela 5f87762742 Rename SOUND_HW to sound-obj-y
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:07 -05:00
Juan Quintela 943e0a319c Substitute ifdef CONFIG_FOO by obj-
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:07 -05:00
Juan Quintela 0e22fd2f11 Substitute ifdef CONFIG_FOO by obj-
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:07 -05:00
Juan Quintela e34af2ced5 move CONFIG_* values from yes to y
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:07 -05:00
Juan Quintela 6ef859b3f4 Rename OBJS to obj-y
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:06 -05:00
Juan Quintela e11b1dce8f Rename USER_OBJS to user-obj-y
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:06 -05:00
Juan Quintela 78892528a2 Rename XEN_OBJS to xen-obj-y
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:06 -05:00