qemu
15 years agotcg: optimize tcg_gen_bswap16_i32
aurel32 [Fri, 13 Mar 2009 09:35:03 +0000 (09:35 +0000)]
tcg: optimize tcg_gen_bswap16_i32

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6831 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotcg: allow bswap16_i32 to be implemented by TCG backends
aurel32 [Fri, 13 Mar 2009 09:34:56 +0000 (09:34 +0000)]
tcg: allow bswap16_i32 to be implemented by TCG backends

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6830 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotcg: rename bswap_i32/i64 functions
aurel32 [Fri, 13 Mar 2009 09:34:48 +0000 (09:34 +0000)]
tcg: rename bswap_i32/i64 functions

Rename bswap_i32 into bswap32_i32 and bswap_i64 into bswap64_i64

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6829 c046a42c-6fe2-441c-8c8c-71466251a162

15 years ago[v2] ARMv7 mov pc,xxx fix
Juha Riihimäki [Fri, 13 Mar 2009 07:58:54 +0000 (09:58 +0200)]
[v2] ARMv7 mov pc,xxx fix

15 years agoFix regression introduced by r6824
aliguori [Fri, 13 Mar 2009 03:12:03 +0000 (03:12 +0000)]
Fix regression introduced by r6824

The changes introduced by r6824 broke a subtle, and admittedly obscure, aspect
of the block API.  While bdrv_{pread,pwrite} return the number of bytes read
or written upon success, bdrv_{read,write} returns a zero upon success.

When using bdrv_pread for bdrv_read, special care must be taken to handle this
case.

This fixes certain guest images (notably linux-0.2 provided on the qemu
website).

Reported-by: malc <av1474@comtv.ru>
Reported-by: Herve Poussineau <hpoussin@reactos.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6828 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFrom 67e94ae77f8de4d5d822917f1723cefa7ebfb64d Mon Sep 17 00:00:00 2001
aliguori [Thu, 12 Mar 2009 20:25:12 +0000 (20:25 +0000)]
From 67e94ae77f8de4d5d822917f1723cefa7ebfb64d Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Tue, 3 Mar 2009 13:33:13 +0800
Subject: [PATCH] Split ioapic logic from the current apic.

Add a new ioapic.c to hold ioapic's logic, and also
make it work for ia64.

Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 Makefile.target |    2 +-
 hw/apic.c       |  237 +++----------------------------------------------
 hw/ioapic.c     |  263 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 hw/pc.h         |    5 +-
 4 files changed, 281 insertions(+), 226 deletions(-)
 create mode 100644 hw/ioapic.c

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6827 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agomonitor: sync from kvm state before generating output (Jan Kiszka)
aliguori [Thu, 12 Mar 2009 20:12:57 +0000 (20:12 +0000)]
monitor: sync from kvm state before generating output (Jan Kiszka)

Ported from the KVM tree: Synchronize the qemu cpu state with kvm's
before invoking various monitor info commands (like 'info registers').

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6826 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoGuest debugging support for KVM (Jan Kiszka)
aliguori [Thu, 12 Mar 2009 20:12:48 +0000 (20:12 +0000)]
Guest debugging support for KVM (Jan Kiszka)

This is a backport of the guest debugging support for the KVM
accelerator that is now part of the KVM tree. It implements the reworked
KVM kernel API for guest debugging (KVM_CAP_SET_GUEST_DEBUG) which is
not yet part of any mainline kernel but will probably be 2.6.30 stuff.
So far supported is x86, but PPC is expected to catch up soon.

Core features are:
 - unlimited soft-breakpoints via code patching
 - hardware-assisted x86 breakpoints and watchpoints

Changes in this version:
 - use generic hook cpu_synchronize_state to transfer registers between
   user space and kvm
 - push kvm_sw_breakpoints into KVMState

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6825 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoDrop internal bdrv_pread()/bdrv_pwrite() APIs (Avi Kivity)
aliguori [Thu, 12 Mar 2009 19:57:16 +0000 (19:57 +0000)]
Drop internal bdrv_pread()/bdrv_pwrite() APIs (Avi Kivity)

Now that scsi generic no longer uses bdrv_pread() and bdrv_pwrite(), we can
drop the corresponding internal APIs, which overlap bdrv_read()/bdrv_write()
and, being byte oriented, are unnatural for a block device.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6824 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd internal scsi generic block API (Avi Kivity)
aliguori [Thu, 12 Mar 2009 19:57:12 +0000 (19:57 +0000)]
Add internal scsi generic block API (Avi Kivity)

