kvm-s390.c (4092de1ba34eb376791809fb366bc15f8a9e0b7c) kvm-s390.c (f76f6371643b563a7168a6ba5713ce93caa36ecc)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * hosting IBM Z kernel virtual machines (s390x)
4 *
5 * Copyright IBM Corp. 2008, 2018
6 *
7 * Author(s): Carsten Otte <cotte@de.ibm.com>
8 * Christian Borntraeger <borntraeger@de.ibm.com>

--- 439 unchanged lines hidden (view full) ---

448 *
449 * KVM_S390_VM_CPU_FEAT_SIGPIF: Wrong SCB addresses in the SCA. We
450 * cannot easily shadow the SCA because of the ipte lock.
451 */
452}
453
454int kvm_arch_init(void *opaque)
455{
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * hosting IBM Z kernel virtual machines (s390x)
4 *
5 * Copyright IBM Corp. 2008, 2018
6 *
7 * Author(s): Carsten Otte <cotte@de.ibm.com>
8 * Christian Borntraeger <borntraeger@de.ibm.com>

--- 439 unchanged lines hidden (view full) ---

448 *
449 * KVM_S390_VM_CPU_FEAT_SIGPIF: Wrong SCB addresses in the SCA. We
450 * cannot easily shadow the SCA because of the ipte lock.
451 */
452}
453
454int kvm_arch_init(void *opaque)
455{
456 int rc;
456 int rc = -ENOMEM;
457
458 kvm_s390_dbf = debug_register("kvm-trace", 32, 1, 7 * sizeof(long));
459 if (!kvm_s390_dbf)
460 return -ENOMEM;
461
457
458 kvm_s390_dbf = debug_register("kvm-trace", 32, 1, 7 * sizeof(long));
459 if (!kvm_s390_dbf)
460 return -ENOMEM;
461
462 if (debug_register_view(kvm_s390_dbf, &debug_sprintf_view)) {
463 rc = -ENOMEM;
464 goto out_debug_unreg;
465 }
462 if (debug_register_view(kvm_s390_dbf, &debug_sprintf_view))
463 goto out;
466
467 kvm_s390_cpu_feat_init();
468
469 /* Register floating interrupt controller interface. */
470 rc = kvm_register_device_ops(&kvm_flic_ops, KVM_DEV_TYPE_FLIC);
471 if (rc) {
472 pr_err("A FLIC registration call failed with rc=%d\n", rc);
464
465 kvm_s390_cpu_feat_init();
466
467 /* Register floating interrupt controller interface. */
468 rc = kvm_register_device_ops(&kvm_flic_ops, KVM_DEV_TYPE_FLIC);
469 if (rc) {
470 pr_err("A FLIC registration call failed with rc=%d\n", rc);
473 goto out_debug_unreg;
471 goto out;
474 }
475
476 rc = kvm_s390_gib_init(GAL_ISC);
477 if (rc)
472 }
473
474 rc = kvm_s390_gib_init(GAL_ISC);
475 if (rc)
478 goto out_gib_destroy;
476 goto out;
479
480 return 0;
481
477
478 return 0;
479
482out_gib_destroy:
483 kvm_s390_gib_destroy();
484out_debug_unreg:
485 debug_unregister(kvm_s390_dbf);
480out:
481 kvm_arch_exit();
486 return rc;
487}
488
489void kvm_arch_exit(void)
490{
491 kvm_s390_gib_destroy();
492 debug_unregister(kvm_s390_dbf);
493}

--- 4114 unchanged lines hidden ---
482 return rc;
483}
484
485void kvm_arch_exit(void)
486{
487 kvm_s390_gib_destroy();
488 debug_unregister(kvm_s390_dbf);
489}

--- 4114 unchanged lines hidden ---