sdk/emulator/qemu.git
15 years agoThis should have been added in Gerd's previous commit.
aliguori [Wed, 17 Dec 2008 21:32:37 +0000 (21:32 +0000)]
This should have been added in Gerd's previous commit.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6076 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoUse saner types for virtio-net
aliguori [Wed, 17 Dec 2008 19:45:40 +0000 (19:45 +0000)]
Use saner types for virtio-net

This was spotted by malc

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6075 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd support for tap vectored send
aliguori [Wed, 17 Dec 2008 19:17:17 +0000 (19:17 +0000)]
Add support for tap vectored send

This is adapted from kvm-userspace.  It allows readv to be used with tap when
the host supports it.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6074 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agovirtio-net support
aliguori [Wed, 17 Dec 2008 19:13:11 +0000 (19:13 +0000)]
virtio-net support

This adds virtio-net support.  This is based on the virtio-net driver
that exists in kvm-userspace.  This also adds a new qemu_sendv_packet
which virtio-net requires.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6073 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoDo not rely on BSD style echo (which accepts -n option)
malc [Wed, 17 Dec 2008 19:00:18 +0000 (19:00 +0000)]
Do not rely on BSD style echo (which accepts -n option)

http://www.opengroup.org/onlinepubs/7990989775/xcu/echo.html

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

15 years agoAdd bamboo.dtb compiled from bamboo.dts
aurel32 [Wed, 17 Dec 2008 00:03:01 +0000 (00:03 +0000)]
Add bamboo.dtb compiled from bamboo.dts

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6070 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: add comments about constants introduced in revision 6046
aurel32 [Tue, 16 Dec 2008 10:44:29 +0000 (10:44 +0000)]
target-ppc: add comments about constants introduced in revision 6046

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6069 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: fix a typo introduced in revision 6058
aurel32 [Tue, 16 Dec 2008 10:44:22 +0000 (10:44 +0000)]
target-ppc: fix a typo introduced in revision 6058

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6068 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: IBM PowerPC 440EP Bamboo reference board emulation
aurel32 [Tue, 16 Dec 2008 10:44:14 +0000 (10:44 +0000)]
target-ppc: IBM PowerPC 440EP Bamboo reference board emulation

Since most IO devices are integrated into the 440EP chip, "Bamboo support"
mostly entails implementing the -kernel, -initrd, and -append options.

These options are implemented by loading the guest as if u-boot had done it,
i.e. loading a flat device tree, updating it to hold initrd addresses, ram
size, and command line, and passing the FDT address in r3.

Since we use it with KVM, we enable the virtio block driver and include hooks
necessary for KVM support.

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@6067 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: PowerPC 440EP SoC emulation
aurel32 [Tue, 16 Dec 2008 10:44:06 +0000 (10:44 +0000)]
target-ppc: PowerPC 440EP SoC emulation

Wire up the system-on-chip devices present on 440EP chips.

This patch is a little unusual in that qemu doesn't actually emulate the 440
core, but we use this board code with KVM (which does). If/when 440 core
emulation is supported, the kvm_enabled() hack can be removed.

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@6066 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: Enable KVM for ppcemb.
aurel32 [Tue, 16 Dec 2008 10:43:58 +0000 (10:43 +0000)]
target-ppc: Enable KVM for ppcemb.

Implement hooks called by generic KVM code.

Also add code that will copy the host's CPU and timebase frequencies to the
guest, which is necessary on KVM because the guest can directly access the
timebase.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Acked-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6065 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoImplement device tree support needed for Bamboo emulation
aurel32 [Tue, 16 Dec 2008 10:43:48 +0000 (10:43 +0000)]
Implement device tree support needed for Bamboo emulation

To implement the -kernel, -initrd, and -append options, 4xx board emulation
must load the guest kernel as if firmware had loaded it. Where u-boot would be
the firmware, we must load the flat device tree into memory and set key fields
such as /chosen/bootargs.

