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

6009 Commits

Author SHA1 Message Date
blueswir1 e283261910 Add missing newline at the end of file
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6020 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-14 08:50:18 +00:00
balrog 92fb73b9b0 Fix PXA2xx framebuffer dirty checking.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6019 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 23:57:01 +00:00
aliguori 55308450d4 Initialize msr list size properly in KVM
Hollis Blanchard noticed that the last commit was not sufficient.  We also need
to initialize the msr size in our newly allocated list.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6018 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 20:49:31 +00:00
aliguori 4c9f7372fc Correctly initialize msr list in KVM
I believe this was spotted by Gerd Hoffman but I can't find his patch 
now.  This will cause very subtle corruption on the heap because we 
don't allocate the appropriately sized buffer.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6017 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 20:41:58 +00:00
aurel32 56cd2b9663 target-sh4: make the initial value of SR easier to read
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6016 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 19:27:22 +00:00
aurel32 f3ff7facf5 target-sh4: don't disable FPU instructions in user mode
Based on a patch from Lionel Landwerlin.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6015 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 19:27:14 +00:00
aurel32 bacc637a44 target-sh4: disable debug code
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6014 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 18:57:46 +00:00
aurel32 71968fa65b target-sh4: add prefi, icbi, synco
(Vladimir Prus)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6013 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 18:57:37 +00:00
aurel32 a9c43f8ede target-sh4: add SH7785 as CPU option
(Vladimir Prus)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6012 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 18:57:28 +00:00
aurel32 9db3ba4db2 TCG x86/x86-64: use move with zero-extend for loads/stores
Starting with version 4.3, gcc returns the result of a function in
rax/eax/ax/al instead of rax/eax, depending of the return type. As
a consequence we should use a zero extend moe in TCG loads/stores.

See http://gcc.gnu.org/ml/gcc/2008-01/msg00052.html for more details.

A big thanks to malc who founds the problem and wrote the x86 patch.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6011 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 18:57:21 +00:00
aurel32 13412c9d2f vnc: Fix crash on 'info vnc' after 'change vnc none'
vnc_state->display is set to NULL after "change vnc none" but vnc_state itself
is still valid.

(James Ko)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6010 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 18:57:12 +00:00
malc f60d2728cc Fix smsw for x86_64 guest and bigendian host case
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6009 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 15:51:14 +00:00
aurel32 d40c54d641 target-i386: SVM: acknowledge interrupt only after it is taken
SVM specifies that the V_IRQ mask is only to be removed, if the
interrupt that is to be delivered actually is delivered.

As of the SVM rewrite, this mask is always unmasked when the main cpu
loop is processed, leaving a corner case where calling the interrupt
handler causes a #PF. In that case (booting Linux / starting gfxboot)
the current implementation tells the VMM the interrupt is taken, even
though it is not.

This patch modifies the VIRQ unmasking to occur after do_interrupt,
making gfxboot work again.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6008 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 12:33:02 +00:00
aurel32 5e9ae189f8 target-ppc: keep only the table version for mfrom
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6007 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 12:30:21 +00:00
aurel32 be94c952e4 target-ppc: use accessors to access fp_status exception_flags
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6006 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 12:13:33 +00:00
blueswir1 d9957a8b0f x86 cleanup
Remove some unnecessary includes, add needed includes, move prototypes to
cpu.h to suppress missing prototype warnings.

Remove unused functions and prototypes (cpu_x86_flush_tlb, cpu_lock,
cpu_unlock, restore_native_fp_state, save_native_fp_state).

Make some functions and data static (f15rk, parity_table, rclw_table,
rclb_table, raise_interrupt, fpu_raise_exception), they are not used
outside op_helper.c anymore.

Make some x86_64 and user only code conditional to avoid warnings.