Add an internal API for the generic block layer to send scsi generic commands
to block format driver.  This means block format drivers no longer need
to consider overloaded nb_sectors parameters.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6823 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd specialized block driver scsi generic API (Avi Kivity)
aliguori [Thu, 12 Mar 2009 19:57:08 +0000 (19:57 +0000)]
Add specialized block driver scsi generic API (Avi Kivity)

When a scsi device is backed by a scsi generic device instead of an
ordinary host block device, the block API is abused in a couple of annoying
ways:

 - nb_sectors is negative, and specifies a byte count instead of a sector count
 - offset is ignored, since scsi-generic is essentially a packet protocol

This overloading makes hacking the block layer difficult.  Remove it by
introducing a new explicit API for scsi-generic devices.  The new API
is still backed by the old implementation, but at least the users are
insulated.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6822 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoCorrect usb revision number
Riku Voipio [Thu, 12 Mar 2009 16:14:52 +0000 (18:14 +0200)]
Correct usb revision number

Match omap3530 ES 2.1. Debug more.

15 years agoquick fix for ARMv7 "mov pc, <xxx>" commands
Juha Riihimäki [Thu, 12 Mar 2009 13:14:38 +0000 (15:14 +0200)]
quick fix for ARMv7 "mov pc, <xxx>" commands

QEMU does not currently emulate the load/move operations to R15 (PC) correctly for ARMv7. Correct behavior is similar to BX command. This patch fixes the behavior for the special case of "mov<cond> pc, <rm>", "mov<cond> pc, #<const>", "mov<cond> pc, <rm>, <shift>". Other commands (such as "ldr pc, ..." for example) are not fixed.

15 years agoEnhanced OMAP3 boot ROM emulation
Juha Riihimäki [Thu, 12 Mar 2009 13:12:54 +0000 (15:12 +0200)]
Enhanced OMAP3 boot ROM emulation

Boot ROM emulation is no longer dependent on machine specifics (e.g. type of NAND device attached). Also a kind of stub ROM image is mapped at correct address at POR.

15 years agoRevert r6404
aliguori [Wed, 11 Mar 2009 20:05:37 +0000 (20:05 +0000)]
Revert r6404

This series is broken by design as it requires expensive IO operations at
open time causing very long delays when starting a virtual machine for the
first time.

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6816 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRevert r6405
aliguori [Wed, 11 Mar 2009 20:05:33 +0000 (20:05 +0000)]
Revert r6405

This series is broken by design as it requires expensive IO operations at
open time causing very long delays when starting a virtual machine for the
first time.

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6815 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRevert r6406
aliguori [Wed, 11 Mar 2009 20:05:29 +0000 (20:05 +0000)]
Revert r6406

This series is broken by design as it requires expensive IO operations at
open time causing very long delays when starting a virtual machine for the
first time.

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6814 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRevert r6407
aliguori [Wed, 11 Mar 2009 20:05:25 +0000 (20:05 +0000)]
Revert r6407

This series is broken by design as it requires expensive IO operations at
open time causing very long delays when starting a virtual machine for the
first time.

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6813 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRevert r6408
aliguori [Wed, 11 Mar 2009 20:05:20 +0000 (20:05 +0000)]
Revert r6408

This series is broken by design as it requires expensive IO operations at
open time causing very long delays when starting a virtual machine for the
first time.

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6812 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotcg: move {not,neg}_i{32,64} definitions at the right place
aurel32 [Wed, 11 Mar 2009 11:00:49 +0000 (11:00 +0000)]
tcg: move {not,neg}_i{32,64} definitions at the right place

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6811 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoOMAP3 clock adjustments & cleanups
Juha Riihimäki [Wed, 11 Mar 2009 08:55:38 +0000 (10:55 +0200)]
OMAP3 clock adjustments & cleanups

Add support for OMAP3 SYS_CLK input selection reconfiguration support. In real life we would also need to support sys_boot pin 6 to choose between oscillator bypass mode (xtalin is square wave) or PRCM internal oscillator (xtalin). Current code is fixed to use the bypass mode with a default setting of 26MHz input. Also, added SYS_CLKOUT1 clock which was missing.

