Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: PPC: Remove DCR handling

DCR handling was only needed for 440 KVM. Since we removed it, we can also
remove handling of DCR accesses.

Signed-off-by: Alexander Graf <agraf@suse.de>

+5 -29
+3 -3
Documentation/virtual/kvm/api.txt
··· 2613 2613 appear if the VCPU performed a load or store of the appropriate width directly 2614 2614 to the byte array. 2615 2615 2616 - NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_DCR, 2617 - KVM_EXIT_PAPR and KVM_EXIT_EPR the corresponding 2616 + NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI KVM_EXIT_PAPR and 2617 + KVM_EXIT_EPR the corresponding 2618 2618 operations are complete (and guest state is consistent) only after userspace 2619 2619 has re-entered the kernel with KVM_RUN. The kernel side will first finish 2620 2620 incomplete operations and then check for pending signals. Userspace ··· 2685 2685 __u8 is_write; 2686 2686 } dcr; 2687 2687 2688 - powerpc specific. 2688 + Deprecated - was used for 440 KVM. 2689 2689 2690 2690 /* KVM_EXIT_OSI */ 2691 2691 struct {
-4
arch/powerpc/include/asm/kvm_host.h
··· 94 94 struct kvm_vcpu_stat { 95 95 u32 sum_exits; 96 96 u32 mmio_exits; 97 - u32 dcr_exits; 98 97 u32 signal_exits; 99 98 u32 light_exits; 100 99 /* Account for special types of light exits: */ ··· 125 126 126 127 enum kvm_exit_types { 127 128 MMIO_EXITS, 128 - DCR_EXITS, 129 129 SIGNAL_EXITS, 130 130 ITLB_REAL_MISS_EXITS, 131 131 ITLB_VIRT_MISS_EXITS, ··· 599 601 u8 io_gpr; /* GPR used as IO source/target */ 600 602 u8 mmio_is_bigendian; 601 603 u8 mmio_sign_extend; 602 - u8 dcr_needed; 603 - u8 dcr_is_write; 604 604 u8 osi_needed; 605 605 u8 osi_enabled; 606 606 u8 papr_enabled;
-1
arch/powerpc/include/asm/kvm_ppc.h
··· 41 41 enum emulation_result { 42 42 EMULATE_DONE, /* no further processing */ 43 43 EMULATE_DO_MMIO, /* kvm_run filled with MMIO request */ 44 - EMULATE_DO_DCR, /* kvm_run filled with DCR request */ 45 44 EMULATE_FAIL, /* can't emulate this instruction */ 46 45 EMULATE_AGAIN, /* something went wrong. go again */ 47 46 EMULATE_EXIT_USER, /* emulation requires exit to user-space */
-5
arch/powerpc/kvm/booke.c
··· 51 51 52 52 struct kvm_stats_debugfs_item debugfs_entries[] = { 53 53 { "mmio", VCPU_STAT(mmio_exits) }, 54 - { "dcr", VCPU_STAT(dcr_exits) }, 55 54 { "sig", VCPU_STAT(signal_exits) }, 56 55 { "itlb_r", VCPU_STAT(itlb_real_miss_exits) }, 57 56 { "itlb_v", VCPU_STAT(itlb_virt_miss_exits) }, ··· 707 708 708 709 case EMULATE_AGAIN: 709 710 return RESUME_GUEST; 710 - 711 - case EMULATE_DO_DCR: 712 - run->exit_reason = KVM_EXIT_DCR; 713 - return RESUME_HOST; 714 711 715 712 case EMULATE_FAIL: 716 713 printk(KERN_CRIT "%s: emulation at %lx failed (%08x)\n",
-10
arch/powerpc/kvm/powerpc.c
··· 743 743 #endif 744 744 } 745 745 746 - static void kvmppc_complete_dcr_load(struct kvm_vcpu *vcpu, 747 - struct kvm_run *run) 748 - { 749 - kvmppc_set_gpr(vcpu, vcpu->arch.io_gpr, run->dcr.data); 750 - } 751 - 752 746 static void kvmppc_complete_mmio_load(struct kvm_vcpu *vcpu, 753 747 struct kvm_run *run) 754 748 { ··· 939 945 if (!vcpu->mmio_is_write) 940 946 kvmppc_complete_mmio_load(vcpu, run); 941 947 vcpu->mmio_needed = 0; 942 - } else if (vcpu->arch.dcr_needed) { 943 - if (!vcpu->arch.dcr_is_write) 944 - kvmppc_complete_dcr_load(vcpu, run); 945 - vcpu->arch.dcr_needed = 0; 946 948 } else if (vcpu->arch.osi_needed) { 947 949 u64 *gprs = run->osi.gprs; 948 950 int i;
-1
arch/powerpc/kvm/timing.c
··· 110 110 111 111 static const char *kvm_exit_names[__NUMBER_OF_KVM_EXIT_TYPES] = { 112 112 [MMIO_EXITS] = "MMIO", 113 - [DCR_EXITS] = "DCR", 114 113 [SIGNAL_EXITS] = "SIGNAL", 115 114 [ITLB_REAL_MISS_EXITS] = "ITLBREAL", 116 115 [ITLB_VIRT_MISS_EXITS] = "ITLBVIRT",
-3
arch/powerpc/kvm/timing.h
··· 63 63 case EMULATED_INST_EXITS: 64 64 vcpu->stat.emulated_inst_exits++; 65 65 break; 66 - case DCR_EXITS: 67 - vcpu->stat.dcr_exits++; 68 - break; 69 66 case DSI_EXITS: 70 67 vcpu->stat.dsi_exits++; 71 68 break;
+2 -2
include/uapi/linux/kvm.h
··· 162 162 #define KVM_EXIT_TPR_ACCESS 12 163 163 #define KVM_EXIT_S390_SIEIC 13 164 164 #define KVM_EXIT_S390_RESET 14 165 - #define KVM_EXIT_DCR 15 165 + #define KVM_EXIT_DCR 15 /* deprecated */ 166 166 #define KVM_EXIT_NMI 16 167 167 #define KVM_EXIT_INTERNAL_ERROR 17 168 168 #define KVM_EXIT_OSI 18 ··· 268 268 __u64 trans_exc_code; 269 269 __u32 pgm_code; 270 270 } s390_ucontrol; 271 - /* KVM_EXIT_DCR */ 271 + /* KVM_EXIT_DCR (deprecated) */ 272 272 struct { 273 273 __u32 dcrn; 274 274 __u32 data;