Commit Graph

60521 Commits

Author SHA1 Message Date
Matt Borgerson 2497e2d7c4 nv2a: Add support for window clipping
Fixes several games which utilize clipping, such as Halo:CE which
uses clipping in multiplayer to render multiple player screens.

Research and original PoC work done by Jannik Vogel:
- JayFoxRox/xqemu-espes@c05d91b
- JayFoxRox/xqemu-espes@a254830
2018-07-10 01:11:05 +02:00
Jannik Vogel 67500be6e6 Add SDL flags and libs to objects which use it 2018-07-08 12:58:21 -07:00
Lucas Eriksson 50c0e6a45d ui: Set window title to 'XQEMU (Revision: <id>)' 2018-07-01 22:29:01 -07:00
Mayeul Cantan dd3fa1004e Adjust CI configuration to call the unified build script 2018-07-01 14:50:50 -07:00
Mayeul Cantan d9d11bcdc4 Merge build scripts together
The platform is detected at runtime, and the next steps are adjusted
accordingly.
2018-07-01 14:50:50 -07:00
Jannik Vogel a9db473231 Check for GL debug extensions before use 2018-07-01 14:50:50 -07:00
Jannik Vogel 0f190369d3 Switch from GLEW to epoxy 2018-07-01 14:21:53 -07:00
Matt Borgerson 0523deaa93 nv2a: Recycle FIFO command queue memory
This patch adds an additional "retired" queue in which FIFO command
entry objects are placed after execution. This queue of objects is then
returned to the pusher's new "available" queue for re-use.

This improves the performance of the system by avoiding the costly
overhead associated with the general-purpose use of `malloc` and `free`
for previous allocation of FIFO command queue objects.
2018-06-28 10:17:57 -07:00
Matt Borgerson 7f7dc95761 Add XQEMU README.md 2018-06-26 17:07:42 -07:00
Matt Borgerson 27f0b8e54e Set GUI refresh interval to 16ms (~60Hz)--need to confirm on real hw 2018-06-26 17:07:42 -07:00
Matt Borgerson 791418dec4 CI: Add Travis CI support for Linux & macOS builds 2018-06-26 17:07:42 -07:00
Matt Borgerson e675fc038c CI: Add Appveyor support for Windows builds 2018-06-26 17:07:42 -07:00
Matt Borgerson c0a6d0b285 Add XQEMU build scripts for Windows, Linux, and macOS 2018-06-26 17:07:42 -07:00
Matt Borgerson 3a7b349756 Update configure script to force OpenGL support for now 2018-06-26 17:07:42 -07:00
Matt Borgerson ae19795682 Add xbox hardware directory to hw/Makefile.objs 2018-06-26 17:07:42 -07:00
Matt Borgerson 6eb2e9ac93 Update Xbox Makefile.objs 2018-06-26 17:07:42 -07:00
Matt Borgerson dc57d0e3c0 Add offscreen GL code 2018-06-26 17:07:41 -07:00
Matt Borgerson 584dbda1d6 Fix and refactor NV2A code
This patch does the following:
- Fixes up things for Qemu 2.x compat
- Factors out the high-level NV2A blocks into separate files
- Updates g-lru-cache for latest glib compat (github.com/chergert/glrucache@c10af24)
- Changes texture hashing algorithm from FNV to xxH v0.6.5
2018-06-26 17:07:41 -07:00
Matt Borgerson cff0d97e35 Add SDL2 gamepad based XID emulation 2018-06-26 17:07:41 -07:00
Matt Borgerson 6629cc354a Fix keyboard based XID emulation 2018-06-26 17:07:41 -07:00
Matt Borgerson 20414991be Fix Xbox ACI/APU code 2018-06-26 17:07:41 -07:00
Matt Borgerson a87f67f143 Fix Xbox SuperIO code 2018-06-26 17:07:41 -07:00
Matt Borgerson 5e1deea596 Fix Xbox ACPI code 2018-06-26 17:07:41 -07:00
Matt Borgerson fcc596cb7f Fix Xbox DSP code 2018-06-26 17:07:41 -07:00
Matt Borgerson 6f2eafa9bb Fix NVNet code 2018-06-26 17:07:41 -07:00
Matt Borgerson 65c5afbeac Fix Xbox SMBus devices 2018-06-26 17:07:41 -07:00
Matt Borgerson 3486a4f1f4 Fix basic Chihiro machine init (IDE still needs fixing) 2018-06-26 17:07:41 -07:00
Matt Borgerson 8e24af7bda Fix basic Xbox machine init 2018-06-26 17:07:41 -07:00
Matt Borgerson 68ff73b5b5 [Core Change] Add nVidia PCI VID/DIDs 2018-06-26 17:07:40 -07:00
Matt Borgerson 7aa5985eba [Core Change] Port AC97 factorization from XQEMU 1.x 2018-06-26 17:07:40 -07:00
Matt Borgerson cbadd93124 [Core Change] Disable support for some HW to reduce build time and size 2018-06-26 17:07:40 -07:00
Matt Borgerson 9ced180a0c [Core Change] Port smbus_eeprom_init_single from XQEMU 1.x
This patch is necessary to initialize a single EEPROM at a specific I2C
address.
2018-06-26 17:07:40 -07:00
Matt Borgerson 7ea10931d1 [Core Change] Port HDD locking from XQEMU 1.x 2018-06-26 17:07:40 -07:00
Matt Borgerson 68b54a7cc9 [Core Change] Fix PM timer at 3.375 MHz for Xbox compat 2018-06-26 17:07:40 -07:00
Matt Borgerson 70de2f76b0 [Core Change] Fix TSC timer at 733 MHz for Xbox compat 2018-06-26 17:07:33 -07:00
Matt Borgerson 410702189f [Core Change] Fix PIC interrupt delivery by unmasking LINT0 in APIC for BSP 2018-06-26 15:09:46 -07:00
Matt Borgerson 6338bfae98 [Core Change] Port i8259 fixes from XQEMU 1.x
32cba22 i8259: in edge triggered mode apparently a training edge should cancel the interrupt
ad6aef5 nforce chipset seems to allow setting irq0-3 to level triggered
2018-06-26 15:09:42 -07:00
Matt Borgerson 0ed317ff4b [Core Change] Port USB fixes from XQEMU 1.x
commit 761d06bab6
Author: espes <espes@pequalsnp.com>
Date:   Thu Sep 5 01:45:37 2013 +1000