15 years agotcg: fix commit r6805
aurel32 [Wed, 11 Mar 2009 02:57:30 +0000 (02:57 +0000)]
tcg: fix commit r6805

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6810 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoClean build: Add bt-host.h
aurel32 [Tue, 10 Mar 2009 21:43:35 +0000 (21:43 +0000)]
Clean build: Add bt-host.h

Silence compiler warning by providing proper CONFIG_BLUEZ-independent
header for the bt-host API.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6809 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotcg-arm: fix qemu_ld64
aurel32 [Tue, 10 Mar 2009 21:43:25 +0000 (21:43 +0000)]
tcg-arm: fix qemu_ld64

Emulating fldl on arm doesn't seem to work too well. It's the way
qemu_ld64 is translated to arm instructions.

        tcg_out_ld32_12(s, COND_AL, data_reg, addr_reg, 0);
        tcg_out_ld32_12(s, COND_AL, data_reg2, addr_reg, 4);

Consider case where data_reg==0, data_reg2==1, and addr_reg==0. First load
overwrited addr_reg. So let's put an if (data_ref==addr_reg).

(Pablo Virolainen)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6808 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotcg: update TODO
aurel32 [Tue, 10 Mar 2009 19:37:56 +0000 (19:37 +0000)]
tcg: update TODO

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6807 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotcg/x86: add not/neg/extu/bswap/rot i32 ops
aurel32 [Tue, 10 Mar 2009 19:37:46 +0000 (19:37 +0000)]
tcg/x86: add not/neg/extu/bswap/rot i32 ops

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6806 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotcg: optimize logical operations
aurel32 [Tue, 10 Mar 2009 19:37:39 +0000 (19:37 +0000)]
tcg: optimize logical operations

Simplify nand/nor/eqv and move their optimizations to and/or/xor

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6805 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: fix commit r6789
aurel32 [Tue, 10 Mar 2009 19:37:28 +0000 (19:37 +0000)]
target-ppc: fix commit r6789

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6804 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agomusicpal: Reorganize IO memory handling (Jan Kiszka)
malc [Tue, 10 Mar 2009 19:25:13 +0000 (19:25 +0000)]
musicpal: Reorganize IO memory handling (Jan Kiszka)

The new MMIO interface requires non-overlapping slots. Reorganize the
musicpal accordingly, fixing a regression for the Ethernet emulation.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6803 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix tcg after commit 6800
aurel32 [Tue, 10 Mar 2009 10:29:45 +0000 (10:29 +0000)]
Fix tcg after commit 6800

The introduction of TCGV_EQUAL and not op is slightly broken.
The definition of DEBUG_TCGV shows that.

Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6802 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoMerge commit 'garage/master'
Riku Voipio [Tue, 10 Mar 2009 10:25:49 +0000 (12:25 +0200)]
Merge commit 'garage/master'

15 years agobye bye
Riku Voipio [Tue, 10 Mar 2009 10:24:56 +0000 (12:24 +0200)]
bye bye

15 years agoMerge commit 'garage/master'
Riku Voipio [Tue, 10 Mar 2009 10:24:22 +0000 (12:24 +0200)]
Merge commit 'garage/master'

15 years agotarget-mips: use nor instead of or + not
aurel32 [Tue, 10 Mar 2009 09:03:18 +0000 (09:03 +0000)]
target-mips: use nor instead of or + not

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6801 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotcg: use TCGV_EQUAL_I{32,64}
aurel32 [Tue, 10 Mar 2009 08:57:16 +0000 (08:57 +0000)]
tcg: use TCGV_EQUAL_I{32,64}

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6800 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotcg: define TCGV_EQUAL_I{32,64}
aurel32 [Tue, 10 Mar 2009 08:56:30 +0000 (08:56 +0000)]
tcg: define TCGV_EQUAL_I{32,64}

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6799 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotcg: optimize nor(X, Y, Y), used on PPC for not(X, Y)
aurel32 [Mon, 9 Mar 2009 22:35:22 +0000 (22:35 +0000)]
tcg: optimize nor(X, Y, Y), used on PPC for not(X, Y)

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6798 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoImplement TCG not ops for x86-64
aurel32 [Mon, 9 Mar 2009 22:35:13 +0000 (22:35 +0000)]
Implement TCG not ops for x86-64

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6797 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotcg: don't define TCG rotation ops if they are not supported
aurel32 [Mon, 9 Mar 2009 21:58:46 +0000 (21:58 +0000)]
tcg: don't define TCG rotation ops if they are not supported

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6796 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoImplement TCG rotation ops for x86-64
aurel32 [Mon, 9 Mar 2009 18:50:53 +0000 (18:50 +0000)]
Implement TCG rotation ops for x86-64

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6795 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-mips: optimize mflo and mfhi
aurel32 [Mon, 9 Mar 2009 18:50:43 +0000 (18:50 +0000)]
target-mips: optimize mflo and mfhi

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6794 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarge-ppc: optimize mfcr and mtcrf
aurel32 [Mon, 9 Mar 2009 18:50:24 +0000 (18:50 +0000)]
targe-ppc: optimize mfcr and mtcrf

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6793 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agofread_targphys(): Do not cut off the tail.
blueswir1 [Mon, 9 Mar 2009 18:08:56 +0000 (18:08 +0000)]
fread_targphys(): Do not cut off the tail.