This patch introduces a dependency on libfdt for flat device tree support.

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@6064 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: create a helper function to allow more flexible RAM allocation for PPC 4xx
aurel32 [Mon, 15 Dec 2008 23:15:56 +0000 (23:15 +0000)]
target-ppc: create a helper function to allow more flexible RAM allocation for PPC 4xx

The 4xx SDRAM controller supports a small number of banks, and each bank must
be one of a small set of sizes. The number of banks and the supported sizes
varies by SoC.

This function uses the user-specified RAM size to fill in the "ram_bases" and
"ram_sizes" arrays required by ppc4xx_sdram_init().

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@6063 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: rename ppc405_sdram_init() to ppc4xx_sdram_init()
aurel32 [Mon, 15 Dec 2008 22:59:45 +0000 (22:59 +0000)]
target-ppc: rename ppc405_sdram_init() to ppc4xx_sdram_init()

The SDRAM controller is shared across almost all 405 and 440 embedded
processors, with some slight differences such as the sizes supported for each
memory bank.

Rename only; no functional changes.

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@6062 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: move PPC4xx SDRAM controller emulation from ppc405_uc.c to ppc4xx_devs.c
aurel32 [Mon, 15 Dec 2008 22:59:34 +0000 (22:59 +0000)]
target-ppc: move PPC4xx SDRAM controller emulation from ppc405_uc.c to ppc4xx_devs.c

The SDRAM controller is shared across almost all 405 and 440 embedded
processors, with some slight differences such as the sizes supported for each
memory bank.

Code movement only; no functional changes.

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@6061 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agokvm: sync vcpu state during initialization (Hollis Blanchard)
aliguori [Mon, 15 Dec 2008 22:20:42 +0000 (22:20 +0000)]
kvm: sync vcpu state during initialization (Hollis Blanchard)

Currently on x86, qemu initializes CPUState but KVM ignores it and does its
own vcpu initialization. However, PowerPC KVM needs to be able to set the
initial register state to support the -kernel and -append options.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6060 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agosoftfloat-native: improve correctness of floatXX_is_neg()
aurel32 [Mon, 15 Dec 2008 22:07:50 +0000 (22:07 +0000)]
softfloat-native: improve correctness of floatXX_is_neg()

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6059 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: update comment about precise emulation
aurel32 [Mon, 15 Dec 2008 21:48:27 +0000 (21:48 +0000)]
target-ppc: update comment about precise emulation

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6058 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRevert part of r5853
blueswir1 [Mon, 15 Dec 2008 20:24:25 +0000 (20:24 +0000)]
Revert part of r5853

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

15 years agoFix mremap, based on patch by Kirill A. Shutemov
blueswir1 [Mon, 15 Dec 2008 17:58:49 +0000 (17:58 +0000)]
Fix mremap, based on patch by Kirill A. Shutemov

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

15 years agotarget-ppc: remove dead code
aurel32 [Mon, 15 Dec 2008 17:14:58 +0000 (17:14 +0000)]
target-ppc: remove dead code

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6055 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: enable PRECISE_EMULATION by default
aurel32 [Mon, 15 Dec 2008 17:14:50 +0000 (17:14 +0000)]
target-ppc: enable PRECISE_EMULATION by default