ohci: fix handling of transfer underruns

See:
https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Devices/USB/DevOHCI.cpp#L2343
https://www.virtualbox.org/browser/vbox/trunk/src/VBox/Devices/USB/DevOHCI.cpp#L2363

commit d532051a8e
Author: espes <espes@pequalsnp.com>
Date:   Mon Oct 19 17:38:38 2015 +1100

usb hub: don't return an overrun when there's no new status
2018-06-26 15:09:35 -07:00
Matt Borgerson eb4c0f18e9 [Core Change] Port memory region aliasing from XQEMU 1.x 2018-06-26 15:08:45 -07:00
Matt Borgerson 3f557e6d45 Add hw/xbox sources from XQEMU 1.x @ 4d9107e 2018-06-26 15:08:01 -07:00
Peter Maydell 4743c23509 Update version for v2.12.0 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-24 16:44:55 +01:00
Peter Maydell 27e757e29c Update version for v2.12.0-rc4 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-17 22:26:44 +01:00
Peter Maydell 6f660996f1 Revert "mux: fix ctrl-a b again"
This reverts commit 1b2503fcf7.

Unfortunately this fix regresses console handling on MIPS Malta;
since the mux ctrl-a b bug is not a regression since 2.11, we
take the conservative approach and just drop it from 2.12.

Reported-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-17 21:11:30 +01:00
Richard Henderson ce8d408205 fpu: Bound increment for scalbn
Without bounding the increment, we can overflow exp either here
in scalbn_decomposed or when adding the bias in round_canonical.
This can result in e.g. underflowing to 0 instead of overflowing
to infinity.

The old softfloat code did bound the increment.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-17 14:52:38 +01:00
Marc-André Lureau 1b2503fcf7 mux: fix ctrl-a b again
Commit fb5e19d2e1 originally fixed the
regression, but was inadvertently broken again in merge commit
2d6752d38d.

Fixes:
https://bugs.launchpad.net/qemu/+bug/1654137

Cc: qemu-stable@nongnu.org
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180416181844.7851-1-marcandre.lureau@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-17 12:52:48 +01:00
Peter Maydell bb3ba35f20 linux-user: check that all of AArch64 SVE extended sigframe is writable
In commit 8c5931de0a we added support for SVE extended
sigframe records.  These mean that the signal frame might now be
larger than the size of the target_rt_sigframe record, so make sure
we call lock_user on the entire frame size when we're creating it.
(The code for restoring the signal frame already correctly handles
the extended records by locking the 'extra' section separately to the
main section.)