loader.c:fread_targphys() read file by 4096 byte chunks and store them to
memory. But did not store the last chunk if its size was not 4096.

Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6792 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoconfigure sensitive to user locale
blueswir1 [Mon, 9 Mar 2009 17:36:50 +0000 (17:36 +0000)]
configure sensitive to user locale

On German Fedora 9, no KVM errors are displayed.
This is because configure greps for "error:", which is locale-sensitive.

Use LANG=C for configure to find and display errors as expected.

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6791 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoMerge commit 'juri/juha-devel' 0.10.0-0maemo2
Riku Voipio [Mon, 9 Mar 2009 15:50:12 +0000 (17:50 +0200)]
Merge commit 'juri/juha-devel'

15 years agoMerge branch 'maemo-test'
Riku Voipio [Mon, 9 Mar 2009 15:49:21 +0000 (17:49 +0200)]
Merge branch 'maemo-test'

15 years agofix merge fallout
Riku Voipio [Mon, 9 Mar 2009 14:33:03 +0000 (16:33 +0200)]
fix merge fallout

15 years agoPackaging update
Riku Voipio [Mon, 9 Mar 2009 13:01:52 +0000 (15:01 +0200)]
Packaging update

15 years agoEmulate only host mode
Riku Voipio [Mon, 9 Mar 2009 13:01:47 +0000 (15:01 +0200)]
Emulate only host mode

15 years agouse Paul Brooks thread variant
Riku Voipio [Mon, 9 Mar 2009 14:22:35 +0000 (16:22 +0200)]
use Paul Brooks thread variant

15 years agoChanged fprintf() -> qemu_log().
Mika Westerberg [Mon, 9 Mar 2009 09:09:13 +0000 (11:09 +0200)]
Changed fprintf() -> qemu_log().

15 years agoMerge branch 'upstream' into maemo-test
Riku Voipio [Mon, 9 Mar 2009 14:03:23 +0000 (16:03 +0200)]
Merge branch 'upstream' into maemo-test

Conflicts:

linux-user/syscall.c
target-arm/helper.c

15 years agocleaning up unnecessary compiler warnings
Juha Riihimäki [Mon, 9 Mar 2009 13:19:39 +0000 (15:19 +0200)]
cleaning up unnecessary compiler warnings

15 years agoPackaging update
Riku Voipio [Mon, 9 Mar 2009 13:01:52 +0000 (15:01 +0200)]
Packaging update

15 years agoEmulate only host mode
Riku Voipio [Mon, 9 Mar 2009 13:01:47 +0000 (15:01 +0200)]
Emulate only host mode

15 years agoChanged fprintf() -> qemu_log().
Mika Westerberg [Mon, 9 Mar 2009 09:09:13 +0000 (11:09 +0200)]
Changed fprintf() -> qemu_log().

15 years agomore cleanups
Juha Riihimäki [Mon, 9 Mar 2009 12:36:32 +0000 (14:36 +0200)]
more cleanups

15 years agomisc clean-ups
Juha Riihimäki [Mon, 9 Mar 2009 11:20:15 +0000 (13:20 +0200)]
misc clean-ups

15 years agomore NAND fixing & tidying
Juha Riihimäki [Mon, 9 Mar 2009 06:31:16 +0000 (08:31 +0200)]
more NAND fixing & tidying

