Commit Graph

63169 Commits

Author SHA1 Message Date
Thomas Debesse 9344483a0c build.sh: pass options, fix #114 2018-10-10 11:47:40 -07:00
Lucas Eriksson 6ecac32cff eeprom: Read EEPROM from file 2018-10-10 11:40:18 -07:00
espes e12aa122cf relicense xbox components as LGPL
(with permission)
2018-10-10 13:38:16 +10:00
Tillmann Karras df2dc0ce33 build.sh: allow out-of-tree builds 2018-10-08 22:30:58 +02:00
Stefan Schmidt 1c6bb37bec Replace ffs() calls with ctz32() 2018-10-08 11:34:23 -07:00
espes 7d500c46e6 hvf: support PAT msr 2018-10-06 17:52:32 +10:00
espes 99cfb38552 hvf: fix is_host_reg for i386 2018-10-06 17:38:19 +10:00
espes d07438fa8a hvf: refactor headers, fix gdbstub 2018-09-30 15:37:00 +10:00
espes 8bf48720fb hvf: fix 2bl due to broken dirty tracking 2018-09-30 15:10:19 +10:00
Matt Borgerson f48b6345f2 haxm: Skip unconditional marking of pages as dirty
Marking all pages as always dirty has some really bad consequences for
the current NV2A emulation. The lesser of two evils for now is to leave
the pages as-is. Eventually this will be replaced by proper dirty page
tracking once HAXM supports it.
2018-09-26 21:21:44 -07:00
Matt Borgerson 71a4c6ddd4 haxm: Add hax_ram_block_removed notify handler
QEMU core will call this handler when a RAM block is removed (no
surprises there), but it does _not_ check to see if this handler is
non-NULL. Add a dummy handler for now.
2018-09-26 21:21:44 -07:00
Tao Wu 5edc406e1b hvf: Fix bug that fails to find slot on border.
If gpa is exactly the start address of one slot, the
old code fails to find the slot. Change to use one byte
range to find slot.

Change-Id: I169ec8f759bb211a5ea7c693c5d99f27576c2e93
Signed-off-by: Tao Wu <lepton@google.com>
2018-09-27 10:48:30 +08:00
Haitao Shan e2fd7b21be Fix emulator hang during adb reboot. Bug 69798912
Change-Id: I26e116194e3fb2a5570bd2654e111307a14cc161
Signed-off-by: Haitao Shan <hshan@google.com>
2018-09-27 10:44:08 +08:00
Lingfeng Yang d0b4d2939a asan: hvf: fix overflow in decode struct
Change-Id: I9d8d08d922eb08748b1535c628b08f27db3d5619
Fixes: 111676629
2018-09-27 10:38:04 +08:00
espes 2911dda2dc initial i386 hvf 2018-09-27 10:37:48 +08:00
Haitao Shan 09d1d09697 Fix Mac Hypervisor Framework Crash Issue. The crash is caused by incorrect instruction emulation by QEMU hvf, which resulted in a ruined register that was not supposed to touch.
+ copy it over to target/i386 as well (for latest QEMU version)

