mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge tag 'pull-request-2023-02-27' of https://gitlab.com/thuth/qemu into staging
* Simplify device casting in w/vfio/ccw.c * Fix memory corruption in the s390x dump code * Various s390x TCG clean-ups * s390x PV support for asynchronous teardown for reboot * qemu-keymap related fixes * Improvements for the duration of the gitlab-CI * Deprecate the "-no-acpi" command line switch # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmP8lVURHHRodXRoQHJl # ZGhhdC5jb20ACgkQLtnXdP5wLbWYkg//RTKsG0+HGMtnKvjTA5NzLIJrWAQfSPfh # ABkxNHoscReae8LGquFfeTy9cN/uA051e/P06WfPXAkg3Uj72JKHHs/ncm5VhApY # 7moOCIHlvFRAsy5TKYoInM+Yo0jov7vgKqqJcS3AL3hwhmvEwPwKr0cpZLNfKV8p # GD+XM453g0AFn2jDFoXDsnHX3zco+7sd4dQN4olSrkd/gDel2UQ5JE4gJ/o6Qgys # GW4vb+NpxQ6W3mSlU+ClTr03ZljPkascBS7tZO8Fwn+J3Wv4UTNLlM1JFXQhC3v8 # x9HpVpk4HW6C/hiPcsMpZRlXBb/HklkAhDxZ6tjTnQLRvbJ/o2uISJt+ZgeH9zeQ # Ae4Ap7yPxsuGbx2twzbGoyEPAJj18hW7EUd6KromFqy877svmyRYs3NXQqSJOEmh # Pv7VriUe6esyyVSXWjA6g2imo5pIhWxxRlsNVrrp8vOJNYT+ygBIFqu28ngwk86H # jZOLqekEkQrNkwZZLuoxm8FyCAvzfMBeHQFlDnL4a3114dlC6X3/cJqCZ5htTaO+ # t7CL6QcepRh0NQPw1jRlUCARZK+WocjwwcmzgVzSKKzGpdg/EJC8Sg54l7wdVQCp # jY3HEUWHHHmrqe3IefrzadRQhsB9xKcNdUaZmetRUm+ohgSc9S0cfpVXNwT+G3+M # a47dp9ueI6Q= # =wDFZ # -----END PGP SIGNATURE----- # gpg: Signature made Mon 27 Feb 2023 11:34:45 GMT # gpg: using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5 # gpg: issuer "thuth@redhat.com" # gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full] # gpg: aka "Thomas Huth <thuth@redhat.com>" [full] # gpg: aka "Thomas Huth <huth@tuxfamily.org>" [full] # gpg: aka "Thomas Huth <th.huth@posteo.de>" [unknown] # Primary key fingerprint: 27B8 8847 EEE0 2501 18F3 EAB9 2ED9 D774 FE70 2DB5 * tag 'pull-request-2023-02-27' of https://gitlab.com/thuth/qemu: (33 commits) Deprecate the "-no-acpi" command line switch gitlab-ci.d/base: Mark jobs as interruptible by default gitlab-ci.d: Build with --enable-fdt=system by default gitlab-ci.d/buildtest-template: Simplify the configure step gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job gitlab-ci.d/buildtest: Remove aarch64-softmmu from the build-system-ubuntu job Updated the FSF address to <https://www.gnu.org/licenses/> meson: fix dependency on qemu-keymap qemu-keymap: Silence memory leak warning from Clang's sanitizer configure: Add 'mkdir build' check tests/tcg/s390x: Add sam.S tests/tcg/s390x: Add bal.S target/s390x: Use tcg_constant_* in translate_vx.c.inc target/s390x: Use tcg_constant_i32 for fpinst_extract_m34 target/s390x: Use tcg_constant_* for DisasCompare target/s390x: Use tcg_constant_* in local contexts s390x/pv: Add support for asynchronous teardown for reboot target/s390x: Hoist some computation in access_memmove target/s390x: Inline do_access_{get,set}_byte target/s390x: Remove TLB_NOTDIRTY workarounds ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
# and show the duration of each line.
|
||||
FF_SCRIPT_SECTIONS: 1
|
||||
|
||||
interruptible: true
|
||||
|
||||
rules:
|
||||
#############################################################
|
||||
# Stage 1: exclude scenarios where we definitely don't
|
||||
|
||||
@@ -11,12 +11,10 @@
|
||||
fi
|
||||
- mkdir build
|
||||
- cd build
|
||||
- if test -n "$TARGETS";
|
||||
then
|
||||
../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS --target-list="$TARGETS" ;
|
||||
else
|
||||
../configure --enable-werror --disable-docs ${LD_JOBS:+--meson=git} $CONFIGURE_ARGS ;
|
||||
fi || { cat config.log meson-logs/meson-log.txt && exit 1; }
|
||||
- ../configure --enable-werror --disable-docs --enable-fdt=system
|
||||
${LD_JOBS:+--meson=git} ${TARGETS:+--target-list="$TARGETS"}
|
||||
$CONFIGURE_ARGS ||
|
||||
{ cat config.log meson-logs/meson-log.txt && exit 1; }
|
||||
- if test -n "$LD_JOBS";
|
||||
then
|
||||
../meson/meson.py configure . -Dbackend_max_links="$LD_JOBS" ;
|
||||
|
||||
@@ -41,8 +41,8 @@ build-system-ubuntu:
|
||||
job: amd64-ubuntu2004-container
|
||||
variables:
|
||||
IMAGE: ubuntu2004
|
||||
CONFIGURE_ARGS: --enable-docs --enable-fdt=system --enable-capstone
|
||||
TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu
|
||||
CONFIGURE_ARGS: --enable-docs
|
||||
TARGETS: alpha-softmmu cris-softmmu hppa-softmmu
|
||||
microblazeel-softmmu mips64el-softmmu
|
||||
MAKE_CHECK_ARGS: check-build
|
||||
artifacts:
|
||||
@@ -74,6 +74,7 @@ build-system-debian:
|
||||
job: amd64-debian-container
|
||||
variables:
|
||||
IMAGE: debian-amd64
|
||||
CONFIGURE_ARGS: --with-coroutine=sigaltstack
|
||||
TARGETS: arm-softmmu avr-softmmu i386-softmmu mipsel-softmmu
|
||||
riscv64-softmmu sh4eb-softmmu sparc-softmmu xtensaeb-softmmu
|
||||
MAKE_CHECK_ARGS: check-build
|
||||
@@ -119,7 +120,6 @@ build-system-fedora:
|
||||
variables:
|
||||
IMAGE: fedora
|
||||
CONFIGURE_ARGS: --disable-gcrypt --enable-nettle --enable-docs
|
||||
--enable-fdt=system --enable-slirp --enable-capstone
|
||||
TARGETS: tricore-softmmu microblaze-softmmu mips-softmmu
|
||||
xtensa-softmmu m68k-softmmu riscv32-softmmu ppc-softmmu sparc64-softmmu
|
||||
MAKE_CHECK_ARGS: check-build
|
||||
@@ -165,9 +165,8 @@ build-system-centos:
|
||||
job: amd64-centos8-container
|
||||
variables:
|
||||
IMAGE: centos8
|
||||
CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-fdt=system
|
||||
CONFIGURE_ARGS: --disable-nettle --enable-gcrypt --enable-vfio-user-server
|
||||
--enable-modules --enable-trace-backends=dtrace --enable-docs
|
||||
--enable-vfio-user-server
|
||||
TARGETS: ppc64-softmmu or1k-softmmu s390x-softmmu
|
||||
x86_64-softmmu rx-softmmu sh4-softmmu nios2-softmmu
|
||||
MAKE_CHECK_ARGS: check-build
|
||||
@@ -200,7 +199,6 @@ build-system-opensuse:
|
||||
job: amd64-opensuse-leap-container
|
||||
variables:
|
||||
IMAGE: opensuse-leap
|
||||
CONFIGURE_ARGS: --enable-fdt=system
|
||||
TARGETS: s390x-softmmu x86_64-softmmu aarch64-softmmu
|
||||
MAKE_CHECK_ARGS: check-build
|
||||
artifacts:
|
||||
@@ -463,7 +461,7 @@ tsan-build:
|
||||
variables:
|
||||
IMAGE: ubuntu2004
|
||||
CONFIGURE_ARGS: --enable-tsan --cc=clang-10 --cxx=clang++-10
|
||||
--enable-trace-backends=ust --enable-fdt=system --disable-slirp
|
||||
--enable-trace-backends=ust --disable-slirp
|
||||
TARGETS: x86_64-softmmu ppc64-softmmu riscv64-softmmu x86_64-linux-user
|
||||
MAKE_CHECK_ARGS: bench V=1
|
||||
|
||||
@@ -534,18 +532,6 @@ build-tci:
|
||||
- QTEST_QEMU_BINARY="./qemu-system-s390x" ./tests/qtest/pxe-test -m slow
|
||||
- make check-tcg
|
||||
|
||||
# Alternate coroutines implementations are only really of interest to KVM users
|
||||
# However we can't test against KVM on Gitlab-CI so we can only run unit tests
|
||||
build-coroutine-sigaltstack:
|
||||
extends: .native_build_job_template
|
||||
needs:
|
||||
job: amd64-ubuntu2004-container
|
||||
variables:
|
||||
IMAGE: ubuntu2004
|
||||
CONFIGURE_ARGS: --with-coroutine=sigaltstack --disable-tcg
|
||||
--enable-trace-backends=ftrace
|
||||
MAKE_CHECK_ARGS: check-unit
|
||||
|
||||
# Check our reduced build configurations
|
||||
build-without-defaults:
|
||||
extends: .native_build_job_template
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- ../configure --enable-werror --disable-docs $QEMU_CONFIGURE_OPTS
|
||||
--disable-user --target-list-exclude="arm-softmmu cris-softmmu
|
||||
- ../configure --enable-werror --disable-docs --enable-fdt=system
|
||||
--disable-user $QEMU_CONFIGURE_OPTS $EXTRA_CONFIGURE_OPTS
|
||||
--target-list-exclude="arm-softmmu cris-softmmu
|
||||
i386-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu
|
||||
mips64-softmmu ppc-softmmu riscv32-softmmu sh4-softmmu
|
||||
sparc-softmmu xtensa-softmmu $CROSS_SKIP_TARGETS"
|
||||
|
||||
@@ -159,7 +159,7 @@ cross-s390x-kvm-only:
|
||||
job: s390x-debian-cross-container
|
||||
variables:
|
||||
IMAGE: debian-s390x-cross
|
||||
EXTRA_CONFIGURE_OPTS: --disable-tcg
|
||||
EXTRA_CONFIGURE_OPTS: --disable-tcg --enable-trace-backends=ftrace
|
||||
|
||||
cross-mips64el-kvm-only:
|
||||
extends: .cross_accel_build_job
|
||||
@@ -175,6 +175,7 @@ cross-win32-system:
|
||||
job: win32-fedora-cross-container
|
||||
variables:
|
||||
IMAGE: fedora-win32-cross
|
||||
EXTRA_CONFIGURE_OPTS: --enable-fdt=internal
|
||||
CROSS_SKIP_TARGETS: alpha-softmmu avr-softmmu hppa-softmmu m68k-softmmu
|
||||
microblazeel-softmmu mips64el-softmmu nios2-softmmu
|
||||
artifacts:
|
||||
@@ -187,6 +188,7 @@ cross-win64-system:
|
||||
job: win64-fedora-cross-container
|
||||
variables:
|
||||
IMAGE: fedora-win64-cross
|
||||
EXTRA_CONFIGURE_OPTS: --enable-fdt=internal
|
||||
CROSS_SKIP_TARGETS: alpha-softmmu avr-softmmu hppa-softmmu
|
||||
m68k-softmmu microblazeel-softmmu nios2-softmmu
|
||||
or1k-softmmu rx-softmmu sh4eb-softmmu sparc64-softmmu
|
||||
|
||||
@@ -38,6 +38,7 @@ msys2-64bit:
|
||||
mingw-w64-x86_64-capstone
|
||||
mingw-w64-x86_64-curl
|
||||
mingw-w64-x86_64-cyrus-sasl
|
||||
mingw-w64-x86_64-dtc
|
||||
mingw-w64-x86_64-gcc
|
||||
mingw-w64-x86_64-glib2
|
||||
mingw-w64-x86_64-gnutls
|
||||
@@ -71,7 +72,7 @@ msys2-64bit:
|
||||
# for the msys2 64-bit job, due to the build could not complete within
|
||||
# the project timeout.
|
||||
- ..\msys64\usr\bin\bash -lc '../configure --target-list=x86_64-softmmu
|
||||
--without-default-devices'
|
||||
--without-default-devices --enable-fdt=system'
|
||||
- ..\msys64\usr\bin\bash -lc 'make'
|
||||
# qTests don't run successfully with "--without-default-devices",
|
||||
# so let's exclude the qtests from CI for now.
|
||||
@@ -86,6 +87,7 @@ msys2-32bit:
|
||||
mingw-w64-i686-capstone
|
||||
mingw-w64-i686-curl
|
||||
mingw-w64-i686-cyrus-sasl
|
||||
mingw-w64-i686-dtc
|
||||
mingw-w64-i686-gcc
|
||||
mingw-w64-i686-glib2
|
||||
mingw-w64-i686-gnutls
|
||||
@@ -113,7 +115,8 @@ msys2-32bit:
|
||||
- $env:MSYS = 'winsymlinks:native' # Enable native Windows symlink
|
||||
- mkdir output
|
||||
- cd output
|
||||
- ..\msys64\usr\bin\bash -lc '../configure --target-list=ppc64-softmmu'
|
||||
- ..\msys64\usr\bin\bash -lc '../configure --target-list=ppc64-softmmu
|
||||
--enable-fdt=system'
|
||||
- ..\msys64\usr\bin\bash -lc 'make'
|
||||
- ..\msys64\usr\bin\bash -lc 'make check MTESTARGS=\"--no-suite qtest\" ||
|
||||
{ cat meson-logs/testlog.txt; exit 1; }'
|
||||
|
||||
@@ -31,8 +31,12 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir build
|
||||
touch $MARKER
|
||||
if ! mkdir build || ! touch $MARKER
|
||||
then
|
||||
echo "ERROR: Could not create ./build directory. Check the permissions on"
|
||||
echo "your source directory, or try doing an out-of-tree build."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat > GNUmakefile <<'EOF'
|
||||
# This file is auto-generated by configure to support in-source tree
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
# GNU Library General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Authors : Gregorio Robles <grex@gsyc.escet.urjc.es>
|
||||
# Authors : Germán Póo-Caamaño <gpoo@gnome.org>
|
||||
|
||||
@@ -99,6 +99,12 @@ form is preferred.
|
||||
The HPET setting has been turned into a machine property.
|
||||
Use ``-machine hpet=off`` instead.
|
||||
|
||||
``-no-acpi`` (since 8.0)
|
||||
''''''''''''''''''''''''
|
||||
|
||||
The ``-no-acpi`` setting has been turned into a machine property.
|
||||
Use ``-machine acpi=off`` instead.
|
||||
|
||||
``-accel hax`` (since 8.0)
|
||||
''''''''''''''''''''''''''
|
||||
|
||||
|
||||
@@ -306,6 +306,6 @@ variable::
|
||||
|
||||
host_kconfig = \
|
||||
(have_tpm ? ['CONFIG_TPM=y'] : []) + \
|
||||
('CONFIG_SPICE' in config_host ? ['CONFIG_SPICE=y'] : []) + \
|
||||
('CONFIG_LINUX' in config_host ? ['CONFIG_LINUX=y'] : []) + \
|
||||
(have_ivshmem ? ['CONFIG_IVSHMEM=y'] : []) + \
|
||||
...
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/units.h"
|
||||
#include "qapi/error.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/pci/pci_device.h"
|
||||
#include "hw/pci/pci_host.h"
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/units.h"
|
||||
#include "qapi/error.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/ppc/ppc.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/pci/pci_host.h"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "qapi/error.h"
|
||||
#include "qemu/error-report.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "qom/object_interfaces.h"
|
||||
#include "exec/confidential-guest-support.h"
|
||||
#include "hw/s390x/ipl.h"
|
||||
@@ -108,6 +109,33 @@ void s390_pv_vm_disable(void)
|
||||
s390_pv_cmd_exit(KVM_PV_DISABLE, NULL);
|
||||
}
|
||||
|
||||
static void *s390_pv_do_unprot_async_fn(void *p)
|
||||
{
|
||||
s390_pv_cmd_exit(KVM_PV_ASYNC_CLEANUP_PERFORM, NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool s390_pv_vm_try_disable_async(void)
|
||||
{
|
||||
/*
|
||||
* t is only needed to create the thread; once qemu_thread_create
|
||||
* returns, it can safely be discarded.
|
||||
*/
|
||||
QemuThread t;
|
||||
|
||||
if (!kvm_check_extension(kvm_state, KVM_CAP_S390_PROTECTED_ASYNC_DISABLE)) {
|
||||
return false;
|
||||
}
|
||||
if (s390_pv_cmd(KVM_PV_ASYNC_CLEANUP_PREPARE, NULL) != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
qemu_thread_create(&t, "async_cleanup", s390_pv_do_unprot_async_fn, NULL,
|
||||
QEMU_THREAD_DETACHED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int s390_pv_set_sec_parms(uint64_t origin, uint64_t length)
|
||||
{
|
||||
struct kvm_s390_pv_sec_parm args = {
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "hw/qdev-properties.h"
|
||||
#include "hw/s390x/tod.h"
|
||||
#include "sysemu/sysemu.h"
|
||||
#include "sysemu/cpus.h"
|
||||
#include "hw/s390x/pv.h"
|
||||
#include "migration/blocker.h"
|
||||
#include "qapi/visitor.h"
|
||||
@@ -329,7 +330,9 @@ static inline void s390_do_cpu_ipl(CPUState *cs, run_on_cpu_data arg)
|
||||
|
||||
static void s390_machine_unprotect(S390CcwMachineState *ms)
|
||||
{
|
||||
s390_pv_vm_disable();
|
||||
if (!s390_pv_vm_try_disable_async()) {
|
||||
s390_pv_vm_disable();
|
||||
}
|
||||
ms->pv = false;
|
||||
migrate_del_blocker(pv_mig_blocker);
|
||||
error_free_or_abort(&pv_mig_blocker);
|
||||
|
||||
+1
-2
@@ -16,8 +16,7 @@
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program; if not, write to the Free Software */
|
||||
/* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
/* along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/* */
|
||||
/* This file contains structures and definitions for IBM RPA (RS/6000 */
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qemu/log.h"
|
||||
#include "hw/hw.h"
|
||||
#include "hw/i2c/i2c.h"
|
||||
#include "qapi/error.h"
|
||||
#include "qapi/visitor.h"
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details. You should have received
|
||||
* a copy of the GNU General Public License along with RTEMS; see
|
||||
* file COPYING. If not, write to the Free Software Foundation, 675
|
||||
* Mass Ave, Cambridge, MA 02139, USA.
|
||||
* file COPYING. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* As a special exception, including RTEMS header files in a file,
|
||||
* instantiating RTEMS generics or templates, or linking other files
|
||||
|
||||
+16
-24
@@ -76,8 +76,7 @@ struct VFIODeviceOps vfio_ccw_ops = {
|
||||
|
||||
static IOInstEnding vfio_ccw_handle_request(SubchDev *sch)
|
||||
{
|
||||
S390CCWDevice *cdev = sch->driver_data;
|
||||
VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev);
|
||||
VFIOCCWDevice *vcdev = VFIO_CCW(sch->driver_data);
|
||||
struct ccw_io_region *region = vcdev->io_region;
|
||||
int ret;
|
||||
|
||||
@@ -125,8 +124,7 @@ again:
|
||||
|
||||
static IOInstEnding vfio_ccw_handle_store(SubchDev *sch)
|
||||
{
|
||||
S390CCWDevice *cdev = sch->driver_data;
|
||||
VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev);
|
||||
VFIOCCWDevice *vcdev = VFIO_CCW(sch->driver_data);
|
||||
SCHIB *schib = &sch->curr_status;
|
||||
struct ccw_schib_region *region = vcdev->schib_region;
|
||||
SCHIB *s;
|
||||
@@ -170,8 +168,7 @@ static IOInstEnding vfio_ccw_handle_store(SubchDev *sch)
|
||||
|
||||
static int vfio_ccw_handle_clear(SubchDev *sch)
|
||||
{
|
||||
S390CCWDevice *cdev = sch->driver_data;
|
||||
VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev);
|
||||
VFIOCCWDevice *vcdev = VFIO_CCW(sch->driver_data);
|
||||
struct ccw_cmd_region *region = vcdev->async_cmd_region;
|
||||
int ret;
|
||||
|
||||
@@ -210,8 +207,7 @@ again:
|
||||
|
||||
static int vfio_ccw_handle_halt(SubchDev *sch)
|
||||
{
|
||||
S390CCWDevice *cdev = sch->driver_data;
|
||||
VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev);
|
||||
VFIOCCWDevice *vcdev = VFIO_CCW(sch->driver_data);
|
||||
struct ccw_cmd_region *region = vcdev->async_cmd_region;
|
||||
int ret;
|
||||
|
||||
@@ -251,9 +247,7 @@ again:
|
||||
|
||||
static void vfio_ccw_reset(DeviceState *dev)
|
||||
{
|
||||
CcwDevice *ccw_dev = DO_UPCAST(CcwDevice, parent_obj, dev);
|
||||
S390CCWDevice *cdev = DO_UPCAST(S390CCWDevice, parent_obj, ccw_dev);
|
||||
VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev);
|
||||
VFIOCCWDevice *vcdev = VFIO_CCW(dev);
|
||||
|
||||
ioctl(vcdev->vdev.fd, VFIO_DEVICE_RESET);
|
||||
}
|
||||
@@ -315,8 +309,7 @@ static void vfio_ccw_io_notifier_handler(void *opaque)
|
||||
{
|
||||
VFIOCCWDevice *vcdev = opaque;
|
||||
struct ccw_io_region *region = vcdev->io_region;
|
||||
S390CCWDevice *cdev = S390_CCW_DEVICE(vcdev);
|
||||
CcwDevice *ccw_dev = CCW_DEVICE(cdev);
|
||||
CcwDevice *ccw_dev = CCW_DEVICE(vcdev);
|
||||
SubchDev *sch = ccw_dev->sch;
|
||||
SCHIB *schib = &sch->curr_status;
|
||||
SCSW s;
|
||||
@@ -588,9 +581,10 @@ static void vfio_ccw_put_device(VFIOCCWDevice *vcdev)
|
||||
static void vfio_ccw_get_device(VFIOGroup *group, VFIOCCWDevice *vcdev,
|
||||
Error **errp)
|
||||
{
|
||||
char *name = g_strdup_printf("%x.%x.%04x", vcdev->cdev.hostid.cssid,
|
||||
vcdev->cdev.hostid.ssid,
|
||||
vcdev->cdev.hostid.devid);
|
||||
S390CCWDevice *cdev = S390_CCW_DEVICE(vcdev);
|
||||
char *name = g_strdup_printf("%x.%x.%04x", cdev->hostid.cssid,
|
||||
cdev->hostid.ssid,
|
||||
cdev->hostid.devid);
|
||||
VFIODevice *vbasedev;
|
||||
|
||||
QLIST_FOREACH(vbasedev, &group->device_list, next) {
|
||||
@@ -611,14 +605,14 @@ static void vfio_ccw_get_device(VFIOGroup *group, VFIOCCWDevice *vcdev,
|
||||
*/
|
||||
vcdev->vdev.ram_block_discard_allowed = true;
|
||||
|
||||
if (vfio_get_device(group, vcdev->cdev.mdevid, &vcdev->vdev, errp)) {
|
||||
if (vfio_get_device(group, cdev->mdevid, &vcdev->vdev, errp)) {
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
vcdev->vdev.ops = &vfio_ccw_ops;
|
||||
vcdev->vdev.type = VFIO_DEVICE_TYPE_CCW;
|
||||
vcdev->vdev.name = name;
|
||||
vcdev->vdev.dev = &vcdev->cdev.parent_obj.parent_obj;
|
||||
vcdev->vdev.dev = DEVICE(vcdev);
|
||||
|
||||
return;
|
||||
|
||||
@@ -656,9 +650,8 @@ static VFIOGroup *vfio_ccw_get_group(S390CCWDevice *cdev, Error **errp)
|
||||
static void vfio_ccw_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
VFIOGroup *group;
|
||||
CcwDevice *ccw_dev = DO_UPCAST(CcwDevice, parent_obj, dev);
|
||||
S390CCWDevice *cdev = DO_UPCAST(S390CCWDevice, parent_obj, ccw_dev);
|
||||
VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev);
|
||||
S390CCWDevice *cdev = S390_CCW_DEVICE(dev);
|
||||
VFIOCCWDevice *vcdev = VFIO_CCW(cdev);
|
||||
S390CCWDeviceClass *cdc = S390_CCW_DEVICE_GET_CLASS(cdev);
|
||||
Error *err = NULL;
|
||||
|
||||
@@ -728,9 +721,8 @@ out_err_propagate:
|
||||
|
||||
static void vfio_ccw_unrealize(DeviceState *dev)
|
||||
{
|
||||
CcwDevice *ccw_dev = DO_UPCAST(CcwDevice, parent_obj, dev);
|
||||
S390CCWDevice *cdev = DO_UPCAST(S390CCWDevice, parent_obj, ccw_dev);
|
||||
VFIOCCWDevice *vcdev = DO_UPCAST(VFIOCCWDevice, cdev, cdev);
|
||||
S390CCWDevice *cdev = S390_CCW_DEVICE(dev);
|
||||
VFIOCCWDevice *vcdev = VFIO_CCW(cdev);
|
||||
S390CCWDeviceClass *cdc = S390_CCW_DEVICE_GET_CLASS(cdev);
|
||||
VFIOGroup *group = vcdev->vdev.group;
|
||||
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Various undocumented addresses and names come from Herman Hermitage's VC4
|
||||
* documentation:
|
||||
|
||||
@@ -41,6 +41,7 @@ static inline bool s390_is_pv(void)
|
||||
int s390_pv_query_info(void);
|
||||
int s390_pv_vm_enable(void);
|
||||
void s390_pv_vm_disable(void);
|
||||
bool s390_pv_vm_try_disable_async(void);
|
||||
int s390_pv_set_sec_parms(uint64_t origin, uint64_t length);
|
||||
int s390_pv_unpack(uint64_t addr, uint64_t size, uint64_t tweak);
|
||||
void s390_pv_prep_reset(void);
|
||||
@@ -60,6 +61,7 @@ static inline bool s390_is_pv(void) { return false; }
|
||||
static inline int s390_pv_query_info(void) { return 0; }
|
||||
static inline int s390_pv_vm_enable(void) { return 0; }
|
||||
static inline void s390_pv_vm_disable(void) {}
|
||||
static inline bool s390_pv_vm_try_disable_async(void) { return false; }
|
||||
static inline int s390_pv_set_sec_parms(uint64_t origin, uint64_t length) { return 0; }
|
||||
static inline int s390_pv_unpack(uint64_t addr, uint64_t size, uint64_t tweak) { return 0; }
|
||||
static inline void s390_pv_prep_reset(void) {}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user