Document where each function is implemented in cpu.h and exec.h.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6005 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 11:49:17 +00:00
aurel32 cf1cf21eac target-ppc: fix compilation with PRECISE_EMULATION
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6004 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 11:46:36 +00:00
aurel32 a44d2ce18a target-ppc: fix compilation with CONFIG_SOFTFLOAT
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6003 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 11:46:27 +00:00
aurel32 629bd74a4f softfloat-native: add float32_is_nan()
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6002 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 11:46:15 +00:00
blueswir1 3f911a51b2 Fix warning about unused shm_regions
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6001 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 11:37:02 +00:00
blueswir1 1d6198c3b0 Remove unnecessary trailing newlines
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6000 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 09:32:43 +00:00
aurel32 8d32699ade Remove useless check_ops.sh
Suggested by Stuart Brady.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5999 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 09:03:28 +00:00
blueswir1 7a3a514140 Fix TARGET_LONG_BITS warning in TCG
Looking at tcg/tcg.c:828, the bug that the warning indicated would show up as
incorrect PC shown in log, only on 32 bit big endian host emulating a 64 bit
target, -d op flag enabled. Now that dyngen is gone, the patch can be applied.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5998 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-13 08:16:43 +00:00
aliguori da93a1fd49 Make sure to link librt if we need to.
This is really a stop-gap.  The recent thread pool changes uncovered a 
deeper issue with how we use librt.  We really should be probing for 
timer_create and then conditionally enabling that code.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5997 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-12 20:02:52 +00:00
aliguori 3c529d9359 Replace posix-aio with custom thread pool
glibc implements posix-aio as a thread pool and imposes a number of limitations.

1) it limits one request per-file descriptor.  we hack around this by dup()'ing
file descriptors which is hideously ugly

2) it's impossible to add new interfaces and we need a vectored read/write
operation to properly support a zero-copy API.

What has been suggested to me by glibc folks, is to implement whatever new
interfaces we want and then it can eventually be proposed for standardization.
This requires that we implement our own posix-aio implementation though.

This patch implements posix-aio using pthreads.  It immediately eliminates the
need for fd pooling.

It performs at least as well as the current posix-aio code (in some
circumstances, even better).

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5996 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-12 16:41:40 +00:00
aurel32 8de2410635 PPC405EP: fix fpga write function
I'm not familiar with this device, but I'm fairly certain the writel handler is
not supposed to recurse.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5995 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 22:43:07 +00:00
aurel32 c78eae6177 baum: remove 2 warnings
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5994 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 22:42:58 +00:00
aurel32 420832208e target-sh4: remove 2 warnings
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5993 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 22:42:50 +00:00
aurel32 9587035602 target-alpha: fix 2 warnings
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5992 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 22:42:42 +00:00
aurel32 9322057384 target-ppc: remove remaining warnings
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5991 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 22:42:33 +00:00
aurel32 94fa46e2c2 target-ppc: remove unneeded include
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5990 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 22:42:25 +00:00
aurel32 e06fcd754e target-ppc: rework exception code
... also remove two warnings.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5989 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 22:42:14 +00:00
aurel32 2a3ec4b5b3 target-ppc: remove dead code
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5988 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 22:42:04 +00:00
aliguori 9b32d5a5f7 pci: virtio: use pci id defines (Gerd Hoffman)
Use the defines added by the previous patch in the virtio drivers.
Also remove the pointless vendor and device args from the
virtio_blk_init() function.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5987 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 21:20:03 +00:00
aliguori d350d97d19 pci: add default pci subsystem id for all devices (Gerd Hoffman)
This sets a default PCI subsystem ID for all emulated PCI devices.  PCI
specs require this, so do it.

In many cases it is enougth to know the PCI ID to handle a device
correctly.  Sometimes a device driver must identify the exact piece of
hardware (via PCI Subsystem ID) though.

What does this patch to qemu devices:

Right now the emulated PCI devices have no PCI subsystem ID, only the
PCI ID.  The discussed patch sets a default PCI subsystem ID for all
emulated devices.  Which will make the qemu devices look pretty much
like in the laptop case: all PCI subsystem IDs will point to qemu by
default.

If a driver emulates a very specific piece of hardware where it has to
emulate more than just the PCI chip, it can overwrite the PCI subsystem
ID without problems.  The es1370 driver does that for example.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5986 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 21:15:42 +00:00
aliguori 2d22b18f77 Fix handling of disk-only snapshots (Kevin Wolf)
When creating a snapshot with multiple qcow2 disks attached, the current
behaviour is that qemu creates a disk snapshot on all of them and
chooses one to write the VM state to.