Change-Id: Ibdada114db8736560d41402d6af4042fc6e6c25b
2018-09-27 09:57:12 +08:00
espes 022d50f600 the rebase forgot the rtc fixes 2018-09-26 18:31:16 +08:00
espes 3d33d8101b cleanup nv2a 2018-09-26 17:42:41 +08:00
espes 3ee213e59a cleanup xbox.c 2018-09-26 17:03:42 +08:00
Matt 316967c441 nv2a FIFO Refactoring (#76)
* Port espes's fifo work to the split up nv2a code

This patch ports over the following commits from the XQEMU 1.x tree
(available via tag archive-xqemu-1.x) to the refactored nv2a code:

- 4d9107e8 (HEAD -> xbox, upstream/xbox) Merge branch 'fix-fifo' into xbox
- c33f4ab2 cleanups
- d3f83d93 cleanups
- faca5dd0 fix
- 7c62d7c1 fixes
- 8ad239b0 wip
- 45ed3c31 wip
- c006d5e8 wip

However, in its current form, this patch causes some regressions and
needs further investigation.

* nv2a: basic pattern object
2018-09-26 16:10:07 +08:00
Lucas 7960ffe466 nv2a: Ptimer fixes (#113)
Set NV2A_CRYSTAL_FREQ to Retail speed
Fix ptimer_get_clock() behaviour
2018-09-26 16:01:28 +08:00
Matt 337e1fa114
Merge upstream QEMU v3.0.0
This updates XQEMU's QEMU code base from v2.12.0 to v3.0.0. A few minor fixups were necessary due to core changes. Basic testing done on Ubuntu 18.04, macOS, and Windows.
2018-09-05 22:47:03 -07:00
Matt Borgerson 6b21948bcc Merge branch 'master' into merge_3_0_0_sync 2018-09-05 20:07:50 -07:00
Lucas Eriksson faf09c632d ui: Fix AppVeyor build "-dirty"-bug 2018-09-05 14:14:03 -07:00
wutno 9b8904eda0 Update configure with --disable-stack-protector
As noted in #106 this will produce working builds with GCC versions over 7.3.0-2. Upstream has already done this work-a-round.
2018-09-05 11:45:01 -07:00
Matt Borgerson 5246cad0c1 nvnet: don't trigger interrupt if no packets are sent 2018-09-04 01:20:16 +02:00
Lucas Eriksson c01c27d968 nv2a: Fix EXP and LOG
According to the NV_vertex_program specification, our implementations of
these functions were wrong.
spec:
https://www.khronos.org/registry/OpenGL/extensions/NV/NV_vertex_program.txt
2018-09-04 01:14:55 +02:00
Matt Borgerson aa32236d5a smbus: Replace smbus_eeprom_init_single with new upstream equivalent 2018-09-02 14:14:34 -07:00
Matt Borgerson a0dad83029 nv2a: Replace QINC/DECREF macros with new inlines 2018-09-02 13:49:53 -07:00
Matt Borgerson 12401cd500 nv2a: remove global_vmstate arg in vga_common_init 2018-09-02 13:49:24 -07:00
Matt Borgerson 9c96d7bc08 sio: Use serial_hd(i) instead of serial_hds[i] 2018-09-02 13:48:02 -07:00
Matt Borgerson a0ed8d9c8b smbus: Use DeviceClass::realize instead of init
I2CSlaveClass::init removed in c8c9e10, use DeviceClass::realize
instead.
2018-09-02 13:44:07 -07:00
Matt Borgerson 95503c6608 v3.0.0 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJbcveDAAoJEDwlJe0UNgzen9QP/jEa9I1aN6ylYJHF7R9NI8Yh
 06k+dXCIK51ETRVXbWDnNa5KHxa1pYdBOVlBt/TtHq1sqJL0B3eAaNyeoRkuehvk
 LE+72CxEm4M+D+cw8Mnq3NEND1dCu3PVXykHUWaoLck3hLwS4gvD/J0veht72GId
 Ifv+wlAObtCijnJ9z5/K54bliPMt/c3HWXQegJ5Z6/aBiha+fYTairu9x3qBht56
 yHHc0cPnqMOR710vzB93u8HGP5jbtbqYmQZGyFXheUFLpEdQhzXfGlNeZsE3FRPb
 4CCRhSDp0a7sfhNQ29eYI4kTmpadnXLFtrDYeoKnzcrfe6VXwhAZotU1iAmAUCVA
 86Z3UI96PeGNwmyuFRAxomtKD5fdilG+IBSrv9WPFHbUzT4OsdldobjAaabGjtvk
 Lt+MG758/GWgRRldNjozi7YfGukctryMYoJcqv6v8o3sXlahId2CffDCGOxUQgWJ
 C4u4zgWDMrZVR7Iqcnn044Q4DCb7pSLnaGd7mpG1sW5MDCEhJKbDBBKzwjsuzGRZ
 YFjAzZ3pCaYrJ2foFteobc43Y0wdugR1AyDNoRY+aaK2qn0EG4gv+NCtlF9ZJlm3
 UCYdAFQuevXFJQ5ZO2nHYNkWUMw0xGUG7CXYMXAxRePk8urLY/tC3g0CySJYnBe1
 BBEbaX+pR3eT5xnEWPL0
 =rchV
 -----END PGP SIGNATURE-----

Merge tag 'v3.0.0' into merge_3_0_0

v3.0.0 release
2018-09-02 13:17:13 -07:00
Matt Borgerson 964883e192 Revert "[Core Change] Disable support for some HW to reduce build time and size"
This reverts commit cbadd93124.
2018-09-02 13:12:50 -07:00
Mayeul Cantan 667fe8536d build.sh: use as many threads as CPUs 2018-08-21 12:17:05 -07:00
Peter Maydell 38441756b7 Update version for v3.0.0 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-08-14 16:38:43 +01:00
Peter Maydell 6ad9080538 Update version for v3.0.0-rc4 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-08-07 17:26:17 +01:00
Marc-André Lureau 93f874fe9d virtio-gpu: fix crashes upon warm reboot with vga mode
With vga=775 on the Linux command line a first boot of the VM running
Linux works fine. After a warm reboot it crashes during Linux boot.

Before that, valgrind points out bad memory write to console
surface. The VGA code is not aware that virtio-gpu got a message
surface scanout when the display is disabled. Let's reset VGA graphic
mode when it is the case, so that a new display surface is created
when doing further VGA operations.

https://bugs.launchpad.net/qemu/+bug/1784900/

Reported-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Message-id: 20180803153235.4134-1-marcandre.lureau@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-08-07 15:03:58 +01:00
Peter Maydell 09b94ac0f2 slirp: Correct size check in m_inc()
The data in an mbuf buffer is not necessarily at the start of the
allocated buffer. (For instance m_adj() allows data to be trimmed
from the start by just advancing the pointer and reducing the length.)
This means that the allocated buffer size (m->m_size) and the
amount of space from the m_data pointer to the end of the
buffer (M_ROOM(m)) are not necessarily the same.

Commit 864036e251 tried to change the m_inc() function from
taking the new allocated-buffer-size to taking the new room-size,
but forgot to change the initial "do we already have enough space"
check. This meant that if we were trying to extend a buffer which
had a leading gap between the buffer start and the data, we might
incorrectly decide it didn't need to be extended, and then
overrun the end of the buffer, causing memory corruption and
an eventual crash.

Change the "already big enough?" condition from checking the
argument against m->m_size to checking against M_ROOM().
This only makes a difference for the callsite in m_cat();
the other three callsites all start with a freshly allocated
mbuf from m_get(), which will have m->m_size == M_ROOM(m).

Fixes: 864036e251
Fixes: https://bugs.launchpad.net/qemu/+bug/1785670
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Message-id: 20180807114501.12370-1-peter.maydell@linaro.org
Tested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2018-08-07 14:13:22 +01:00
Thomas Huth 09d98b6980 target/xtensa/cpu: Set owner of memory region in xtensa_cpu_initfn
The instance_init function of the xtensa CPUs creates a memory region,
but does not set an owner, so the memory region is not destroyed
correctly when the CPU object is removed. This can happen when
introspecting the CPU devices, so introspecting the CPU device will
leave a dangling memory region object in the QOM tree. Make sure to
set the right owner here to fix this issue.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Message-id: 1532005320-17794-1-git-send-email-thuth@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-08-06 19:07:21 +01:00
Peter Maydell 341823c172 hw/intc/arm_gicv3_common: Move gicd shift bug handling to gicv3_post_load
The code currently in gicv3_gicd_no_migration_shift_bug_post_load()
that handles migration from older QEMU versions with a particular
bug is misplaced. We need to run this after migration in all cases,
not just the cases where the "arm_gicv3/gicd_no_migration_shift_bug"
subsection is present, so it must go in a post_load hook for the
top level VMSD, not for the subsection. Move it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-id: 20180806123445.1459-6-peter.maydell@linaro.org
2018-08-06 16:19:33 +01:00
Peter Maydell 326049cc8e hw/intc/arm_gicv3_common: Move post_load hooks to top-level VMSD
Contrary to the the impression given in docs/devel/migration.rst,
the migration code does not run the pre_load hook for a
subsection unless the subsection appears on the wire, and so
this is not a place where you can set the default value for
state for the "subsection not present" case. Instead this needs
to be done in a pre_load hook for whatever is the parent VMSD
of the subsection.

We got this wrong in two of the subsection definitions in
the GICv3 migration structs; fix this.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-id: 20180806123445.1459-5-peter.maydell@linaro.org
2018-08-06 16:19:33 +01:00
Peter Maydell 7b69454a12 target/arm: Add dummy needed functions to M profile vmstate subsections
Currently the migration code incorrectly treats a subsection with
no .needed function pointer as if it was the subsection list
terminator -- it is ignored and so is everything after it.
Work around this by giving various M profile vmstate structs
a 'needed' function that always returns true.
We reuse m_needed() for this, since it's always true here.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180806123445.1459-4-peter.maydell@linaro.org
2018-08-06 16:19:33 +01:00
Peter Maydell adc4fda6d5 hw/intc/arm_gicv3_common: Combine duplicate .subsections in vmstate_gicv3_cpu
Commit 6692aac411 accidentally introduced a second initialization
of the .subsections field of vmstate_gicv3_cpu, instead of adding
the new subsection to the existing list. The effect of this was
probably that migration of GICv3 with virtualization enabled was
broken (or alternatively that migration of ICC_SRE_EL1 was broken,
depending on which of the two initializers the compiler used).
Combine the two into a single list.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180806123445.1459-3-peter.maydell@linaro.org
2018-08-06 16:19:33 +01:00
Peter Maydell 78e9ddd75e hw/intc/arm_gicv3_common: Give no-migration-shift-bug subsection a needed function
Currently the migration code incorrectly treats a subsection with
no .needed function pointer as if it was the subsection list
terminator -- it is ignored and so is everything after it.
Work around this by giving vmstate_gicv3_gicd_no_migration_shift_bug
a 'needed' function that always returns true.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180806123445.1459-2-peter.maydell@linaro.org
2018-08-06 16:19:33 +01:00
Richard Henderson 1fb57da72a tcg/optimize: Do not skip default processing of dup_vec
If we do not opimize away dup_vec, we must mark its output as changed.

Fixes: 170ba88f45
Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Message-id: 20180805233258.31892-1-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-08-06 14:57:48 +01:00
Peter Maydell 896b63dbff ppc patch queue for 2018-08-01
Here are a final couple of fixes for the 3.0 release.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlthLpkACgkQbDjKyiDZ
 s5K1/w/7BK0oMDqe3NsErXK9yAU0zm5mKYdB3swLmViwKSOUHNhHkFDEN1lyf5mk
 F8/hMeqaWDyBK2RhcHw8dSW0ER6Lg9N3yVDHTYU3BdhVM82cUR64MGTmrHJzEWcu
 F1zeOoYmkTsw+3nJHqlKskE5TTOJyDOGiRqTnNwAbevBscc6JxxehYICrhhXEtVv
 BBBXNSJ9jTr6woGpCXjeswwn3yrz106Ly3zuayx/k8JPeyXYnlJFuoZhvfIBJNBM
 oQMa4+XBDU427Q41h1m82wfx8HgMbdp8ajuQu397Ci4PL6O6WJ7H6h5+otvQi76D
 tgRnptS1OOERqkmKk7jk9QK8Oe7x4rQqBCGMY5TpohM3ahmS4Mvd38IVf06ffd/z
 tGdhrf2Xq46IiUcqhxrOIrq9hMi/wjg4kVjeYtiiM1qwT4q5sOQPNIPKSfPv69aK
 mXc238+VVwt35Om4ZkjLLZqE4cR6OMVacqTWlxNeTM19ICpiOGJGjM5dNWAvGyR5
 hBzs/G81XaC0WIOLqnwHHT2IwF49ny249NfXmkSATD/4hosp745IABv/f5pZIYSw
 e8SHHnzSRg3m6lbTwRBRBZ3FSbU5HDBWYG3tEJPockgpGxHwaAYMxhe4uI/YWmJU
 QDZeqAKYKtYs6AsNvKMXxGvyyWyHx0YObYOGDWeUKaNcdjz/5ts=
 =b2i8
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.0-20180801' into staging

ppc patch queue for 2018-08-01

Here are a final couple of fixes for the 3.0 release.

# gpg: Signature made Wed 01 Aug 2018 04:52:57 BST
# gpg:                using RSA key 6C38CACA20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
# gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
# gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
# gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>"
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-for-3.0-20180801:
  sam460ex: Fix PCI interrupts with multiple devices
  hw/misc/macio: Fix device introspection problems in macio devices

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-08-06 10:48:06 +01:00
Peter Maydell e3a4129abd pc, virtio: fixes
A couple of last minute fixes.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJbZBPqAAoJECgfDbjSjVRpI1MH/RXVFelJL8nd9tcFff64H863
 G7M/VxKI9yOqOWkeiAAjojXrgi7fesiDNzcKXVxlLuC5jTwpmyugKIIwI0CvHYaA
 jg2h5Ytv/jymd0BQPll+J8zLkjNf9D1eC8xpfTkG2OJbpVaaAsIoZjSbwBRsGMfi
 d7DLSf5dN1FMC/2VKyIthar59rFy5mahsdH5arqE6KNOrdMB7+2ESxbli1Sve8Hh
 hDshorVoVScG+ROEwircwS+xQy3ZbxAj93LGtnfA9rwEt2/4gwR8iA0fPKdeS9Vr
 9HSi0LtzGHqKhas1Id3hwe6qVxXyi0yshOrj8LsA6sh96RkCxBtCOgoUbEQ6pGA=
 =Xh4l
 -----END PGP SIGNATURE-----

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

pc, virtio: fixes

A couple of last minute fixes.

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

# gpg: Signature made Fri 03 Aug 2018 09:35:54 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:
  tests/acpi: update tables after memory hotplug changes
  pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size
  tests/acpi-test: update ACPI tables test blobs
  hw/acpi-build: Add a check for memory-less NUMA nodes
  vhost: check region type before casting

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2018-08-06 09:59:05 +01:00
Michael S. Tsirkin 1c707d6990 tests/acpi: update tables after memory hotplug changes
Previous patch changes acpi tables, update expected
files accordingly.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-08-03 11:35:21 +03:00
Igor Mammedov 10efd7e108 pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size
Commit 848a1cc1e (hw/acpi-build: build SRAT memory affinity structures for DIMM devices)
broke the first dimm hotplug in following cases:

 1: there is no coldplugged dimm in the last numa node
    but there is a coldplugged dimm in another node

  -m 4096,slots=4,maxmem=32G               \
  -object memory-backend-ram,id=m0,size=2G \
  -device pc-dimm,memdev=m0,node=0         \
  -numa node,nodeid=0                      \
  -numa node,nodeid=1

 2: if order of dimms on CLI is:
       1st plugged dimm in node1
       2nd plugged dimm in node0

  -m 4096,slots=4,maxmem=32G               \
  -object memory-backend-ram,size=2G,id=m0 \
  -device pc-dimm,memdev=m0,node=1         \
  -object memory-backend-ram,id=m1,size=2G \
  -device pc-dimm,memdev=m1,node=0         \
  -numa node,nodeid=0                      \
  -numa node,nodeid=1

(qemu) object_add memory-backend-ram,id=m2,size=1G
(qemu) device_add pc-dimm,memdev=m2,node=0

the first DIMM hotplug to any node except the last one
fails (Windows is unable to online it).

Length reduction of stub hotplug memory SRAT entry,
fixes issue for some reason.

RHBZ: 1609234

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2018-08-03 11:35:21 +03:00