With this option enabled, all glibc math tests pass.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6054 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: fmadd/fmsub/fmnadd/fmnsub can generate VXIMZ or VXIZI exceptions
aurel32 [Mon, 15 Dec 2008 17:14:43 +0000 (17:14 +0000)]
target-ppc: fmadd/fmsub/fmnadd/fmnsub can generate VXIMZ or VXIZI exceptions

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6053 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: fadd/fsub: correctly propagate NaN
aurel32 [Mon, 15 Dec 2008 17:14:35 +0000 (17:14 +0000)]
target-ppc: fadd/fsub: correctly propagate NaN

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6052 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: use the new fp functions
aurel32 [Mon, 15 Dec 2008 17:14:27 +0000 (17:14 +0000)]
target-ppc: use the new fp functions

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6051 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agofp: add floatXX_is_infinity(), floatXX_is_neg(), floatXX_is_zero()
aurel32 [Mon, 15 Dec 2008 17:14:20 +0000 (17:14 +0000)]
fp: add floatXX_is_infinity(), floatXX_is_neg(), floatXX_is_zero()

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6050 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agosoftfloat-native: fix *nan()
aurel32 [Mon, 15 Dec 2008 17:14:12 +0000 (17:14 +0000)]
softfloat-native: fix *nan()

Fix float64_is_nan()
Fix floatx80_is_signaling_nan()
Add floatx80_is_nan()

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6049 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: correctly propagate NaN in division
aurel32 [Mon, 15 Dec 2008 17:14:05 +0000 (17:14 +0000)]
target-ppc: correctly propagate NaN in division

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6048 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: fix fload_invalid_op_excp()
aurel32 [Mon, 15 Dec 2008 17:13:55 +0000 (17:13 +0000)]
target-ppc: fix fload_invalid_op_excp()

The argument is a value, not a flag. Update the tests accordingly. Also
set a correct default value for NaN.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6047 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: use a correct value to represent 1.0
aurel32 [Mon, 15 Dec 2008 17:13:48 +0000 (17:13 +0000)]
target-ppc: use a correct value to represent 1.0

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6046 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: update nip before calling an helper in FP instructions
aurel32 [Mon, 15 Dec 2008 17:13:39 +0000 (17:13 +0000)]
target-ppc: update nip before calling an helper in FP instructions

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6045 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: fix TCGv type in fcmpu/fcmpo
aurel32 [Mon, 15 Dec 2008 17:13:31 +0000 (17:13 +0000)]
target-ppc: fix TCGv type in fcmpu/fcmpo

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6044 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoconfigure: also switch ppc64abi32 and ppcemb to CONFIG_SOFTFLOAT
aurel32 [Mon, 15 Dec 2008 17:13:19 +0000 (17:13 +0000)]
configure: also switch ppc64abi32 and ppcemb to CONFIG_SOFTFLOAT

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6043 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: add signed fields to ppc_avr_t.
aurel32 [Mon, 15 Dec 2008 07:03:06 +0000 (07:03 +0000)]
target-ppc: add signed fields to ppc_avr_t.

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@6042 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoconfigure: switch to CONFIG_SOFTFLOAT for PPC
aurel32 [Mon, 15 Dec 2008 06:34:37 +0000 (06:34 +0000)]
configure: switch to CONFIG_SOFTFLOAT for PPC

softfloat-native currently only supports one FPU context, while we need
at least 3 of them for the PPC target (FPU, SPE, AVR).

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6041 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoconfigure: close stdout for the remaining calls to cc.
balrog [Mon, 15 Dec 2008 03:15:36 +0000 (03:15 +0000)]
configure: close stdout for the remaining calls to cc.

r5953 managed to quite most colorgcc errors leakage to console
but not all of them.

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

15 years agoAdd ARM board names still missing from qemu-doc.
balrog [Mon, 15 Dec 2008 02:12:20 +0000 (02:12 +0000)]
Add ARM board names still missing from qemu-doc.

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

15 years agoARM: basic SX1-cellphone sysemu support (Jean-Christophe PLAGNIOL-VILLARD).
balrog [Mon, 15 Dec 2008 02:05:00 +0000 (02:05 +0000)]
ARM: basic SX1-cellphone sysemu support (Jean-Christophe PLAGNIOL-VILLARD).

The TSC2102 chip is not included in documentation because a patch is
pending.

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

15 years agoFix the PXA2xx LCD dirty page detection a little more.
balrog [Mon, 15 Dec 2008 01:35:39 +0000 (01:35 +0000)]
Fix the PXA2xx LCD dirty page detection a little more.

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