Despite having the state only in one image, loadvm tries to restore the
VM state from the middle of nowhere if you run qemu a second time with
only one of the other images attached. In the lucky case it will fail
because there simply is no state, but it also can happen that it loads
the state of a different snapshot (the one this new one is based upon).

The fix is to write a zero VM state size to the images which don't
contain the state, and check this in loadvm.

I agree that you probably have to provoke such things intentionally to
get in a state like this with qemu itself. However, with my second patch
that adds snapshot support to qemu-img it could become a reasonable use
case to have snapshots with and without VM states on the same image.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5985 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 21:06:49 +00:00
aliguori 40a2d7050a Fix crash in kvm.c (Stefan Weil)
Fix crash with kvm enabled.

Signed-off-by: Stefan Weil <weil@mail.berlios.de> 
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5984 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 21:03:10 +00:00
blueswir1 d456ae3e04 Remove redundant #ifdef _BSD
since _BSD if already handled in osdep.c:qemu_memalign(), we don't need to
check it in the calling function again. getpagesize() is available in BSD.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5983 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 19:39:56 +00:00
blueswir1 ad46db9add Rename fls to qemu_fls
Fix compiler warning on OSX, reported by Andreas Faerber.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5982 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 19:37:54 +00:00
malc 807d517027 Add lost semicolons
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5981 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 19:20:41 +00:00
malc 4710036aff Don't require linux/auxvec.h, which isn't always installed with libc.
I'm cross-compiling, and linux/auxvec.h was not installed with my glibc
headers. How about this:

Don't require linux/auxvec.h, which isn't always installed with libc.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5980 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 19:12:59 +00:00
blueswir1 5caf7bb2c4 Fix compiling without MREMAP_FIXED
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5979 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 19:12:25 +00:00
blueswir1 85df0de4cf Allow to register a callback with fw_cfg_add_callback()
fw_cfg_add_callback() checks if key has FW_CFG_WRITE_CHANNEL bit set
after masking the key with FW_CFG_ENTRY_MASK.

But as FW_CFG_ENTRY_MASK is ~(FW_CFG_WRITE_CHANNEL | FW_CFG_ARCH_LOCAL),
the bit is never set and function exits.

This patch corrects this by checking the bit before masking the value.

Signed-by-off: Laurent Vivier <Laurent.Vivier@bull.net>
Acked-by: Gleb Natapov <gleb@redhat.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5978 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 17:30:50 +00:00
blueswir1 f4a5a5ba92 Add missing "static"
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5977 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 17:29:00 +00:00
malc e01fe6d575 Fix warnings introduced in r5948
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5976 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 00:14:30 +00:00
malc 371bc573e5 Add missing static qualifier
Caught by -Wstrict-prototypes

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5975 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 00:14:28 +00:00
malc c40e866fa2 adlib.c includes fmopl.h and so needs -DBUILD_Y8950=0 too
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5974 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-11 00:14:25 +00:00
malc 902b3d5c39 Introduce and use cache-utils.[ch]
Thanks to Segher Boessenkool and Holis Blanchard.

AIX and Darwin cache inquiry:
http://gcc.gnu.org/ml/gcc-patches/2007-08/msg00388.html

Auxiliary vectors:
http://manugarg.googlepages.com/aboutelfauxiliaryvectors

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5973 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-10 19:18:40 +00:00
aurel32 4fbfcd6d53 IDE: Implement SEEK command
Signed-off-by: Justin Chevrier <theburner1@yahoo.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5972 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-10 18:17:06 +00:00
aurel32 eeda67786c target-sh4: Add SH bit handling to TLB
This patch adds SH bit handling to sh4's TLB, which is a part of MMU
functionality that had not been implemented in qemu.

Additionally, increment_urc() call in cpu_load_tlb() is deleted, because
the specification explicitly says that URC is not incremented by an LDTLB
instruction (at Section 3 of SH7751 Hardware manual(REJ09B0370-0400)).
Even though URC is not needed to be strictly same as HW because it is a
random number, this condition is not negligible.

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@5971 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-10 17:31:51 +00:00