15 years agotarget-ppc: free a tcg temp variable
aurel32 [Mon, 9 Mar 2009 06:27:24 +0000 (06:27 +0000)]
target-ppc: free a tcg temp variable

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6790 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: add support for reading/writing spefscr
aurel32 [Mon, 9 Mar 2009 06:27:14 +0000 (06:27 +0000)]
target-ppc: add support for reading/writing spefscr

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6789 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu-img: fix help message
aurel32 [Sun, 8 Mar 2009 19:49:51 +0000 (19:49 +0000)]
qemu-img: fix help message

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6787 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqemu-img: accept sizes with decimal values
aurel32 [Sun, 8 Mar 2009 19:49:44 +0000 (19:49 +0000)]
qemu-img: accept sizes with decimal values

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6786 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoCall Perl directly instead of relying on shebang
blueswir1 [Sun, 8 Mar 2009 19:26:53 +0000 (19:26 +0000)]
Call Perl directly instead of relying on shebang

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6785 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoMulti-key completion for sendkey
blueswir1 [Sun, 8 Mar 2009 17:42:02 +0000 (17:42 +0000)]
Multi-key completion for sendkey

Allow completion of concatenated key strings for the sendkey command.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6784 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix windows build and clean up use of <windows.h>
aliguori [Sun, 8 Mar 2009 16:26:59 +0000 (16:26 +0000)]
Fix windows build and clean up use of <windows.h>

We want to globally define WIN_LEAN_AND_MEAN and WINVER to particular values so
let's do it in OS_CFLAGS.

Then, we can pepper in windows.h includes where using #includes that require it.

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6783 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRename one more _BSD to HOST_BSD (spotted by Hasso Tepper)
blueswir1 [Sun, 8 Mar 2009 15:58:00 +0000 (15:58 +0000)]
Rename one more _BSD to HOST_BSD (spotted by Hasso Tepper)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6782 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRemove unnecessary prefix on SDL_syswm.h. This fixes the build for certain
aliguori [Sun, 8 Mar 2009 15:04:07 +0000 (15:04 +0000)]
Remove unnecessary prefix on SDL_syswm.h.  This fixes the build for certain
installs of SDL.

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6780 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoPrune unused TCG_AREGs
blueswir1 [Sun, 8 Mar 2009 14:45:45 +0000 (14:45 +0000)]
Prune unused TCG_AREGs

Remove definitions for TCG_AREGs corresponding to AREG definitions
removed in r6778.

Signed-off-by: Stuart Brady <stuart.brady@gmail.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6779 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoPrune unused AREGs
blueswir1 [Sun, 8 Mar 2009 12:41:36 +0000 (12:41 +0000)]
Prune unused AREGs

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6778 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoUse firmware configuration instead of NVRAM (initial patch by Aurelien Jarno)
blueswir1 [Sun, 8 Mar 2009 09:51:29 +0000 (09:51 +0000)]
Use firmware configuration instead of NVRAM (initial patch by Aurelien Jarno)

Use firmware configuration device for boot device, kernel, initrd and
kernel command line parameters on PPC, Sparc32 and Sparc64.

Update OpenBIOS images to r479 which supports the change.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6777 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd new entries to firmware configuration device
blueswir1 [Sun, 8 Mar 2009 09:34:26 +0000 (09:34 +0000)]
Add new entries to firmware configuration device

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6776 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRename _BSD to HOST_BSD so that it's more obvious that it's defined by configure
blueswir1 [Sun, 8 Mar 2009 08:23:32 +0000 (08:23 +0000)]
Rename _BSD to HOST_BSD so that it's more obvious that it's defined by configure

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6775 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-mips: remove dead code
aurel32 [Sun, 8 Mar 2009 00:06:10 +0000 (00:06 +0000)]
target-mips: remove dead code

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6774 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-mips: rename helpers from do_ to helper_
aurel32 [Sun, 8 Mar 2009 00:06:01 +0000 (00:06 +0000)]
target-mips: rename helpers from do_ to helper_

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6773 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agodo not pretend to support low voltage operation
aurel32 [Sat, 7 Mar 2009 22:10:40 +0000 (22:10 +0000)]
do not pretend to support low voltage operation

Eliminate "mmc0: SD card claims to support the incompletely defined 'low voltage
range'. This will be ignored." warning. Qemu says the card is a SD card, and SD
spec doesn't define low-voltage cards, so do now pretend to be one.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6772 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix correct reset value for ARM CP15 c1 auxiliary control register
aurel32 [Sat, 7 Mar 2009 22:10:28 +0000 (22:10 +0000)]
Fix correct reset value for ARM CP15 c1 auxiliary control register