15 years agotarget-ppc: fix frsp instruction
aurel32 [Mon, 15 Dec 2008 01:00:17 +0000 (01:00 +0000)]
target-ppc: fix frsp instruction

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6036 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: fix mtfsf and mtfsfi instructions
aurel32 [Mon, 15 Dec 2008 00:30:28 +0000 (00:30 +0000)]
target-ppc: fix mtfsf and mtfsfi instructions

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6035 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: fix fcmp{o,u} instructions
aurel32 [Sun, 14 Dec 2008 19:34:09 +0000 (19:34 +0000)]
target-ppc: fix fcmp{o,u} instructions

The instructions are specified to update the condition register even if
an error is to be signaled because of NaN input.

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@6034 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: remove FPRF optimization
aurel32 [Sun, 14 Dec 2008 18:59:08 +0000 (18:59 +0000)]
target-ppc: remove FPRF optimization

FPRF optimization is totally broken, remove it.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6033 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: fix mtfsb0 and mtfsb1
aurel32 [Sun, 14 Dec 2008 18:40:58 +0000 (18:40 +0000)]
target-ppc: fix mtfsb0 and mtfsb1

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6032 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: display FPSCR in register dump
aurel32 [Sun, 14 Dec 2008 18:40:49 +0000 (18:40 +0000)]
target-ppc: display FPSCR in register dump

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6031 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRevert "target-ppc: use -Werror to make sure no new warning is added"
aurel32 [Sun, 14 Dec 2008 17:30:18 +0000 (17:30 +0000)]
Revert "target-ppc: use -Werror to make sure no new warning is added"

This reverts commit 6028.

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

15 years agotcg: kill two warnings
aurel32 [Sun, 14 Dec 2008 17:29:58 +0000 (17:29 +0000)]
tcg: kill two warnings

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6029 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: use -Werror to make sure no new warning is added
aurel32 [Sun, 14 Dec 2008 11:12:28 +0000 (11:12 +0000)]
target-ppc: use -Werror to make sure no new warning is added

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6028 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: fix mbar opcode
aurel32 [Sun, 14 Dec 2008 11:12:20 +0000 (11:12 +0000)]
target-ppc: fix mbar opcode

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@6027 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agotarget-ppc: fix fsel instruction
aurel32 [Sun, 14 Dec 2008 11:12:10 +0000 (11:12 +0000)]
target-ppc: fix fsel instruction

Fix fsel instruction.  Eliminate unneeded temporaries while we're at it,
too.

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@6026 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoUse float_relation_* constants
aurel32 [Sun, 14 Dec 2008 11:12:02 +0000 (11:12 +0000)]
Use float_relation_* constants

Use float_relation_* constants rather than magic numbers in
softfloat-native comparison routines.

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@6025 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoIgnore .pc and patches used by quilt
blueswir1 [Sun, 14 Dec 2008 10:32:11 +0000 (10:32 +0000)]
Ignore .pc and patches used by quilt

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

15 years agoUse a hex value instead of possibly ambiguous 8 bit character
blueswir1 [Sun, 14 Dec 2008 09:30:41 +0000 (09:30 +0000)]
Use a hex value instead of possibly ambiguous 8 bit character

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

15 years agoSVN property and .gitignore fixes (Stuart Brady)
blueswir1 [Sun, 14 Dec 2008 09:22:41 +0000 (09:22 +0000)]
SVN property and .gitignore fixes (Stuart Brady)

Remove dyngen and dyngen.dSYM from svn property svn:ignore
Add *-bsd-user and qemu-nbd.pod to the svn property svn:ignore and .gitignore

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

15 years agoRemove CRs
blueswir1 [Sun, 14 Dec 2008 08:53:17 +0000 (08:53 +0000)]
Remove CRs

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

