Compare commits

...

402 Commits
f20 ... master

Author SHA1 Message Date
Cole Robinson 646ce0f5b5 Rebase to qemu-5.2.0-rc4
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-12-03 10:35:07 -05:00
Cole Robinson 4b48a789ef Add missing patch
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-11-24 12:50:53 -05:00
Cole Robinson 108c22f518 Fix running 9p tests in copr
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-11-24 11:48:57 -05:00
Paolo Bonzini f0d2afbe43 Remove --python=... to force use of system meson 2020-11-19 18:12:44 +01:00
Daniel P. Berrangé fd795fc4d0 Cull changelog entries older than 2 years
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-19 14:10:11 +00:00
Daniel P. Berrangé 9d15b88230 Wildcard ignore the archive files
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-19 14:09:40 +00:00
Daniel P. Berrangé e837494495 Re-enable systemtap tracing
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-19 11:36:57 +00:00
Cole Robinson 5ff8af4aaa Rebase to qemu-5.2.0-rc2
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-11-18 08:44:48 -05:00
Daniel P. Berrangé 0b61e57fbe Disable static user mode build on RHEL
The ELN stream builds Fedora packages in a psuedo-RHEL build root and
does not ship all the things that Fedora expects to be present. In
particular glib2-static is missing in ELN build roots, so we need to
disable the user mode static build.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-13 11:26:40 +00:00
Adam Williamson 3f5e1104a8 common: also obsolete -core packages of removed systems
We need to obsolete {lm32,moxie,unicore32}-core as well.
2020-11-11 10:42:07 -08:00
Cole Robinson 5bc1125531 Rebase to qemu-5.2.0-rc1
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-11-11 09:01:43 -05:00
Cole Robinson 28222ce611 Rebase to 5.2.0-rc0
* Drop deprecated targets: moxie, unicore32, lm32, tilegx, ppc64abi32
* Use qemu-pr-helper units from qemu contrib/
* Drop ivshmem-tools package, upstream doesn't install it anymore
* New spice device modules

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-11-08 18:53:38 -05:00
Daniel P. Berrangé 581fcfe335 Remove conditionals for skipping/ignoring tests
The conditionals for completely skipping testing, or ignoring all test
failures are much too big a hammer. They are resulting in seriously
broken QEMU binaries making their way into the rawhide repos.

When failures happen the smallest possible number of individual tests
need to be disabled/skipped, but *only* if failure is confined to the
test suite. If there are problems affecting functionality in QEMU
itself, the build should not be forced through, instead QEMU must be
fixed before a build is made.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-05 14:17:23 +00:00
Daniel P. Berrangé 9fb824102c Don't disable all tests, selectively disable only broken ones
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-05 14:16:45 +00:00
Daniel P. Berrangé 357c686a3e Disable LTO again because it is massively broken
The tests were not actually passing, the spec file had been set to
ignore all test failures, and as a result we were shipping completely
fubar builds.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-05 14:15:59 +00:00
Daniel P. Berrangé 65b2a489f4 Re-enable LTO since it now passes tests
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-10-26 15:48:06 +00:00
Daniel P. Berrangé 744e70f72e Clean up build requires lines
Drop podlators since QEMU no longer uses POD for man pages.

Drop all version numbers, since we can assume Fedora has new enough
packages.

Make comments a little more consistent.

Drop rados2-devel  as it is implied by rbd-devel

Use rbd-devel instead of rbd1-devel due to rename

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-10-22 11:36:46 +01:00
Cole Robinson cd21b7f45d spec: drop BuildRequires: iasl
From Igor Mammedov:

    QEMU doesn't need iasl for building since 2.6,
    where we switched to generating acpi tables
    using internal aml_foo() API and stopped using
    precompiled templates.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-28 13:47:47 -04:00
Cole Robinson efaa1cda68 Packaging work to build on epel8
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-23 19:03:13 -04:00
Cole Robinson 748c8c3268 spec: Only require virglrenderer on fedora
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-08 10:24:28 -04:00
Daniel P. Berrangé d9af2bbdff Make QEMU sanity check a build blocker
If it ever breaks, it can be skipped by setting the %qemu_sanity_check
variable to 0.

This ensures it does not bit-rot again in future and actually adds some
value to the build.