According to ARM Cortex A8 Technical Reference Manual, the reset value for CP15 c1 auxiliary control
register is 2, not zero (page 3.12).

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6771 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoWork around QEMU GDB stub suboptimality
aurel32 [Sat, 7 Mar 2009 22:00:56 +0000 (22:00 +0000)]
Work around QEMU GDB stub suboptimality

The current XML files claim, on floating point-supporting Power chips,
that $f0 is register 70.  This would be fine, except that register 70
for non-XML-aware GDB is FPSCR.  More importantly, 70 is less than
NUM_CORE_REGS (71) for Power, so a request for register 70 goes to the
"core" register reading routines, rather than the floating-point
register read routine we registered with gdb_register_coprocessor.

Therefore, when we are talking to an XML-aware GDB, we claim that
register has zero width, which causes the rest of QEMU's GDB stub to
send an error back to GDB, which causes GDB to be unable to read the
floating-point registers.  (The problem is also present for SPE
registers and occurs in a slightly different way for Altivec registers.)

The best way to fix this is to have the "core register" XML files for
PPC32 and PPC64 claim that there is a 4-byte register 70, which causes
$f0 to be register 71, and everything works just fine from that point
forward.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6770 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix off-by-one errors for Altivec and SPE registers
aurel32 [Sat, 7 Mar 2009 22:00:49 +0000 (22:00 +0000)]
Fix off-by-one errors for Altivec and SPE registers

Altivec and SPE both have 34 registers in their register sets, not 35
with a missing register 32.

GDB would ask for register 32 of the Altivec (resp. SPE) registers and
the code would claim it had zero width.  The QEMU GDB stub code would
then return an E14 to GDB, which would complain about not being sure
whether p packets were supported or not.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6769 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoUse C99 initializers for BlockDriver methods
aurel32 [Sat, 7 Mar 2009 22:00:29 +0000 (22:00 +0000)]
Use C99 initializers for BlockDriver methods

Consistently use the C99 named initializer format for the BlockDriver
methods to make the method table more readable and more easily
extensible.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6768 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoclean build: Fix remaining m68k warnings
aurel32 [Sat, 7 Mar 2009 21:48:08 +0000 (21:48 +0000)]
clean build: Fix remaining m68k warnings

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6767 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoclean build: Fix arm build warnings
aurel32 [Sat, 7 Mar 2009 21:48:00 +0000 (21:48 +0000)]
clean build: Fix arm build warnings

Fix remaining arm warnings - except for the mess in the NetWinder FP
emulator.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6766 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoarm: Fix gic_irq_state.level bitfield type
aurel32 [Sat, 7 Mar 2009 21:47:53 +0000 (21:47 +0000)]
arm: Fix gic_irq_state.level bitfield type

Found while cleaning up compiler warnings: GIC_*_LEVEL macros strongly
suggest that gic_irq_state.level is intended to be per-CPU and not just
a single, global bit. I'm unable to test the effect, but it seems to be
the most reasonable fix for the apparent brokenness.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6765 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: move the CD-ROM drive to the second IDE
aurel32 [Sat, 7 Mar 2009 21:35:27 +0000 (21:35 +0000)]
target-ppc: move the CD-ROM drive to the second IDE

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6764 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoppc_oldworld: swap the MACIO and CMD646 IDE controllers
aurel32 [Sat, 7 Mar 2009 21:35:21 +0000 (21:35 +0000)]
ppc_oldworld: swap the MACIO and CMD646 IDE controllers

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6763 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoUse a dedicated function to request exit from execution loop
aurel32 [Sat, 7 Mar 2009 21:28:24 +0000 (21:28 +0000)]
Use a dedicated function to request exit from execution loop

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6762 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix texinfo syntax errors.
aurel32 [Sat, 7 Mar 2009 21:28:14 +0000 (21:28 +0000)]
Fix texinfo syntax errors.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6761 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoDisable BAT for 970
blueswir1 [Sat, 7 Mar 2009 20:58:30 +0000 (20:58 +0000)]
Disable BAT for 970

The 970 doesn't know BAT, so let's not search BATs there.
This was only in as a hack for OpenHackWare so it would
work on PPC64.

Signed-off-by: Alexander Graf <alex@csgraf.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6759 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix mfcr on ppc64-softmmu
aurel32 [Sat, 7 Mar 2009 20:57:47 +0000 (20:57 +0000)]
Fix mfcr on ppc64-softmmu

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6758 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoKeep SLB in-CPU
blueswir1 [Sat, 7 Mar 2009 20:57:42 +0000 (20:57 +0000)]
Keep SLB in-CPU