15 years agoAdd missing newline at the end of file
blueswir1 [Sun, 14 Dec 2008 08:50:18 +0000 (08:50 +0000)]
Add missing newline at the end of file

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

15 years agoFix PXA2xx framebuffer dirty checking.
balrog [Sat, 13 Dec 2008 23:57:01 +0000 (23:57 +0000)]
Fix PXA2xx framebuffer dirty checking.

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

15 years agoInitialize msr list size properly in KVM
aliguori [Sat, 13 Dec 2008 20:49:31 +0000 (20:49 +0000)]
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

15 years agoCorrectly initialize msr list in KVM
aliguori [Sat, 13 Dec 2008 20:41:58 +0000 (20:41 +0000)]
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

15 years agotarget-sh4: make the initial value of SR easier to read
aurel32 [Sat, 13 Dec 2008 19:27:22 +0000 (19:27 +0000)]
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

15 years agotarget-sh4: don't disable FPU instructions in user mode
aurel32 [Sat, 13 Dec 2008 19:27:14 +0000 (19:27 +0000)]
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

15 years agotarget-sh4: disable debug code
aurel32 [Sat, 13 Dec 2008 18:57:46 +0000 (18:57 +0000)]
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

15 years agotarget-sh4: add prefi, icbi, synco
aurel32 [Sat, 13 Dec 2008 18:57:37 +0000 (18:57 +0000)]
target-sh4: add prefi, icbi, synco

(Vladimir Prus)

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

15 years agotarget-sh4: add SH7785 as CPU option
aurel32 [Sat, 13 Dec 2008 18:57:28 +0000 (18:57 +0000)]
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

15 years agoTCG x86/x86-64: use move with zero-extend for loads/stores
aurel32 [Sat, 13 Dec 2008 18:57:21 +0000 (18:57 +0000)]
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

15 years agovnc: Fix crash on 'info vnc' after 'change vnc none'
aurel32 [Sat, 13 Dec 2008 18:57:12 +0000 (18:57 +0000)]
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

15 years agoFix smsw for x86_64 guest and bigendian host case
malc [Sat, 13 Dec 2008 15:51:14 +0000 (15:51 +0000)]
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

15 years agotarget-i386: SVM: acknowledge interrupt only after it is taken
aurel32 [Sat, 13 Dec 2008 12:33:02 +0000 (12:33 +0000)]
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

15 years agotarget-ppc: keep only the table version for mfrom
aurel32 [Sat, 13 Dec 2008 12:30:21 +0000 (12:30 +0000)]
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

15 years agotarget-ppc: use accessors to access fp_status exception_flags
aurel32 [Sat, 13 Dec 2008 12:13:33 +0000 (12:13 +0000)]
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

15 years agox86 cleanup
blueswir1 [Sat, 13 Dec 2008 11:49:17 +0000 (11:49 +0000)]
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

15 years agotarget-ppc: fix compilation with PRECISE_EMULATION
aurel32 [Sat, 13 Dec 2008 11:46:36 +0000 (11:46 +0000)]
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

15 years agotarget-ppc: fix compilation with CONFIG_SOFTFLOAT
aurel32 [Sat, 13 Dec 2008 11:46:27 +0000 (11:46 +0000)]
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

15 years agosoftfloat-native: add float32_is_nan()
aurel32 [Sat, 13 Dec 2008 11:46:15 +0000 (11:46 +0000)]
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

15 years agoFix warning about unused shm_regions
blueswir1 [Sat, 13 Dec 2008 11:37:02 +0000 (11:37 +0000)]
Fix warning about unused shm_regions

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

15 years agoRemove unnecessary trailing newlines
blueswir1 [Sat, 13 Dec 2008 09:32:43 +0000 (09:32 +0000)]
Remove unnecessary trailing newlines

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

15 years agoRemove useless check_ops.sh
aurel32 [Sat, 13 Dec 2008 09:03:28 +0000 (09:03 +0000)]
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