In particular, this fixes a bug even for non-SVE signal frames,
because it extends the locked section to cover the
target_rt_frame_record. Previously this was part of 'struct
target_rt_sigframe', but in commit e1eecd1d9d we pulled
it out into its own struct, and so locking the target_rt_sigframe
alone doesn't cover it. This bug would mean that we would fail
to correctly handle the case where a signal was taken with
SP pointing 16 bytes into an unwritable page, with the page
immediately below it in memory being writable.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
2018-04-17 12:04:58 +01:00
Peter Maydell 0df2121693 i386: Don't automatically enable FEAT_KVM_HINTS bits
Bug fix for "-cpu host" with newer kernels.
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJa1NFhAAoJECgHk2+YTcWm1qgP/AuDGp7c/z23xMtuwDB1YoDo
 Jzovze97rP9RRlKt2F1WXyNLezxO9bpomTPozFF9UIcG6cavakKByBFFJyW8gjya
 yWpsq/kkbR14amYKBbBJgi5uTLBPClFqSAHnJfzkozT5oWOhU5R0/n26gv3Lfgh2
 TTJg1+tMG0W3EIQ+MeJ2uXuop910134mtFge7//COIVVzPvC24+mNJqB5nlMUtQA
 3PSWrMBRRXDkI9iTYfn58+ZHojdAGdK+VECpEBNI8bmkJgw4wnBfGEFHZiSZBLD2
 EG4u924HxMhDtQ3Y3LcwgNcEPGBqNOseMQSYiN5sPHQtNCtFo9cZWq/5lKedKXDH
 sFSdaLFJwwCuvEDE/8U3MKtHxzxtP9yGXctu1KqEK+ZkC4nKLoZgbIQHtrCa7nzb
 9PsA08L1XnNSnodfPKwxl8ZfRFRrUeFLbhFML9588jhG2dktWeIMwTOrIvVHail2
 75hr65SPxAzERTX9stEv4tcGgN+z1yDdUrfONK4GSH9/CRbDt73yuH/Gc26t1x/8
 PbleeDltMLKZRoXhR8SzcwTDmq5J7PQAnPTGghPe2tCyjNz1ax+yYkPfIGtR4ovc
 6M+s9STs9Au+k2YSr4ISttps/ofY8D3vKCVYsUrRnle7qBDDoe07GGmI1f3sybVi
 tb9v82dy71QOGWgz7Ols
 =oq3l
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/ehabkost/tags/x86-next-pull-request' into staging

i386: Don't automatically enable FEAT_KVM_HINTS bits

Bug fix for "-cpu host" with newer kernels.

# gpg: Signature made Mon 16 Apr 2018 17:37:53 BST
# gpg:                using RSA key 2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/x86-next-pull-request:
  i386: Don't automatically enable FEAT_KVM_HINTS bits

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-17 11:13:47 +01:00
Peter Maydell 32f418c003 vhost: bugfix
This fixes a regression in vhost.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJa1MuLAAoJECgfDbjSjVRpYzoH/RqprLADb2Q8jofq46/jw9gn
 +N+mIBDlZL2clobEpTG9QaSzwZr/dnXPa2R9pPSNONaeK3Qvqq7l+KXO2TGS3g6+
 XUckTurNBsjoFZ4Lfgrn9jHm1ZH6YO/vsUuwW4nsx+yQZsm2EryiWK8QiAuXKkDT
 L1wJmkUbZFJ/u7GJorSHA3C9AirvvrTYUXGCw/J8nXZBqblKRB7lELmkk3hT0jjk
 lebzr6v2eORjz+2D6s6SqTFCVNA1nUZourbkiy64GlAj3sctSWfBLO/2DoiZDdEv
 PQhiW1EaWeb2+vl6Eot7nRwYmPZztUbh1rqsk/I9fi8uBvyZaYLKAlIEoRNDf3Y=
 =xj3W
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

vhost: bugfix

This fixes a regression in vhost.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Mon 16 Apr 2018 17:12:59 BST
# gpg:                using RSA key 281F0DB8D28D5469
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>"
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>"
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream:
  vhost: do not verify ring mappings when IOMMU is enabled

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-17 09:57:52 +01:00
Alex Bennée 9cb4e398c2 fpu/softfloat: check for Inf / x or 0 / x before /0
The re-factoring of div_floats changed the order of checking meaning
an operation like -inf/0 erroneously raises the divbyzero flag.
IEEE-754 (2008) specifies this should only occur for operations on
finite operands.

We fix this by moving the check on the dividend being Inf/0 to before
the divisor is zero check.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 20180416135442.30606-1-alex.bennee@linaro.org
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Tested-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-04-16 18:40:48 +01:00
Eduardo Habkost 0d914f39a7 i386: Don't automatically enable FEAT_KVM_HINTS bits
The assumption in the cpu->max_features code is that anything
enabled on GET_SUPPORTED_CPUID should be enabled on "-cpu host".
This shouldn't be the case for FEAT_KVM_HINTS.

This adds a new FeatureWordInfo::no_autoenable_flags field, that
can be used to prevent FEAT_KVM_HINTS bits to be enabled
automatically.

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20180410211534.26079-1-ehabkost@redhat.com>
Tested-by: Wanpeng Li <wanpengli@tencent.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2018-04-16 13:36:52 -03:00