Real 970 CPUs have the SLB not memory backed, but inside the CPU.
This breaks bridge mode for 970 for now, but at least keeps us from
overwriting physical addresses 0x0 - 0x300, rendering our interrupt
handlers useless.

I put in a stub for bridge mode operation that could be enabled
easily, but for now it's safer to leave that off I guess (970fx doesn't
have bridge mode AFAIK).

Signed-off-by: Alexander Graf <alex@csgraf.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6757 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoClear CPU_INTERRUPT_EXIT on VM load
aurel32 [Sat, 7 Mar 2009 20:57:31 +0000 (20:57 +0000)]
Clear CPU_INTERRUPT_EXIT on VM load

CPU_INTERRUPT_EXIT is not set anymore in env->interrupt_request since
revision 6728. Make sure the bit is cleared on VM load.

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

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6756 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix NX bit
blueswir1 [Sat, 7 Mar 2009 20:57:01 +0000 (20:57 +0000)]
Fix NX bit

ctx->nx only got ORed, but never reset. So when one page in the
lifetime of the VM was ever NX, all later pages were too.

Signed-off-by: Alexander Graf <alex@csgraf.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6755 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix RFI(d)
blueswir1 [Sat, 7 Mar 2009 20:56:21 +0000 (20:56 +0000)]
Fix RFI(d)

The current implementation masks some MSR bits from SRR1 as it is
given on rfi(d). This looks pretty wrong and breaks Altivec.

Signed-off-by: Alexander Graf <alex@csgraf.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6754 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoImplement mtfsf.L encoding
blueswir1 [Sat, 7 Mar 2009 20:55:31 +0000 (20:55 +0000)]
Implement mtfsf.L encoding

Mtfsf can have the L bit set, so all the register contents get stored
in FPSCR. Linux uses it, so let's implement it.

Signed-off-by: Alexander Graf <alex@csgraf.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6753 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoEnable 64bit mode on interrupts
blueswir1 [Sat, 7 Mar 2009 20:54:59 +0000 (20:54 +0000)]
Enable 64bit mode on interrupts

Real 970s enable MSR_SF on all interrupts. The current code didn't do
this until now, so let's activate it!

Signed-off-by: Alexander Graf <alex@csgraf.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6752 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoNop some SPRs on 970fx
blueswir1 [Sat, 7 Mar 2009 20:54:03 +0000 (20:54 +0000)]
Nop some SPRs on 970fx

Linux tries to access some SPRs on PPC64 boot. Let's just ignore those
for the 970fx for now to make it happy.

Signed-off-by: Alexander Graf <alex@csgraf.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6751 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoActivate uninorth AGP bridge
blueswir1 [Sat, 7 Mar 2009 20:53:18 +0000 (20:53 +0000)]
Activate uninorth AGP bridge

Linux tries to poke the AGP bridge port and is pretty sad when it can't,
so let's activate the old code again and throw out the bit modifications,
as we don't really do anything with the values anyways.

Signed-off-by: Alexander Graf <alex@csgraf.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6750 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoImplment tlbiel
blueswir1 [Sat, 7 Mar 2009 20:52:22 +0000 (20:52 +0000)]
Implment tlbiel

Linux uses tlbiel to flush TLB entries in PPC64 mode. This special TLB
flush opcode only flushes an entry for the CPU it runs on, not across
all CPUs in the system.

Signed-off-by: Alexander Graf <alex@csgraf.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6749 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoImplement large pages
blueswir1 [Sat, 7 Mar 2009 20:51:18 +0000 (20:51 +0000)]
Implement large pages

The current SLB/PTE code does not support large pages, which are
required by Linux, as it boots up with the kernel regions up as large.

This patch implements large page support, so we can run Linux.

Signed-off-by: Alexander Graf <alex@csgraf.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6748 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoImplement slbmte
blueswir1 [Sat, 7 Mar 2009 20:50:01 +0000 (20:50 +0000)]
Implement slbmte

In order to modify SLB entries on recent PPC64 machines, the slbmte
instruction is used.

This patch implements the slbmte instruction and makes the "bridge"
mode code use the slb set functions, so we can move the SLB into
the CPU struct later.

This is required for Linux to run on PPC64.

Signed-off-by: Alexander Graf <alex@csgraf.de>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6747 c046a42c-6fe2-441c-8c8c-71466251a162