Commit Graph

7257 Commits

Author SHA1 Message Date
Blue Swirl 789c91ef39 Convert addx
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-10 07:19:22 +00:00
Blue Swirl bdf9f35dad Convert add
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-10 07:19:17 +00:00
Blue Swirl 8393617c1a Use dynamical computation for condition codes
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-10 07:19:11 +00:00
Paul Brook bc24a225af Follow coding conventions
Remove explicit struct qualifiers and rename structure types.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-10 01:44:56 +01:00
Paul Brook d4ec522882 Workaround compiler warnings at -O1
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-09 23:22:35 +01:00
Paul Brook cb76e138d3 Fixe ARM NEON vrshl.
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-09 23:12:06 +01:00
Laurent Vivier 009a4356a7 Add m68k_cpu_list()
This patch adds to m68k target the missing m68k_cpu_list():

$ ./m68k-softmmu/qemu-system-m68k -cpu ?
m5206
m5208
cfv4e
any

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2009-05-09 21:28:46 +01:00
vibi 39b6efc806 Fix in file qemu-sockets.c
1) Changed usage of malloc,free,strdup to qemu_malloc,qemu_free,qemu_strdup
 	2) Some coding style fixes (based on CODING_STYLE document)
 	3) Free struct addrinfo *res after failure of listen

Signed-off-by: vibi <vibi_sreenivasan@cms.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 16:11:49 -05:00
Avi Kivity 4e12cd946f vga: Replace VGA_COMMON with a structure
All VGA devices share a common field subset; currently they do so by
a macro which defines the common fields inline their state structures,
relying on the the common state being placed at offset 0 in the structure.
This makes refactoring the code difficult and requires a lot of error prone
casts.

Replace the macro by a new VGACommonState structure, and the casts by
regular field access and container_of() for upcasts.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 16:11:38 -05:00
Kevin Wolf fbb7b4e080 Improve block range checks
This patch makes the range checks for block requests more strict: It fixes a
potential integer overflow and checks for negative offsets. Also, it adds the
check for compressed writes.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 16:02:18 -05:00
Anthony Liguori 989cebff75 Remove noisy printf when KVM masks CPU features
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:51:28 -05:00
Christoph Hellwig e7d54ae83c fix asynchronous ioctls
posix_aio_read expect aio requests to return the number of bytes
requests to be successfull, so we need to fake this up for ioctls.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:51:19 -05:00
Avi Kivity e8a6aec9b5 kvm: Trim cpu features not supported by kvm
Remove cpu features that are not supported by kvm from the cpuid features
reported to the guest.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:42:52 -05:00
Avi Kivity 02b049df49 Fix x86 feature modifications for features that set multiple bits
QEMU allows adding or removing cpu features by using the syntax '-cpu +feature'
or '-cpu -feature'.  Some cpuid features cause more than one bit to be set or
cleared; but QEMU stops after just one bit has been modified, causing the
feature bits to be inconsistent.

Fix by allowing all feature bits corresponding to a given name to be set.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:42:52 -05:00
Avi Kivity c6fa82c4e9 Make x86 cpuid feature names available in file scope
To be used later.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:42:52 -05:00
Avi Kivity b827df585b kvm: Add support for querying supported cpu features
kvm does not support all cpu features; add support for dunamically querying
the supported feature set.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:42:52 -05:00
Anthony Liguori ad7b8b3310 Introduce kvm_check_extension to check if KVM extensions are supported
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:42:42 -05:00
Amit Shah 4a794a626d e1000: Do not reinit pci config space to 0
pci_register_device already mallocs the pci config space buffer filled
with zeroes.

Doing this again breaks some default config space writes like
setting the subsystem vendor id and subsystem device id.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:24:10 -05:00
Alexander Graf 79d5ca5617 AIO deletion race fix
When deleting an fd event there is a chance the object doesn't get
deleted, but only ->deleted set positive and deleted somewhere later.

Now, if we create a handler for the fd again before the actual
deletion occurs, we end up writing data into an object that has
->deleted set, which is obviously wrong.

I see two ways to fix this:

1. Don't return ->deleted objects in the search
2. Unset ->deleted in the search

This patch implements 1. which feels safer to do. It fixes AIO issues
I've seen with curl, as libcurl unsets fd event listeners pretty
frequently.

Signed-off-by: Alexander Graf <alex@csgraf.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:24:10 -05:00
Glauber Costa d6ecb03610 reset state for load_linux
The linux loader is just an option rom like any other, just with
some special requirements. Right now, our option rom resetting
mechanism is not being applied to it. As a result, users using
-kernel will not be able to successfully reboot their machines

This patch fixes it by saving all the data we generated in
the load_linux() function, to be used later by the option rom
resetting mechanism.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:24:10 -05:00
Glauber Costa e28f988427 register reset handler for option_roms
Currently, boot options are not preserved across a system reset.
option roms can modify themselves, or can for instance restore the real
int 0x19 vector after they tried to boot from it.