It has to be skipped for ARM for now due to inability to select the
machine type.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-09-04 13:58:19 +01:00
Daniel P. Berrangé f2839fea71 Provide explicit kernel path to QEMU sanity check
In a mock build root the kernel probably won't exist in /boot and the
QEMU sanity check script won't search /lib/modules. So we must find the
vmlinuz file and pass it explicitly.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-09-04 11:10:19 +01:00
Daniel P. Berrangé af50bf7b78 Check whether emulator works before doing sanity check
If the emulator binary can't run, then the sanity check is never going
to work either.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-09-04 11:09:53 +01:00
Daniel P. Berrangé 13e7c30edf Fix conditionals for enabling QEMU sanity check
One part of the spec file checked %{kernel_arches} while the other
checked %{hostqemu}. In fact both conditions need to be valid in
order to be able to run the sanity check. Introduce an explicit
%{qemu_sanity_check} variable to express this rule.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-09-04 11:09:34 +01:00
Daniel P. Berrangé 4e321e2f5c Re-enable kernel BR for qemu sanity check
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-09-04 11:09:09 +01:00
Daniel P. Berrangé 458e07e8d7 Fix host qemu binary path for aarch64
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-09-04 11:08:48 +01:00
Daniel P. Berrangé 3c0f9e810a Drop references to obsolete arches
s390, ppc, ppc64 and mips64 are no longer valid Fedora primary
or alternative architectures.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-09-04 11:08:06 +01:00
Daniel P. Berrangé dc03f389d3 Add btrfs ioctls to linux-user (rhbz #1872918)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-09-03 11:04:29 +01:00
Cole Robinson 3927dda118 spec: Fix test conditionals
And update the comment explaining why things are still disabled

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-31 15:01:17 -04:00
Tom Stellard 3fa99d6aac Add BuildRequires: gcc
https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequires_and_Requires
2020-08-18 14:21:58 +00:00
Cole Robinson 9b60ebfd67 Disable dtrace generation to fix use of modules (bz 1869339)
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-17 18:22:02 -04:00
Cole Robinson 2b132a41aa spec: qxl module syntax fixes
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-12 05:44:18 -04:00
Cole Robinson a840dd697e Conditionalize qxl subpackage on whether spice is available
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-12 05:38:40 -04:00
Cole Robinson 884b734123 spec: Temporarily disable kernel dep due to f34 breakage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-12 05:32:45 -04:00
Cole Robinson b35e952c0c Drop grubby dep
Rawhide grubby deps are currently broken. And I'm not sure if
this is even still required for qemu-sanity-check, so let's see

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-11 19:34:44 -04:00
Cole Robinson 25b0302679 qemu-5.1.0-1
Update to version 5.1.0
2020-08-11 19:01:17 -04:00
Cole Robinson a90ffcbc2c qemu-5.1.0-0.3.rc3
Update to version 5.1.0-rc3
2020-08-07 09:54:37 -04:00
Merlin Mathesius e84a93a247 Use new %{kernel_arches} macro to determine when a full kernel is available
Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2020-08-06 12:09:47 -05:00
Cole Robinson d20fa70a4e Pull in new device modules by default
Like we do for all other modularized components

Reported by Mark Mielke

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-05 10:53:01 -04:00
Cole Robinson c9c298d7a8 Fix AVX typo
Reported by Mark Mielke

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-05 10:50:48 -04:00
Cole Robinson f4bee9e135 Rebase to qemu-5.1.0-rc2
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-04 17:50:59 -04:00
Daniel P. Berrangé 7ffd7f7fdf Remove obsolete fedora conditionals (PR#9)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-07-31 10:52:10 +01:00
Richard W.M. Jones bdc5a0bca1 Disable LTO as it caused many strange assert failures. 2020-07-30 10:01:26 +01:00
Richard W.M. Jones 4269c70e28 Backport Dan's upstream patch to fix insecure cert in test suite. 2020-07-29 13:32:58 +01:00
Kevin Fenzi 0133142152 Rebuild for new xen 2020-07-27 20:14:53 -07:00
Cole Robinson 3da886a924 qemu-5.0.0-2
Fix iouring hang (bz #1823751)
2020-05-13 13:34:26 -04:00
Cole Robinson 8c45437b3a Re-enable test suite failure reporting
A scratch-build succeeded for me now

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-05-09 11:48:40 -04:00
Cole Robinson 9f833efd2d qemu-5.0.0-1
Update to version 5.0.0
2020-05-06 09:27:16 -04:00
Cole Robinson fa1d6ea0cd Update to qemu 5.0.0 rc3
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-04-16 05:23:57 -04:00
Cole Robinson 7e9fe41b78 spec: Temporarily disable tests, iotest 161 failing on i686
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-04-09 13:16:07 -04:00
Cole Robinson 76b4bc9d96 spec: Add 'hostname' dep for test suite
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-04-09 06:30:48 -04:00
Cole Robinson 9f8e48750c Update to qemu 5.0.0 rc2
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-04-09 05:47:16 -04:00
Adam Williamson e2b4e80d3c Rebuild for new brltty
Also add missing %changelog entry for 5.0.0 bump
2020-04-07 17:30:05 -07:00
Cole Robinson e1b832b513 Add -rx emulator, install all new files
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-03-25 16:22:54 -04:00
Cole Robinson 17655806bf liburing isn't available on %{arm}
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-03-25 14:14:43 -04:00
Cole Robinson dd41f1a7ca spec: Disable liburing, it's breaking the test suite
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-03-25 13:25:36 -04:00
Cole Robinson 8833af8dcd Update to qemu-5.0.0-rc0
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-03-24 20:47:08 -04:00
Fabiano Fidêncio 492d6c1fff qemu-4.2.0-7.fc33
Fix segfault with SR-IOV hot-{plug,unplug} (bz #1814017)

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-03-17 11:12:56 +01:00
Cole Robinson 377bb253e3 qemu-4.2.0-6.fc33
Rebuild for libiscsi soname bump
2020-02-25 14:47:44 -05:00
Cole Robinson 023288b71a qemu-4.2.0-5.fc32
Fix ppc shutdown issue (bz #1784961)
2020-02-15 21:11:36 -05:00
Cole Robinson 1d442bb612 qemu-4.2.0-4.fc32
virtio-fs support from upstream
2020-01-28 10:36:21 -05:00
Richard W.M. Jones b98348b411 Add miscellaneous fixes for RISC-V (RHBZ#1794902). 2020-01-25 10:43:21 +00:00
Mohan Boddu ba6f50c7d7 Rebuild for xen 4.13
Signed-off-by: Mohan Boddu <mboddu@bhujji.com>
2019-12-19 10:55:04 -05:00
Cole Robinson 57a3231073 Update to qemu-4.2.0 GA
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-12-13 09:32:23 -05:00
Cole Robinson 46ea403d2f Update to qemu-4.2.0 rc5
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-12-10 16:50:49 -05:00
Daniel P. Berrangé e6e2c63c09 Disable rdma on arm 32-bit (rhbz #1778517)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-12-02 11:35:47 +00:00
Cole Robinson 1d0e437ac8 Re-enable test suite
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-20 13:09:58 -05:00
Cole Robinson 6732563c65 Update to qemu-4.2.0 rc2
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-20 13:06:13 -05:00
Cole Robinson 46eefb217c Disable tests, they are consistently failing on ppc64le
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-15 13:26:03 -05:00
Cole Robinson ff9bb15b16 Fix last commit
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-15 09:43:16 -05:00
Cole Robinson 993f4157b6 Make spice-app subpackage conditional on with_spice
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-15 09:39:29 -05:00
Cole Robinson 41cffcfad7 Add new bios-microvm.bin rom
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-13 19:57:10 -05:00
Cole Robinson b4072bd645 Fix the test suite
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-13 16:33:52 -05:00
Cole Robinson fddfbd9637 spec: Fix spice_app variable naming
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-13 12:38:02 -05:00
Thierry Vignaud 16769836d7 qemu: actually pull new ui_spice_add subpkg
--00000000000065190005973c323b
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi
The newly added spice_add subpkg is not required despite creating the
proper macro
This fixes it.
See you

--=20
Thierry Vignaud -- EMEA ENG OpenStack Management
tvignaud@redhat.com
irc: tvignaud

<div dir="ltr"><div>Hi</div><div>The newly added spice_add subpkg is not required despite creating the proper macro<br></div><div>This fixes it.</div><div>See you<br></div><div><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Thierry Vignaud -- EMEA ENG OpenStack Management<br></div><div><a href="mailto:tvignaud@redhat.com" target="_blank">tvignaud@redhat.com</a><br></div>irc: tvignaud<br></div></div></div></div>

From c610e43d411389e36462607d38c95a85264f2881 Mon Sep 17 00:00:00 2001
From: Thierry Vignaud <thierry.vignaud@gmail.com>
Date: Wed, 13 Nov 2019 16:39:25 +0100
Subject: [PATCH] actually pull new ui_spice_add subpkg
2019-11-13 12:37:31 -05:00
Cole Robinson 0038f84388 Update to qemu 4.2.0 rc1
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-12 17:39:50 -05:00
Cole Robinson 8e6758e973 qemu-4.1.0-6.fc32
Fix compressed qcow2 'qemu-img check' errors (bz #1768541)
2019-11-11 09:33:46 -05:00
Cole Robinson fe24ece8af Use --enable-tcg for static builds, apparently it's required
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-10-24 14:04:01 -04:00
Cole Robinson f4c127bbc1 qemu-4.1.0-5.fc32
Workaround for qcow2 triggered XFS corruption (bz #1763519)
2019-10-24 11:34:55 -04:00
Cole Robinson 918c70b1aa spec: Disable any -tcg usage for -user builds
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-10-18 10:54:16 -04:00
Cole Robinson 964eff6ae8 Fix tests on kernel 5.3+
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-10-18 10:51:02 -04:00
Cole Robinson 481596d7a6 qemu-4.1.0-4.fc32
Rebuild for new virglrenderer
2019-10-03 13:43:23 -04:00
Leigh Scott c36918674f Rebuild for new libnfs version 2019-09-11 11:33:43 +01:00
Cole Robinson 9db63cb5df qemu-4.1.0-2.fc32
gluster 4K block size fixes (bz #1737256)
2019-09-04 10:37:55 -04:00
Cole Robinson 5084436959 spec: Remove sanity check dep on ix86 too
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-08-19 17:14:57 -04:00
Cole Robinson 70269497f2 Add sources
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-08-19 15:29:11 -04:00
Cole Robinson 2a7146a2ca Update to qemu-4.1.0 GA
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-08-19 15:19:33 -04:00
Cole Robinson 70b6670bdf kernel isn't available on ix86 anymore, adjust the dep 2019-07-25 10:23:11 -04:00
Cole Robinson 28828da2e3 spec: Handle new files in 4.1.0-rc2 2019-07-25 08:57:58 -04:00
Cole Robinson e4599b5e27 Update to qemu-4.1.0-rc2 2019-07-24 14:25:25 -04:00
Cole Robinson bd59499379 spec: Use libxattr for qemu-user-static builds
https://bugzilla.redhat.com/show_bug.cgi?id=1731756
2019-07-23 15:18:31 -04:00
Cole Robinson 6acd45ea32 Update to qemu-4.1.0-rc1 2019-07-17 18:45:07 -04:00
Cole Robinson e0a72f8f2d Add patch fixing docs build 2019-07-12 13:04:17 -04:00
Cole Robinson 160bf4b4d5 Update to qemu-4.1.0-rc0 2019-07-11 21:11:36 -04:00
Kevin Fenzi 8e85e5e9aa Rebuild for new brltty. 2019-06-28 13:47:44 -07:00
Cole Robinson 419868beaf spec: Some cleanups + improvements
* Add run_configure_disable_everything
* Use it for static builds
* Add some comments
* Misc style cleanups
2019-06-24 19:49:43 -04:00
Cole Robinson e5504b6ad4 Only use slirp on fedora > 30, to fix virt-preview builds 2019-06-21 08:18:53 -04:00
Cole Robinson 40fbd86194 Fix spec conditional 2019-06-20 17:36:29 -04:00
Cole Robinson 8a7ac9c97e qemu-4.0.0-4.fc31
CVE-2019-12155: qxl: null pointer dereference while releasing spice resources (bz #1712727, bz #1712670)
qemu-4.0.0-2.fc31 ppc64le: rpm hash calculation buggy (bz #1715017)
Fix rawhide build (bz #1718926)
Link against libslirp (bz #1712980)
Add vgabios-ramfb.bin and vgabios-bochs-display.bin (bz #1721445)
2019-06-20 17:31:11 -04:00
David Abdurachmanov 29c3523ef3 Add vgabios-ramfb.bin and vgabios-bochs-display.bin
These are now available in Rawhide starting seabios 1.12.1.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2019-06-20 16:54:55 -04:00
Cole Robinson 17efd80578 Link against libslirp 2019-06-20 16:30:27 -04:00
Daniel P. Berrangé 70ef327d5f Define md-clear CPUID bit
CVE-2018-12126, CVE-2018-12127, CVE-2018-12130, CVE-2019-11091

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-05-14 19:04:29 +01:00
Daniel P. Berrangé af6274808b Cull changelog entries prior to 2017
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-05-14 19:04:29 +01:00
Cole Robinson c67ebc8192 Update to qemu-4.0.0 GA 2019-04-24 17:18:50 -04:00
Cole Robinson cdc7e4ca72 Add missing sources 2019-04-16 21:59:06 -04:00
Cole Robinson e14a8ce4ef qemu-4.0.0-0.7.rc3.fc31
Don't block migration with nested VMX (bz #1697997)
Update to qemu-4.0.0-rc3
2019-04-16 21:48:03 -04:00
Richard W.M. Jones 09f7c02959 Rebuild against xen 4.12.
DEBUG util.py:554:  BUILDSTDERR:   - conflicting requests
DEBUG util.py:554:  BUILDSTDERR:   - nothing provides libxenctrl.so.4.11()(64bit) needed by qemu-system-x86-core-2:4.0.0-0.5.rc2.fc31.x86_64
DEBUG util.py:554:  BUILDSTDERR:   - nothing provides libxenguest.so.4.11()(64bit) needed by qemu-system-x86-core-2:4.0.0-0.5.rc2.fc31.x86_64
2019-04-06 16:28:04 +01:00
Cole Robinson 4266c9b33e Update to 4.0.0-rc2 2019-04-03 09:46:28 -04:00
Cole Robinson c9654a07d8 Update to 4.0.0-rc1 2019-03-27 17:28:12 -04:00
Adam Williamson fd86380c5b Add changelog entry 2019-03-25 11:49:20 -07:00
Adam Williamson 1515438fd3 Backport danpb's proposed fix for RHBZ #1692323 (3D crasher)
This is a Fedora 30 Beta blocker, so we need it fixed ASAP; I'm
doing it (for Rawhide and F30) as none of the qemu maintainers
seems to be around on IRC.
2019-03-25 11:21:01 -07:00
Cole Robinson e3d6ad24ae spec: Only run pathfix on the one file that needs it
It's really noisy recursing through the sourcedir otherwise
2019-03-22 19:19:03 -04:00
Thierry Vignaud 9687314304 fix macro expansion in comment 2019-03-22 19:18:55 -04:00
Cole Robinson 7da5fc303e spec: Use consitent have_X macro pattern 2019-03-22 19:18:37 -04:00
Cole Robinson f3518876c6 Fix python paths for qemu-trace-stap 2019-03-21 06:37:24 -04:00
Cole Robinson d3ff788791 Update to qemu 4.0.0-rc0 2019-03-20 17:39:56 -04:00
Daniel P. Berrangé 941a4c0548 Fix typo curl -> curses
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-20 16:55:02 +00:00
Daniel P. Berrangé e1923c9eb5 Use conditional compilation to disable glusterfs
Instead of commenting out parts of the spec introduce conditionals
that allow glusterfs to be disabled in a single place.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-20 16:42:05 +00:00
Daniel P. Berrangé a60ad61787 Make qemu-common obsolete RBD module when disabled
If RBD module build is disabled, we need to obsolete it to ensure a
clean upgrade from previous builds. This is done by adding an Obsoletes
from the qemu-common sub-RPM.

This fixes the upgrade path on i686 (rhbz #1688117)

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-20 16:41:29 +00:00
Daniel P. Berrangé f1fa58e582 Refactor global module requires to facilitate conditional builds
The global list of module requires is not amenable to conditional
builds, requiring the entire set of requires to be duplicated.
Refactor it so that individual pieces can be disabled.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-20 16:41:29 +00:00
Daniel P. Berrangé e24cbbb32e Fix compat with latest glibc which has gettid func
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-20 16:22:51 +00:00
Cole Robinson de10d8e08e Temporarily disable glusterfs (bz #1684298) 2019-03-03 17:42:14 -05:00
Cole Robinson 2679bc30fc Rebuild for brltty soname bump 2019-02-28 17:00:40 -05:00
Fedora Release Engineering 8e22bbd1e0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-02 10:30:22 +00:00
Richard W.M. Jones f1ea04bd67 Revert "Add a temporary patch to fix capstone header location."
This has now been fixed in capstone, see
https://github.com/aquynh/capstone/issues/1339

This reverts commit e0155fb5be.
2019-01-12 07:39:39 +00:00
Richard W.M. Jones e0155fb5be Add a temporary patch to fix capstone header location. 2019-01-11 09:43:39 +00:00
Richard W.M. Jones 8433925433 Rebuild for unannounced libcapstone soname bump from 3 to 4. 2019-01-11 09:16:11 +00:00
Adam Williamson 61ad1f41fd Restore patch to drop phantom 86 key from en-us keymap (bz #1658676)
The exact bug this was initially added to workaround was fixed
in 2.12, so @crobinso dropped the patch. However, the phantom
key turns out to still cause problems in another case, so until
that is fixed, we need to put this back. See
https://bugzilla.redhat.com/show_bug.cgi?id=1658676 for full
details on the outstanding bug.
2018-12-18 10:35:22 -08:00
Cole Robinson 5704646898 Rebase to qemu-3.1.0 GA 2018-12-11 18:41:59 -05:00
Daniel P. Berrangé a4b3db7151 Disable RBD on 32-bit arches
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-12-10 18:40:38 +00:00
Cole Robinson 0af132aa98 BR libpmem is only available on x86_64 2018-11-16 11:01:12 -05:00
Cole Robinson 007776f3e4 Rebase to qemu-3.1.0-rc1 2018-11-15 19:50:28 -05:00
Cole Robinson e4323bc8b2 Remove unused patches 2018-10-03 11:13:53 -04:00
Cole Robinson a6f68877d0 Rebase to qemu-3.0.0 GA 2018-08-15 10:19:27 -04:00
Cole Robinson 91efacc572 Fix build after ksm removal 2018-08-13 18:31:29 -04:00
Cole Robinson 748bb2f566 Drop ksm package, moved to ksmtuned srpm 2018-08-13 17:07:28 -04:00
Cole Robinson c90305980d Drop ksm package, moved to ksmtuned srpm 2018-08-13 17:06:42 -04:00
Daniel P. Berrangé 13b2fd93a9 Add missing requires on ssh block module accidentally lost
The rebase to 2.12 accidentally lost the %{name}-block-ssh
module dep.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-08-01 14:29:02 +01:00
Cole Robinson e4ec8b672d Another attempt to remove 50-kvm-sysctl 2018-08-01 05:54:39 -04:00
Cole Robinson 5bdb061bca Fix s390x file removal
Only install modprobe kvm.conf on x86 (bz #1517989)
2018-07-31 18:39:03 -04:00
Cole Robinson d4c4507533 Rebase to qemu-3.0.0-rc3
Drop now unneeded s390x conf (bz #1609706)
2018-07-31 16:36:31 -04:00
Peter Robinson b12f5aef3a Rebuild for Xen 4.11 2018-07-13 11:36:41 +01:00
Daniel P. Berrangé b91dae7a8f New CPU features for speculative store bypass (CVE-2018-3639)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-06-18 13:45:14 +01:00
Cole Robinson 330481bc1c Fix qxl memslot_get_virt crashes (bz #1565354) 2018-06-05 14:28:06 -04:00
Cole Robinson 97eed6b145 Update to qemu-2.12.0 GA 2018-04-30 12:19:47 -04:00
Richard W.M. Jones 6dab4a0cbd Update to qemu-2.12.0-rc3
- Remove upstream patch.
- Fixes issues with partition / LV minimum alignment (RHBZ#1565714).
2018-04-16 12:17:57 +01:00
Cole Robinson 7b9b67b1ec Update to qemu-2.12.0-rc2
Drop upstreamed riscv patch
2018-04-05 14:25:31 -04:00
Cole Robinson 0d2d5cc76d Update to qemu-2.12.0-rc1 2018-03-28 11:01:32 -04:00
Cole Robinson 80404b03be Drop target whitelists; enable user tilegx, xtensa*
qemu configure will give us all targets if we don't specify a
whitelist, so drop the target lists to simplify the spec. This
also makes it clear that we were missing some linux-user targets,
so enable them
2018-03-26 17:12:19 -04:00
Cole Robinson a28cfa8216 spec: Convert to using qemu-binfmt-conf.sh script
The binfmt masks are slightly different but I think they are
functionally equivalent. The script handles arch collision
automatically which lets us drop a lot of the %ifarch stuff
2018-03-25 11:53:02 -04:00
Cole Robinson e9e03fcd1c Add changelog 2018-03-23 19:40:00 -04:00
Cole Robinson 6269069f27 Fix audio/ui module dependencies 2018-03-23 19:28:10 -04:00
Cole Robinson 3930e8ff37 spec: Clean up outdated arch deps
- rdma-core, xen, spice, numactl are available in more places
- drop presumably obsolete aarch64 ld flag droppage
- centralize arch dep checks in one place
2018-03-23 16:41:49 -04:00
Cole Robinson 3758f8a137 Some spec cleanups
- Sort system-* in alphabetical order
- Remove a bunch of whitespace
- Remove repeated QEMU line in %description
2018-03-22 12:09:38 -04:00
Cole Robinson e13261f947 Fix hppa firmware packaging
Accidentally added it to aarch64
2018-03-22 11:07:41 -04:00
Cole Robinson 3c6a0ca337 Rebase to qemu-2.12.0-rc0
- Add hppa and riscv32/64 targets
- Add audio and ui modules
2018-03-22 09:13:01 -04:00
Daniel P. Berrangé 55054b88c9 Re-enable normal Fedora hardening macros
We previously disabled the hardened build macros because they broke
static linking. This is now resolved, so we can use them as is, which in
turn ensures ksmctl gets linked correctly.

While doing this it is not neccessary to pass -pie in ldflags, as we are
already giving the --enable-pie configure option. This lets us move
setting  of linker/compiler flags into the common run_configure
function, rather than duplicating them for static & dynamic builds

Finally, even though QEMU sets _FORTIFY_SOURCE itself, there's no reason
to strip it from the RPM provided build flags - it is harmless for it to
appear twice on compiler args. This ensures ksmctl.c gets fortified.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-19 18:36:49 +00:00
Cole Robinson 6b1a7d80a5 git rm kvm.modules
Was dropped from the spec in 2015

Reported-by: Danilo C. L. de Paula <ddepaula@redhat.com>
2018-03-13 09:33:13 -04:00
Cole Robinson a7e2480deb Rebase to qemu 2.11.1 bugfix release 2018-02-28 17:11:13 -05:00
Daniel P. Berrangé 29249a79a8 Avoid breakage in tests due to stricter crypto policies
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-28 18:54:48 +00:00
Daniel P. Berrangé 52904050aa Explicitly use python2 binary
The /usr/bin/python binary has started spewing text to stderr, even when
not connected to a tty, which breaks QEMU test suite.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-28 18:02:52 +00:00
Daniel P. Berrangé 603dd9e50a Bump release for new build
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-27 16:31:19 +00:00
Daniel P. Berrangé 28d4d1f5e7 Non-deterministic python hash iterator sort ordering
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-27 16:30:20 +00:00
Daniel P. Berrangé 34056732a5 Honour CC/LD flags from RPM global settings.
https://bugzilla.redhat.com/show_bug.cgi?id=1549657

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-27 15:33:06 +00:00
Daniel P. Berrangé 1d16c17085 Fix License: tag to better reflect reality
There are multiple problems with the license tag

  - A bunch of QEMU code is GPLv2-only, not GPLv2-or-later
  - Fedora licensing guidelines say that if "GPLv2" is
    listed, it is redundant to list "GPLv2+" / "LGPLv2+",
    since those licenses are forced to be equiv to "GPLv2"
    in the combined work
  - QEMU also includes code / files under MIT and CC-BY
    license

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-27 15:14:09 +00:00
Fedora Release Engineering 8253c01b09 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-09 12:10:24 +00:00
Daniel P. Berrange ec520ba35e Fix date in changelog
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-12-22 10:38:58 +00:00
Daniel P. Berrange 167a6b72c2 Re-enable rbd on arm/ppc arches (rhbz #1528378)
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-12-21 16:29:06 +00:00
Adam Williamson f81be8f026 Fix problem with typing some characters via VNC (LP#1738283)
Note: this is kinda a temporary fix, but I don't want to wait
for a 'real' fix from upstream as I want to build os-autoinst
for Rawhide and this bug prevents its test suite working right.
2017-12-20 16:51:21 -08:00
Cole Robinson f95699bf90 Rebuild for xen 4.10 2017-12-20 07:05:41 -05:00
Cole Robinson 90a3c96cff Rebase to 2.11.0 GA 2017-12-18 14:37:02 -05:00
Cole Robinson a76e086590 Rebase to 2.11.0-rc3 2017-12-04 11:54:22 -05:00
Paolo Bonzini e978b4fe84 fix /var/log/qga-fsfreeze-hook.log 2017-11-29 00:39:08 +01:00
Paolo Bonzini bfe7b8124e fix compilation, upgrade qemu-ga packaging based on RHEL 7 2017-11-28 18:07:46 +01:00
Cole Robinson 700f126a07 Update to qemu-2.11.0-rc1 2017-11-20 06:41:22 -05:00
Cole Robinson 2a2b49f85b spec: Drop deprecated Group: tag 2017-11-19 18:56:06 -05:00
Cole Robinson 59eb7ad892 Fix ppc64 KVM failure (bz #1501936)
CVE-2017-15038: 9p: information disclosure when reading extended attributes (bz #1499111)
CVE-2017-15268: potential memory exhaustion via websock connection to VNC (bz #1496882)
2017-10-19 12:59:57 -04:00
Paolo Bonzini b0a7742ccd fix multipath qemu-pr-helper
Update patch 1014 for new libmultipath/libmpathpersist API
Force build to fail if multipath is not available
2017-10-18 09:03:01 +02:00
Daniel P. Berrange 8699737f6d Fix inverted check for ignoring test suite failures
An inverted conditional meant that test suite failures were previously
being ignored on all architectures by default, instead of only on the
blacklisted arches (currently none)

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-10-12 09:37:20 +01:00
Daniel P. Berrange ac5e33cbfe Remove iasl dep on big endian arches
iasl is still broken for QEMU usage on big endian

https://bugzilla.redhat.com/show_bug.cgi?id=1332449

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-10-12 09:37:20 +01:00
Daniel P. Berrange a8c6008b7d Add patches from git master to fix TLS test suite with new GNUTLS
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-10-12 09:26:40 +01:00
Daniel P. Berrange 9acefb8589 Rebuild for libiscsi changed soname again
The previous rebuild was sent to builders before the build root had
updated to pull in the new libiscsi, so it just built with the old
libiscsi again.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-10-09 10:29:00 +01:00
Paolo Bonzini 4b7bd99c46 Rebuild with new libiscsi for iSER support 2017-10-03 17:36:43 +02:00
Paolo Bonzini fd8ba3896b Stop using tcmalloc, glibc got faster 2017-09-28 15:14:19 +02:00
Paolo Bonzini 0fb2b27d3a Backport persistent reservation manager in preparation for SELinux work 2017-09-22 16:47:53 +02:00
Paolo Bonzini 0945e0bba3 fix previous commit 2017-09-22 10:59:02 +02:00
Nathaniel McCallum 98b428ff80 Fix endianness of e_type in the ppc64le binfmt 2017-09-18 16:27:33 -04:00
Cole Robinson 0b42e7fc18 Rebase to 2.10.0 GA 2017-09-07 16:08:24 -04:00
Nathaniel McCallum 3b6c813012 Fix incorrect byte order in e_machine field in ppc64le binfmt (#1486379) 2017-08-29 12:59:07 -04:00
Cole Robinson 45cb87a59c Fix changelog 2017-08-25 18:14:00 -04:00
Cole Robinson 5264c6a895 Rebase to 2.10.0-rc4 2017-08-25 18:13:05 -04:00
Adam Williamson c2f33c885f Don't build against rdma on 32-bit ARM (#1484155) 2017-08-22 17:39:41 -07:00
Cole Robinson c333713fea Add sources 2017-08-16 17:46:28 -04:00
Cole Robinson 14cfc78b3c Rebase to 2.10.0-rc3 2017-08-16 17:38:41 -04:00
Cole Robinson 0323a03914 Remove /dev/kvm udev rules, systemd now provides them (bz #1431876) 2017-08-03 17:33:01 -04:00
Cole Robinson 1a4355e536 Rebase to 2.10.0-rc1 2017-08-03 10:14:19 -04:00
Florian Weimer 26c1ceeaa3 Rebuild with fixed binutils for ppc64le (#1475636) 2017-07-30 15:53:03 +02:00
Daniel P. Berrange 6e16c07206 Re-enable ceph on i386 as build is now fixed (rhbz #1474773)
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-07-26 11:42:02 +01:00
Daniel P. Berrange a3b9d99ab2 Disabled RBD on i386, arm, ppc64 (rhbz #1474743)
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-07-26 11:40:17 +01:00
Daniel P. Berrange a949744f38 Replace obsolete ceph-devel dep with librbd1-devel/librados2-devel
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-07-25 09:44:33 +01:00
Daniel P. Berrange 20b2275a19 Rebuild for changed rbd soname
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-07-25 09:35:08 +01:00
Nathaniel McCallum 22c2909bc1 Restrict user-static to user-static builds 2017-07-20 11:51:59 -04:00
Nathaniel McCallum f73c470a02 Cleanup binfmt deps/scripts; add binfmt for ppc64le 2017-07-20 10:42:28 -04:00
Daniel P. Berrange 1e96c68c3d Fixes for compat with Xen 4.9
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-07-19 12:26:23 +01:00
Nathaniel McCallum cf6afbb855 Fix invalid ucontext_t references 2017-07-18 21:27:57 -04:00
Daniel P. Berrange 895ba8da7d Rebuild for changed Xen sonames
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-07-18 15:28:08 +01:00
Cole Robinson 335584f502 CVE-2017-8112: vmw_pvscsi: infinite loop in pvscsi_log2 (bz #1445622)
CVE-2017-8309: audio: host memory lekage via capture buffer (bz #1446520)
CVE-2017-8379: input: host memory lekage via keyboard events (bz #1446560)
CVE-2017-8380: scsi: megasas: out-of-bounds read in megasas_mmio_write (bz #1446578)
CVE-2017-7493: 9pfs: guest privilege escalation in virtfs mapped-file mode (bz #1451711)
CVE-2017-9503: megasas: null pointer dereference while processing megasas command (bz #1459478)
CVE-2017-10806: usb-redirect: stack buffer overflow in debug logging (bz #1468497)
CVE-2017-9524: nbd: segfault due to client non-negotiation (bz #1460172)
CVE-2017-10664: qemu-nbd: server breaks with SIGPIPE upon client abort (bz #1466192)
2017-07-13 16:21:40 -04:00
Richard W.M. Jones 5eae33f189 Bump release and rebuild to try to fix _ZdlPvm symbol (see RHBZ#1452813). 2017-05-22 09:56:26 +01:00
Cole Robinson faa9df96ad Fix fedpkg verrel 2017-04-25 16:17:05 -04:00
Cole Robinson 33f79e5eb1 Rebase to qemu-2.9.0 GA 2017-04-25 16:03:50 -04:00
Cole Robinson 514d6bc543 Rebase to qemu-2.9.0-rc4
Fix ipxe rom links for aarch64
2017-04-13 19:28:05 -04:00
Richard W.M. Jones 5dd6a73c80 Backport upstream fix for assertion when copy-on-read=true (RHBZ#1439922). 2017-04-08 09:39:38 +01:00
Cole Robinson 74c0a82292 Rebase to qemu-2.9.0-rc3 2017-04-04 18:27:53 -04:00
Cole Robinson 0db3257f1a Rebase to qemu-2.9.0-rc2
Add Obsoletes for or32-or1k rename (bz 1435016)
2017-03-29 13:54:10 -04:00
Cole Robinson 996634350a spec: Pull in vga and pxe roms for ppc64 (bz 1431403) 2017-03-29 13:03:29 -04:00
Cole Robinson 1db5811d26 Rebase to qemu-2.9.0-rc1 2017-03-21 18:42:44 -04:00
Cole Robinson 1c7073d8dd Rebase to qemu-2.9.0-rc0 2017-03-15 14:03:33 -04:00
Daniel P. Berrange 6a041ef569 Drop texi2html BR, since QEMU switched to using makeinfo back in 2010
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-02-20 17:49:12 +00:00
Fedora Release Engineering c1f9c0e4d7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 11:12:06 +00:00
Cole Robinson 8b317f0917 Rebase to qemu-2.8.0 GA 2016-12-20 16:17:18 -05:00
Cole Robinson 50bb158a7a Rebase to qemu-2.8.0-rc3 2016-12-12 16:04:42 -05:00
Daniel P. Berrange 8288677cfa Rebuild for libxen* soname changes
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-12-08 14:17:33 +00:00
Cole Robinson 9074eea4bb Add rc2 sources 2016-12-05 12:04:20 -05:00
Cole Robinson 17a6dacdca Remove --disable-xfsctl option, no longer explicitly required
It was added at one point to work around temporarily broken
xfsprogs-devel
2016-12-05 11:57:27 -05:00
Cole Robinson 84eeb10ee8 spec: Share common configure options between static/standard builds 2016-12-05 11:57:27 -05:00
Cole Robinson 151958b44b Rebase to qemu-2.8.0-rc2 2016-12-05 11:57:27 -05:00
Cole Robinson 3bbbcdcb07 Kill changelog entries prior to 2015 2016-12-05 10:45:56 -05:00
Cole Robinson 6f55752c5f Depend on vte291, not vte3
vte3 is stuck at a certain version, vte291 is actually where new vte
versions are packaged. Yes, that's confusing.
2016-12-05 10:45:56 -05:00
Paolo Bonzini b68b5fed43 Do not build aarch64 with -fPIC anymore (rhbz 1232499)
This seems to be unnecessary now (tested with kvm-unit-tests on aarch64
F25).
2016-11-28 15:47:34 +01:00
Nathaniel McCallum 0583426e3d Clean up binfmt.d configuration files
In particular, I performed the following changes:

1. Add the (missing) aarch64 configuration.

2. Mask out e_ident[EI_OSABI]. A single OS can have multiple values
   here. We just pass them all to qemu. I personally ran into this issue
   (where filtering was too strict) on ppc64.

3. Mask out e_ident[EI_ABIVERSION]. On Linux, this value is ignored.

4. Mask out e_ident[EI_PAD]. The current check insists they are zero
   when they are, in fact, undefined.

5. Don't mask any bits for e_ident[EI_VERSION]. We want an exact match
   on this since there has only ever been one version. However, alpha, i386
   and i486 were masking out the least significant bit.

6. Don't mask any bits for e_ident[EI_DATA]. You can't mask out bits for
   endianness because it controls the byte order of later bytes in the
   binfmt match (starting at offset 0x10). So you can never have a rule
   which works with bits masked out on this field. However, alpha, i386 and
   i486 were masking out the least significant bit.
2016-11-15 10:33:03 -05:00
Richard W.M. Jones 820948cb49 Fix qemu-sanity-check. 2016-11-14 14:37:49 +00:00
Richard W.M. Jones ecbe006bda Create subpackages for modularized qemu block drivers (RHBZ#1393688). 2016-11-14 14:37:15 +00:00
Cole Robinson 8a588691e2 Fix PPC64 build with memlock file (bz #1387601) 2016-10-25 10:18:57 -04:00
Bastien Nocera b8878c0ca6 Add "F" flag to static user emulators' binfmt, to make them
available in containers (#1384615)
- Also fixes the path of those emulators in the binfmt configurations
2016-10-19 19:19:36 +02:00
Cole Robinson cf816402f7 Fix nested PPC 'Unknown MMU model' error (bz #1374749)
Fix flickering display with boxes + wayland VM (bz #1266484)
Add ppc64 kvm memlock file (bz #1293024)
2016-10-19 13:17:38 -04:00
Cole Robinson d19693d908 Add ppc64 kvm memlock file (bz 1293024) 2016-10-19 12:23:45 -04:00
Cole Robinson 8dd6b5e9c8 spec: Use power64 macro consistently 2016-10-19 12:17:47 -04:00
Cole Robinson 3a13ddd514 CVE-2016-7155: pvscsi: OOB read and infinite loop (bz #1373463)
CVE-2016-7156: pvscsi: infinite loop when building SG list (bz #1373480)
CVE-2016-7156: pvscsi: infinite loop when processing IO requests (bz #1373480)
CVE-2016-7170: vmware_vga: OOB stack memory access (bz #1374709)
CVE-2016-7157: mptsas: invalid memory access (bz #1373505)
CVE-2016-7466: usb: xhci memory leakage during device unplug (bz #1377838)
CVE-2016-7423: scsi: mptsas: OOB access (bz #1376777)
CVE-2016-7422: virtio: null pointer dereference (bz #1376756)
CVE-2016-7908: net: Infinite loop in mcf_fec_do_tx (bz #1381193)
CVE-2016-8576: usb: xHCI: infinite loop vulnerability (bz #1382322)
CVE-2016-7995: usb: hcd-ehci: memory leak (bz #1382669)
2016-10-15 22:24:48 -04:00
Hans de Goede a2729a240b Fix interrupt endpoints not working with network/spice USB redirection
on guest with an emulated xhci controller (rhbz#1382331)
2016-10-10 10:50:30 +02:00
Michal Toman 504e25420b Fix build on MIPS 2016-09-21 09:29:36 +01:00
Cole Robinson 57dbb7a5be Don't depend on edk2 roms where they aren't available (bz 1373576) 2016-09-08 15:56:28 -04:00
Cole Robinson 435be3635e Rebase to qemu 2.7.0 GA 2016-09-08 15:52:09 -04:00
Cole Robinson 94ddf1cc6a Rebase to qemu 2.7.0-rc3 2016-08-19 09:20:37 -04:00
Daniel P. Berrange d52607ebe6 Also disable static builds on ppc64 due to glibc fubarness 2016-08-17 09:47:57 +01:00
Cole Robinson 4ff778e7b3 Add new sources 2016-08-08 20:07:27 -04:00
Cole Robinson ef34be9e72 Rebase to qemu 2.7.0-rc2
* kvm_stat was moved to the kernel tree
* trace-events renamed to trace-events-all
* several new pxe roms added
2016-08-08 20:05:39 -04:00
Richard W.M. Jones 84e6ecadd9 Rebuild to attempt to fix '2:qemu-system-xtensa-2.6.0-5.fc25.x86_64 requires libxenctrl.so.4.6()(64bit)' 2016-07-23 16:37:42 +01:00
Daniel P. Berrange 51223f941f Ignore build logs, src RPMs and x84_64 RPM output dir too
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-07-15 14:39:08 +01:00
Daniel P. Berrange d0bc223280 Add skip for s390x as well as s390 2016-07-15 14:28:04 +01:00
Daniel P. Berrange 9868109a5e Disable qemu-user-static on s390 too 2016-07-14 11:20:48 +01:00
Daniel P. Berrange ecee1eccfe Add explicit BR on alsa-lib-devel
Previously we'd get alsa-lib-devel pulled in by accident due to
dep from another package. Latest rawhide doesn't get this so we
must add the dep explicitly in QEMU.
2016-07-13 15:08:58 +01:00
Daniel P. Berrange a8a5dc38f8 Cat config.log when configure fails during build
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-07-13 15:08:17 +01:00
Daniel P. Berrange 9e71574671 Use precise version in obsoletes line
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-07-13 13:49:06 +01:00
Daniel P. Berrange 0835325a86 Introduce qemu-user-static sub-RPM
The i686 build of this is temp disabled due to fubar
glibc-static on i686

The hardended build macro is disabled due to fubar
rpm macros for static linking while hardened, but
the equivalent hardening is turned on manually.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-07-13 13:42:21 +01:00
Cole Robinson cf91b1dfd9 CVE-2016-4002: net: buffer overflow in MIPSnet (bz #1326083)
CVE-2016-4952 scsi: pvscsi: out-of-bounds access issue
CVE-2016-4964: scsi: mptsas infinite loop (bz #1339157)
CVE-2016-5106: scsi: megasas: out-of-bounds write (bz #1339581)
CVE-2016-5105: scsi: megasas: stack information leakage (bz #1339585)
CVE-2016-5107: scsi: megasas: out-of-bounds read (bz #1339573)
CVE-2016-4454: display: vmsvga: out-of-bounds read (bz #1340740)
CVE-2016-4453: display: vmsvga: infinite loop (bz #1340744)
CVE-2016-5126: block: iscsi: buffer overflow (bz #1340925)
CVE-2016-5238: scsi: esp: OOB write (bz #1341932)
CVE-2016-5338: scsi: esp: OOB r/w access (bz #1343325)
CVE-2016-5337: scsi: megasas: information leakage (bz #1343910)
Fix crash with -nodefaults -sdl (bz #1340931)
Add deps on edk2-ovmf and edk2-aarch64
2016-06-22 09:40:57 -04:00
Cole Robinson f9730dab94 Add deps on fedora edk2-ovmf and edk2-aarch64 2016-06-22 08:22:36 -04:00
Cole Robinson f0208c9e42 CVE-2016-4020: memory leak in kvmvapic.c (bz #1326904)
CVE-2016-4439: scsi: esb: OOB write #1 (bz #1337503)
CVE-2016-4441: scsi: esb: OOB write #2 (bz #1337506)
Fix regression installing windows 7 with qxl/vga (bz #1339267)
Fix crash with aarch64 gic-version=host and accel=tcg (bz #1339977)
2016-05-26 11:32:16 -04:00
Cole Robinson f8dc431e37 Explicitly error if spice GL setup fails
Fix monitor resizing with virgl (bz #1337564)
Fix libvirt noise when introspecting qemu-kvm without hw virt
2016-05-20 16:36:01 -04:00
Cole Robinson c3911a29b3 qemu-kvm: Don't try to init KVM during libvirt introspection
If it's disabled on the host, libvirt logs a ton of errors to
syslog.
2016-05-19 18:15:26 -04:00
Cole Robinson 837eb7efa2 qemu: Clean up BuildRequires
Drop outdated:
    nss-devel (old libcacard)
    rsync (no longer used)
    which (no longer used)
    pciutils-devel (no longer used)

Add libcap-ng-devel for extra qemu-bridge-helper restrictions
Document all BuildRequires
Separate buildsystem bits vs feature bits
2016-05-15 14:52:29 -04:00
Cole Robinson e200903264 Rebase to v2.6.0 GA 2016-05-13 14:18:07 -04:00
Cole Robinson 35faab4c45 Fix gtk UI crash when switching to monitor (bz #1333424)
Fix sdl2 UI lockup lockup when switching to monitor
Rebased to qemu-2.6.0-rc5
2016-05-09 13:36:06 -04:00
Cole Robinson bc7ce050b0 Rebased to version 2.6.0-rc4
Fix test suite on big endian hosts (bz 1330174)
2016-05-02 16:08:20 -04:00
Cole Robinson b455e4b103 Rebuild to pick up spice GL support 2016-04-25 09:01:59 -04:00
Cole Robinson b0b55fdca8 Rebased to version 2.6.0-rc3
Fix s390 sysctl file install (bz 1327870)
Adjust spice gl version check to expect F24 backported version
2016-04-22 08:03:02 -04:00
Cole Robinson 6138a983a3 - Rebased to version 2.6.0-rc2
- Fix GL deps (bz 1325966)
- Ship sysctl file to fix s390x kvm (bz 1290589)
- Fix FTBFS on s390 (bz 1326247)
2016-04-14 18:48:51 -04:00
Cole Robinson c752245c96 Ship sysctl file to fix s390x kvm (bz 1290589) 2016-04-14 18:46:31 -04:00
Cole Robinson fa6cd1dad5 Fix GL deps (bz 1325966) 2016-04-14 18:34:08 -04:00
Cole Robinson a503b12a16 Add sources 2016-04-07 13:03:15 -04:00
Cole Robinson 4097206ab3 Rebased to version 2.6.0-rc1 2016-04-07 13:00:29 -04:00
Cole Robinson 54cb1301c6 CVE-2016-2857: net: out of bounds read (bz #1309564)
CVE-2016-2392: usb: null pointer dereference (bz #1307115)
2016-03-17 13:45:47 -04:00
Peter Robinson ae11374147 Rebuild for tcmalloc ifunc issues on non x86 arches (see rhbz 1312462) 2016-03-09 15:12:12 +00:00
Paolo Bonzini 43821749cc Disable xfsctl, fallocate works fine in newer kernels (bz #1305512) 2016-03-01 13:14:39 +01:00
Peter Robinson 73731f9ecd All Fedora arches have libseccomp support (ARMv7, aarch64, Power64, s390(x)) 2016-03-01 11:46:16 +00:00
Cole Robinson 7d975d9810 CVE-2015-8619: Fix sendkey out of bounds (bz #1292757)
CVE-2016-1981: infinite loop in e1000 (bz #1299995)
Fix Out-of-bounds read in usb-ehci (bz #1300234, bz #1299455)
CVE-2016-2197: ahci: null pointer dereference (bz #1302952)
Fix gdbstub for VSX registers for ppc64 (bz #1304377)
Fix qemu-img vmdk images to work with VMware (bz #1299185)
2016-02-15 17:05:41 -05:00
Fedora Release Engineering 95a588650f - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-04 21:38:06 +00:00
Cole Robinson b24b7f1644 CVE-2015-8567: net: vmxnet3: host memory leakage (bz #1289818)
CVE-2016-1922: i386: avoid null pointer dereference (bz #1292766)
CVE-2015-8613: buffer overflow in megasas_ctrl_get_info (bz #1284008)
CVE-2015-8701: Buffer overflow in tx_consume in rocker.c (bz #1293720)
CVE-2015-8743: ne2000: OOB memory access in ioport r/w functions (bz #1294787)
CVE-2016-1568: Use-after-free vulnerability in ahci (bz #1297023)
Fix modules.d/kvm.conf example syntax (bz #1298823)
2016-01-20 20:17:04 -05:00
Cole Robinson 78f4db5d1d Fix virtio 9p thread pool usage
CVE-2015-8558: DoS by infinite loop in ehci_advance_state (bz #1291309)
Re-add dist tag
2016-01-09 12:35:08 -05:00
Cole Robinson 2a77992272 spec: Re-add dist tag 2016-01-09 11:18:17 -05:00
Cole Robinson e8a6e4f833 Replace %define usage with %global 2016-01-09 11:16:52 -05:00
Paolo Bonzini 205399c1ee add missing file 2016-01-07 21:13:32 +01:00
Paolo Bonzini c9396159e8 oops, it is now 2016 2016-01-07 21:07:39 +01:00
Paolo Bonzini 15489f4108 fix previous commit 2016-01-07 21:04:45 +01:00
Paolo Bonzini 0d5e9f6618 add 0001-virtio-9p-use-accessor-to-get-thread-pool.patch 2016-01-07 20:57:53 +01:00
Paolo Bonzini dda6c386a5 add /etc/modprobe.d/kvm.conf 2016-01-07 20:57:53 +01:00
Cole Robinson 6176f1d7e2 Reabsed to version 2.5.0 2015-12-23 17:49:55 -05:00
Cole Robinson 89aacd5f7a Rebased to version 2.5.0-rc3 2015-12-08 10:29:09 -05:00
Cole Robinson 6baf84acf1 Rebased to version 2.5.0-rc2 2015-11-30 18:00:49 -05:00
Cole Robinson 191c302918 qemu 2.5.0 rc1 2015-11-20 22:24:11 -05:00
Cole Robinson 7bf1a680e6 Drop needless ksm dep on qemu-common 2015-11-20 21:04:54 -05:00
Cole Robinson 48e07c5c6e spec: code movement for clarity
- Order packages consistently across sections
- Group all %post sections
2015-11-18 10:28:10 -05:00
Cole Robinson 88b3793f29 2.5.0 rc0 wip 2015-11-18 10:20:33 -05:00
Cole Robinson 4f68392c26 Rebased to version 2.4.1 2015-11-04 15:48:36 -05:00
Cole Robinson 86d7b9f29b Rebuild for xen 4.6 2015-10-11 16:08:44 -04:00
Cole Robinson b448bfad34 Rebased to version 2.4.0.1
CVE-2015-7295: virtio-net possible remote DoS (bz #1264393)
drive-mirror: Fix coroutine reentrance (bz #1266936)
2015-10-08 13:38:49 -04:00
Cole Robinson 1ae1f09f33 spec: Fix builddep on libepoxy 2015-09-29 17:09:48 -04:00
Cole Robinson cf8819083b CVE-2015-6815: net: e1000: infinite loop issue (bz #1260225)
CVE-2015-6855: ide: divide by zero issue (bz #1261793)
CVE-2015-5278: Infinite loop in ne2000_receive() (bz #1263284)
CVE-2015-5279: Heap overflow vulnerability in ne2000_receive() (bz #1263287)
2015-09-21 18:01:46 -04:00
Richard W.M. Jones c5e57685f9 Fix emulation of various instructions, required by libm in F22 ppc64 guests. 2015-09-20 10:23:16 +01:00
Cole Robinson 8211390ac8 CVE-2015-5255: heap memory corruption in vnc_refresh_server_surface (bz #1255899) 2015-08-31 20:18:31 -04:00
Cole Robinson 74717053dc Rebased to version 2.4.0
Support for virtio-gpu, 2D only
Support for virtio-based keyboard/mouse/tablet emulation
x86 support for memory hot-unplug
ACPI v5.1 table support for 'virt' board
2015-08-11 18:08:40 -04:00
Cole Robinson d5417f465c Drop perl-Storable requires, texinfo rawhide is fixed now 2015-08-10 10:31:45 -04:00
Cole Robinson 6ac2a80eae Add temporary dep on perl-Storable
see https://bugzilla.redhat.com/show_bug.cgi?id=1251766 for more info
2015-08-09 15:07:58 -04:00
Cole Robinson 6214bfdcf3 Add sources 2015-08-09 13:13:43 -04:00
Cole Robinson 4c6dc5b3d6 CVE-2015-3209: pcnet: multi-tmd buffer overflow in the tx path (bz #1230536)
CVE-2015-3214: i8254: out-of-bounds memory access (bz #1243728)
CVE-2015-5158: scsi stack buffer overflow (bz #1246025)
CVE-2015-5154: ide: atapi: heap overflow during I/O buffer memory access (bz #1247141)
CVE-2015-5165: rtl8139 uninitialized heap memory information leakage to guest (bz #1249755)
CVE-2015-5166: BlockBackend object use after free issue (bz #1249758)
CVE-2015-5745: buffer overflow in virtio-serial (bz #1251160)
2015-08-09 13:08:31 -04:00
Cole Robinson de4550957e Rebased to v2.4.0-rc0 2015-07-14 17:12:37 -04:00
Richard W.M. Jones 61ce511be4 Bump and rebuild. 2015-07-03 19:23:12 +01:00
Richard W.M. Jones 74ab99f1a6 Revert "Enable -fPIC and -fPIE on every architecture (rhbz 1232499)."
This reverts commit 77b7d81b2b.

See https://bugzilla.redhat.com/show_bug.cgi?id=1232499#36
2015-07-03 19:20:51 +01:00
Richard W.M. Jones 77b7d81b2b Enable -fPIC and -fPIE on every architecture (rhbz 1232499). 2015-07-03 18:45:22 +01:00
Daniel P. Berrange bcb37b2ec0 Fix conditional in previous commit 2015-07-03 17:22:51 +01:00
Daniel P. Berrange d4803feead Use explicit --(enable,disable)-spice args (rhbz #1239102) 2015-07-03 15:02:57 +01:00
Peter Robinson 1ec8e52bb2 Build aarch64 with -fPIC (rhbz 1232499) 2015-07-02 16:32:23 +01:00
Peter Robinson 806ecbe49c Disable stack protection for AArch64. F23's GCC thinks that it is available but F23's glibc does not support it. 2015-07-01 11:26:59 +01:00
Paolo Bonzini 749c3c43c3 Rebuild for libiscsi soname bump 2015-06-26 11:10:12 +02:00
Paolo Bonzini 260c0ac680 Re-enable tcmalloc on arm 2015-06-19 12:03:04 +02:00
Dennis Gilmore 6626651b28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-18 21:39:31 +00:00
Dan Horák 94a40ce774 - gperftools not available on s390(x) 2015-06-10 22:28:01 +02:00
Cole Robinson 6fc6504bd8 CVE-2015-4037: insecure temporary file use in /net/slirp.c (bz #1222894) 2015-06-05 19:55:57 -04:00
Cole Robinson d43799b0b3 spec: Drop now unused kvm_target and kvm_archs globals 2015-06-05 18:21:57 -04:00
Daniel P. Berrange 7bf3158612 Fix conditional enablement of tcmalloc
Opps, cant have comments in the middle of multi-line continuations.
2015-06-01 14:43:36 +01:00
Daniel P. Berrange aa972b9106 Disable broken tcmalloc on arm and re-enable tests 2015-06-01 14:12:15 +01:00
Cole Robinson 198e142c7d Disable _all_ tests on arm, since they are all currently hanging 2015-05-21 14:07:03 -04:00
Cole Robinson 31085aa400 Temporarily disable hanging test on arm 2015-05-20 16:51:14 -04:00
Cole Robinson 7c5a423647 Remove %autopatch macro from changelog 2015-05-13 23:15:28 -04:00
Cole Robinson 18eddd1631 Backport upstream 2.4 patch to link with tcmalloc, enable it
CVE-2015-3456: (VENOM) fdc: out-of-bounds fifo buffer memory access (bz #1221152)
2015-05-13 18:39:05 -04:00
Paolo Bonzini af53ec630c Backport upstream 2.4 patch to link with tcmalloc, enable it 2015-05-13 15:33:19 +02:00
poma 343c57952d Fix ksm.service (bz 1218814) 2015-05-06 12:52:09 -04:00
Dan Horák 5059f25c8e - Require libseccomp only when built with it 2015-05-05 17:03:52 +02:00
Cole Robinson 41aca9586f Rebased to version 2.3.0 GA
Another attempt at fixing default /dev/kvm permissions (bz 950436)
2015-04-27 13:33:41 -04:00
Cole Robinson b26fb5a551 qemu: Drop kvm.modules
Looked into this because recent packaging changes broke kvm.modules
installation, see https://bugzilla.redhat.com/show_bug.cgi?id=1212328

But nowadays this isn't even required I don't think. According to
comments here:

https://bugzilla.redhat.com/show_bug.cgi?id=963198

The reason for shipping it is missing devname:kvm for ppc and s390 kvm
modules. But those have been in upstream kernel.git since late 2013,
so it should be safe to drop entirely.
2015-04-16 09:11:00 -04:00
Cole Robinson 9b9ad7bb74 Rebased to version 2.3.0-rc3 2015-04-14 14:51:42 -04:00
Cole Robinson c61e67e86b Rebased to version 2.3.0-rc2
Don't install ksm services as executable (bz #1192720)
Skip hanging tests on s390 (bz #1206057)
CVE-2015-1779 vnc: insufficient resource limiting in VNC websockets decoder
(bz #1205051, bz #1199572)
2015-04-03 10:21:46 -04:00
Cole Robinson c2770435bf Big specfile cleanup
- Drop all the crazy kvmonly and separate_kvm bits
- Drop outdates conditionals
- Drop old style things like defattr and RPM_BUILD_ROOT
- Readability improvements
2015-03-27 17:08:26 -04:00
Cole Robinson 355b03ef5c Rebased to version 2.3.0-rc1 2015-03-25 08:48:20 -04:00
Cole Robinson 6a451ba509 Remove unused patches 2015-03-22 12:17:06 -04:00
Cole Robinson 8055ee2da9 Rebase to qemu-2.3.0-rc0 2015-03-22 11:06:24 -04:00
Richard W.M. Jones 5a454effcf Revert "- Enable seccomp on ARM (thanks: Peter Robinson)."
This reverts commit 76a74e853f.

The upstream (qemu) configure script hard-codes x86 & x86-64,
so you cannot enable seccomp on arm yet.
2015-02-17 15:07:06 +00:00
Richard W.M. Jones 76a74e853f - Enable seccomp on ARM (thanks: Peter Robinson). 2015-02-17 13:37:05 +00:00
Richard W.M. Jones 6c3741c276 - Add -fPIC flag to build to avoid
'relocation R_X86_64_PC32 against undefined symbol' errors.
- Add a hopefully temporary hack so that -fPIC is used to build
  NSS files in libcacard.
2015-02-17 13:35:59 +00:00
Richard W.M. Jones 391fb81c16 Add UEFI support for aarch64. 2015-02-04 15:54:41 +00:00
Daniel P. Berrange f287dc5662 Re-enable SPICE after previous build fixes circular dep 2015-02-03 14:05:24 +00:00
Daniel P. Berrange fc57f44566 Stop libcacard linking against the entire world 2015-02-03 11:36:06 +00:00
Daniel P. Berrange cad2bcb6a1 Temporarily disable SPICE to break circular build-dep on libcacard 2015-02-03 10:57:50 +00:00
Daniel P. Berrange 0716c2e68a Rebuild for changed xen soname 2015-02-03 09:25:11 +00:00
Daniel P. Berrange 10fa62ffc3 Set pkgversion when running configure 2015-01-28 13:25:27 +00:00
Cole Robinson c88cc7e403 Rebased to version 2.2.0 2014-12-09 16:25:38 -05:00
Cole Robinson bd7b20725b Add sources 2014-11-30 17:45:14 -05:00
Cole Robinson 1be48f0df6 Update to qemu-2.2.0-rc3 2014-11-30 17:19:56 -05:00
Cole Robinson 259393612c Update to qemu-2.2.0-rc1 2014-11-15 20:39:24 -05:00
Cole Robinson 725f84b743 CVE-2014-7815 vnc: insufficient bits_per_pixel from the client sanitization (bz #1157647, bz #1157641)
CVE-2014-3689 vmware_vga: insufficient parameter validation in rectangle functions (bz #1153038, bz #1153035)
2014-10-29 15:58:32 -04:00
Daniel P. Berrange 145f8dccfa Fix dep on numactl-devel to be build time not install time
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2014-10-24 16:38:01 +01:00
Cole Robinson fbbbab2c57 Fix PPC virtio regression (bz #1144490) 2014-10-06 12:32:22 -04:00
Dan Horák 215b584050 fix typo 2014-09-30 16:48:14 +02:00
Dan Horák 3a39bf78f1 add ppc64le to KVM arches 2014-09-30 16:46:25 +02:00
Cole Robinson 6c2b2d8a11 Fix date in changelog 2014-09-26 12:51:48 -04:00
Richard W.M. Jones 6ce0be8333 Add Requires seabios >= 1.7.5, otherwise Windows virtio booting does not work. 2014-09-26 16:56:20 +01:00
Cole Robinson 46f3a5c276 Rebased to version 2.1.2
CVE-2014-3640 qemu: slirp: NULL pointer (bz #1144821, bz #1144818)
2014-09-26 10:26:35 -04:00
Cole Robinson e84b901375 Fix crash on migration/snapshot (bz #1144490) 2014-09-21 12:42:19 -04:00
Ruben Kerkhof 2f5a0ef6e6 qemu: Fix building without usbredir
The comparison checks if have_usbredir is defined, which it always is.
Check if it's defined and set to 1 instead.
2014-09-15 10:51:00 +01:00
Cole Robinson 723d95470d Rebased to version 2.1.1
CVE-2014-5388: out of bounds memory access (bz #1132962, bz #1132956)
CVE-2014-3615 crash when guest sets high resolution (bz #1139121, bz #1139115)
2014-09-11 15:58:04 -04:00
Richard W.M. Jones 87bbaebdd6 Remember to update Release field this time. 2014-09-03 11:28:38 +01:00
Richard W.M. Jones f2a088a4af Add upstream patches to:
* Fix crash in curl driver.
  * Add curl timeout option.
  * Add curl cookie option.

- Add upstream commit hashes to patches.
2014-09-03 11:27:07 +01:00
Alexey Kardashevskiy d92cc55200 ppc64: Enable HV and PR KVM
Unlike other platforms, PPC64 supports 2 types of KVM:
1. PR KVM emulated in user space - works on every PPC64 platform, even on
old POWERMAC; does not require hypervisor-enabled host CPU (POWER5+ and
newer); does not require OPAL;

2. HV KVM - this requires hypervisor-enabled CPU and OPAL - i.e. recent
POWER7/8 CPUs running as a "powernv" platform only.

So PPC64 KVM is split into 3 kernel modules - kvm_pr, kvm_hv and kvm,
the latter contains bits of code common for both types of KVM.

Recent QEMU supports a "kvm-type" machine option and can instantiate
the requested type of KVM.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2014-08-27 10:57:47 +01:00
Richard W.M. Jones e144c654aa Forgot to update Release field ... 2014-08-20 22:35:42 +01:00
Richard W.M. Jones 4ced99fb02 Add patch for aarch64 which uncompresses -kernel parameter (in arm.next). 2014-08-20 22:28:16 +01:00
Dan Horák 592e6889a5 - Don't fail build due failing tests on s390 (#1100971) 2014-08-19 08:36:38 +02:00
Peter Robinson bc6fc976b4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-17 22:22:32 +00:00
Richard W.M. Jones a6c45000fe Drop optimization flags when compiling on aarch64 (see RHBZ#1126199). 2014-08-03 14:17:35 +01:00
Richard W.M. Jones bcd9d80d1a Update to qemu 2.1.0 final released version. 2014-08-03 13:27:19 +01:00
Cole Robinson cc110b43ed Update to qemu-2.1.0-rc3 2014-07-25 15:02:38 -04:00
Cole Robinson 3561d33ea5 Update to qemu 2.1.0-rc2 2014-07-16 13:05:09 -04:00
Peter Robinson d35cbd0d7e Build qemu-system-aarch64 on all arches, Run check on ARM arches, just don't fail the build ATM 2014-07-15 17:46:17 +01:00
Cole Robinson 4773d3c9c6 Add sources 2014-07-09 12:06:16 -04:00
Cole Robinson b440863c6b Update to qemu-2.1.0-rc1
Enable SDL2 frontend, it's improved recently
Fix drive-mirror segfaults if source size is not cluster-aligned (bz #1114791)
Fix crash with virtio-blk hotunplug (bz #1117181)
2014-07-09 11:53:36 -04:00
Cole Robinson ad339ad339 Update to qemu 2.1-rc0 2014-07-04 15:08:59 -04:00
Cole Robinson 0410ae29c0 Don't use libtool on dtrace, fixes rawhide build (bz #1106968) 2014-06-15 17:58:34 -04:00
Dennis Gilmore 200da9cdce - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 20:00:11 -05:00
Cole Robinson 12cd546161 QCOW1 validation CVEs: CVE-2014-0222, CVE-2014-0223 (bz #1097232, bz #1097238, bz #1097222, bz #1097216)
CVE-2014-3461: Issues in USB post load checks (bz #1097260, bz #1096821)
2014-05-31 20:49:56 -04:00
Dan Horák 660494c491 - Disable tests on s390 (#1100971) 2014-05-24 19:47:47 +02:00
Cole Robinson 70114f9e56 Migration CVEs: CVE-2014-0182 etc. 2014-05-11 19:07:44 -04:00
Peter Robinson 5461c5246c Fix aarch64 build by adding aarch64 to kvm_archs 2014-04-30 22:17:24 +01:00
Cole Robinson 762d9e1463 Re-enable test suite on arm, works with a scratch build now 2014-04-26 13:46:26 -04:00
Cole Robinson 21cd6fac34 Don't use SDL2 API support, it's incomplete
Build qemu-system-aarch64 only on aarch64 for now
2014-04-21 20:35:15 -04:00
Cole Robinson 269942c0fd Update to 2.0.0 GA 2014-04-17 12:25:50 -04:00
Cole Robinson f03d6d0588 Sigh, fix %setup 2014-04-15 12:33:04 -04:00
Cole Robinson 7ce01f8f81 Add sources 2014-04-15 12:11:31 -04:00
Cole Robinson 17908043da Update to qemu 2.0-rc3
Fix crash when restoring from snapshot (bz #1085632)
2014-04-15 11:37:22 -04:00
Cole Robinson 75f0c8715a Change gtk quit accelerator to ctrl+shift+q (bz #1062393)
Fix mouse with spice
Enable xen support for xen 4.4
2014-03-24 13:20:43 -04:00
Cole Robinson 1560ff70e8 spec: Disable check on arm just to get the build out 2014-03-24 13:16:27 -04:00
Cole Robinson 3400e70a32 Enable xen support for xen 4.4 2014-03-24 09:15:34 -04:00
Cole Robinson ac843bf3ce Update to qemu 2.0 rc0 2014-03-18 14:25:31 -04:00
Richard W.M. Jones 755ac92dbf Better to quote the argument to test. 2014-02-18 17:10:08 +00:00
Richard W.M. Jones 5b4ee6cf96 Run qemu-sanity-check on x86 and armv7 too. The results are still only advisory. 2014-02-18 11:42:46 -05:00
Richard W.M. Jones aa1e9b6b3f Disable make check on aarch64. 2014-01-13 10:12:15 +00:00
Cole Robinson e65bbe3b55 spec: Fix some --without conditionals (bz 1048476) 2014-01-06 12:35:34 -05:00
Ville Skyttä c4896d008b Add libcacard ldconfig %post* scriptlets. 2013-12-21 20:30:28 +02:00
Cole Robinson c4025101e7 Add kill() to seccomp whitelist, fix AC97 with -sandbox on (bz #1043521)
Changing streaming mode default to off for spice (bz #1038336)
Fix guest scsi verify command (bz #1001617)
2013-12-18 12:11:24 -05:00
Cole Robinson cba9c935f9 Update qemu-img patch to latest available upstream version 2013-12-04 18:14:53 -05:00
Cole Robinson cf5f9d239e Clarify chrpath comment 2013-12-04 18:13:23 -05:00
Cole Robinson 46c39e954f Actually missing files 2013-12-03 06:55:15 -05:00
Cole Robinson bacd9b0468 Fix qemu-img create with NBD backing file (bz #1034433)
Rebase to qemu-1.7 GA
New monitor command blockdev-add for full featured block device hotplug.
Performance and functionality improvements for USB 3.0.
Many VFIO improvements
ACPI tables can be generated by QEMU and can be used by firmware directly.
Support creating and writing .vhdx images.
qemu-img map: dump detailed image file metadata
2013-12-03 06:36:52 -05:00
Richard W.M. Jones dd16baaeb5 Run chrpath on binaries, so qemu can be built using rpmbuild. 2013-11-29 13:36:26 +00:00
Cole Robinson 45bdef1ab0 Update to qemu-1.7.0-rc1 2013-11-21 16:20:05 -05:00
40 changed files with 1817 additions and 5397 deletions

30
.gitignore vendored
View File

@ -1,26 +1,4 @@
qemu-kvm-0.13.0-b81fe95.tar.gz
qemu-kvm-0.13.0-25fdf4a.tar.gz
/qemu-kvm-0.13.0-rc1.tar.gz
/qemu-kvm-0.13.0.tar.gz
/qemu-kvm-0.14.0-3593e6b.tar.gz
/qemu-kvm-0.14.0-7aa8c46.tar.gz
/qemu-kvm-0.15.0-525e3df.tar.gz
/qemu-kvm-0.15.0-fda1906.tar.gz
/qemu-kvm-0.15.0-59fadcc.tar.gz
/qemu-kvm-0.15.0-0af4922.tar.gz
/qemu-kvm-0.15.0.tar.gz
/qemu-kvm-0.15.1.tar.gz
/qemu-kvm-1.1.0.tar.gz
/qemu-kvm-1.1.1.tar.gz
/qemu-1.2-0.1.20120806git3e430569.fc18.src.rpm
/qemu-kvm-1.2-3e430569.tar.gz
/qemu-kvm-1.2.0-rc1.tar.gz
/qemu-kvm-1.2.0.tar.gz
/qemu-1.3.0.tar.bz2
/qemu-1.4.0.tar.bz2
/qemu-1.4.1.tar.bz2
/qemu-1.5.0.tar.bz2
/qemu-1.5.1.tar.bz2
/qemu-1.5.2.tar.bz2
/qemu-1.6.0.tar.bz2
/qemu-1.6.1.tar.bz2
/.build*.log
/x86_64/
/*.src.rpm
/qemu-*.tar.xz

View File

@ -1,212 +0,0 @@
From 2196426a9b081cb99f4bdefb854aaa206bdd0392 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Fri, 16 Aug 2013 12:14:51 -0400
Subject: [PATCH] Fix migration from qemu-kvm
Details are in the code comments for each change. Just lumped this together
to ease patch maintenance.
Everything except the video memory bits can likely be dropped by Fedora 21
time frame. Need to figure out if there's anything to upstream for the
video memory bits.
---
hw/acpi/piix4.c | 8 ++++++-
hw/display/qxl.c | 9 ++++----
hw/i386/pc_piix.c | 61 +++++++++++++++++++++++++++++++++++++++++++++----
hw/timer/i8254_common.c | 7 +++++-
4 files changed, 74 insertions(+), 11 deletions(-)
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 3aaf18c..6fbe57c 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -289,7 +289,13 @@ static int acpi_load_old(QEMUFile *f, void *opaque, int version_id)
static const VMStateDescription vmstate_acpi = {
.name = "piix4_pm",
.version_id = 3,
- .minimum_version_id = 3,
+ /*
+ * qemu-kvm 1.2 uses qemu.git version 3 format, but advertised as 2.
+ * This allows incoming migration from qemu-kvm, but breaks incoming
+ * migration from qemu < 1.3.
+ */
+ //minimum_version_id = 3,
+ .minimum_version_id = 2,
.minimum_version_id_old = 1,
.load_state_old = acpi_load_old,
.post_load = vmstate_acpi_post_load,
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index c537057..7ef3eff 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -307,16 +307,14 @@ static inline uint32_t msb_mask(uint32_t val)
return mask;
}
-static ram_addr_t qxl_rom_size(void)
+static void check_qxl_rom_size(PCIQXLDevice *d)
{
uint32_t required_rom_size = sizeof(QXLRom) + sizeof(QXLModes) +
sizeof(qxl_modes);
- uint32_t rom_size = 8192; /* two pages */
required_rom_size = MAX(required_rom_size, TARGET_PAGE_SIZE);
required_rom_size = msb_mask(required_rom_size * 2 - 1);
- assert(required_rom_size <= rom_size);
- return rom_size;
+ assert(required_rom_size <= d->rom_size);
}
static void init_qxl_rom(PCIQXLDevice *d)
@@ -1981,7 +1979,7 @@ static int qxl_init_common(PCIQXLDevice *qxl)
pci_set_byte(&config[PCI_REVISION_ID], pci_device_rev);
pci_set_byte(&config[PCI_INTERRUPT_PIN], 1);
- qxl->rom_size = qxl_rom_size();
+ check_qxl_rom_size(qxl);
memory_region_init_ram(&qxl->rom_bar, OBJECT(qxl), "qxl.vrom",
qxl->rom_size);
vmstate_register_ram(&qxl->rom_bar, &qxl->pci.qdev);
@@ -2309,6 +2307,7 @@ static Property qxl_properties[] = {
DEFINE_PROP_UINT32("vram64_size_mb", PCIQXLDevice, vram_size_mb, -1),
DEFINE_PROP_UINT32("vgamem_mb", PCIQXLDevice, vgamem_size_mb, 16),
DEFINE_PROP_INT32("surfaces", PCIQXLDevice, ssd.num_surfaces, 1024),
+ DEFINE_PROP_UINT32("rom_size", PCIQXLDevice, rom_size, 8192),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 3df2ff9..28216ee 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -377,6 +377,24 @@ static QEMUMachine pc_i440fx_machine_v1_4 = {
DEFAULT_MACHINE_OPTIONS,
};
+/*
+ * Commit 038c1879a00153b14bce113315b693e8c2944fa9 changed the qxl rom
+ * size to 8192, which fixes incoming migration from qemu 1.0. However
+ * from qemu 1.2 and 1.3 had rom size 16384, so incoming migration
+ * from those versions is now broken.
+ *
+ * Add a rom_size compat property. 1.2 and 1.3 get 16384, everything
+ * else is 8192.
+ *
+ * This isn't actually fool proof, since rom_size can be dependent on
+ * the version of spice qemu is built against:
+ *
+ * https://lists.gnu.org/archive/html/qemu-devel/2013-02/msg03154.html
+ *
+ * However these sizes match what native Fedora packages get, so it's
+ * good enough for now.
+ */
+
#define PC_COMPAT_1_3 \
PC_COMPAT_1_4, \
{\
@@ -395,8 +413,17 @@ static QEMUMachine pc_i440fx_machine_v1_4 = {
.driver = "e1000",\
.property = "autonegotiation",\
.value = "off",\
+ },{ \
+ .driver = "qxl", \
+ .property = "rom_size", \
+ .value = stringify(16384), \
+ },{\
+ .driver = "qxl-vga", \
+ .property = "rom_size", \
+ .value = stringify(16384), \
}
+
static QEMUMachine pc_machine_v1_3 = {
.name = "pc-1.3",
.desc = "Standard PC",
@@ -409,6 +436,19 @@ static QEMUMachine pc_machine_v1_3 = {
DEFAULT_MACHINE_OPTIONS,
};
+
+/*
+ * https://lists.gnu.org/archive/html/qemu-devel/2013-01/msg02540.html
+ *
+ * qemu-kvm defaulted to vgamem=16MB since at least 0.15, while qemu used
+ * 8MB. For qemu 1.2, the default was changed to 16MB for all devices
+ * except cirrus.
+ *
+ * Make sure cirrus uses 16MB for <= pc-1.2 (the qemu-kvm merge),
+ * and 16MB always for all others. This will break incoming qemu
+ * migration for qemu < 1.3.
+ */
+
#define PC_COMPAT_1_2 \
PC_COMPAT_1_3,\
{\
@@ -432,6 +472,10 @@ static QEMUMachine pc_machine_v1_3 = {
.property = "revision",\
.value = stringify(3),\
},{\
+ .driver = "cirrus-vga",\
+ .property = "vgamem_mb",\
+ .value = stringify(16),\
+ },{\
.driver = "VGA",\
.property = "mmio",\
.value = "off",\
@@ -462,25 +506,34 @@ static QEMUMachine pc_machine_v1_2 = {
},{\
.driver = "VGA",\
.property = "vgamem_mb",\
- .value = stringify(8),\
+ .value = stringify(16),\
},{\
.driver = "vmware-svga",\
.property = "vgamem_mb",\
- .value = stringify(8),\
+ .value = stringify(16),\
},{\
.driver = "qxl-vga",\
.property = "vgamem_mb",\
- .value = stringify(8),\
+ .value = stringify(16),\
},{\
.driver = "qxl",\
.property = "vgamem_mb",\
- .value = stringify(8),\
+ .value = stringify(16),\
},{\
.driver = "virtio-blk-pci",\
.property = "config-wce",\
.value = "off",\
+ },{ \
+ .driver = "qxl", \
+ .property = "rom_size", \
+ .value = stringify(8192), \
+ },{\
+ .driver = "qxl-vga", \
+ .property = "rom_size", \
+ .value = stringify(8192), \
}
+
static QEMUMachine pc_machine_v1_1 = {
.name = "pc-1.1",
.desc = "Standard PC",
diff --git a/hw/timer/i8254_common.c b/hw/timer/i8254_common.c
index 4e5bf0b..cbc00a0 100644
--- a/hw/timer/i8254_common.c
+++ b/hw/timer/i8254_common.c
@@ -267,7 +267,12 @@ static const VMStateDescription vmstate_pit_common = {
.pre_save = pit_dispatch_pre_save,
.post_load = pit_dispatch_post_load,
.fields = (VMStateField[]) {
- VMSTATE_UINT32_V(channels[0].irq_disabled, PITCommonState, 3),
+ /* qemu-kvm version_id=2 had 'flags' here which is equivalent
+ * This fixes incoming migration from qemu-kvm 1.0, but breaks
+ * incoming migration from qemu < 1.1
+ */
+ //VMSTATE_UINT32_V(channels[0].irq_disabled, PITCommonState, 3),
+ VMSTATE_UINT32(channels[0].irq_disabled, PITCommonState),
VMSTATE_STRUCT_ARRAY(channels, PITCommonState, 3, 2,
vmstate_pit_channel, PITChannelState),
VMSTATE_INT64(channels[0].next_transition_time,

View File

@ -1,36 +0,0 @@
From 85a924af30f31a4f701ee6f18d84dd27aa02f47b Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Tue, 13 Aug 2013 00:02:18 +0200
Subject: [PATCH] isapc: disable kvmvapic
vapic requires the VAPIC ROM to be mapped into RAM. This is not
possible without PAM hardware. This fixes a segmentation fault
running with -M isapc.
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(crobinso: s/kvmvapic/vapic/g)
Signed-off-by: Cole Robinson <crobinso@redhat.com>
---
hw/i386/pc_piix.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 28216ee..2f2cb4d 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -795,7 +795,11 @@ static QEMUMachine isapc_machine = {
.init = pc_init_isa,
.max_cpus = 1,
.compat_props = (GlobalProperty[]) {
- { /* end of list */ }
+ {
+ .driver = "apic-common",
+ .property = "vapic",
+ .value = "off",
+ },
},
DEFAULT_MACHINE_OPTIONS,
};

View File

@ -1,72 +0,0 @@
From 07873f45017c04994496d8dc3f7acb60358bba49 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Thu, 2 May 2013 11:38:37 +0200
Subject: [PATCH] pci: do not export pci_bus_reset
qbus_reset_all can be used instead. There is no semantic change
because pcibus_reset returns 1 and takes care of the device
tree traversal.
This will be necessary once the traversal is done always in
qbus_reset_all *before* invoking pcibus_reset itself.
Tested-by: Claudio Bley <cbley@av-test.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/pci/pci.c | 8 ++------
hw/pci/pci_bridge.c | 2 +-
include/hw/pci/pci.h | 1 -
3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 4c004f5..0389375 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -210,8 +210,9 @@ void pci_device_reset(PCIDevice *dev)
* Trigger pci bus reset under a given bus.
* To be called on RST# assert.
*/
-void pci_bus_reset(PCIBus *bus)
+static int pcibus_reset(BusState *qbus)
{
+ PCIBus *bus = DO_UPCAST(PCIBus, qbus, qbus);
int i;
for (i = 0; i < bus->nirq; i++) {
@@ -222,11 +223,6 @@ void pci_bus_reset(PCIBus *bus)
pci_device_reset(bus->devices[i]);
}
}
-}
-
-static int pcibus_reset(BusState *qbus)
-{
- pci_bus_reset(DO_UPCAST(PCIBus, qbus, qbus));
/* topology traverse is done by pci_bus_reset().
Tell qbus/qdev walker not to traverse the tree */
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index a90671d..5d0e5ff 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -268,7 +268,7 @@ void pci_bridge_write_config(PCIDevice *d,
newctl = pci_get_word(d->config + PCI_BRIDGE_CONTROL);
if (~oldctl & newctl & PCI_BRIDGE_CTL_BUS_RESET) {
/* Trigger hot reset on 0->1 transition. */
- pci_bus_reset(&s->sec_bus);
+ qbus_reset_all(&s->sec_bus.qbus);
}
}
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index ccec2ba..32f1419 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -376,7 +376,6 @@ void pci_bus_fire_intx_routing_notifier(PCIBus *bus);
void pci_device_set_intx_routing_notifier(PCIDevice *dev,
PCIINTxRoutingNotifier notifier);
void pci_device_reset(PCIDevice *dev);
-void pci_bus_reset(PCIBus *bus);
PCIDevice *pci_nic_init(NICInfo *nd, PCIBus *rootbus,
const char *default_model,

View File

@ -1,141 +0,0 @@
From cf09bc533d82f2b16d1e9f4888c1afd977ca256d Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Thu, 2 May 2013 11:38:38 +0200
Subject: [PATCH] qdev: allow both pre- and post-order vists in qdev walking
functions
Resetting should be done in post-order, not pre-order. However,
qdev_walk_children and qbus_walk_children do not allow this. Fix
it by adding two extra arguments to the functions.
Tested-by: Claudio Bley <cbley@av-test.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/core/qdev.c | 45 +++++++++++++++++++++++++++++++++------------
include/hw/qdev-core.h | 13 +++++++++----
2 files changed, 42 insertions(+), 16 deletions(-)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 9190a7e..842804f 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -240,12 +240,12 @@ static int qbus_reset_one(BusState *bus, void *opaque)
void qdev_reset_all(DeviceState *dev)
{
- qdev_walk_children(dev, qdev_reset_one, qbus_reset_one, NULL);
+ qdev_walk_children(dev, qdev_reset_one, qbus_reset_one, NULL, NULL, NULL);
}
void qbus_reset_all(BusState *bus)
{
- qbus_walk_children(bus, qdev_reset_one, qbus_reset_one, NULL);
+ qbus_walk_children(bus, qdev_reset_one, qbus_reset_one, NULL, NULL, NULL);
}
void qbus_reset_all_fn(void *opaque)
@@ -343,49 +343,70 @@ BusState *qdev_get_child_bus(DeviceState *dev, const char *name)
return NULL;
}
-int qbus_walk_children(BusState *bus, qdev_walkerfn *devfn,
- qbus_walkerfn *busfn, void *opaque)
+int qbus_walk_children(BusState *bus,
+ qdev_walkerfn *pre_devfn, qbus_walkerfn *pre_busfn,
+ qdev_walkerfn *post_devfn, qbus_walkerfn *post_busfn,
+ void *opaque)
{
BusChild *kid;
int err;
- if (busfn) {
- err = busfn(bus, opaque);
+ if (pre_busfn) {
+ err = pre_busfn(bus, opaque);
if (err) {
return err;
}
}
QTAILQ_FOREACH(kid, &bus->children, sibling) {
- err = qdev_walk_children(kid->child, devfn, busfn, opaque);
+ err = qdev_walk_children(kid->child,
+ pre_devfn, pre_busfn,
+ post_devfn, post_busfn, opaque);
if (err < 0) {
return err;
}
}
+ if (post_busfn) {
+ err = post_busfn(bus, opaque);
+ if (err) {
+ return err;
+ }
+ }
+
return 0;
}
-int qdev_walk_children(DeviceState *dev, qdev_walkerfn *devfn,
- qbus_walkerfn *busfn, void *opaque)
+int qdev_walk_children(DeviceState *dev,
+ qdev_walkerfn *pre_devfn, qbus_walkerfn *pre_busfn,
+ qdev_walkerfn *post_devfn, qbus_walkerfn *post_busfn,
+ void *opaque)
{
BusState *bus;
int err;
- if (devfn) {
- err = devfn(dev, opaque);
+ if (pre_devfn) {
+ err = pre_devfn(dev, opaque);
if (err) {
return err;
}
}
QLIST_FOREACH(bus, &dev->child_bus, sibling) {
- err = qbus_walk_children(bus, devfn, busfn, opaque);
+ err = qbus_walk_children(bus, pre_devfn, pre_busfn,
+ post_devfn, post_busfn, opaque);
if (err < 0) {
return err;
}
}
+ if (post_devfn) {
+ err = post_devfn(dev, opaque);
+ if (err) {
+ return err;
+ }
+ }
+
return 0;
}
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index 46972f4..c6c9b14 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -270,10 +270,15 @@ BusState *qbus_create(const char *typename, DeviceState *parent, const char *nam
/* Returns > 0 if either devfn or busfn skip walk somewhere in cursion,
* < 0 if either devfn or busfn terminate walk somewhere in cursion,
* 0 otherwise. */
-int qbus_walk_children(BusState *bus, qdev_walkerfn *devfn,
- qbus_walkerfn *busfn, void *opaque);
-int qdev_walk_children(DeviceState *dev, qdev_walkerfn *devfn,
- qbus_walkerfn *busfn, void *opaque);
+int qbus_walk_children(BusState *bus,
+ qdev_walkerfn *pre_devfn, qbus_walkerfn *pre_busfn,
+ qdev_walkerfn *post_devfn, qbus_walkerfn *post_busfn,
+ void *opaque);
+int qdev_walk_children(DeviceState *dev,
+ qdev_walkerfn *pre_devfn, qbus_walkerfn *pre_busfn,
+ qdev_walkerfn *post_devfn, qbus_walkerfn *post_busfn,
+ void *opaque);
+
void qdev_reset_all(DeviceState *dev);
/**

View File

@ -1,143 +0,0 @@
From 41a2077cea8ce006dbef885bcb0778af05a0b159 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Thu, 2 May 2013 11:38:39 +0200
Subject: [PATCH] qdev: switch reset to post-order
Post-order is the only sensible direction for the reset signals.
For example, suppose pre-order is used and the parent has some data
structures that cache children state (for example a list of active
requests). When the reset method is invoked on the parent, these caches
could be in any state.
If post-order is used, on the other hand, these will be in a known state
when the reset method is invoked on the parent.
This change means that it is no longer possible to block the visit of
the devices, so the callback is changed to return void. This is not
a problem, because PCI was returning 1 exactly in order to achieve the
same ordering that this patch implements.
PCI can then rely on the qdev core having sent a "reset signal"
(whatever that means) to the device, and only do the PCI-specific
initialization with the new function pci_do_device_reset, extracted
from pci_device_reset. There is no change in the operation of FLR,
which used and still uses pci_device_reset.
Tested-by: Claudio Bley <cbley@av-test.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/core/qdev.c | 6 +++---
hw/pci/pci.c | 31 ++++++++++++++++---------------
include/hw/qdev-core.h | 2 +-
3 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 842804f..87d7e1e 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -233,19 +233,19 @@ static int qbus_reset_one(BusState *bus, void *opaque)
{
BusClass *bc = BUS_GET_CLASS(bus);
if (bc->reset) {
- return bc->reset(bus);
+ bc->reset(bus);
}
return 0;
}
void qdev_reset_all(DeviceState *dev)
{
- qdev_walk_children(dev, qdev_reset_one, qbus_reset_one, NULL, NULL, NULL);
+ qdev_walk_children(dev, NULL, NULL, qdev_reset_one, qbus_reset_one, NULL);
}
void qbus_reset_all(BusState *bus)
{
- qbus_walk_children(bus, qdev_reset_one, qbus_reset_one, NULL, NULL, NULL);
+ qbus_walk_children(bus, NULL, NULL, qdev_reset_one, qbus_reset_one, NULL);
}
void qbus_reset_all_fn(void *opaque)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 0389375..bbca696 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -46,7 +46,7 @@
static void pcibus_dev_print(Monitor *mon, DeviceState *dev, int indent);
static char *pcibus_get_dev_path(DeviceState *dev);
static char *pcibus_get_fw_dev_path(DeviceState *dev);
-static int pcibus_reset(BusState *qbus);
+static void pcibus_reset(BusState *qbus);
static Property pci_props[] = {
DEFINE_PROP_PCI_DEVFN("addr", PCIDevice, devfn, -1),
@@ -165,16 +165,10 @@ void pci_device_deassert_intx(PCIDevice *dev)
}
}
-/*
- * This function is called on #RST and FLR.
- * FLR if PCI_EXP_DEVCTL_BCR_FLR is set
- */
-void pci_device_reset(PCIDevice *dev)
+static void pci_do_device_reset(PCIDevice *dev)
{
int r;
- qdev_reset_all(&dev->qdev);
-
dev->irq_state = 0;
pci_update_irq_status(dev);
pci_device_deassert_intx(dev);
@@ -207,10 +201,21 @@ void pci_device_reset(PCIDevice *dev)
}
/*
+ * This function is called on #RST and FLR.
+ * FLR if PCI_EXP_DEVCTL_BCR_FLR is set
+ */
+void pci_device_reset(PCIDevice *dev)
+{
+ qdev_reset_all(&dev->qdev);
+ pci_do_device_reset(dev);
+}
+
+/*
* Trigger pci bus reset under a given bus.
- * To be called on RST# assert.
+ * Called via qbus_reset_all on RST# assert, after the devices
+ * have been reset qdev_reset_all-ed already.
*/
-static int pcibus_reset(BusState *qbus)
+static void pcibus_reset(BusState *qbus)
{
PCIBus *bus = DO_UPCAST(PCIBus, qbus, qbus);
int i;
@@ -220,13 +225,9 @@ static int pcibus_reset(BusState *qbus)
}
for (i = 0; i < ARRAY_SIZE(bus->devices); ++i) {
if (bus->devices[i]) {
- pci_device_reset(bus->devices[i]);
+ pci_do_device_reset(bus->devices[i]);
}
}
-
- /* topology traverse is done by pci_bus_reset().
- Tell qbus/qdev walker not to traverse the tree */
- return 1;
}
static void pci_host_bus_register(PCIBus *bus, DeviceState *parent)
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index c6c9b14..89dcbad 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -174,7 +174,7 @@ struct BusClass {
* bindings can be found at http://playground.sun.com/1275/bindings/.
*/
char *(*get_fw_dev_path)(DeviceState *dev);
- int (*reset)(BusState *bus);
+ void (*reset)(BusState *bus);
/* maximum devices allowed on the bus, 0: no limit. */
int max_dev;
};

View File

@ -1,251 +0,0 @@
From ed35f9edcc420b4f8c1f909bc7cfb002a54f437b Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri, 20 Sep 2013 16:57:50 +0200
Subject: [PATCH] virtio-bus: remove vdev field
The vdev field is complicated to synchronize. Just access the
BusState's list of children.
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/virtio/virtio-bus.c | 67 ++++++++++++++++++++++++------------------
hw/virtio/virtio-mmio.c | 9 +++---
hw/virtio/virtio-pci.c | 2 +-
include/hw/virtio/virtio-bus.h | 16 +++++++---
4 files changed, 57 insertions(+), 37 deletions(-)
diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c
index 6849a01..669ce38 100644
--- a/hw/virtio/virtio-bus.c
+++ b/hw/virtio/virtio-bus.c
@@ -46,8 +46,6 @@ int virtio_bus_plug_device(VirtIODevice *vdev)
VirtioBusClass *klass = VIRTIO_BUS_GET_CLASS(bus);
DPRINTF("%s: plug device.\n", qbus->name);
- bus->vdev = vdev;
-
if (klass->device_plugged != NULL) {
klass->device_plugged(qbus->parent);
}
@@ -58,75 +56,84 @@ int virtio_bus_plug_device(VirtIODevice *vdev)
/* Reset the virtio_bus */
void virtio_bus_reset(VirtioBusState *bus)
{
+ VirtIODevice *vdev = virtio_bus_get_device(bus);
+
DPRINTF("%s: reset device.\n", qbus->name);
- if (bus->vdev != NULL) {
- virtio_reset(bus->vdev);
+ if (vdev != NULL) {
+ virtio_reset(vdev);
}
}
/* Destroy the VirtIODevice */
void virtio_bus_destroy_device(VirtioBusState *bus)
{
- DeviceState *qdev;
BusState *qbus = BUS(bus);
VirtioBusClass *klass = VIRTIO_BUS_GET_CLASS(bus);
+ VirtIODevice *vdev = virtio_bus_get_device(bus);
+
DPRINTF("%s: remove device.\n", qbus->name);
- if (bus->vdev != NULL) {
+ if (vdev != NULL) {
if (klass->device_unplug != NULL) {
klass->device_unplug(qbus->parent);
}
- qdev = DEVICE(bus->vdev);
- qdev_free(qdev);
- bus->vdev = NULL;
+ qdev_free(DEVICE(vdev));
}
}
/* Get the device id of the plugged device. */
uint16_t virtio_bus_get_vdev_id(VirtioBusState *bus)
{
- assert(bus->vdev != NULL);
- return bus->vdev->device_id;
+ VirtIODevice *vdev = virtio_bus_get_device(bus);
+ assert(vdev != NULL);
+ return vdev->device_id;
}
/* Get the config_len field of the plugged device. */
size_t virtio_bus_get_vdev_config_len(VirtioBusState *bus)
{
- assert(bus->vdev != NULL);
- return bus->vdev->config_len;
+ VirtIODevice *vdev = virtio_bus_get_device(bus);
+ assert(vdev != NULL);
+ return vdev->config_len;
}
/* Get the features of the plugged device. */
uint32_t virtio_bus_get_vdev_features(VirtioBusState *bus,
uint32_t requested_features)
{
+ VirtIODevice *vdev = virtio_bus_get_device(bus);
VirtioDeviceClass *k;
- assert(bus->vdev != NULL);
- k = VIRTIO_DEVICE_GET_CLASS(bus->vdev);
+
+ assert(vdev != NULL);
+ k = VIRTIO_DEVICE_GET_CLASS(vdev);
assert(k->get_features != NULL);
- return k->get_features(bus->vdev, requested_features);
+ return k->get_features(vdev, requested_features);
}
/* Set the features of the plugged device. */
void virtio_bus_set_vdev_features(VirtioBusState *bus,
uint32_t requested_features)
{
+ VirtIODevice *vdev = virtio_bus_get_device(bus);
VirtioDeviceClass *k;
- assert(bus->vdev != NULL);
- k = VIRTIO_DEVICE_GET_CLASS(bus->vdev);
+
+ assert(vdev != NULL);
+ k = VIRTIO_DEVICE_GET_CLASS(vdev);
if (k->set_features != NULL) {
- k->set_features(bus->vdev, requested_features);
+ k->set_features(vdev, requested_features);
}
}
/* Get bad features of the plugged device. */
uint32_t virtio_bus_get_vdev_bad_features(VirtioBusState *bus)
{
+ VirtIODevice *vdev = virtio_bus_get_device(bus);
VirtioDeviceClass *k;
- assert(bus->vdev != NULL);
- k = VIRTIO_DEVICE_GET_CLASS(bus->vdev);
+
+ assert(vdev != NULL);
+ k = VIRTIO_DEVICE_GET_CLASS(vdev);
if (k->bad_features != NULL) {
- return k->bad_features(bus->vdev);
+ return k->bad_features(vdev);
} else {
return 0;
}
@@ -135,22 +142,26 @@ uint32_t virtio_bus_get_vdev_bad_features(VirtioBusState *bus)
/* Get config of the plugged device. */
void virtio_bus_get_vdev_config(VirtioBusState *bus, uint8_t *config)
{
+ VirtIODevice *vdev = virtio_bus_get_device(bus);
VirtioDeviceClass *k;
- assert(bus->vdev != NULL);
- k = VIRTIO_DEVICE_GET_CLASS(bus->vdev);
+
+ assert(vdev != NULL);
+ k = VIRTIO_DEVICE_GET_CLASS(vdev);
if (k->get_config != NULL) {
- k->get_config(bus->vdev, config);
+ k->get_config(vdev, config);
}
}
/* Set config of the plugged device. */
void virtio_bus_set_vdev_config(VirtioBusState *bus, uint8_t *config)
{
+ VirtIODevice *vdev = virtio_bus_get_device(bus);
VirtioDeviceClass *k;
- assert(bus->vdev != NULL);
- k = VIRTIO_DEVICE_GET_CLASS(bus->vdev);
+
+ assert(vdev != NULL);
+ k = VIRTIO_DEVICE_GET_CLASS(vdev);
if (k->set_config != NULL) {
- k->set_config(bus->vdev, config);
+ k->set_config(vdev, config);
}
}
diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c
index 4bd2953..8f7b764 100644
--- a/hw/virtio/virtio-mmio.c
+++ b/hw/virtio/virtio-mmio.c
@@ -94,7 +94,7 @@ static void virtio_mmio_bus_new(VirtioBusState *bus, VirtIOMMIOProxy *dev);
static uint64_t virtio_mmio_read(void *opaque, hwaddr offset, unsigned size)
{
VirtIOMMIOProxy *proxy = (VirtIOMMIOProxy *)opaque;
- VirtIODevice *vdev = proxy->bus.vdev;
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
DPRINTF("virtio_mmio_read offset 0x%x\n", (int)offset);
@@ -184,7 +184,7 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value,
unsigned size)
{
VirtIOMMIOProxy *proxy = (VirtIOMMIOProxy *)opaque;
- VirtIODevice *vdev = proxy->bus.vdev;
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
DPRINTF("virtio_mmio_write offset 0x%x value 0x%" PRIx64 "\n",
(int)offset, value);
@@ -297,12 +297,13 @@ static const MemoryRegionOps virtio_mem_ops = {
static void virtio_mmio_update_irq(DeviceState *opaque, uint16_t vector)
{
VirtIOMMIOProxy *proxy = VIRTIO_MMIO(opaque);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
int level;
- if (!proxy->bus.vdev) {
+ if (!vdev) {
return;
}
- level = (proxy->bus.vdev->isr != 0);
+ level = (vdev->isr != 0);
DPRINTF("virtio_mmio setting IRQ %d\n", level);
qemu_set_irq(proxy->irq, level);
}
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 41b96ce..55617a6 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -942,7 +942,7 @@ static void virtio_pci_device_plugged(DeviceState *d)
uint8_t *config;
uint32_t size;
- proxy->vdev = bus->vdev;
+ proxy->vdev = virtio_bus_get_device(bus);
config = proxy->pci_dev.config;
if (proxy->class_code) {
diff --git a/include/hw/virtio/virtio-bus.h b/include/hw/virtio/virtio-bus.h
index 9217f85..ba0f86a 100644
--- a/include/hw/virtio/virtio-bus.h
+++ b/include/hw/virtio/virtio-bus.h
@@ -72,10 +72,6 @@ typedef struct VirtioBusClass {
struct VirtioBusState {
BusState parent_obj;
- /*
- * Only one VirtIODevice can be plugged on the bus.
- */
- VirtIODevice *vdev;
};
int virtio_bus_plug_device(VirtIODevice *vdev);
@@ -98,4 +94,16 @@ void virtio_bus_get_vdev_config(VirtioBusState *bus, uint8_t *config);
/* Set config of the plugged device. */
void virtio_bus_set_vdev_config(VirtioBusState *bus, uint8_t *config);
+static inline VirtIODevice *virtio_bus_get_device(VirtioBusState *bus)
+{
+ BusState *qbus = &bus->parent_obj;
+ BusChild *kid = QTAILQ_FIRST(&qbus->children);
+ DeviceState *qdev = kid ? kid->child : NULL;
+
+ /* This is used on the data path, the cast is guaranteed
+ * to succeed by the qdev machinery.
+ */
+ return (VirtIODevice *)qdev;
+}
+
#endif /* VIRTIO_BUS_H */

View File

@ -1,447 +0,0 @@
From 1d388b4fda2c4c9d00dc6ae91aaf35eb9fc04c26 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri, 20 Sep 2013 16:57:51 +0200
Subject: [PATCH] virtio-pci: remove vdev field
The vdev field is complicated to synchronize. Just access the
BusState's list of children.
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/s390x/virtio-ccw.h | 1 -
hw/virtio/virtio-pci.c | 107 +++++++++++++++++++++++++++++--------------------
hw/virtio/virtio-pci.h | 1 -
3 files changed, 63 insertions(+), 46 deletions(-)
diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h
index 96d6f5d..00932c7 100644
--- a/hw/s390x/virtio-ccw.h
+++ b/hw/s390x/virtio-ccw.h
@@ -77,7 +77,6 @@ typedef struct VirtIOCCWDeviceClass {
struct VirtioCcwDevice {
DeviceState parent_obj;
SubchDev *sch;
- VirtIODevice *vdev;
char *bus_id;
uint32_t host_features[VIRTIO_CCW_FEATURE_SIZE];
VirtioBusState bus;
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 55617a6..6fd6d6d 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -112,31 +112,39 @@ static inline VirtIOPCIProxy *to_virtio_pci_proxy_fast(DeviceState *d)
static void virtio_pci_notify(DeviceState *d, uint16_t vector)
{
VirtIOPCIProxy *proxy = to_virtio_pci_proxy_fast(d);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
+
if (msix_enabled(&proxy->pci_dev))
msix_notify(&proxy->pci_dev, vector);
else
- qemu_set_irq(proxy->pci_dev.irq[0], proxy->vdev->isr & 1);
+ qemu_set_irq(proxy->pci_dev.irq[0], vdev->isr & 1);
}
static void virtio_pci_save_config(DeviceState *d, QEMUFile *f)
{
VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
+
pci_device_save(&proxy->pci_dev, f);
msix_save(&proxy->pci_dev, f);
if (msix_present(&proxy->pci_dev))
- qemu_put_be16(f, proxy->vdev->config_vector);
+ qemu_put_be16(f, vdev->config_vector);
}
static void virtio_pci_save_queue(DeviceState *d, int n, QEMUFile *f)
{
VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
+
if (msix_present(&proxy->pci_dev))
- qemu_put_be16(f, virtio_queue_vector(proxy->vdev, n));
+ qemu_put_be16(f, virtio_queue_vector(vdev, n));
}
static int virtio_pci_load_config(DeviceState *d, QEMUFile *f)
{
VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
+
int ret;
ret = pci_device_load(&proxy->pci_dev, f);
if (ret) {
@@ -145,12 +153,12 @@ static int virtio_pci_load_config(DeviceState *d, QEMUFile *f)
msix_unuse_all_vectors(&proxy->pci_dev);
msix_load(&proxy->pci_dev, f);
if (msix_present(&proxy->pci_dev)) {
- qemu_get_be16s(f, &proxy->vdev->config_vector);
+ qemu_get_be16s(f, &vdev->config_vector);
} else {
- proxy->vdev->config_vector = VIRTIO_NO_VECTOR;
+ vdev->config_vector = VIRTIO_NO_VECTOR;
}
- if (proxy->vdev->config_vector != VIRTIO_NO_VECTOR) {
- return msix_vector_use(&proxy->pci_dev, proxy->vdev->config_vector);
+ if (vdev->config_vector != VIRTIO_NO_VECTOR) {
+ return msix_vector_use(&proxy->pci_dev, vdev->config_vector);
}
return 0;
}
@@ -158,13 +166,15 @@ static int virtio_pci_load_config(DeviceState *d, QEMUFile *f)
static int virtio_pci_load_queue(DeviceState *d, int n, QEMUFile *f)
{
VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
+
uint16_t vector;
if (msix_present(&proxy->pci_dev)) {
qemu_get_be16s(f, &vector);
} else {
vector = VIRTIO_NO_VECTOR;
}
- virtio_queue_set_vector(proxy->vdev, n, vector);
+ virtio_queue_set_vector(vdev, n, vector);
if (vector != VIRTIO_NO_VECTOR) {
return msix_vector_use(&proxy->pci_dev, vector);
}
@@ -174,7 +184,8 @@ static int virtio_pci_load_queue(DeviceState *d, int n, QEMUFile *f)
static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy,
int n, bool assign, bool set_handler)
{
- VirtQueue *vq = virtio_get_queue(proxy->vdev, n);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
+ VirtQueue *vq = virtio_get_queue(vdev, n);
EventNotifier *notifier = virtio_queue_get_host_notifier(vq);
int r = 0;
@@ -199,6 +210,7 @@ static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy,
static void virtio_pci_start_ioeventfd(VirtIOPCIProxy *proxy)
{
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
int n, r;
if (!(proxy->flags & VIRTIO_PCI_FLAG_USE_IOEVENTFD) ||
@@ -208,7 +220,7 @@ static void virtio_pci_start_ioeventfd(VirtIOPCIProxy *proxy)
}
for (n = 0; n < VIRTIO_PCI_QUEUE_MAX; n++) {
- if (!virtio_queue_get_num(proxy->vdev, n)) {
+ if (!virtio_queue_get_num(vdev, n)) {
continue;
}
@@ -222,7 +234,7 @@ static void virtio_pci_start_ioeventfd(VirtIOPCIProxy *proxy)
assign_error:
while (--n >= 0) {
- if (!virtio_queue_get_num(proxy->vdev, n)) {
+ if (!virtio_queue_get_num(vdev, n)) {
continue;
}
@@ -235,6 +247,7 @@ assign_error:
static void virtio_pci_stop_ioeventfd(VirtIOPCIProxy *proxy)
{
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
int r;
int n;
@@ -243,7 +256,7 @@ static void virtio_pci_stop_ioeventfd(VirtIOPCIProxy *proxy)
}
for (n = 0; n < VIRTIO_PCI_QUEUE_MAX; n++) {
- if (!virtio_queue_get_num(proxy->vdev, n)) {
+ if (!virtio_queue_get_num(vdev, n)) {
continue;
}
@@ -256,7 +269,7 @@ static void virtio_pci_stop_ioeventfd(VirtIOPCIProxy *proxy)
static void virtio_ioport_write(void *opaque, uint32_t addr, uint32_t val)
{
VirtIOPCIProxy *proxy = opaque;
- VirtIODevice *vdev = proxy->vdev;
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
hwaddr pa;
switch (addr) {
@@ -271,7 +284,7 @@ static void virtio_ioport_write(void *opaque, uint32_t addr, uint32_t val)
pa = (hwaddr)val << VIRTIO_PCI_QUEUE_ADDR_SHIFT;
if (pa == 0) {
virtio_pci_stop_ioeventfd(proxy);
- virtio_reset(proxy->vdev);
+ virtio_reset(vdev);
msix_unuse_all_vectors(&proxy->pci_dev);
}
else
@@ -298,7 +311,7 @@ static void virtio_ioport_write(void *opaque, uint32_t addr, uint32_t val)
}
if (vdev->status == 0) {
- virtio_reset(proxy->vdev);
+ virtio_reset(vdev);
msix_unuse_all_vectors(&proxy->pci_dev);
}
@@ -334,7 +347,7 @@ static void virtio_ioport_write(void *opaque, uint32_t addr, uint32_t val)
static uint32_t virtio_ioport_read(VirtIOPCIProxy *proxy, uint32_t addr)
{
- VirtIODevice *vdev = proxy->vdev;
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
uint32_t ret = 0xFFFFFFFF;
switch (addr) {
@@ -380,6 +393,7 @@ static uint64_t virtio_pci_config_read(void *opaque, hwaddr addr,
unsigned size)
{
VirtIOPCIProxy *proxy = opaque;
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
uint64_t val = 0;
if (addr < config) {
@@ -389,16 +403,16 @@ static uint64_t virtio_pci_config_read(void *opaque, hwaddr addr,
switch (size) {
case 1:
- val = virtio_config_readb(proxy->vdev, addr);
+ val = virtio_config_readb(vdev, addr);
break;
case 2:
- val = virtio_config_readw(proxy->vdev, addr);
+ val = virtio_config_readw(vdev, addr);
if (virtio_is_big_endian()) {
val = bswap16(val);
}
break;
case 4:
- val = virtio_config_readl(proxy->vdev, addr);
+ val = virtio_config_readl(vdev, addr);
if (virtio_is_big_endian()) {
val = bswap32(val);
}
@@ -412,6 +426,7 @@ static void virtio_pci_config_write(void *opaque, hwaddr addr,
{
VirtIOPCIProxy *proxy = opaque;
uint32_t config = VIRTIO_PCI_CONFIG(&proxy->pci_dev);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
if (addr < config) {
virtio_ioport_write(proxy, addr, val);
return;
@@ -423,19 +438,19 @@ static void virtio_pci_config_write(void *opaque, hwaddr addr,
*/
switch (size) {
case 1:
- virtio_config_writeb(proxy->vdev, addr, val);
+ virtio_config_writeb(vdev, addr, val);
break;
case 2:
if (virtio_is_big_endian()) {
val = bswap16(val);
}
- virtio_config_writew(proxy->vdev, addr, val);
+ virtio_config_writew(vdev, addr, val);
break;
case 4:
if (virtio_is_big_endian()) {
val = bswap32(val);
}
- virtio_config_writel(proxy->vdev, addr, val);
+ virtio_config_writel(vdev, addr, val);
break;
}
}
@@ -454,6 +469,7 @@ static void virtio_write_config(PCIDevice *pci_dev, uint32_t address,
uint32_t val, int len)
{
VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
pci_default_write_config(pci_dev, address, val, len);
@@ -461,8 +477,7 @@ static void virtio_write_config(PCIDevice *pci_dev, uint32_t address,
!(pci_dev->config[PCI_COMMAND] & PCI_COMMAND_MASTER) &&
!(proxy->flags & VIRTIO_PCI_FLAG_BUS_MASTER_BUG)) {
virtio_pci_stop_ioeventfd(proxy);
- virtio_set_status(proxy->vdev,
- proxy->vdev->status & ~VIRTIO_CONFIG_S_DRIVER_OK);
+ virtio_set_status(vdev, vdev->status & ~VIRTIO_CONFIG_S_DRIVER_OK);
}
}
@@ -505,7 +520,8 @@ static int kvm_virtio_pci_irqfd_use(VirtIOPCIProxy *proxy,
unsigned int vector)
{
VirtIOIRQFD *irqfd = &proxy->vector_irqfd[vector];
- VirtQueue *vq = virtio_get_queue(proxy->vdev, queue_no);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
+ VirtQueue *vq = virtio_get_queue(vdev, queue_no);
EventNotifier *n = virtio_queue_get_guest_notifier(vq);
int ret;
ret = kvm_irqchip_add_irqfd_notifier(kvm_state, n, irqfd->virq);
@@ -516,7 +532,8 @@ static void kvm_virtio_pci_irqfd_release(VirtIOPCIProxy *proxy,
unsigned int queue_no,
unsigned int vector)
{
- VirtQueue *vq = virtio_get_queue(proxy->vdev, queue_no);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
+ VirtQueue *vq = virtio_get_queue(vdev, queue_no);
EventNotifier *n = virtio_queue_get_guest_notifier(vq);
VirtIOIRQFD *irqfd = &proxy->vector_irqfd[vector];
int ret;
@@ -528,7 +545,7 @@ static void kvm_virtio_pci_irqfd_release(VirtIOPCIProxy *proxy,
static int kvm_virtio_pci_vector_use(VirtIOPCIProxy *proxy, int nvqs)
{
PCIDevice *dev = &proxy->pci_dev;
- VirtIODevice *vdev = proxy->vdev;
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
unsigned int vector;
int ret, queue_no;
@@ -577,7 +594,7 @@ undo:
static void kvm_virtio_pci_vector_release(VirtIOPCIProxy *proxy, int nvqs)
{
PCIDevice *dev = &proxy->pci_dev;
- VirtIODevice *vdev = proxy->vdev;
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
unsigned int vector;
int queue_no;
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
@@ -605,8 +622,9 @@ static int virtio_pci_vq_vector_unmask(VirtIOPCIProxy *proxy,
unsigned int vector,
MSIMessage msg)
{
- VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(proxy->vdev);
- VirtQueue *vq = virtio_get_queue(proxy->vdev, queue_no);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
+ VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
+ VirtQueue *vq = virtio_get_queue(vdev, queue_no);
EventNotifier *n = virtio_queue_get_guest_notifier(vq);
VirtIOIRQFD *irqfd;
int ret = 0;
@@ -625,10 +643,10 @@ static int virtio_pci_vq_vector_unmask(VirtIOPCIProxy *proxy,
* Otherwise, set it up now.
*/
if (k->guest_notifier_mask) {
- k->guest_notifier_mask(proxy->vdev, queue_no, false);
+ k->guest_notifier_mask(vdev, queue_no, false);
/* Test after unmasking to avoid losing events. */
if (k->guest_notifier_pending &&
- k->guest_notifier_pending(proxy->vdev, queue_no)) {
+ k->guest_notifier_pending(vdev, queue_no)) {
event_notifier_set(n);
}
} else {
@@ -641,13 +659,14 @@ static void virtio_pci_vq_vector_mask(VirtIOPCIProxy *proxy,
unsigned int queue_no,
unsigned int vector)
{
- VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(proxy->vdev);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
+ VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
/* If guest supports masking, keep irqfd but mask it.
* Otherwise, clean it up now.
*/
if (k->guest_notifier_mask) {
- k->guest_notifier_mask(proxy->vdev, queue_no, true);
+ k->guest_notifier_mask(vdev, queue_no, true);
} else {
kvm_virtio_pci_irqfd_release(proxy, queue_no, vector);
}
@@ -657,7 +676,7 @@ static int virtio_pci_vector_unmask(PCIDevice *dev, unsigned vector,
MSIMessage msg)
{
VirtIOPCIProxy *proxy = container_of(dev, VirtIOPCIProxy, pci_dev);
- VirtIODevice *vdev = proxy->vdev;
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
int ret, queue_no;
for (queue_no = 0; queue_no < proxy->nvqs_with_notifiers; queue_no++) {
@@ -687,7 +706,7 @@ undo:
static void virtio_pci_vector_mask(PCIDevice *dev, unsigned vector)
{
VirtIOPCIProxy *proxy = container_of(dev, VirtIOPCIProxy, pci_dev);
- VirtIODevice *vdev = proxy->vdev;
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
int queue_no;
for (queue_no = 0; queue_no < proxy->nvqs_with_notifiers; queue_no++) {
@@ -706,7 +725,7 @@ static void virtio_pci_vector_poll(PCIDevice *dev,
unsigned int vector_end)
{
VirtIOPCIProxy *proxy = container_of(dev, VirtIOPCIProxy, pci_dev);
- VirtIODevice *vdev = proxy->vdev;
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
int queue_no;
unsigned int vector;
@@ -738,8 +757,9 @@ static int virtio_pci_set_guest_notifier(DeviceState *d, int n, bool assign,
bool with_irqfd)
{
VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d);
- VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(proxy->vdev);
- VirtQueue *vq = virtio_get_queue(proxy->vdev, n);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
+ VirtioDeviceClass *vdc = VIRTIO_DEVICE_GET_CLASS(vdev);
+ VirtQueue *vq = virtio_get_queue(vdev, n);
EventNotifier *notifier = virtio_queue_get_guest_notifier(vq);
if (assign) {
@@ -754,7 +774,7 @@ static int virtio_pci_set_guest_notifier(DeviceState *d, int n, bool assign,
}
if (!msix_enabled(&proxy->pci_dev) && vdc->guest_notifier_mask) {
- vdc->guest_notifier_mask(proxy->vdev, n, !assign);
+ vdc->guest_notifier_mask(vdev, n, !assign);
}
return 0;
@@ -769,7 +789,7 @@ static bool virtio_pci_query_guest_notifiers(DeviceState *d)
static int virtio_pci_set_guest_notifiers(DeviceState *d, int nvqs, bool assign)
{
VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d);
- VirtIODevice *vdev = proxy->vdev;
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
int r, n;
bool with_irqfd = msix_enabled(&proxy->pci_dev) &&
@@ -863,11 +883,12 @@ static int virtio_pci_set_host_notifier(DeviceState *d, int n, bool assign)
static void virtio_pci_vmstate_change(DeviceState *d, bool running)
{
VirtIOPCIProxy *proxy = to_virtio_pci_proxy(d);
+ VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
if (running) {
/* Try to find out if the guest has bus master disabled, but is
in ready state. Then we have a buggy guest OS. */
- if ((proxy->vdev->status & VIRTIO_CONFIG_S_DRIVER_OK) &&
+ if ((vdev->status & VIRTIO_CONFIG_S_DRIVER_OK) &&
!(proxy->pci_dev.config[PCI_COMMAND] & PCI_COMMAND_MASTER)) {
proxy->flags |= VIRTIO_PCI_FLAG_BUS_MASTER_BUG;
}
@@ -942,8 +963,6 @@ static void virtio_pci_device_plugged(DeviceState *d)
uint8_t *config;
uint32_t size;
- proxy->vdev = virtio_bus_get_device(bus);
-
config = proxy->pci_dev.config;
if (proxy->class_code) {
pci_config_set_class(config, proxy->class_code);
diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index 917bcc5..dc332ae 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -82,7 +82,6 @@ typedef struct VirtioPCIClass {
struct VirtIOPCIProxy {
PCIDevice pci_dev;
- VirtIODevice *vdev;
MemoryRegion bar;
uint32_t flags;
uint32_t class_code;

View File

@ -1,293 +0,0 @@
From a9b1f1aeba8167ae90aecea9b8ca223faf33ae90 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri, 20 Sep 2013 16:57:52 +0200
Subject: [PATCH] virtio-ccw: remove vdev field
The vdev field is complicated to synchronize. Just access the
BusState's list of children.
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/s390x/virtio-ccw.c | 80 ++++++++++++++++++++++++++++-----------------------
1 file changed, 44 insertions(+), 36 deletions(-)
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 8835bd4..0fc7387 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -56,9 +56,10 @@ static const TypeInfo virtual_css_bus_info = {
VirtIODevice *virtio_ccw_get_vdev(SubchDev *sch)
{
VirtIODevice *vdev = NULL;
+ VirtioCcwDevice *dev = sch->driver_data;
- if (sch->driver_data) {
- vdev = ((VirtioCcwDevice *)sch->driver_data)->vdev;
+ if (dev) {
+ vdev = virtio_bus_get_device(&dev->bus);
}
return vdev;
}
@@ -66,7 +67,8 @@ VirtIODevice *virtio_ccw_get_vdev(SubchDev *sch)
static int virtio_ccw_set_guest2host_notifier(VirtioCcwDevice *dev, int n,
bool assign, bool set_handler)
{
- VirtQueue *vq = virtio_get_queue(dev->vdev, n);
+ VirtIODevice *vdev = virtio_bus_get_device(&dev->bus);
+ VirtQueue *vq = virtio_get_queue(vdev, n);
EventNotifier *notifier = virtio_queue_get_host_notifier(vq);
int r = 0;
SubchDev *sch = dev->sch;
@@ -96,6 +98,7 @@ static int virtio_ccw_set_guest2host_notifier(VirtioCcwDevice *dev, int n,
static void virtio_ccw_start_ioeventfd(VirtioCcwDevice *dev)
{
+ VirtIODevice *vdev;
int n, r;
if (!(dev->flags & VIRTIO_CCW_FLAG_USE_IOEVENTFD) ||
@@ -103,8 +106,9 @@ static void virtio_ccw_start_ioeventfd(VirtioCcwDevice *dev)
dev->ioeventfd_started) {
return;
}
+ vdev = virtio_bus_get_device(&dev->bus);
for (n = 0; n < VIRTIO_PCI_QUEUE_MAX; n++) {
- if (!virtio_queue_get_num(dev->vdev, n)) {
+ if (!virtio_queue_get_num(vdev, n)) {
continue;
}
r = virtio_ccw_set_guest2host_notifier(dev, n, true, true);
@@ -117,7 +121,7 @@ static void virtio_ccw_start_ioeventfd(VirtioCcwDevice *dev)
assign_error:
while (--n >= 0) {
- if (!virtio_queue_get_num(dev->vdev, n)) {
+ if (!virtio_queue_get_num(vdev, n)) {
continue;
}
r = virtio_ccw_set_guest2host_notifier(dev, n, false, false);
@@ -131,13 +135,15 @@ static void virtio_ccw_start_ioeventfd(VirtioCcwDevice *dev)
static void virtio_ccw_stop_ioeventfd(VirtioCcwDevice *dev)
{
+ VirtIODevice *vdev;
int n, r;
if (!dev->ioeventfd_started) {
return;
}
+ vdev = virtio_bus_get_device(&dev->bus);
for (n = 0; n < VIRTIO_PCI_QUEUE_MAX; n++) {
- if (!virtio_queue_get_num(dev->vdev, n)) {
+ if (!virtio_queue_get_num(vdev, n)) {
continue;
}
r = virtio_ccw_set_guest2host_notifier(dev, n, false, false);
@@ -188,7 +194,7 @@ typedef struct VirtioFeatDesc {
static int virtio_ccw_set_vqs(SubchDev *sch, uint64_t addr, uint32_t align,
uint16_t index, uint16_t num)
{
- VirtioCcwDevice *dev = sch->driver_data;
+ VirtIODevice *vdev = virtio_ccw_get_vdev(sch);
if (index > VIRTIO_PCI_QUEUE_MAX) {
return -EINVAL;
@@ -199,23 +205,23 @@ static int virtio_ccw_set_vqs(SubchDev *sch, uint64_t addr, uint32_t align,
return -EINVAL;
}
- if (!dev) {
+ if (!vdev) {
return -EINVAL;
}
- virtio_queue_set_addr(dev->vdev, index, addr);
+ virtio_queue_set_addr(vdev, index, addr);
if (!addr) {
- virtio_queue_set_vector(dev->vdev, index, 0);
+ virtio_queue_set_vector(vdev, index, 0);
} else {
/* Fail if we don't have a big enough queue. */
/* TODO: Add interface to handle vring.num changing */
- if (virtio_queue_get_num(dev->vdev, index) > num) {
+ if (virtio_queue_get_num(vdev, index) > num) {
return -EINVAL;
}
- virtio_queue_set_vector(dev->vdev, index, index);
+ virtio_queue_set_vector(vdev, index, index);
}
/* tell notify handler in case of config change */
- dev->vdev->config_vector = VIRTIO_PCI_QUEUE_MAX;
+ vdev->config_vector = VIRTIO_PCI_QUEUE_MAX;
return 0;
}
@@ -229,6 +235,7 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
hwaddr indicators;
VqConfigBlock vq_config;
VirtioCcwDevice *dev = sch->driver_data;
+ VirtIODevice *vdev = virtio_bus_get_device(&dev->bus);
bool check_len;
int len;
hwaddr hw_len;
@@ -271,7 +278,7 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
break;
case CCW_CMD_VDEV_RESET:
virtio_ccw_stop_ioeventfd(dev);
- virtio_reset(dev->vdev);
+ virtio_reset(vdev);
ret = 0;
break;
case CCW_CMD_READ_FEAT:
@@ -318,7 +325,7 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
features.features = ldl_le_phys(ccw.cda);
if (features.index < ARRAY_SIZE(dev->host_features)) {
virtio_bus_set_vdev_features(&dev->bus, features.features);
- dev->vdev->guest_features = features.features;
+ vdev->guest_features = features.features;
} else {
/*
* If the guest supports more feature bits, assert that it
@@ -336,30 +343,30 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
break;
case CCW_CMD_READ_CONF:
if (check_len) {
- if (ccw.count > dev->vdev->config_len) {
+ if (ccw.count > vdev->config_len) {
ret = -EINVAL;
break;
}
}
- len = MIN(ccw.count, dev->vdev->config_len);
+ len = MIN(ccw.count, vdev->config_len);
if (!ccw.cda) {
ret = -EFAULT;
} else {
- virtio_bus_get_vdev_config(&dev->bus, dev->vdev->config);
+ virtio_bus_get_vdev_config(&dev->bus, vdev->config);
/* XXX config space endianness */
- cpu_physical_memory_write(ccw.cda, dev->vdev->config, len);
+ cpu_physical_memory_write(ccw.cda, vdev->config, len);
sch->curr_status.scsw.count = ccw.count - len;
ret = 0;
}
break;
case CCW_CMD_WRITE_CONF:
if (check_len) {
- if (ccw.count > dev->vdev->config_len) {
+ if (ccw.count > vdev->config_len) {
ret = -EINVAL;
break;
}
}
- len = MIN(ccw.count, dev->vdev->config_len);
+ len = MIN(ccw.count, vdev->config_len);
hw_len = len;
if (!ccw.cda) {
ret = -EFAULT;
@@ -370,9 +377,9 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
} else {
len = hw_len;
/* XXX config space endianness */
- memcpy(dev->vdev->config, config, len);
+ memcpy(vdev->config, config, len);
cpu_physical_memory_unmap(config, hw_len, 0, hw_len);
- virtio_bus_set_vdev_config(&dev->bus, dev->vdev->config);
+ virtio_bus_set_vdev_config(&dev->bus, vdev->config);
sch->curr_status.scsw.count = ccw.count - len;
ret = 0;
}
@@ -396,9 +403,9 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
if (!(status & VIRTIO_CONFIG_S_DRIVER_OK)) {
virtio_ccw_stop_ioeventfd(dev);
}
- virtio_set_status(dev->vdev, status);
- if (dev->vdev->status == 0) {
- virtio_reset(dev->vdev);
+ virtio_set_status(vdev, status);
+ if (vdev->status == 0) {
+ virtio_reset(vdev);
}
if (status & VIRTIO_CONFIG_S_DRIVER_OK) {
virtio_ccw_start_ioeventfd(dev);
@@ -462,7 +469,7 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
ret = -EFAULT;
} else {
vq_config.index = lduw_phys(ccw.cda);
- vq_config.num_max = virtio_queue_get_num(dev->vdev,
+ vq_config.num_max = virtio_queue_get_num(vdev,
vq_config.index);
stw_phys(ccw.cda + sizeof(vq_config.index), vq_config.num_max);
sch->curr_status.scsw.count = ccw.count - sizeof(vq_config);
@@ -494,7 +501,6 @@ static int virtio_ccw_device_init(VirtioCcwDevice *dev, VirtIODevice *vdev)
sch->driver_data = dev;
dev->sch = sch;
- dev->vdev = vdev;
dev->indicators = 0;
/* Initialize subchannel structure. */
@@ -607,7 +613,7 @@ static int virtio_ccw_device_init(VirtioCcwDevice *dev, VirtIODevice *vdev)
memset(&sch->id, 0, sizeof(SenseId));
sch->id.reserved = 0xff;
sch->id.cu_type = VIRTIO_CCW_CU_TYPE;
- sch->id.cu_model = dev->vdev->device_id;
+ sch->id.cu_model = vdev->device_id;
/* Only the first 32 feature bits are used. */
dev->host_features[0] = virtio_bus_get_vdev_features(&dev->bus,
@@ -891,9 +897,10 @@ static unsigned virtio_ccw_get_features(DeviceState *d)
static void virtio_ccw_reset(DeviceState *d)
{
VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(d);
+ VirtIODevice *vdev = virtio_bus_get_device(&dev->bus);
virtio_ccw_stop_ioeventfd(dev);
- virtio_reset(dev->vdev);
+ virtio_reset(vdev);
css_reset_sch(dev->sch);
dev->indicators = 0;
dev->indicators2 = 0;
@@ -933,9 +940,10 @@ static int virtio_ccw_set_host_notifier(DeviceState *d, int n, bool assign)
static int virtio_ccw_set_guest_notifier(VirtioCcwDevice *dev, int n,
bool assign, bool with_irqfd)
{
- VirtQueue *vq = virtio_get_queue(dev->vdev, n);
+ VirtIODevice *vdev = virtio_bus_get_device(&dev->bus);
+ VirtQueue *vq = virtio_get_queue(vdev, n);
EventNotifier *notifier = virtio_queue_get_guest_notifier(vq);
- VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(dev->vdev);
+ VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
if (assign) {
int r = event_notifier_init(notifier, 0);
@@ -951,16 +959,16 @@ static int virtio_ccw_set_guest_notifier(VirtioCcwDevice *dev, int n,
* land in qemu (and only the irq fd) in this code.
*/
if (k->guest_notifier_mask) {
- k->guest_notifier_mask(dev->vdev, n, false);
+ k->guest_notifier_mask(vdev, n, false);
}
/* get lost events and re-inject */
if (k->guest_notifier_pending &&
- k->guest_notifier_pending(dev->vdev, n)) {
+ k->guest_notifier_pending(vdev, n)) {
event_notifier_set(notifier);
}
} else {
if (k->guest_notifier_mask) {
- k->guest_notifier_mask(dev->vdev, n, true);
+ k->guest_notifier_mask(vdev, n, true);
}
virtio_queue_set_guest_notifier_fd_handler(vq, false, with_irqfd);
event_notifier_cleanup(notifier);
@@ -972,7 +980,7 @@ static int virtio_ccw_set_guest_notifiers(DeviceState *d, int nvqs,
bool assigned)
{
VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(d);
- VirtIODevice *vdev = dev->vdev;
+ VirtIODevice *vdev = virtio_bus_get_device(&dev->bus);
int r, n;
for (n = 0; n < nvqs; n++) {

View File

@ -1,148 +0,0 @@
From fe02fcc2b929e6a678ec783cb80890b79b7dca78 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri, 20 Sep 2013 16:57:53 +0200
Subject: [PATCH] virtio-bus: cleanup plug/unplug interface
Right now we have these pairs:
- virtio_bus_plug_device/virtio_bus_destroy_device. The first
takes a VirtIODevice, the second takes a VirtioBusState
- device_plugged/device_unplug callbacks in the VirtioBusClass
(here it's just the naming that is inconsistent)
- virtio_bus_destroy_device is not called by anyone (and since
it calls qdev_free, it would be called by the proxies---but
then the callback is useless since the proxies can do whatever
they want before calling virtio_bus_destroy_device)
And there is a k->init but no k->exit, hence virtio_device_exit is
overwritten by subclasses (except virtio-9p). This cleans it up by:
- renaming the device_unplug callback to device_unplugged
- renaming virtio_bus_plug_device to virtio_bus_device_plugged,
matching the callback name
- renaming virtio_bus_destroy_device to virtio_bus_device_unplugged,
removing the qdev_free, making it take a VirtIODevice and calling it
from virtio_device_exit
- adding a k->exit callback
virtio_device_exit is still overwritten, the next patches will fix that.
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/virtio/virtio-bus.c | 18 +++++++++---------
hw/virtio/virtio.c | 7 ++++++-
include/hw/virtio/virtio-bus.h | 6 +++---
include/hw/virtio/virtio.h | 1 +
4 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c
index 669ce38..7aed6a4 100644
--- a/hw/virtio/virtio-bus.c
+++ b/hw/virtio/virtio-bus.c
@@ -37,8 +37,8 @@ do { printf("virtio_bus: " fmt , ## __VA_ARGS__); } while (0)
#define DPRINTF(fmt, ...) do { } while (0)
#endif
-/* Plug the VirtIODevice */
-int virtio_bus_plug_device(VirtIODevice *vdev)
+/* A VirtIODevice is being plugged */
+int virtio_bus_device_plugged(VirtIODevice *vdev)
{
DeviceState *qdev = DEVICE(vdev);
BusState *qbus = BUS(qdev_get_parent_bus(qdev));
@@ -64,20 +64,20 @@ void virtio_bus_reset(VirtioBusState *bus)
}
}
-/* Destroy the VirtIODevice */
-void virtio_bus_destroy_device(VirtioBusState *bus)
+/* A VirtIODevice is being unplugged */
+void virtio_bus_device_unplugged(VirtIODevice *vdev)
{
- BusState *qbus = BUS(bus);
+ DeviceState *qdev = DEVICE(vdev);
+ BusState *qbus = BUS(qdev_get_parent_bus(qdev));
+ VirtioBusState *bus = VIRTIO_BUS(qbus);
VirtioBusClass *klass = VIRTIO_BUS_GET_CLASS(bus);
- VirtIODevice *vdev = virtio_bus_get_device(bus);
DPRINTF("%s: remove device.\n", qbus->name);
if (vdev != NULL) {
- if (klass->device_unplug != NULL) {
- klass->device_unplug(qbus->parent);
+ if (klass->device_unplugged != NULL) {
+ klass->device_unplugged(qbus->parent);
}
- qdev_free(DEVICE(vdev));
}
}
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 2f1e73b..965b2c0 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -1158,14 +1158,19 @@ static int virtio_device_init(DeviceState *qdev)
if (k->init(vdev) < 0) {
return -1;
}
- virtio_bus_plug_device(vdev);
+ virtio_bus_device_plugged(vdev);
return 0;
}
static int virtio_device_exit(DeviceState *qdev)
{
VirtIODevice *vdev = VIRTIO_DEVICE(qdev);
+ VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(qdev);
+ virtio_bus_device_unplugged(vdev);
+ if (k->exit) {
+ k->exit(vdev);
+ }
if (vdev->bus_name) {
g_free(vdev->bus_name);
vdev->bus_name = NULL;
diff --git a/include/hw/virtio/virtio-bus.h b/include/hw/virtio/virtio-bus.h
index ba0f86a..0756545 100644
--- a/include/hw/virtio/virtio-bus.h
+++ b/include/hw/virtio/virtio-bus.h
@@ -61,7 +61,7 @@ typedef struct VirtioBusClass {
* transport independent exit function.
* This is called by virtio-bus just before the device is unplugged.
*/
- void (*device_unplug)(DeviceState *d);
+ void (*device_unplugged)(DeviceState *d);
/*
* Does the transport have variable vring alignment?
* (ie can it ever call virtio_queue_set_align()?)
@@ -74,9 +74,9 @@ struct VirtioBusState {
BusState parent_obj;
};
-int virtio_bus_plug_device(VirtIODevice *vdev);
+int virtio_bus_device_plugged(VirtIODevice *vdev);
void virtio_bus_reset(VirtioBusState *bus);
-void virtio_bus_destroy_device(VirtioBusState *bus);
+void virtio_bus_device_unplugged(VirtIODevice *bus);
/* Get the device id of the plugged device. */
uint16_t virtio_bus_get_vdev_id(VirtioBusState *bus);
/* Get the config_len field of the plugged device. */
diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
index a90522d..59756c2 100644
--- a/include/hw/virtio/virtio.h
+++ b/include/hw/virtio/virtio.h
@@ -127,6 +127,7 @@ typedef struct VirtioDeviceClass {
/* This is what a VirtioDevice must implement */
DeviceClass parent;
int (*init)(VirtIODevice *vdev);
+ void (*exit)(VirtIODevice *vdev);
uint32_t (*get_features)(VirtIODevice *vdev, uint32_t requested_features);
uint32_t (*bad_features)(VirtIODevice *vdev);
void (*set_features)(VirtIODevice *vdev, uint32_t val);

View File

@ -1,53 +0,0 @@
From aa75555e6fb5cae0e495cb5f7d9f3511ad5ac6ce Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri, 20 Sep 2013 16:57:54 +0200
Subject: [PATCH] virtio-blk: switch exit callback to VirtioDeviceClass
This ensures hot-unplug is handled properly by the proxy.
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/block/virtio-blk.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 49a23c3..aa37cc9 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -729,20 +729,18 @@ static int virtio_blk_device_init(VirtIODevice *vdev)
return 0;
}
-static int virtio_blk_device_exit(DeviceState *dev)
+static void virtio_blk_device_exit(VirtIODevice *vdev)
{
- VirtIODevice *vdev = VIRTIO_DEVICE(dev);
- VirtIOBlock *s = VIRTIO_BLK(dev);
+ VirtIOBlock *s = VIRTIO_BLK(vdev);
#ifdef CONFIG_VIRTIO_BLK_DATA_PLANE
remove_migration_state_change_notifier(&s->migration_state_notifier);
virtio_blk_data_plane_destroy(s->dataplane);
s->dataplane = NULL;
#endif
qemu_del_vm_change_state_handler(s->change);
- unregister_savevm(dev, "virtio-blk", s);
+ unregister_savevm(DEVICE(vdev), "virtio-blk", s);
blockdev_mark_auto_del(s->bs);
virtio_cleanup(vdev);
- return 0;
}
static Property virtio_blk_properties[] = {
@@ -754,10 +752,10 @@ static void virtio_blk_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- dc->exit = virtio_blk_device_exit;
dc->props = virtio_blk_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
vdc->init = virtio_blk_device_init;
+ vdc->exit = virtio_blk_device_exit;
vdc->get_config = virtio_blk_update_config;
vdc->set_config = virtio_blk_set_config;
vdc->get_features = virtio_blk_get_features;

View File

@ -1,53 +0,0 @@
From 811b51426d9e7819e6498d4dad0d6ac744a8e5d0 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri, 20 Sep 2013 16:57:55 +0200
Subject: [PATCH] virtio-serial: switch exit callback to VirtioDeviceClass
This ensures hot-unplug is handled properly by the proxy.
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/char/virtio-serial-bus.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index da417c7..57dd070 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -987,12 +987,11 @@ static const TypeInfo virtio_serial_port_type_info = {
.class_init = virtio_serial_port_class_init,
};
-static int virtio_serial_device_exit(DeviceState *dev)
+static void virtio_serial_device_exit(VirtIODevice *vdev)
{
- VirtIOSerial *vser = VIRTIO_SERIAL(dev);
- VirtIODevice *vdev = VIRTIO_DEVICE(dev);
+ VirtIOSerial *vser = VIRTIO_SERIAL(vdev);
- unregister_savevm(dev, "virtio-console", vser);
+ unregister_savevm(DEVICE(vdev), "virtio-console", vser);
g_free(vser->ivqs);
g_free(vser->ovqs);
@@ -1004,7 +1003,6 @@ static int virtio_serial_device_exit(DeviceState *dev)
g_free(vser->post_load);
}
virtio_cleanup(vdev);
- return 0;
}
static Property virtio_serial_properties[] = {
@@ -1016,10 +1014,10 @@ static void virtio_serial_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- dc->exit = virtio_serial_device_exit;
dc->props = virtio_serial_properties;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
vdc->init = virtio_serial_device_init;
+ vdc->exit = virtio_serial_device_exit;
vdc->get_features = get_features;
vdc->get_config = get_config;
vdc->set_config = set_config;

View File

@ -1,58 +0,0 @@
From 1582699fb9f748f9f91b015ef311f93bf5a95f5d Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri, 20 Sep 2013 16:57:56 +0200
Subject: [PATCH] virtio-net: switch exit callback to VirtioDeviceClass
This ensures hot-unplug is handled properly by the proxy.
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/net/virtio-net.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index aa1880c..46a4d8c 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1568,16 +1568,15 @@ static int virtio_net_device_init(VirtIODevice *vdev)
return 0;
}
-static int virtio_net_device_exit(DeviceState *qdev)
+static void virtio_net_device_exit(VirtIODevice *vdev)
{
- VirtIONet *n = VIRTIO_NET(qdev);
- VirtIODevice *vdev = VIRTIO_DEVICE(qdev);
+ VirtIONet *n = VIRTIO_NET(vdev);
int i;
/* This will stop vhost backend if appropriate. */
virtio_net_set_status(vdev, 0);
- unregister_savevm(qdev, "virtio-net", n);
+ unregister_savevm(DEVICE(vdev), "virtio-net", n);
if (n->netclient_name) {
g_free(n->netclient_name);
@@ -1608,8 +1607,6 @@ static int virtio_net_device_exit(DeviceState *qdev)
g_free(n->vqs);
qemu_del_nic(n->nic);
virtio_cleanup(vdev);
-
- return 0;
}
static void virtio_net_instance_init(Object *obj)
@@ -1636,10 +1633,10 @@ static void virtio_net_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- dc->exit = virtio_net_device_exit;
dc->props = virtio_net_properties;
set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
vdc->init = virtio_net_device_init;
+ vdc->exit = virtio_net_device_exit;
vdc->get_config = virtio_net_get_config;
vdc->set_config = virtio_net_set_config;
vdc->get_features = virtio_net_get_features;

View File

@ -1,112 +0,0 @@
From df750f462929ba85a61dbdd6a4020cb4b2ee68d0 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri, 20 Sep 2013 16:57:57 +0200
Subject: [PATCH] virtio-scsi: switch exit callback to VirtioDeviceClass
This ensures hot-unplug is handled properly by the proxy.
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/scsi/vhost-scsi.c | 11 +++++------
hw/scsi/virtio-scsi.c | 15 +++++++--------
include/hw/virtio/virtio-scsi.h | 2 +-
3 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 9e770fb..5e3cc61 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -240,11 +240,10 @@ static int vhost_scsi_init(VirtIODevice *vdev)
return 0;
}
-static int vhost_scsi_exit(DeviceState *qdev)
+static void vhost_scsi_exit(VirtIODevice *vdev)
{
- VirtIODevice *vdev = VIRTIO_DEVICE(qdev);
- VHostSCSI *s = VHOST_SCSI(qdev);
- VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(qdev);
+ VHostSCSI *s = VHOST_SCSI(vdev);
+ VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(vdev);
migrate_del_blocker(s->migration_blocker);
error_free(s->migration_blocker);
@@ -253,7 +252,7 @@ static int vhost_scsi_exit(DeviceState *qdev)
vhost_scsi_set_status(vdev, 0);
g_free(s->dev.vqs);
- return virtio_scsi_common_exit(vs);
+ virtio_scsi_common_exit(vs);
}
static Property vhost_scsi_properties[] = {
@@ -265,10 +264,10 @@ static void vhost_scsi_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- dc->exit = vhost_scsi_exit;
dc->props = vhost_scsi_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
vdc->init = vhost_scsi_init;
+ vdc->exit = vhost_scsi_exit;
vdc->get_features = vhost_scsi_get_features;
vdc->set_config = vhost_scsi_set_config;
vdc->set_status = vhost_scsi_set_status;
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index 05da56b..5545993 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -643,22 +643,21 @@ static int virtio_scsi_device_init(VirtIODevice *vdev)
return 0;
}
-int virtio_scsi_common_exit(VirtIOSCSICommon *vs)
+void virtio_scsi_common_exit(VirtIOSCSICommon *vs)
{
VirtIODevice *vdev = VIRTIO_DEVICE(vs);
g_free(vs->cmd_vqs);
virtio_cleanup(vdev);
- return 0;
}
-static int virtio_scsi_device_exit(DeviceState *qdev)
+static void virtio_scsi_device_exit(VirtIODevice *vdev)
{
- VirtIOSCSI *s = VIRTIO_SCSI(qdev);
- VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(qdev);
+ VirtIOSCSI *s = VIRTIO_SCSI(vdev);
+ VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(vdev);
- unregister_savevm(qdev, "virtio-scsi", s);
- return virtio_scsi_common_exit(vs);
+ unregister_savevm(DEVICE(vdev), "virtio-scsi", s);
+ virtio_scsi_common_exit(vs);
}
static Property virtio_scsi_properties[] = {
@@ -679,10 +678,10 @@ static void virtio_scsi_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- dc->exit = virtio_scsi_device_exit;
dc->props = virtio_scsi_properties;
set_bit(DEVICE_CATEGORY_STORAGE, dc->categories);
vdc->init = virtio_scsi_device_init;
+ vdc->exit = virtio_scsi_device_exit;
vdc->set_config = virtio_scsi_set_config;
vdc->get_features = virtio_scsi_get_features;
vdc->reset = virtio_scsi_reset;
diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h
index 9a98540..206c61d 100644
--- a/include/hw/virtio/virtio-scsi.h
+++ b/include/hw/virtio/virtio-scsi.h
@@ -187,6 +187,6 @@ typedef struct {
VIRTIO_SCSI_F_CHANGE, true)
int virtio_scsi_common_init(VirtIOSCSICommon *vs);
-int virtio_scsi_common_exit(VirtIOSCSICommon *vs);
+void virtio_scsi_common_exit(VirtIOSCSICommon *vs);
#endif /* _QEMU_VIRTIO_SCSI_H */

View File

@ -1,49 +0,0 @@
From d42ac36363ef9e3d3963c2c31fa7122492dbaf0e Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri, 20 Sep 2013 16:57:58 +0200
Subject: [PATCH] virtio-balloon: switch exit callback to VirtioDeviceClass
This ensures hot-unplug is handled properly by the proxy.
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/virtio/virtio-balloon.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index aac7f83..c23facb 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -370,16 +370,14 @@ static int virtio_balloon_device_init(VirtIODevice *vdev)
return 0;
}
-static int virtio_balloon_device_exit(DeviceState *qdev)
+static void virtio_balloon_device_exit(VirtIODevice *vdev)
{
- VirtIOBalloon *s = VIRTIO_BALLOON(qdev);
- VirtIODevice *vdev = VIRTIO_DEVICE(qdev);
+ VirtIOBalloon *s = VIRTIO_BALLOON(vdev);
balloon_stats_destroy_timer(s);
qemu_remove_balloon_handler(s);
- unregister_savevm(qdev, "virtio-balloon", s);
+ unregister_savevm(DEVICE(vdev), "virtio-balloon", s);
virtio_cleanup(vdev);
- return 0;
}
static Property virtio_balloon_properties[] = {
@@ -390,10 +388,10 @@ static void virtio_balloon_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- dc->exit = virtio_balloon_device_exit;
dc->props = virtio_balloon_properties;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
vdc->init = virtio_balloon_device_init;
+ vdc->exit = virtio_balloon_device_exit;
vdc->get_config = virtio_balloon_get_config;
vdc->set_config = virtio_balloon_set_config;
vdc->get_features = virtio_balloon_get_features;

View File

@ -1,49 +0,0 @@
From 2bb10b85ffa655f91a4777da4f7a5534ee4c266c Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri, 20 Sep 2013 16:57:59 +0200
Subject: [PATCH] virtio-rng: switch exit callback to VirtioDeviceClass
This ensures hot-unplug is handled properly by the proxy.
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/virtio/virtio-rng.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index bac8421..6895146 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -184,16 +184,14 @@ static int virtio_rng_device_init(VirtIODevice *vdev)
return 0;
}
-static int virtio_rng_device_exit(DeviceState *qdev)
+static void virtio_rng_device_exit(VirtIODevice *vdev)
{
- VirtIORNG *vrng = VIRTIO_RNG(qdev);
- VirtIODevice *vdev = VIRTIO_DEVICE(qdev);
+ VirtIORNG *vrng = VIRTIO_RNG(vdev);
qemu_del_timer(vrng->rate_limit_timer);
qemu_free_timer(vrng->rate_limit_timer);
- unregister_savevm(qdev, "virtio-rng", vrng);
+ unregister_savevm(DEVICE(vdev), "virtio-rng", vrng);
virtio_cleanup(vdev);
- return 0;
}
static Property virtio_rng_properties[] = {
@@ -205,10 +203,10 @@ static void virtio_rng_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- dc->exit = virtio_rng_device_exit;
dc->props = virtio_rng_properties;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
vdc->init = virtio_rng_device_init;
+ vdc->exit = virtio_rng_device_exit;
vdc->get_features = get_features;
}

View File

@ -1,59 +0,0 @@
From cb2282d55ee34d04a67d74111d69ab098f765680 Mon Sep 17 00:00:00 2001
From: Paolo Bonzini <pbonzini@redhat.com>
Date: Fri, 20 Sep 2013 16:58:00 +0200
Subject: [PATCH] virtio-pci: add device_unplugged callback
This fixes a crash in hot-unplug of virtio-pci devices behind a PCIe
switch. The crash happens because the ioeventfd is still set whent the
child is destroyed (destruction happens in postorder). Then the proxy
tries to unset to ioeventfd, but the virtqueue structure that holds the
EventNotifier has been trashed in the meanwhile. kvm_set_ioeventfd_pio
does not expect failure and aborts.
The fix is simply to move parts of uninitialization to a new
device_unplugged callback, which is called before the child is destroyed.
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/virtio/virtio-pci.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 6fd6d6d..242ec3e 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1000,6 +1000,15 @@ static void virtio_pci_device_plugged(DeviceState *d)
proxy->host_features);
}
+static void virtio_pci_device_unplugged(DeviceState *d)
+{
+ PCIDevice *pci_dev = PCI_DEVICE(d);
+ VirtIOPCIProxy *proxy = VIRTIO_PCI(d);
+
+ virtio_pci_stop_ioeventfd(proxy);
+ msix_uninit_exclusive_bar(pci_dev);
+}
+
static int virtio_pci_init(PCIDevice *pci_dev)
{
VirtIOPCIProxy *dev = VIRTIO_PCI(pci_dev);
@@ -1014,9 +1023,7 @@ static int virtio_pci_init(PCIDevice *pci_dev)
static void virtio_pci_exit(PCIDevice *pci_dev)
{
VirtIOPCIProxy *proxy = VIRTIO_PCI(pci_dev);
- virtio_pci_stop_ioeventfd(proxy);
memory_region_destroy(&proxy->bar);
- msix_uninit_exclusive_bar(pci_dev);
}
static void virtio_pci_reset(DeviceState *qdev)
@@ -1550,6 +1557,7 @@ static void virtio_pci_bus_class_init(ObjectClass *klass, void *data)
k->set_guest_notifiers = virtio_pci_set_guest_notifiers;
k->vmstate_change = virtio_pci_vmstate_change;
k->device_plugged = virtio_pci_device_plugged;
+ k->device_unplugged = virtio_pci_device_unplugged;
}
static const TypeInfo virtio_pci_bus_info = {

View File

@ -1,81 +0,0 @@
From 411a7e4ad457f7f3c9f1d02ef9f726ce13a35f08 Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Fri, 6 Sep 2013 12:32:25 +0200
Subject: [PATCH] qcow2: Pass discard type to qcow2_discard_clusters()
The function will be used internally instead of only being called for
guest discard requests.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/qcow2-cluster.c | 8 ++++----
block/qcow2.c | 2 +-
block/qcow2.h | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index cca76d4..8c3185d 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -1317,7 +1317,7 @@ int qcow2_decompress_cluster(BlockDriverState *bs, uint64_t cluster_offset)
* clusters.
*/
static int discard_single_l2(BlockDriverState *bs, uint64_t offset,
- unsigned int nb_clusters)
+ unsigned int nb_clusters, enum qcow2_discard_type type)
{
BDRVQcowState *s = bs->opaque;
uint64_t *l2_table;
@@ -1346,7 +1346,7 @@ static int discard_single_l2(BlockDriverState *bs, uint64_t offset,
l2_table[l2_index + i] = cpu_to_be64(0);
/* Then decrease the refcount */
- qcow2_free_any_clusters(bs, old_offset, 1, QCOW2_DISCARD_REQUEST);
+ qcow2_free_any_clusters(bs, old_offset, 1, type);
}
ret = qcow2_cache_put(bs, s->l2_table_cache, (void**) &l2_table);
@@ -1358,7 +1358,7 @@ static int discard_single_l2(BlockDriverState *bs, uint64_t offset,
}
int qcow2_discard_clusters(BlockDriverState *bs, uint64_t offset,
- int nb_sectors)
+ int nb_sectors, enum qcow2_discard_type type)
{
BDRVQcowState *s = bs->opaque;
uint64_t end_offset;
@@ -1381,7 +1381,7 @@ int qcow2_discard_clusters(BlockDriverState *bs, uint64_t offset,
/* Each L2 table is handled by its own loop iteration */
while (nb_clusters > 0) {
- ret = discard_single_l2(bs, offset, nb_clusters);
+ ret = discard_single_l2(bs, offset, nb_clusters, type);
if (ret < 0) {
goto fail;
}
diff --git a/block/qcow2.c b/block/qcow2.c
index 7f7282e..16e45a0 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1506,7 +1506,7 @@ static coroutine_fn int qcow2_co_discard(BlockDriverState *bs,
qemu_co_mutex_lock(&s->lock);
ret = qcow2_discard_clusters(bs, sector_num << BDRV_SECTOR_BITS,
- nb_sectors);
+ nb_sectors, QCOW2_DISCARD_REQUEST);
qemu_co_mutex_unlock(&s->lock);
return ret;
}
diff --git a/block/qcow2.h b/block/qcow2.h
index dba9771..52cf193 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -405,7 +405,7 @@ uint64_t qcow2_alloc_compressed_cluster_offset(BlockDriverState *bs,
int qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2Meta *m);
int qcow2_discard_clusters(BlockDriverState *bs, uint64_t offset,
- int nb_sectors);
+ int nb_sectors, enum qcow2_discard_type type);
int qcow2_zero_clusters(BlockDriverState *bs, uint64_t offset, int nb_sectors);
/* qcow2-snapshot.c functions */

View File

@ -1,73 +0,0 @@
From 16d78f7cd9e1455ebb0599706ba5badfa3ee4fdc Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Fri, 6 Sep 2013 12:32:26 +0200
Subject: [PATCH] qcow2: Discard VM state in active L1 after creating snapshot
During savevm, the VM state is written to the active L1 of the image and
then a snapshot is taken. After that, the VM state isn't needed any more
in the active L1 and should be discarded. This is implemented by this
patch.
The impact of not discarding the VM state is that a snapshot can never
become smaller than any previous snapshot (because it would be padded
with old VM state), and more importantly that future savevm operations
cause unnecessary COWs (with associated flushes), which makes subsequent
snapshots much slower.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/qcow2-snapshot.c | 7 +++++++
block/qcow2.c | 5 -----
block/qcow2.h | 5 +++++
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c
index 0caac90..ae33b45 100644
--- a/block/qcow2-snapshot.c
+++ b/block/qcow2-snapshot.c
@@ -401,6 +401,13 @@ int qcow2_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)
g_free(old_snapshot_list);
+ /* The VM state isn't needed any more in the active L1 table; in fact, it
+ * hurts by causing expensive COW for the next snapshot. */
+ qcow2_discard_clusters(bs, qcow2_vm_state_offset(s),
+ align_offset(sn->vm_state_size, s->cluster_size)
+ >> BDRV_SECTOR_BITS,
+ QCOW2_DISCARD_NEVER);
+
#ifdef DEBUG_ALLOC
{
BdrvCheckResult result = {0};
diff --git a/block/qcow2.c b/block/qcow2.c
index 16e45a0..f63c2cb 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1666,11 +1666,6 @@ static coroutine_fn int qcow2_co_flush_to_os(BlockDriverState *bs)
return 0;
}
-static int64_t qcow2_vm_state_offset(BDRVQcowState *s)
-{
- return (int64_t)s->l1_vm_state_index << (s->cluster_bits + s->l2_bits);
-}
-
static int qcow2_get_info(BlockDriverState *bs, BlockDriverInfo *bdi)
{
BDRVQcowState *s = bs->opaque;
diff --git a/block/qcow2.h b/block/qcow2.h
index 52cf193..da61d18 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -324,6 +324,11 @@ static inline int64_t align_offset(int64_t offset, int n)
return offset;
}
+static inline int64_t qcow2_vm_state_offset(BDRVQcowState *s)
+{
+ return (int64_t)s->l1_vm_state_index << (s->cluster_bits + s->l2_bits);
+}
+
static inline int qcow2_get_cluster_type(uint64_t l2_entry)
{
if (l2_entry & QCOW_OFLAG_COMPRESSED) {

View File

@ -1,68 +0,0 @@
From 6f7e1d2bddb5a0a1c65f6f02467460d6edbcc901 Mon Sep 17 00:00:00 2001
From: "Daniel P. Berrange" <berrange@redhat.com>
Date: Tue, 1 Oct 2013 12:28:17 +0100
Subject: [PATCH] hw/9pfs: Fix errno value for xattr functions
If there is no operation driver for the xattr type the
functions return '-1' and set errno to '-EOPNOTSUPP'.
When the calling code sets 'ret = -errno' this turns
into a large positive number.
In Linux 3.11, the kernel has switched to using 9p
version 9p2000.L, instead of 9p2000.u, which enables
support for xattr operations. This on its own is harmless,
but for another change which makes it request the xattr
with a name 'security.capability'.
The result is that the guest sees a succesful return
of 95 bytes of data, instead of a failure with errno
set to 95. Since the kernel expects a maximum of 20
bytes for an xattr return this gets translated to the
unexpected errno ERANGE.
This all means that when running a binary off a 9p fs
in 3.11 kernels you get a fun result of:
# ./date
sh: ./date: Numerical result out of range
The only workaround is to pass 'version=9p2000.u' when
mounting the 9p fs in the guest, to disable all use of
xattrs.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
hw/9pfs/virtio-9p-xattr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/9pfs/virtio-9p-xattr.c b/hw/9pfs/virtio-9p-xattr.c
index 90ae565..3fae557 100644
--- a/hw/9pfs/virtio-9p-xattr.c
+++ b/hw/9pfs/virtio-9p-xattr.c
@@ -36,7 +36,7 @@ ssize_t v9fs_get_xattr(FsContext *ctx, const char *path,
if (xops) {
return xops->getxattr(ctx, path, name, value, size);
}
- errno = -EOPNOTSUPP;
+ errno = EOPNOTSUPP;
return -1;
}
@@ -123,7 +123,7 @@ int v9fs_set_xattr(FsContext *ctx, const char *path, const char *name,
if (xops) {
return xops->setxattr(ctx, path, name, value, size, flags);
}
- errno = -EOPNOTSUPP;
+ errno = EOPNOTSUPP;
return -1;
}
@@ -135,7 +135,7 @@ int v9fs_remove_xattr(FsContext *ctx,
if (xops) {
return xops->removexattr(ctx, path, name);
}
- errno = -EOPNOTSUPP;
+ errno = EOPNOTSUPP;
return -1;
}

View File

@ -1,203 +0,0 @@
From 042c76790b1168766332b1aafa4429c265d35ed0 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso@redhat.com>
Date: Mon, 7 Oct 2013 16:32:24 -0400
Subject: [PATCH] Fix pc migration from qemu <= 1.5
The following commit introduced a migration incompatibility:
commit 568f0690fd9aa4d39d84b04c1a5dbb53a915c3fe
Author: David Gibson <david@gibson.dropbear.id.au>
Date: Thu Jun 6 18:48:49 2013 +1000
pci: Replace pci_find_domain() with more general pci_root_bus_path()
The issue is that i440fx savevm idstr went from 0000:00:00.0/I440FX to
0000:00.0/I440FX. Unfortunately we are stuck with the breakage for
1.6 machine types.
Add a compat property to maintain the busted idstr for the 1.6 machine
types, but revert to the old style format for 1.7+, and <= 1.5.
Tested with migration from qemu 1.5, qemu 1.6, and qemu.git.
Cc: qemu-stable@nongnu.org
Signed-off-by: Cole Robinson <crobinso@redhat.com>
---
hw/i386/pc_piix.c | 11 +++++++++++
hw/i386/pc_q35.c | 11 +++++++++++
hw/pci-host/piix.c | 9 ++++++++-
hw/pci-host/q35.c | 10 ++++++++--
include/hw/i386/pc.h | 20 ++++++++++++++++++++
include/hw/pci-host/q35.h | 1 +
6 files changed, 59 insertions(+), 3 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 2f2cb4d..10866f5 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -341,6 +341,13 @@ static void pc_xen_hvm_init(QEMUMachineInitArgs *args)
}
#endif
+#define PC_I440FX_MACHINE_OPTIONS \
+ PC_DEFAULT_MACHINE_OPTIONS, \
+ .desc = "Standard PC (i440FX + PIIX, 1996)", \
+ .hot_add_cpu = pc_hot_add_cpu
+
+#define PC_I440FX_1_6_MACHINE_OPTIONS PC_I440FX_MACHINE_OPTIONS
+
static QEMUMachine pc_i440fx_machine_v1_6 = {
.name = "pc-i440fx-1.6",
.alias = "pc",
@@ -349,6 +356,10 @@ static QEMUMachine pc_i440fx_machine_v1_6 = {
.hot_add_cpu = pc_hot_add_cpu,
.max_cpus = 255,
.is_default = 1,
+ .compat_props = (GlobalProperty[]) {
+ PC_COMPAT_1_6,
+ { /* end of list */ }
+ },
DEFAULT_MACHINE_OPTIONS,
};
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index dd13130..4998ed3 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -243,6 +243,13 @@ static void pc_q35_init_1_4(QEMUMachineInitArgs *args)
pc_q35_init(args);
}
+#define PC_Q35_MACHINE_OPTIONS \
+ PC_DEFAULT_MACHINE_OPTIONS, \
+ .desc = "Standard PC (Q35 + ICH9, 2009)", \
+ .hot_add_cpu = pc_hot_add_cpu
+
+#define PC_Q35_1_6_MACHINE_OPTIONS PC_Q35_MACHINE_OPTIONS
+
static QEMUMachine pc_q35_machine_v1_6 = {
.name = "pc-q35-1.6",
.alias = "q35",
@@ -250,6 +257,10 @@ static QEMUMachine pc_q35_machine_v1_6 = {
.init = pc_q35_init_1_6,
.hot_add_cpu = pc_hot_add_cpu,
.max_cpus = 255,
+ .compat_props = (GlobalProperty[]) {
+ PC_COMPAT_1_6,
+ { /* end of list */ }
+ },
DEFAULT_MACHINE_OPTIONS,
};
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 221d82b..967f949 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -48,6 +48,7 @@ typedef struct I440FXState {
PCIHostState parent_obj;
PcPciInfo pci_info;
uint64_t pci_hole64_size;
+ uint32_t short_root_bus;
} I440FXState;
#define PIIX_NUM_PIC_IRQS 16 /* i8259 * 2 */
@@ -706,13 +707,19 @@ static const TypeInfo i440fx_info = {
static const char *i440fx_pcihost_root_bus_path(PCIHostState *host_bridge,
PCIBus *rootbus)
{
+ I440FXState *s = I440FX_PCI_HOST_BRIDGE(host_bridge);
+
/* For backwards compat with old device paths */
- return "0000";
+ if (s->short_root_bus) {
+ return "0000";
+ }
+ return "0000:00";
}
static Property i440fx_props[] = {
DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, I440FXState,
pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
+ DEFINE_PROP_UINT32("short_root_bus", I440FXState, short_root_bus, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 4febd24..f762053 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -61,8 +61,13 @@ static void q35_host_realize(DeviceState *dev, Error **errp)
static const char *q35_host_root_bus_path(PCIHostState *host_bridge,
PCIBus *rootbus)
{
- /* For backwards compat with old device paths */
- return "0000";
+ Q35PCIHost *s = Q35_HOST_DEVICE(host_bridge);
+
+ /* For backwards compat with old device paths */
+ if (s->mch.short_root_bus) {
+ return "0000";
+ }
+ return "0000:00";
}
static void q35_host_get_pci_hole_start(Object *obj, Visitor *v,
@@ -108,6 +113,7 @@ static Property mch_props[] = {
MCH_HOST_BRIDGE_PCIEXBAR_DEFAULT),
DEFINE_PROP_SIZE(PCI_HOST_PROP_PCI_HOLE64_SIZE, Q35PCIHost,
mch.pci_hole64_size, DEFAULT_PCI_HOLE64_SIZE),
+ DEFINE_PROP_UINT32("short_root_bus", Q35PCIHost, mch.short_root_bus, 0),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 475ba9e..6e2b839 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -225,7 +225,19 @@ void pvpanic_init(ISABus *bus);
int e820_add_entry(uint64_t, uint64_t, uint32_t);
+#define PC_COMPAT_1_6 \
+ {\
+ .driver = "i440FX-pcihost",\
+ .property = "short_root_bus",\
+ .value = stringify(1),\
+ },{\
+ .driver = "q35-pcihost",\
+ .property = "short_root_bus",\
+ .value = stringify(1),\
+ }
+
#define PC_COMPAT_1_5 \
+ PC_COMPAT_1_6, \
{\
.driver = "Conroe-" TYPE_X86_CPU,\
.property = "model",\
@@ -258,6 +270,14 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
.driver = TYPE_X86_CPU,\
.property = "pmu",\
.value = "on",\
+ },{\
+ .driver = "i440FX-pcihost",\
+ .property = "short_root_bus",\
+ .value = stringify(0),\
+ },{\
+ .driver = "q35-pcihost",\
+ .property = "short_root_bus",\
+ .value = stringify(0),\
}
#define PC_COMPAT_1_4 \
diff --git a/include/hw/pci-host/q35.h b/include/hw/pci-host/q35.h
index 6eb7ab6..95a3cc2 100644
--- a/include/hw/pci-host/q35.h
+++ b/include/hw/pci-host/q35.h
@@ -61,6 +61,7 @@ typedef struct MCHPCIState {
ram_addr_t above_4g_mem_size;
uint64_t pci_hole64_size;
PcGuestInfo *guest_info;
+ uint32_t short_root_bus;
} MCHPCIState;
typedef struct Q35PCIHost {

View File

@ -1,42 +0,0 @@
From 6b7ac46a461482c06c5ccdf54815e94205bc7d95 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 9 Oct 2013 21:33:44 +0200
Subject: [PATCH] audio: honor QEMU_AUDIO_TIMER_PERIOD instead of waking up
every *nano* second
Now that we no longer have MIN_REARM_TIMER_NS a bug in the audio subsys has
clearly shown it self by trying to make a timer fire every nano second.
Note we have a similar problem in 1.6, 1.5 and older but there
MIN_REARM_TIMER_NS limits the wakeups caused by audio being active to
4000 times / second. This still causes a host cpu load of 50 % for simply
playing audio, where as with this patch git master is at 13%, so we should
backport this to 1.5 and 1.6 too.
Note this will not apply to 1.5 and 1.6 as is.
Cc: qemu-stable@nongnu.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit b4350deed67b95651896ddb60cf9f765093a4848)
Conflicts:
audio/audio.c
---
audio/audio.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/audio/audio.c b/audio/audio.c
index 02bb886..f9b3e95 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1124,7 +1124,8 @@ static int audio_is_timer_needed (void)
static void audio_reset_timer (AudioState *s)
{
if (audio_is_timer_needed ()) {
- qemu_mod_timer (s->ts, qemu_get_clock_ns (vm_clock) + 1);
+ qemu_mod_timer (s->ts,
+ qemu_get_clock_ns (vm_clock) + conf.period.ticks);
}
else {
qemu_del_timer (s->ts);

View File

@ -1,181 +0,0 @@
From dd733d7097c126ee3b8ee8a0f4c38b8ccac76504 Mon Sep 17 00:00:00 2001
From: Amos Kong <akong@redhat.com>
Date: Fri, 15 Nov 2013 18:53:14 +0100
Subject: [PATCH] qmp: access the local QemuOptsLists for drive option
Currently we have three QemuOptsList (qemu_common_drive_opts,
qemu_legacy_drive_opts, and qemu_drive_opts), only qemu_drive_opts
is added to vm_config_groups[].
This patch changes query-command-line-options to access three local
QemuOptsLists for drive option, and merge the description items
together.
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
blockdev.c | 1 -
include/qemu/config-file.h | 1 +
include/sysemu/sysemu.h | 1 +
util/qemu-config.c | 77 +++++++++++++++++++++++++++++++++++++++++++++-
vl.c | 2 ++
5 files changed, 80 insertions(+), 2 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 097932c..1a6892e 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -45,7 +45,6 @@
#include "sysemu/arch_init.h"
static QTAILQ_HEAD(drivelist, DriveInfo) drives = QTAILQ_HEAD_INITIALIZER(drives);
-extern QemuOptsList qemu_common_drive_opts;
extern QemuOptsList qemu_old_drive_opts;
static const char *const if_name[IF_COUNT] = {
diff --git a/include/qemu/config-file.h b/include/qemu/config-file.h
index ad4a9e5..508428f 100644
--- a/include/qemu/config-file.h
+++ b/include/qemu/config-file.h
@@ -8,6 +8,7 @@
QemuOptsList *qemu_find_opts(const char *group);
QemuOptsList *qemu_find_opts_err(const char *group, Error **errp);
void qemu_add_opts(QemuOptsList *list);
+void qemu_add_drive_opts(QemuOptsList *list);
int qemu_set_option(const char *str);
int qemu_global_option(const char *str);
void qemu_add_globals(void);
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 1a77c99..4962cef 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -190,6 +190,7 @@ QemuOpts *qemu_get_machine_opts(void);
bool usb_enabled(bool default_usb);
+extern QemuOptsList qemu_common_drive_opts;
extern QemuOptsList qemu_drive_opts;
extern QemuOptsList qemu_chardev_opts;
extern QemuOptsList qemu_device_opts;
diff --git a/util/qemu-config.c b/util/qemu-config.c
index a59568d..04da942 100644
--- a/util/qemu-config.c
+++ b/util/qemu-config.c
@@ -8,6 +8,7 @@
#include "qmp-commands.h"
static QemuOptsList *vm_config_groups[32];
+static QemuOptsList *drive_config_groups[4];
static QemuOptsList *find_list(QemuOptsList **lists, const char *group,
Error **errp)
@@ -77,6 +78,59 @@ static CommandLineParameterInfoList *query_option_descs(const QemuOptDesc *desc)
return param_list;
}
+/* remove repeated entry from the info list */
+static void cleanup_infolist(CommandLineParameterInfoList *head)
+{
+ CommandLineParameterInfoList *pre_entry, *cur, *del_entry;
+
+ cur = head;
+ while (cur->next) {
+ pre_entry = head;
+ while (pre_entry != cur->next) {
+ if (!strcmp(pre_entry->value->name, cur->next->value->name)) {
+ del_entry = cur->next;
+ cur->next = cur->next->next;
+ g_free(del_entry);
+ break;
+ }
+ pre_entry = pre_entry->next;
+ }
+ cur = cur->next;
+ }
+}
+
+/* merge the description items of two parameter infolists */
+static void connect_infolist(CommandLineParameterInfoList *head,
+ CommandLineParameterInfoList *new)
+{
+ CommandLineParameterInfoList *cur;
+
+ cur = head;
+ while (cur->next) {
+ cur = cur->next;
+ }
+ cur->next = new;
+}
+
+/* access all the local QemuOptsLists for drive option */
+static CommandLineParameterInfoList *get_drive_infolist(void)
+{
+ CommandLineParameterInfoList *head = NULL, *cur;
+ int i;
+
+ for (i = 0; drive_config_groups[i] != NULL; i++) {
+ if (!head) {
+ head = query_option_descs(drive_config_groups[i]->desc);
+ } else {
+ cur = query_option_descs(drive_config_groups[i]->desc);
+ connect_infolist(head, cur);
+ }
+ }
+ cleanup_infolist(head);
+
+ return head;
+}
+
CommandLineOptionInfoList *qmp_query_command_line_options(bool has_option,
const char *option,
Error **errp)
@@ -89,7 +143,12 @@ CommandLineOptionInfoList *qmp_query_command_line_options(bool has_option,
if (!has_option || !strcmp(option, vm_config_groups[i]->name)) {
info = g_malloc0(sizeof(*info));
info->option = g_strdup(vm_config_groups[i]->name);
- info->parameters = query_option_descs(vm_config_groups[i]->desc);
+ if (!strcmp("drive", vm_config_groups[i]->name)) {
+ info->parameters = get_drive_infolist();
+ } else {
+ info->parameters =
+ query_option_descs(vm_config_groups[i]->desc);
+ }
entry = g_malloc0(sizeof(*entry));
entry->value = info;
entry->next = conf_list;
@@ -109,6 +168,22 @@ QemuOptsList *qemu_find_opts_err(const char *group, Error **errp)
return find_list(vm_config_groups, group, errp);
}
+void qemu_add_drive_opts(QemuOptsList *list)
+{
+ int entries, i;
+
+ entries = ARRAY_SIZE(drive_config_groups);
+ entries--; /* keep list NULL terminated */
+ for (i = 0; i < entries; i++) {
+ if (drive_config_groups[i] == NULL) {
+ drive_config_groups[i] = list;
+ return;
+ }
+ }
+ fprintf(stderr, "ran out of space in drive_config_groups");
+ abort();
+}
+
void qemu_add_opts(QemuOptsList *list)
{
int entries, i;
diff --git a/vl.c b/vl.c
index 2160933..63ecf16 100644
--- a/vl.c
+++ b/vl.c
@@ -2942,6 +2942,8 @@ int main(int argc, char **argv, char **envp)
module_call_init(MODULE_INIT_QOM);
qemu_add_opts(&qemu_drive_opts);
+ qemu_add_drive_opts(&qemu_common_drive_opts);
+ qemu_add_drive_opts(&qemu_drive_opts);
qemu_add_opts(&qemu_chardev_opts);
qemu_add_opts(&qemu_device_opts);
qemu_add_opts(&qemu_netdev_opts);

View File

@ -1,28 +0,0 @@
From aafda3de0ce3589fa69472bd4a1782c65c8c7ade Mon Sep 17 00:00:00 2001
From: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Date: Tue, 24 Sep 2013 14:50:44 -0300
Subject: [PATCH] seccomp: fine tuning whitelist by adding times()
This was causing Qemu process to hang when using -sandbox on as
discribed on RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1004175
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Tested-by: Paul Moore <pmoore@redhat.com>
Acked-by: Paul Moore <pmoore@redhat.com>
(cherry picked from commit c236f4519c9838801798f3705c17dce9ab9e3b9d)
---
qemu-seccomp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/qemu-seccomp.c b/qemu-seccomp.c
index 37d38f8..69cee44 100644
--- a/qemu-seccomp.c
+++ b/qemu-seccomp.c
@@ -90,6 +90,7 @@ static const struct QemuSeccompSyscall seccomp_whitelist[] = {
{ SCMP_SYS(getuid), 245 },
{ SCMP_SYS(geteuid), 245 },
{ SCMP_SYS(timer_create), 245 },
+ { SCMP_SYS(times), 245 },
{ SCMP_SYS(exit), 245 },
{ SCMP_SYS(clock_gettime), 245 },
{ SCMP_SYS(time), 245 },

View File

@ -1 +0,0 @@
KERNEL=="kvm", GROUP="kvm", MODE="0666"

12
95-kvm-ppc64-memlock.conf Normal file
View File

@ -0,0 +1,12 @@
# The KVM HV implementation on Power can require a significant amount
# of unswappable memory (about half of which also needs to be host
# physically contiguous) to hold the guest's Hash Page Table (HPT) -
# roughly 1/64th of the guest's RAM size, minimum 16MiB.
#
# These limits allow unprivileged users to start smallish VMs, such as
# those used by libguestfs.
#
# https://bugzilla.redhat.com/show_bug.cgi?id=1293024
#
* hard memlock 65536
* soft memlock 65536

View File

@ -1,14 +0,0 @@
[Unit]
Description=Kernel Samepage Merging
ConditionPathExists=/sys/kernel/mm/ksm
ConditionVirtualization=no
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=-/etc/sysconfig/ksm
ExecStart=/lib/systemd/ksmctl start
ExecStop=/lib/systemd/ksmctl stop
[Install]
WantedBy=multi-user.target

View File

@ -1,4 +0,0 @@
# The maximum number of unswappable kernel pages
# which may be allocated by ksm (0 for unlimited)
# If unset, defaults to half of total memory
# KSM_MAX_KERNEL_PAGES=

View File

@ -1,77 +0,0 @@
/* Start/stop KSM, for systemd.
* Copyright (C) 2009, 2011 Red Hat, Inc.
* Written by Paolo Bonzini <pbonzini@redhat.com>.
* Based on the original sysvinit script by Dan Kenigsberg <danken@redhat.com>
* This file is distributed under the GNU General Public License, version 2
* or later. */
#include <unistd.h>
#include <stdio.h>
#include <limits.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#define KSM_MAX_KERNEL_PAGES_FILE "/sys/kernel/mm/ksm/max_kernel_pages"
#define KSM_RUN_FILE "/sys/kernel/mm/ksm/run"
char *program_name;
int usage(void)
{
fprintf(stderr, "Usage: %s {start|stop}\n", program_name);
return 1;
}
int write_value(uint64_t value, char *filename)
{
FILE *fp;
if (!(fp = fopen(filename, "w")) ||
fprintf(fp, "%llu\n", (unsigned long long) value) == EOF ||
fflush(fp) == EOF ||
fclose(fp) == EOF)
return 1;
return 0;
}
uint64_t ksm_max_kernel_pages()
{
char *var = getenv("KSM_MAX_KERNEL_PAGES");
char *endptr;
uint64_t value;
if (var && *var) {
value = strtoll(var, &endptr, 0);
if (value < LLONG_MAX && !*endptr)
return value;
}
/* Unless KSM_MAX_KERNEL_PAGES is set, let KSM munch up to half of
* total memory. */
return sysconf(_SC_PHYS_PAGES) / 2;
}
int start(void)
{
if (access(KSM_MAX_KERNEL_PAGES_FILE, R_OK) >= 0)
write_value(ksm_max_kernel_pages(), KSM_MAX_KERNEL_PAGES_FILE);
return write_value(1, KSM_RUN_FILE);
}
int stop(void)
{
return write_value(0, KSM_RUN_FILE);
}
int main(int argc, char **argv)
{
program_name = argv[0];
if (argc < 2) {
return usage();
} else if (!strcmp(argv[1], "start")) {
return start();
} else if (!strcmp(argv[1], "stop")) {
return stop();
} else {
return usage();
}
}

139
ksmtuned
View File

@ -1,139 +0,0 @@
#!/bin/bash
#
# Copyright 2009 Red Hat, Inc. and/or its affiliates.
# Released under the GPL
#
# Author: Dan Kenigsberg <danken@redhat.com>
#
# ksmtuned - a simple script that controls whether (and with what vigor) ksm
# should search for duplicated pages.
#
# starts ksm when memory commited to qemu processes exceeds a threshold, and
# make ksm work harder and harder untill memory load falls below that
# threshold.
#
# send SIGUSR1 to this process right after a new qemu process is started, or
# following its death, to retune ksm accordingly
#
# needs testing and ironing. contact danken@redhat.com if something breaks.
if [ -f /etc/ksmtuned.conf ]; then
. /etc/ksmtuned.conf
fi
debug() {
if [ -n "$DEBUG" ]; then
s="`/bin/date`: $*"
[ -n "$LOGFILE" ] && echo "$s" >> "$LOGFILE" || echo "$s"
fi
}
KSM_MONITOR_INTERVAL=${KSM_MONITOR_INTERVAL:-60}
KSM_NPAGES_BOOST=${KSM_NPAGES_BOOST:-300}
KSM_NPAGES_DECAY=${KSM_NPAGES_DECAY:--50}
KSM_NPAGES_MIN=${KSM_NPAGES_MIN:-64}
KSM_NPAGES_MAX=${KSM_NPAGES_MAX:-1250}
# millisecond sleep between ksm scans for 16Gb server. Smaller servers sleep
# more, bigger sleep less.
KSM_SLEEP_MSEC=${KSM_SLEEP_MSEC:-10}
KSM_THRES_COEF=${KSM_THRES_COEF:-20}
KSM_THRES_CONST=${KSM_THRES_CONST:-2048}
total=`awk '/^MemTotal:/ {print $2}' /proc/meminfo`
debug total $total
npages=0
sleep=$[KSM_SLEEP_MSEC * 16 * 1024 * 1024 / total]
[ $sleep -le 10 ] && sleep=10
debug sleep $sleep
thres=$[total * KSM_THRES_COEF / 100]
if [ $KSM_THRES_CONST -gt $thres ]; then
thres=$KSM_THRES_CONST
fi
debug thres $thres
KSMCTL () {
case x$1 in
xstop)
echo 0 > /sys/kernel/mm/ksm/run
;;
xstart)
echo $2 > /sys/kernel/mm/ksm/pages_to_scan
echo $3 > /sys/kernel/mm/ksm/sleep_millisecs
echo 1 > /sys/kernel/mm/ksm/run
;;
esac
}
committed_memory () {
# calculate how much memory is committed to running qemu processes
local pidlist
pidlist=$(pgrep -d ' ' -- '^qemu(-(kvm|system-.+)|:.{1,11})$')
if [ -n "$pidlist" ]; then
ps -p "$pidlist" -o rsz=
fi | awk '{ sum += $1 }; END { print 0+sum }'
}
free_memory () {
awk '/^(MemFree|Buffers|Cached):/ {free += $2}; END {print free}' \
/proc/meminfo
}
increase_npages() {
local delta
delta=${1:-0}
npages=$[npages + delta]
if [ $npages -lt $KSM_NPAGES_MIN ]; then
npages=$KSM_NPAGES_MIN
elif [ $npages -gt $KSM_NPAGES_MAX ]; then
npages=$KSM_NPAGES_MAX
fi
echo $npages
}
adjust () {
local free committed
free=`free_memory`
committed=`committed_memory`
debug committed $committed free $free
if [ $[committed + thres] -lt $total -a $free -gt $thres ]; then
KSMCTL stop
debug "$[committed + thres] < $total and free > $thres, stop ksm"
return 1
fi
debug "$[committed + thres] > $total, start ksm"
if [ $free -lt $thres ]; then
npages=`increase_npages $KSM_NPAGES_BOOST`
debug "$free < $thres, boost"
else
npages=`increase_npages $KSM_NPAGES_DECAY`
debug "$free > $thres, decay"
fi
KSMCTL start $npages $sleep
debug "KSMCTL start $npages $sleep"
return 0
}
function nothing () {
:
}
loop () {
trap nothing SIGUSR1
while true
do
sleep $KSM_MONITOR_INTERVAL &
wait $!
adjust
done
}
PIDFILE=${PIDFILE-/var/run/ksmtune.pid}
if touch "$PIDFILE"; then
loop &
echo $! > "$PIDFILE"
fi

View File

@ -1,21 +0,0 @@
# Configuration file for ksmtuned.
# How long ksmtuned should sleep between tuning adjustments
# KSM_MONITOR_INTERVAL=60
# Millisecond sleep between ksm scans for 16Gb server.
# Smaller servers sleep more, bigger sleep less.
# KSM_SLEEP_MSEC=10
# KSM_NPAGES_BOOST=300
# KSM_NPAGES_DECAY=-50
# KSM_NPAGES_MIN=64
# KSM_NPAGES_MAX=1250
# KSM_THRES_COEF=20
# KSM_THRES_CONST=2048
# uncomment the following if you want ksmtuned debug info
# LOGFILE=/var/log/ksmtuned
# DEBUG=1

View File

@ -1,13 +0,0 @@
[Unit]
Description=Kernel Samepage Merging (KSM) Tuning Daemon
After=ksm.service
Requires=ksm.service
ConditionVirtualization=no
[Service]
ExecStart=/usr/sbin/ksmtuned
ExecReload=/bin/kill -USR1 $MAINPID
Type=forking
[Install]
WantedBy=multi-user.target

11
kvm-x86.modprobe.conf Normal file
View File

@ -0,0 +1,11 @@
###
### This configuration file was provided by the qemu package.
### Feel free to update as needed.
###
###
### Set these options to enable nested virtualization
###
#options kvm_intel nested=1
#options kvm_amd nested=1

View File

@ -1,16 +0,0 @@
#!/bin/sh
case $(uname -m) in
ppc64)
grep OPAL /proc/cpuinfo >/dev/null 2>&1 && opal=1
if [ "$opal" ]; then
modprobe -b kvm >/dev/null 2>&1 && kvm=1
fi
;;
s390x)
modprobe -b kvm >/dev/null 2>&1 && kvm=1
;;
esac
exit 0

19
qemu-ga.sysconfig Normal file
View File

@ -0,0 +1,19 @@
# This is a systemd environment file, not a shell script.
# It provides settings for "/lib/systemd/system/qemu-guest-agent.service".
# Comma-separated blacklist of RPCs to disable, or empty list to enable all.
#
# You can get the list of RPC commands using "qemu-ga --blacklist='?'".
# There should be no spaces between commas and commands in the blacklist.
#BLACKLIST_RPC=guest-file-open,guest-file-close,guest-file-read,guest-file-write,guest-file-seek,guest-file-flush,guest-exec,guest-exec-status
# Fsfreeze hook script specification.
#
# FSFREEZE_HOOK_PATHNAME=/dev/null : disables the feature.
#
# FSFREEZE_HOOK_PATHNAME=/path/to/executable : enables the feature with the
# specified binary or shell script.
#
# FSFREEZE_HOOK_PATHNAME= : enables the feature with the
# default value (invoke "qemu-ga --help" to interrogate).
FSFREEZE_HOOK_PATHNAME=/etc/qemu-ga/fsfreeze-hook

View File

@ -1,11 +1,19 @@
[Unit]
Description=QEMU Guest Agent
BindTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device
BindsTo=dev-virtio\x2dports-org.qemu.guest_agent.0.device
After=dev-virtio\x2dports-org.qemu.guest_agent.0.device
IgnoreOnIsolate=True
[Service]
ExecStart=-/usr/bin/qemu-ga
UMask=0077
EnvironmentFile=/etc/sysconfig/qemu-ga
ExecStart=/usr/bin/qemu-ga \
--method=virtio-serial \
--path=/dev/virtio-ports/org.qemu.guest_agent.0 \
--blacklist=${BLACKLIST_RPC} \
-F${FSFREEZE_HOOK_PATHNAME}
Restart=always
RestartSec=0
[Install]
WantedBy=dev-virtio\x2dports-org.qemu.guest_agent.0.device

View File

@ -1,3 +1,10 @@
#!/bin/sh
exec /usr/bin/qemu-system-x86_64 -machine accel=kvm "$@"
# Libvirt introspects the binary using -M none. In that case, don't try
# to init KVM, which will fail and be noisy if the host has kvm disabled
opts="-machine accel=kvm"
if echo "$@" | grep -q " -M none "; then
opts=
fi
exec /usr/bin/qemu-system-x86_64 $opts "$@"

View File

@ -1,22 +0,0 @@
:qemu-alpha:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x26\x90:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-alpha:
:qemu-armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb:
:qemu-arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm:
:qemu-cris:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x4c\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-cris:
:qemu-i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:
:qemu-i486:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x06\x00:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-i386:
:qemu-m68k:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x04:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-m68k:
:qemu-microblazeel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xab\xba:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-microblazeel:
:qemu-microblaze:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xba\xab:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-microblaze:
:qemu-mips64el:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mips64el:
:qemu-mips64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips64:
:qemu-mipsel:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-mipsel:
:qemu-mips:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x08:\xff\xff\xff\xff\xff\xff\xff\x00\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-mips:
:qemu-ppc64abi32:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc64abi32:
:qemu-ppc64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x15:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc64:
:qemu-ppc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x14:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-ppc:
:qemu-s390x:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x16:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-s390x:
:qemu-sh4eb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sh4eb:
:qemu-sh4:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2a\x00:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-sh4:
:qemu-sparc32plus:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x12:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc32plus:
:qemu-sparc64:M::\x7fELF\x02\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x2b:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc64:
:qemu-sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc:

3960
qemu.spec

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
3a897d722457c5a895cd6ac79a28fda0 qemu-1.6.1.tar.bz2
SHA512 (qemu-5.2.0-rc4.tar.xz) = 47e918392609c34f904962e5759125485407ae52c273053729054300e10fc67fc7ed443c9af25d1d852a5f5c70eee125c703ce15d0e571068848f405de33db3b