ths [Tue, 2 Sep 2008 23:55:28 +0000 (23:55 +0000)]
Delete unused variable.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5144
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 23:26:40 +0000 (23:26 +0000)]
[ppc] Convert op_moven_T2_T0 to TCG
Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5143
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 23:26:32 +0000 (23:26 +0000)]
[ppc] Convert op_reset_T0, op_set_{T0, T1} to TCG
Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5142
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 23:26:23 +0000 (23:26 +0000)]
SH4: R2D-PLUS FPGA: simply unassigned memory triggering
Use NULL to trigger unassigned memory error on 32-bit accesses instead
of assert(0) as suggested by Blue Swirl.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5141
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 23:26:13 +0000 (23:26 +0000)]
hw/pcnet.c: windows compile fix
(Eduardo Felipe)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5140
c046a42c-6fe2-441c-8c8c-
71466251a162
ths [Tue, 2 Sep 2008 17:39:45 +0000 (17:39 +0000)]
Build fix for gcc-3.3.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5139
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Tue, 2 Sep 2008 16:33:23 +0000 (16:33 +0000)]
Fix sign extension problems with smul and umul (Vince Weaver)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5138
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 16:19:05 +0000 (16:19 +0000)]
[ppc] Convert op_move_{T1,T2}_T0 to TCG
Attached patch replaces op_move_T1_T0 and op_move_T2_T0 with
tcg_gen_mov_tl.
Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5137
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 16:18:55 +0000 (16:18 +0000)]
[ppc] Convert gen_set_{T0,T1} to TCG
The attached patch replaces gen_set_T0 and gen_set_T1 with
tcg_gen_movi_tl.
Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5136
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 16:18:46 +0000 (16:18 +0000)]
pcnet: add loopback mode emulation
This patch enhances the pcnet NIC emulation with better loopback mode
support, including CRC generation for looped-back packets in "raw" mode.
The patch has practically no impact on the normal RX and TX path.
Successfully tested against an ancient proprietary pcnet driver that
does a lot of hardware checks on boot-up and now works fine over qemu as
well.
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@5135
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 16:18:38 +0000 (16:18 +0000)]
sh4: Add R2D-PLUS FPGA support.
This adds trivial support for the R2D-PLUS FPGA, mostly just for the
versioning information that the kernel uses for IRL mappings, in addition
to handling the heartbeat and poweroff writes.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5134
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 16:18:28 +0000 (16:18 +0000)]
sh4: CPU versioning.
Trivial patch adding CPU listing and the ability to do per-subtype
CVR/PVR/PRR values. Presently SH7750R and SH7751R definitions are
provided, as these are the ones in present use in-tree.
The CVR value for SH7751R is intentionally restricted so the kernel
boots, though this will want to be switched to the proper CVR value
once system emulation has sufficiently stabilized.
This also makes it trivial to abstract subtype specific registers like
MMU_PTEA and to set up feature bits in line with the kernel probing for
things like conditionalizing FPU/DSP context.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5133
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 08:42:16 +0000 (08:42 +0000)]
SH4: fix a regression introduced in r5122
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5132
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 00:09:35 +0000 (00:09 +0000)]
Fix call_pal() prototype for alpha system emulation
(Hervé Poussineau)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5131
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 00:09:25 +0000 (00:09 +0000)]
x86: Fix powerdown for non-ACPI case
Trivial fix for a corner case: system_shutdown on isapc machines causes
qemu to segfaults due to accessing the uninitialized pm_state. Issue a
system shutdown instead.
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@5130
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 00:09:16 +0000 (00:09 +0000)]
Fix typo in console.c comment
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5129
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 00:09:08 +0000 (00:09 +0000)]
Reset I32_APIC_BASE on system RESET
Should be done according to spec.
Signed-off-by: Gleb Natapov <gleb@qumranet.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5128
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 2 Sep 2008 00:08:58 +0000 (00:08 +0000)]
suppress a couple of spurious warnings in scsi-generic.c
This patch fixes two spurious `may be used uninitialised' warnings
when compiling with some compilers.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5127
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 1 Sep 2008 22:12:14 +0000 (22:12 +0000)]
SH4: Remove dyngen leftovers
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5126
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 1 Sep 2008 22:12:06 +0000 (22:12 +0000)]
SH4: final conversion to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5125
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 1 Sep 2008 22:11:56 +0000 (22:11 +0000)]
SH4: convert floating-point ops to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5124
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Mon, 1 Sep 2008 19:35:29 +0000 (19:35 +0000)]
Fix y register loads and stores
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5123
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 1 Sep 2008 13:09:21 +0000 (13:09 +0000)]
SH4: Remove most uses of cpu_T[0] and cpu_T[1]
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5122
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 1 Sep 2008 13:09:14 +0000 (13:09 +0000)]
SH4: TCG optimisations
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5121
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 1 Sep 2008 13:09:06 +0000 (13:09 +0000)]
SH4: Convert remaining non-fp ops to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5120
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sat, 30 Aug 2008 22:37:17 +0000 (22:37 +0000)]
SH4: Convert shift functions to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5119
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sat, 30 Aug 2008 22:07:52 +0000 (22:07 +0000)]
SH4: convert control/status register load/store to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5118
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sat, 30 Aug 2008 22:07:44 +0000 (22:07 +0000)]
SH4: Convert memory loads/stores to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5117
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sat, 30 Aug 2008 13:55:14 +0000 (13:55 +0000)]
SH4: convert some more arithmetics ops to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5116
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sat, 30 Aug 2008 09:51:20 +0000 (09:51 +0000)]
Fix some warnings that would be generated by gcc -Wredundant-decls
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5115
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sat, 30 Aug 2008 09:22:10 +0000 (09:22 +0000)]
Remove memcpy32() prototype leftover from r5109
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5114
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sat, 30 Aug 2008 09:20:21 +0000 (09:20 +0000)]
Add correct stack bias if a 64 bit stack is used
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5113
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 29 Aug 2008 23:01:41 +0000 (23:01 +0000)]
SH4: convert a few helpers to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5112
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 29 Aug 2008 22:32:32 +0000 (22:32 +0000)]
SH4: convert branch/jump instructions to TCG
(Shin-ichiro KAWASAKI)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5111
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Fri, 29 Aug 2008 21:03:31 +0000 (21:03 +0000)]
Fix FCC handling for Sparc64 target, initial patch by Vince Weaver
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5110
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Fri, 29 Aug 2008 20:50:21 +0000 (20:50 +0000)]
Fix Sparc64 boot on i386 host:
- move do_interrupt() back to op_helper.c
- move non-helper prototypes from helper.h to exec.h
- move some prototypes from cpu.h to exec.h
- do not export either set_cwp() or cpu_set_cwp() from op_helper.c,
but instead provide inline functions
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5109
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 29 Aug 2008 20:12:18 +0000 (20:12 +0000)]
SH4: convert simple compare instructions to TCG
(Shin-ichiro KAWASAKI)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5108
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 29 Aug 2008 16:32:18 +0000 (16:32 +0000)]
SH4: convert a few control or system register functions to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5107
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 29 Aug 2008 16:08:38 +0000 (16:08 +0000)]
SH4: Fix bugs introduce in r5099
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5106
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 29 Aug 2008 13:27:29 +0000 (13:27 +0000)]
SH4: fix xtrct Rm,Rn (broken in r5103)
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5105
c046a42c-6fe2-441c-8c8c-
71466251a162
ths [Fri, 29 Aug 2008 13:10:00 +0000 (13:10 +0000)]
Fix a nit in exec.c, by Tristan Gingold.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5104
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 29 Aug 2008 10:05:12 +0000 (10:05 +0000)]
SH4: convert logic and arithmetic ops to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5103
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 29 Aug 2008 00:48:50 +0000 (00:48 +0000)]
SH4: use TCG variables for gregs
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5102
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 28 Aug 2008 21:37:53 +0000 (21:37 +0000)]
SH4: use uint32_t/i32 based types/ops
Use uint32_t/i32 based types/ops to stay consistent with previous dyngen
code. Thanks to Paul Brook for noticing that.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5101
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 28 Aug 2008 21:02:38 +0000 (21:02 +0000)]
SH4: Convert register moves to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5100
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 28 Aug 2008 21:02:30 +0000 (21:02 +0000)]
SH4: Convert dyngen registers moves to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5099
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 28 Aug 2008 21:02:19 +0000 (21:02 +0000)]
SH4: Convert immediate loads to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5098
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 28 Aug 2008 21:02:08 +0000 (21:02 +0000)]
SH4: remove unused ops
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5097
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 28 Aug 2008 21:02:00 +0000 (21:02 +0000)]
SH4: add support for TCG helpers
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5096
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 28 Aug 2008 21:01:53 +0000 (21:01 +0000)]
SH4: Init TCG variables
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5095
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 28 Aug 2008 21:01:45 +0000 (21:01 +0000)]
PPC: add support for TCG helpers
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5094
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 28 Aug 2008 21:01:36 +0000 (21:01 +0000)]
PPC: Init TCG variables
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5093
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 28 Aug 2008 20:05:14 +0000 (20:05 +0000)]
Do not try to use -net user as a default when slirp disabled (Jeremy Fitzhardinge)
When CONFIG_SLIRP is not defined, we should not try to use
-net user as a default.
Patch from Jeremy Fitzhardinge <jeremy@goop.org> (who is a Citrix
staff member).
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5092
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Wed, 27 Aug 2008 19:19:44 +0000 (19:19 +0000)]
Fix Sparc64 window handling problems detected by Vince Weaver
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5091
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Wed, 27 Aug 2008 18:43:53 +0000 (18:43 +0000)]
Revert a part of r5087 that didn't need fixing (thanks to malc for spotting)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5090
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Tue, 26 Aug 2008 17:07:04 +0000 (17:07 +0000)]
Revert broken part of r5044 (thanks to Igor Kovalenko for spotting)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5089
c046a42c-6fe2-441c-8c8c-
71466251a162
j_mayer [Mon, 25 Aug 2008 22:26:03 +0000 (22:26 +0000)]
Update maintainers list.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5088
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Mon, 25 Aug 2008 20:43:37 +0000 (20:43 +0000)]
Fix more bugs in r5044
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5087
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Mon, 25 Aug 2008 20:03:28 +0000 (20:03 +0000)]
Fix error introduced by r5044
qemu_strdup() doesn't copy a last character because of off by one error.
Signed-off-by: Gleb Natapov <gleb@qumranet.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5086
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Mon, 25 Aug 2008 19:43:53 +0000 (19:43 +0000)]
Fix udiv and sdiv on Sparc64 (Vince Weaver)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5085
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sun, 24 Aug 2008 23:16:35 +0000 (23:16 +0000)]
Revert commits 5082 and 5083
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5084
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sun, 24 Aug 2008 19:05:35 +0000 (19:05 +0000)]
PPC: Switch a few instructions to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5083
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sun, 24 Aug 2008 19:05:26 +0000 (19:05 +0000)]
PPC: Init TCG variables
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5082
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 24 Aug 2008 10:43:12 +0000 (10:43 +0000)]
Add missing FreeBSD #include (Juergen Lock)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5081
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 24 Aug 2008 10:35:55 +0000 (10:35 +0000)]
To make syscall.c for 64 bit truly warning-free, we need some more #ifs.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5080
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 24 Aug 2008 10:34:20 +0000 (10:34 +0000)]
Enable pty/tty functions for BSDs too (initial patch from Xen)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5079
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 24 Aug 2008 10:30:33 +0000 (10:30 +0000)]
Fix OpenBSD linker warnings in qemu-img
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5078
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 24 Aug 2008 10:29:29 +0000 (10:29 +0000)]
Fix math warnings on OpenBSD -current
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5077
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Sat, 23 Aug 2008 23:27:37 +0000 (23:27 +0000)]
VNC: Support for ExtendedKeyEvent client message
This patch adds support for the ExtendedKeyEvent client message. This message
allows a client to send raw scan codes directly to the server. If the client
and server are using the same keymap, then it's unnecessary to use the '-k'
option with QEMU when this extension is supported.
This is extension is currently only implemented by gtk-vnc based clients
(gvncviewer, virt-manager, vinagre, etc.).
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5076
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Sat, 23 Aug 2008 17:22:19 +0000 (17:22 +0000)]
MIPS: don't free TCG temporary variable twice
In gen_dmtc0 function, TCG temporary variable t0 is freed at the end of
the function. Variable is freed again in the gen_dmtc0 caller.
I removed the free in gen_dmtc0, to do like in gen_dmfc0, gen_mfc0,
gen_mtc0.
(Hervé Poussineau)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5075
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 22 Aug 2008 21:30:28 +0000 (21:30 +0000)]
sh4: fix tas.b @Rn instruction
(Shin-ichiro KAWASAKI, based on a patch from Andrzej Zaborowski)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5074
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 22 Aug 2008 21:25:00 +0000 (21:25 +0000)]
qemu-char.h: Fix IOCTL values
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5073
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 22 Aug 2008 09:23:06 +0000 (09:23 +0000)]
uhci: improved TD matching, working ISOC transfers
While trying to make VX-3000 camera work on XP under KVM I realized that
we do not necessarily have to find original TD address. All we care about
is the token which identifies the transfer rather well (direction, endpoint,
size, etc).
This is especially important for the isochronous transfers because otherwise
they are being canceled left and right and we do not make much progress.
With this patch all devices that used bulk transfers that I've tried so
far continue to work just as well. And now my USB web cammera (isoc transfers)
is working well tool. It's not as smooth as native Windows but it's pretty
darn smooth.
The cool thing is that new USB code (both usb-uhci and usb-linux) is totaly
generic and does not need any special logic for ISOC.
Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5072
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 22 Aug 2008 09:03:17 +0000 (09:03 +0000)]
add comment for DisplayState->idle
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5071
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 22 Aug 2008 08:58:08 +0000 (08:58 +0000)]
uhci: Fixed length handling for SETUP and OUT tokens
Fixes regression reported agains Linux 2.6.18.
Looks like XP and newer Linux kernels are less sensitive
to length returned for control transfers.
Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5070
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 22 Aug 2008 08:58:00 +0000 (08:58 +0000)]
[sh4] code translation bug fix
When a TLB miss occurs while pre-decrement store instruction such as
"mov.l Rm, @-Rn" is executed, re-execution of such instruction cause
status confusion. Because pre Rn decrement is executed before TLB miss,
re-execution decrements Rn again.
In other words, in a translated instruction array, register status
should not modified before memory access instruction.
(Shin-ichiro KAWASAKI)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5069
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 22 Aug 2008 08:57:52 +0000 (08:57 +0000)]
[sh4] MMU bug fix
Some bugs on SH4 MMU are fixed.
- When a TLB entry is overwritten or invalidated, tlb_flush_page() should be
invoked to invalidate old entry.
- When a ASID is changed, tlb_flush() should be invoke to invalidate entries
which have old ASID.
- The check for shared bit in TLB entry causes multiple TLB hit exception.
As SH3's MMU, shared bit is ignored.
- ASID is used when MMUCR's SV bit or SR's MD bit is zero.
No need to check both bits are zero.
(Shin-ichiro KAWASAKI)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5068
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 22 Aug 2008 08:57:43 +0000 (08:57 +0000)]
[sh4] memory mapped TLB entries
SH4 MMU's memory mapped TLB feature is implemented.
SH-Linux seems to write to memory mapped TLB to invalidate a TLB entry,
but does not to read it. So only memory write feature is implemented.
Work on memory read feature is left.
(Shin-ichiro KAWASAKI)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5067
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 22 Aug 2008 08:57:35 +0000 (08:57 +0000)]
[sh4] delay slot bug fix
Two bugs about delay slot handlings are fixed.
- After an exception occurred in delay slot, the branch instruction
before delay slot should be executed again. To judge such re-execution
is necessery or not, delay slot status is kept in SH4 CPU data structure.
- When a branch instruction is placed at the end of memory segment,
the delay slot is placed at the start of next memory segment.
It means delay slot comes to the start of a translation block.
In such occasion, DELAY_SLOT_CLAREME flag is used to transmit status
between translation blocks. When an exception occurs on this kind of
delay slot, DELAY_SLOT_CLEARME flag cause a status confusion in exception
handling. DELAY_SLOT_CLEARME flag should be cleared on exceptions.
And some items are added to CPU status dump.
(Shin-ichiro KAWASAKI)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5066
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 22 Aug 2008 08:57:27 +0000 (08:57 +0000)]
[sh4] sleep instruction
This patch adds sleep instruction.
(Shin-ichiro KAWASAKI)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5065
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 22 Aug 2008 08:57:19 +0000 (08:57 +0000)]
array overflow in hw/stellaris.c and hw/omap_dss.c
(Jindrich Makovicka)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5064
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 22 Aug 2008 08:57:09 +0000 (08:57 +0000)]
Parallel Port Direction Fix
The direction bit in the control register should not be directly
set using PPWCONTROL. The kernel gives the following debug message.
parport0 (ppdev0): use data_reverse for this!
More over setting the data pins to forward mode does not work,
perhaps a bug in the Linux PP driver. The right way to do this is
to use PPDATADIR to set the direction. The patch checks if the
user is toggling the direction bit, and invokes PPDATADIR to
do the job.
Signed-off-by: Vijay Kumar B <vijaykumar@bravegnu.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5063
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 21 Aug 2008 23:03:15 +0000 (23:03 +0000)]
*FreeBSD: pulseaudio is a possible audio driver
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5062
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 21 Aug 2008 22:52:22 +0000 (22:52 +0000)]
PC: suggest a workaround to boot a kernel without hard-disk
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5061
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 21 Aug 2008 22:40:00 +0000 (22:40 +0000)]
Ignore IDE command if issued while IDE is busy (Gleb Natapov)
Feature, Sector Count, LBA Low/Mid/High and Device registers should be
written only when both BSY and DRQ are cleared to zero.
Command register shall only be written when BSY and DRQ are set to zero
for all commands except DEVICE RESET.
Data Port register shall be accessed for host PIO data transfer only when
DRQ is set to one.
Signed-off-by: Gleb Natapov <gleb@qumranet.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5060
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Thu, 21 Aug 2008 22:24:32 +0000 (22:24 +0000)]
Add image format option for USB mass-storage devices
(fix CVE-2008-1945)
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5059
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 21 Aug 2008 20:12:05 +0000 (20:12 +0000)]
move GUI_REFRESH_INTERVAL define from vl.c to console.h (Gerd Hoffmann)
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@5058
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 21 Aug 2008 20:11:11 +0000 (20:11 +0000)]
add container_of() macro to osdep.h (Gerd Hoffmann)
From linux kernel sources, xen bits will use it, put it
into a place where others can see and use it too ;)
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@5057
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 21 Aug 2008 20:08:55 +0000 (20:08 +0000)]
add DisplayState->idle (Samuel Thibault)
Add idle field to DisplayState struct, so drivers can figure
the display is idle and take advantage of that.
The xen framebuffer driver will use this to communicate the
idle state to the guest, so it knows it can stop doing updates
to a virtual display which is invisible anyway.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5056
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 21 Aug 2008 20:08:03 +0000 (20:08 +0000)]
Handle terminating signals (Gerd Hoffmann)
This patch makes qemu handle signals better. It sets the request_shutdown
flag, making the main_loop exit and qemu taking the usual exit route, with
atexit handlers being called and so on, instead of qemu just being killed
by the signal.
To avoid calling vm_start() from the signal handler main_loop() got an
additional check so qemu_system_shutdown_request() works even when the
vm is in stopped state.
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@5055
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 21 Aug 2008 19:33:09 +0000 (19:33 +0000)]
uhci: fixes for save/load-vm (Max Krasnyansky)
For some reason we were not registering save/load-vm handler for piix3
flavor of UHCI and hence save/load was broken.
Async transactions need to be canceled when we save the VM because there
is no way we can save/restore all that state. Since we do not mess the
original TD/QH the driver will simply resubmit the transfers.
Tested with Windows XP-SP2 running under QEMU/KQEMU.
Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5054
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 21 Aug 2008 19:32:29 +0000 (19:32 +0000)]
husb: Fixup printfs and stuff based on the review comments (Max Krasnyansky)
Addressing Anthony's comments regarding printf and stuff.
Anthony, if you you want I can fold this commit and resend
the original patch.
Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: AnthonY Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5053
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 21 Aug 2008 19:31:52 +0000 (19:31 +0000)]
husb: remove disconnect detection timer (Max Krasnyansky)
On top of my previous USB patchset.
Async completion handler can detect device disconnects without polling.
We do not need the timer anymore.
Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5052
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 21 Aug 2008 19:31:10 +0000 (19:31 +0000)]
husb: rewrite Linux host USB layer, fully async operation (Max Krasnyansky)
This is a follow up to the async UHCI patch. Both BULK and ISOC transactions
are now fully asynchrounous. I left CONTROL synchronous for now, ideally
we want it to be async too and it should not be that hard to do now.
This patch obviously requires UHCI patch. The combo has been tested with
various devices. See the UHCI patch description for list of the devices.
Most of the testing was done with the KVM flavor of QEMU.
Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5051
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 21 Aug 2008 19:30:31 +0000 (19:30 +0000)]
uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions (Max Krasnyansky)
This is esentially a re-write of the QEMU UHCI layer. My initial goal
was to support fully async operation with multiple outstanding async
transactions. Along the way I realized that I can greatly simplify
and cleanup the overall logic. There was a lot of duplicate and confusing
code in the UHCI data structure parsing and other places.
We were actually violating UHCI spec in handling async ISOC transaction
(host controller is not supposed to write into the frame pointer).
The reason I wanted to support fully async operation is because current
synchronous version is unusable with most devices exported from host
(via usb-linux.c). Transactions take a long time and the whole VM becomes
slow as hell.
Current async support is very rudimentory and for the most part
non-functional. Single transaction at a time is simply not enough. I have
a device for which XP driver submits both IN and OUT packets at the same
time. IN packet always times out unless OUT packet makes it to the device.
Hence we must be able to process both in order for that device to work.
The new code is backwards compatible and was first tested agains original
synchronous usb-linux.c and builtin usb devices like tablet which is also
synchronous. Rewrite of the usb-linux.c is coming up next.
Async support was tested against various XP versions (ie XP, SP2, SP3) and
a bunch of different USB devices: serial port controllers, mice, keyboard,
JTAG dongles (from Xilinx and Altera).
ISOC support was only lighly tested and needs more work. It's not any worse
than current code though.
UHCI parser changes are probably somewhat hard to review without the
understanding of the UHCI spec.
The async design should be fairly easy to follow. Basically we have a list
of async objects for each pending transfer. Async objects are tagged with
the original TD (transfer descriptor) address and token. We now support
unlimited number of outstanding isoc and one outstanding bulk/intr/ctrl
transfer per QH (queue head). UHCI spec does not have a clear protocol for
the cancelation of the trasfer requests. Driver can yank out TDs on any
frame boundary. In oder to handle that I added somewhat fancy TD validation
logic logic to avoid unnecessary cancelations.
Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5050
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 21 Aug 2008 19:29:38 +0000 (19:29 +0000)]
usb: generic packet handler cleanup and documentation (Max Krasnyansky)
A bit better documentation of the USB device API, namely
return codes.
Rewrite of usb_generic_handle_packet() to make it more
reable and easier to follow.
Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5049
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 21 Aug 2008 19:28:55 +0000 (19:28 +0000)]
husb: support for USB host device auto connect (Max Krasnyansky)
QEMU can now automatically grab host USB devices that match the filter.
For now I just extended 'host:X.Y' and 'host:VID:PID' syntax to handle
wildcards. So for example if you do something like
usb_add host:5.*
QEMU will automatically grab any non-hub device with host address 5.*.
Same with the 'host:PID:*', we grab any device that matches PID.
Filtering itself is very generic so we can probably add more elaborate
syntax like 'host:BUS.ADDR:VID:PID'. So that we can do 'host:5.*:6000:*'.
Anyway, it's implemented using a periodic timer that scans host devices
and grabs those that match the filter. Timer is started when the first
filter is added.
We now keep the list of all host devices that we grabbed to make sure that
we do not grab the same device twice.
btw It's currently possible to grab the same host device more than once.
ie You can just do "usb_add host:1.1" more than once, which of course does
not work. So this patch fixes that issue too.
Along with auto disconnect patch that I send a minute ago the setup is very
seamless now. You can just allocate some usb ports to the VMs and plug/unplug
devices at any time.
Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5048
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 21 Aug 2008 19:27:48 +0000 (19:27 +0000)]
husb: support for USB host device auto disconnect (Max Krasnyansky)
I got really annoyed by the fact that you have to manually do
usb_del in the monitor when host device is unplugged and decided
to fix it :)
Basically we now automatically remove guest USB device
when the actual host device is disconnected.
At first I've extended set_fd_handlerX() stuff to support checking
for exceptions on fds. But unfortunately usbfs code does not wake up
user-space process when device is removed, which means we need a
timer to periodically check if device is still there. So I removed
fd exception stuff and implemented it with the timer.
Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5047
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 21 Aug 2008 19:25:45 +0000 (19:25 +0000)]
Fix windows build
Right now, the Windows build is broken because of NBD. Using a mingw32 cross
compiler is also badly broken.
This patch fixes the Windows build by stubbing out NBD support until someone
fixes it for Windows. It also santizing the mingw32 cross compiler support
by replacing the --enable-mingw32 option with a compiler check to determine
if we're on windows or not.
Also remove the weird SDL pseudo-detection for mingw32 using a cross compiler.
The hardcoded sdl-config name is seemly arbitrary. If you cross compiler SDL
correctly and modify your PATH variable appropriately, it will Just Work when
cross compiling.
The audio driver detection is also broken for cross compiling so you have to
specify the audio drivers explicitly for now.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5046
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Thu, 21 Aug 2008 18:00:53 +0000 (18:00 +0000)]
Fix OSS on OpenBSD
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5045
c046a42c-6fe2-441c-8c8c-
71466251a162