To properly do that, we need a reset handler registered to deal with option
roms. This patch is based on current version on qemu-kvm.git

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:24:10 -05:00
Gleb Natapov d4d698f020 Fix cluster freeing in qcow2
Need to drop QCOW_OFLAG_COPIED from a cluster pointer before freeing it.

Add an explanation how thing meant to work.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 15:24:09 -05:00
Anthony Liguori a6d6552426 Enable power button even generation.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-08 10:13:01 -05:00
Jan Kiszka 322f9d0153 Drop CONFIG_GDBSTUB
This is no user-flippable switch, and no arch makes use of disabling
gdbstub support. So it's pointless to keep the related #ifdefs and
configure hunks around - and risking breakages like 711c410fdd again.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2009-05-08 13:24:12 +01:00
Paul Brook c599710f5c Remove superfluous #includes.
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-08 13:20:23 +01:00
Paul Brook 42a89d7755 Use target_phys_addr_t, not target_ulong.
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-08 13:19:44 +01:00
Paul Brook 2ac711791b Replace cpu_abort with hw_error
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-08 02:35:15 +01:00
Blue Swirl e612a1f725 Fix disassembler memory accesses
Sparc disassembler wants to check previous addresses for some stuff
and this may actually cause faults to be generated to the guest if the
address is close to page start, because of the function used for the
memory access.

Fix by changing ldub_code to cpu_memory_rw_debug, which doesn't trigger
exceptions.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-07 17:14:07 +00:00
Paul Brook 0087375ec8 Suppress make directory messages.
We already print a directory prefix in non-verbose mode, so there's no
point printing a messages when recursive make enters/leaves a directory.

Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-07 02:00:31 +01:00
Paul Brook 399a4e2106 Fix PL110 framebuffer byteswapping in 32bpp mode.
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-06 16:18:34 +01:00
Edgar E. Iglesias 72af917088 ETRAX: Simplify serport control logic.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-05 13:13:18 +02:00
Edgar E. Iglesias f296426006 ETRAX: Drop _t for the serial type.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-05 12:50:45 +02:00
Edgar E. Iglesias 4ad804df46 ETRAX: Use NULL for subwidth serport reg accesses.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-05 12:48:54 +02:00
Edgar E. Iglesias b23b0fd063 ETRAX: Drop the _t for the internal PIC type.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-05 12:41:35 +02:00
Edgar E. Iglesias 8d13fcc01b ETRAX: Simplify the interrupt controller model.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-05 12:38:39 +02:00
Edgar E. Iglesias 7a3161bafb ETRAX: Simplify interrupt signaling.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-05-05 12:25:35 +02:00
Paul Brook 65a650c2a5 Fix compiler warnings in nwfpe code.
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-04 15:19:04 +01:00
Aurelien Jarno 6bb72b184d target-mips: proper sign extension for 'SUBU rd, zero, rt'
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-05-04 10:05:21 +02:00
Aurelien Jarno 88cbb9804b target-mips: fix comments about SUB/DSUB
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-05-04 10:05:15 +02:00
Aurelien Jarno c304d317ac qemu-options.hx: fix description of cache=none suboption
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-05-04 10:05:10 +02:00
Paul Brook cc63bb0faa Suppress type mismatch warnings in VDE code.
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-03 22:40:54 +01:00
Isaku Yamahata 425c608c48 minor fix of pci_register_bus()
keep first_bus linked list correct.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-05-03 22:10:59 +03:00
Isaku Yamahata 6407f37373 use PCI_HEADER_TYPE.
use symbolic value instead of 0x0e and related value.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
2009-05-03 19:03:00 +00:00
Stuart Brady ccbb4d44fc Fix typos in comments in exec.c
This patch fixes several typos in comments in exec.c:

            longet -> longer
       recommanded -> recommended
        ajustments -> adjustments
   inconsistancies -> inconsistencies
           phsical -> physical
       positionned -> positioned
       succesfully -> successfully
      regon_offset -> region_offset

and also:

      start_region -> start_addr

Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
2009-05-03 21:58:28 +03:00
Blue Swirl 719f66a770 Optimize cmp x, 0 case
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-03 18:51:27 +00:00
Blue Swirl dc1a6971e3 Reindent
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-03 18:51:22 +00:00
Paul Brook 03f311edd3 Handle NULL bdrv.
Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-05-03 17:00:48 +01:00
Blue Swirl b89e94af1d Improve instruction name comments for easier searching
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-02 20:19:46 +00:00
Blue Swirl 7ab463cb52 Clarify: dmmuregs[1] is not a typo
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-02 22:52:32 +03:00
Blue Swirl 41d728522b Optimize operations with immediate parameters 2009-05-02 19:14:05 +00:00