15 years agoFix TARGET_LONG_BITS warning in TCG
blueswir1 [Sat, 13 Dec 2008 08:16:43 +0000 (08:16 +0000)]
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

15 years agoMake sure to link librt if we need to.
aliguori [Fri, 12 Dec 2008 20:02:52 +0000 (20:02 +0000)]
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

15 years agoReplace posix-aio with custom thread pool
aliguori [Fri, 12 Dec 2008 16:41:40 +0000 (16:41 +0000)]
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

15 years agoPPC405EP: fix fpga write function
aurel32 [Thu, 11 Dec 2008 22:43:07 +0000 (22:43 +0000)]
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

15 years agobaum: remove 2 warnings
aurel32 [Thu, 11 Dec 2008 22:42:58 +0000 (22:42 +0000)]
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

15 years agotarget-sh4: remove 2 warnings
aurel32 [Thu, 11 Dec 2008 22:42:50 +0000 (22:42 +0000)]
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

15 years agotarget-alpha: fix 2 warnings
aurel32 [Thu, 11 Dec 2008 22:42:42 +0000 (22:42 +0000)]
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

15 years agotarget-ppc: remove remaining warnings
aurel32 [Thu, 11 Dec 2008 22:42:33 +0000 (22:42 +0000)]
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

15 years agotarget-ppc: remove unneeded include
aurel32 [Thu, 11 Dec 2008 22:42:25 +0000 (22:42 +0000)]
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

15 years agotarget-ppc: rework exception code
aurel32 [Thu, 11 Dec 2008 22:42:14 +0000 (22:42 +0000)]
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

15 years agotarget-ppc: remove dead code
aurel32 [Thu, 11 Dec 2008 22:42:04 +0000 (22:42 +0000)]
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

15 years agopci: virtio: use pci id defines (Gerd Hoffman)
aliguori [Thu, 11 Dec 2008 21:20:03 +0000 (21:20 +0000)]
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

15 years agopci: add default pci subsystem id for all devices (Gerd Hoffman)
aliguori [Thu, 11 Dec 2008 21:15:42 +0000 (21:15 +0000)]
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

15 years agoFix handling of disk-only snapshots (Kevin Wolf)
aliguori [Thu, 11 Dec 2008 21:06:49 +0000 (21:06 +0000)]
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

15 years agoFix crash in kvm.c (Stefan Weil)
aliguori [Thu, 11 Dec 2008 21:03:10 +0000 (21:03 +0000)]
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

15 years agoRemove redundant #ifdef _BSD
blueswir1 [Thu, 11 Dec 2008 19:39:56 +0000 (19:39 +0000)]
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

15 years agoRename fls to qemu_fls
blueswir1 [Thu, 11 Dec 2008 19:37:54 +0000 (19:37 +0000)]
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

15 years agoAdd lost semicolons
malc [Thu, 11 Dec 2008 19:20:41 +0000 (19:20 +0000)]
Add lost semicolons

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

15 years agoDon't require linux/auxvec.h, which isn't always installed with libc.
malc [Thu, 11 Dec 2008 19:12:59 +0000 (19:12 +0000)]
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

15 years agoFix compiling without MREMAP_FIXED
blueswir1 [Thu, 11 Dec 2008 19:12:25 +0000 (19:12 +0000)]
Fix compiling without MREMAP_FIXED

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

15 years agoAllow to register a callback with fw_cfg_add_callback()
blueswir1 [Thu, 11 Dec 2008 17:30:50 +0000 (17:30 +0000)]
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

15 years agoAdd missing "static"
blueswir1 [Thu, 11 Dec 2008 17:29:00 +0000 (17:29 +0000)]
Add missing "static"

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

15 years agoFix warnings introduced in r5948
malc [Thu, 11 Dec 2008 00:14:30 +0000 (00:14 +0000)]
Fix warnings introduced in r5948

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