KVM: PPC: Remove 44x target
Subsystems (3)
RFC PATCH 1/1 KVM: PPC: Remove 44x target
The 44x target has been broken for years now. I recently got around to fix most issues, but the fact that nobody reported it as broken indicates that we have 0 effective users.
Thus I would propose to just remove the whole target. It gets PPC down to only 6 subarchitectures we have to worry about.
I am certainly open to keep it in though if there are people who believe it's worth having :).
--- arch/powerpc/include/asm/kvm_44x.h | 67 ----- arch/powerpc/include/asm/kvm_asm.h | 1 - arch/powerpc/kvm/44x.c | 193 ------------ arch/powerpc/kvm/44x_emulate.c | 194 ------------ arch/powerpc/kvm/44x_tlb.c | 523 --------------------------------- arch/powerpc/kvm/44x_tlb.h | 86 ------ arch/powerpc/kvm/Kconfig | 16 +- arch/powerpc/kvm/Makefile | 12 - arch/powerpc/kvm/booke_interrupts.S | 5 - arch/powerpc/kvm/bookehv_interrupts.S | 1 - arch/powerpc/kvm/powerpc.c | 3 - 11 files changed, 1 insertions(+), 1100 deletions(-) delete mode 100644 arch/powerpc/include/asm/kvm_44x.h delete mode 100644 arch/powerpc/kvm/44x.c delete mode 100644 arch/powerpc/kvm/44x_emulate.c delete mode 100644 arch/powerpc/kvm/44x_tlb.c delete mode 100644 arch/powerpc/kvm/44x_tlb.h
arch/powerpc/include/asm/kvm_44x.h deleted +0 -67
@@ -1,67 +0,0 @@ -/* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License, version 2, as -* published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* 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 this program; if not, write to the Free Software -* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -* -* Copyright IBM Corp. 2008 -* -* Authors: Hollis Blanchard <[email protected]> -*/ - -#ifndef __ASM_44X_H__ -#define __ASM_44X_H__ - -#include <linux/kvm_host.h> - -#define PPC44x_TLB_SIZE 64 - -/* If the guest is expecting it, this can be as large as we like; we'd just -* need to find some way of advertising it. */ -#define KVM44x_GUEST_TLB_SIZE 64 - -struct kvmppc_44x_tlbe { -u32 tid;/* Only the low 8 bits are used. */ -u32 word0; -u32 word1; -u32 word2; -}; - -struct kvmppc_44x_shadow_ref { -struct page *page; -u16 gtlb_index; -u8 writeable; -u8 tid; -}; - -struct kvmppc_vcpu_44x { -/* Unmodified copy of the guest's TLB. */ -struct kvmppc_44x_tlbe guest_tlb[KVM44x_GUEST_TLB_SIZE]; - -/* References to guest pages in the hardware TLB. */ -struct kvmppc_44x_shadow_ref shadow_refs[PPC44x_TLB_SIZE]; - -/* State of the shadow TLB at guest context switch time. */ -struct kvmppc_44x_tlbe shadow_tlb[PPC44x_TLB_SIZE]; -u8 shadow_tlb_mod[PPC44x_TLB_SIZE]; - -struct kvm_vcpu vcpu; -}; - -static inline struct kvmppc_vcpu_44x *to_44x (struct kvm_vcpu *vcpu) -{ - return container_of(vcpu, struct kvmppc_vcpu_44x, vcpu); -} - -void kvmppc_44x_tlb_put (struct kvm_vcpu *vcpu); -void kvmppc_44x_tlb_load (struct kvm_vcpu *vcpu); - -#endif /* __ASM_44X_H__ */
arch/powerpc/include/asm/kvm_asm.h +0 -1
@@ -33,7 +33,6 @@/* IVPR must be 64KiB-aligned. */ #define VCPU_SIZE_ORDER 4#define VCPU_SIZE_LOG (VCPU_SIZE_ORDER + 12) -#define VCPU_TLB_PGSZ PPC44x_TLB_64K#define VCPU_SIZE_BYTES (1<<VCPU_SIZE_LOG)#define BOOKE_INTERRUPT_CRITICAL 0
arch/powerpc/kvm/44x.c deleted +0 -193
193 lines not on this page · raw message
arch/powerpc/kvm/44x_emulate.c deleted +0 -194
194 lines not on this page · raw message
arch/powerpc/kvm/44x_tlb.c deleted +0 -523
523 lines not on this page · raw message
arch/powerpc/kvm/44x_tlb.h deleted +0 -86
86 lines not on this page · raw message
arch/powerpc/kvm/Kconfig +1 -15
@@ -94,23 +94,9 @@ config KVM_BOOK3S_64_PR config KVM_BOOKE_HV bool -config KVM_440 - bool "KVM support for PowerPC 440 processors" - depends on EXPERIMENTAL && 44x - select KVM - select KVM_MMIO - ---help--- - Support running unmodified 440 guest kernels in virtual machines on - 440 host processors. - - This module provides access to the hardware capabilities through - a character device node named /dev/kvm. - - If unsure, say N. - config KVM_EXIT_TIMING bool "Detailed exit timing" - depends on KVM_440 || KVM_E500V2 || KVM_E500MC + depends on KVM_E500V2 || KVM_E500MC ---help--- Calculate elapsed time for every exit/enter cycle. A per-vcpu report is available in debugfs kvm/vm#_vcpu#_timing.
arch/powerpc/kvm/Makefile +0 -12
@@ -8,7 +8,6 @@ ccflags-y := -Ivirt/kvm -Iarch/powerpc/kvm common-objs-y = $(addprefix ../../../virt/kvm/, kvm_main.o coalesced_mmio.o) -CFLAGS_44x_tlb.o := -I. CFLAGS_e500_tlb.o := -I. CFLAGS_emulate.o := -I.
@@ -18,16 +17,6 @@ obj-$(CONFIG_KVM_BOOK3S_HANDLER) += book3s_exports.o AFLAGS_booke_interrupts.o := -I$(obj) -kvm-440-objs := \ - $(common-objs-y) \ - booke.o \ - booke_emulate.o \ - booke_interrupts.o \ - 44x.o \ - 44x_tlb.o \ - 44x_emulate.o -kvm-objs-$(CONFIG_KVM_440) := $(kvm-440-objs) - kvm-e500-objs := \ $(common-objs-y) \ booke.o \
@@ -99,7 +88,6 @@ kvm-objs-$(CONFIG_KVM_BOOK3S_32) := $(kvm-book3s_32-objs) kvm-objs := $(kvm-objs-m) $(kvm-objs-y) -obj-$(CONFIG_KVM_440) += kvm.o obj-$(CONFIG_KVM_E500V2) += kvm.o obj-$(CONFIG_KVM_E500MC) += kvm.o obj-$(CONFIG_KVM_BOOK3S_64) += kvm.o
arch/powerpc/kvm/booke_interrupts.S +0 -5
@@ -21,7 +21,6 @@ #include <asm/ppc_asm.h> #include <asm/kvm_asm.h> #include <asm/reg.h> -#include <asm/mmu-44x.h> #include <asm/page.h> #include <asm/asm-offsets.h>
@@ -379,10 +378,6 @@ lightweight_exit: mtspr SPRN_PID1, r3 #endif -#ifdef CONFIG_44x - iccci 0, 0 /* XXX hack */ -#endif - /* Load some guest volatiles. */ lwz r0, VCPU_GPR(R0)(r4) lwz r2, VCPU_GPR(R2)(r4)
arch/powerpc/kvm/bookehv_interrupts.S +0 -1
@@ -23,7 +23,6 @@ #include <asm/ppc_asm.h> #include <asm/kvm_asm.h> #include <asm/reg.h> -#include <asm/mmu-44x.h> #include <asm/page.h> #include <asm/asm-compat.h> #include <asm/asm-offsets.h>
arch/powerpc/kvm/powerpc.c +0 -3
@@ -158,10 +158,7 @@ int kvmppc_kvm_pv(struct kvm_vcpu *vcpu) }case KVM_HCALL_TOKEN (KVM_HC_FEATURES ): r =EV_SUCCESS ; -#if defined(CONFIG_PPC_BOOK3S ) || defined(CONFIG_KVM_E500V2 ) -/* XXX Missing magic page on 44x */ r2 |= (1 <<KVM_FEATURE_MAGIC_PAGE ); -#endif /* Second return value is in r4 */ break ;
Signature · 1 line
1.6.0.2
arch/powerpc/kvm/bookehv_interrupts.S line 28
Quoted 12 lines · Alexander Graf
arch/powerpc/kvm/bookehv_interrupts.S +0
-1@@ -23,7 +23,6 @@ #include <asm/ppc_asm.h> #include <asm/kvm_asm.h> #include <asm/reg.h> -#include <asm/mmu-44x.h> #include <asm/page.h> #include <asm/asm-compat.h> #include <asm/asm-offsets.h>
This could come out of here regardless of whether 44x stays.
arch/powerpc/kvm/powerpc.c int kvmppc_kvm_pv(struct kvm_vcpu *vcpu) · line 164
Quoted 12 lines
arch/powerpc/kvm/powerpc.c +0
-3@@ -158,10 +158,7 @@ int kvmppc_kvm_pv(struct kvm_vcpu *vcpu) }case KVM_HCALL_TOKEN (KVM_HC_FEATURES ): r =EV_SUCCESS ; -#if defined(CONFIG_PPC_BOOK3S ) || defined(CONFIG_KVM_E500V2 ) -/* XXX Missing magic page on 44x */ r2 |= (1 <<KVM_FEATURE_MAGIC_PAGE ); -#endif
We also don't support this on e500mc -- or at least it hasn't been tested, and would be pretty pointless nothing in the magic page traps on e500mc.
-Scott
Quoted 15 lines · Scott Wood
arch/powerpc/kvm/bookehv_interrupts.S line 28
Quoted 12 lines · Alexander Graf
arch/powerpc/kvm/bookehv_interrupts.S +0
-1@@ -23,7 +23,6 @@ #include <asm/ppc_asm.h> #include <asm/kvm_asm.h> #include <asm/reg.h> -#include <asm/mmu-44x.h> #include <asm/page.h> #include <asm/asm-compat.h> #include <asm/asm-offsets.h>This could come out of here regardless of whether 44x stays.
:)
Quoted 15 lines
arch/powerpc/kvm/powerpc.c int kvmppc_kvm_pv(struct kvm_vcpu *vcpu) · line 164
Quoted 13 lines
arch/powerpc/kvm/powerpc.c +0
-3@@ -158,10 +158,7 @@ int kvmppc_kvm_pv(struct kvm_vcpu *vcpu) }case KVM_HCALL_TOKEN (KVM_HC_FEATURES ): r =EV_SUCCESS ; -#if defined(CONFIG_PPC_BOOK3S ) || defined(CONFIG_KVM_E500V2 ) -/* XXX Missing magic page on 44x */ r2 |= (1 <<KVM_FEATURE_MAGIC_PAGE ); -#endif We also don't support this on e500mc -- or at least it hasn't been tested, and would be pretty pointless nothing in the magic page traps on e500mc.
Ah, good point!
Alex