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>
This commit is contained in:
parent
8de12015ff
commit
ce91ddc471
|
@ -2613,8 +2613,8 @@ The 'data' member contains, in its first 'len' bytes, the value as it would
|
||||||
appear if the VCPU performed a load or store of the appropriate width directly
|
appear if the VCPU performed a load or store of the appropriate width directly
|
||||||
to the byte array.
|
to the byte array.
|
||||||
|
|
||||||
NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI, KVM_EXIT_DCR,
|
NOTE: For KVM_EXIT_IO, KVM_EXIT_MMIO, KVM_EXIT_OSI KVM_EXIT_PAPR and
|
||||||
KVM_EXIT_PAPR and KVM_EXIT_EPR the corresponding
|
KVM_EXIT_EPR the corresponding
|
||||||
operations are complete (and guest state is consistent) only after userspace
|
operations are complete (and guest state is consistent) only after userspace
|
||||||
has re-entered the kernel with KVM_RUN. The kernel side will first finish
|
has re-entered the kernel with KVM_RUN. The kernel side will first finish
|
||||||
incomplete operations and then check for pending signals. Userspace
|
incomplete operations and then check for pending signals. Userspace
|
||||||
|
@ -2685,7 +2685,7 @@ Principles of Operation Book in the Chapter for Dynamic Address Translation
|
||||||
__u8 is_write;
|
__u8 is_write;
|
||||||
} dcr;
|
} dcr;
|
||||||
|
|
||||||
powerpc specific.
|
Deprecated - was used for 440 KVM.
|
||||||
|
|
||||||
/* KVM_EXIT_OSI */
|
/* KVM_EXIT_OSI */
|
||||||
struct {
|
struct {
|
||||||
|
|
|
@ -94,7 +94,6 @@ struct kvm_vm_stat {
|
||||||
struct kvm_vcpu_stat {
|
struct kvm_vcpu_stat {
|
||||||
u32 sum_exits;
|
u32 sum_exits;
|
||||||
u32 mmio_exits;
|
u32 mmio_exits;
|
||||||
u32 dcr_exits;
|
|
||||||
u32 signal_exits;
|
u32 signal_exits;
|
||||||
u32 light_exits;
|
u32 light_exits;
|
||||||
/* Account for special types of light exits: */
|
/* Account for special types of light exits: */
|
||||||
|
@ -126,7 +125,6 @@ struct kvm_vcpu_stat {
|
||||||
|
|
||||||
enum kvm_exit_types {
|
enum kvm_exit_types {
|
||||||
MMIO_EXITS,
|
MMIO_EXITS,
|
||||||
DCR_EXITS,
|
|
||||||
SIGNAL_EXITS,
|
SIGNAL_EXITS,
|
||||||
ITLB_REAL_MISS_EXITS,
|
ITLB_REAL_MISS_EXITS,
|
||||||
ITLB_VIRT_MISS_EXITS,
|
ITLB_VIRT_MISS_EXITS,
|
||||||
|
@ -601,8 +599,6 @@ struct kvm_vcpu_arch {
|
||||||
u8 io_gpr; /* GPR used as IO source/target */
|
u8 io_gpr; /* GPR used as IO source/target */
|
||||||
u8 mmio_is_bigendian;
|
u8 mmio_is_bigendian;
|
||||||
u8 mmio_sign_extend;
|
u8 mmio_sign_extend;
|
||||||
u8 dcr_needed;
|
|
||||||
u8 dcr_is_write;
|
|
||||||
u8 osi_needed;
|
u8 osi_needed;
|
||||||
u8 osi_enabled;
|
u8 osi_enabled;
|
||||||
u8 papr_enabled;
|
u8 papr_enabled;
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
enum emulation_result {
|
enum emulation_result {
|
||||||
EMULATE_DONE, /* no further processing */
|
EMULATE_DONE, /* no further processing */
|
||||||
EMULATE_DO_MMIO, /* kvm_run filled with MMIO request */
|
EMULATE_DO_MMIO, /* kvm_run filled with MMIO request */
|
||||||
EMULATE_DO_DCR, /* kvm_run filled with DCR request */
|
|
||||||
EMULATE_FAIL, /* can't emulate this instruction */
|
EMULATE_FAIL, /* can't emulate this instruction */
|
||||||
EMULATE_AGAIN, /* something went wrong. go again */
|
EMULATE_AGAIN, /* something went wrong. go again */
|
||||||
EMULATE_EXIT_USER, /* emulation requires exit to user-space */
|
EMULATE_EXIT_USER, /* emulation requires exit to user-space */
|
||||||
|
|
|
@ -51,7 +51,6 @@ unsigned long kvmppc_booke_handlers;
|
||||||
|
|
||||||
struct kvm_stats_debugfs_item debugfs_entries[] = {
|
struct kvm_stats_debugfs_item debugfs_entries[] = {
|
||||||
{ "mmio", VCPU_STAT(mmio_exits) },
|
{ "mmio", VCPU_STAT(mmio_exits) },
|
||||||
{ "dcr", VCPU_STAT(dcr_exits) },
|
|
||||||
{ "sig", VCPU_STAT(signal_exits) },
|
{ "sig", VCPU_STAT(signal_exits) },
|
||||||
{ "itlb_r", VCPU_STAT(itlb_real_miss_exits) },
|
{ "itlb_r", VCPU_STAT(itlb_real_miss_exits) },
|
||||||
{ "itlb_v", VCPU_STAT(itlb_virt_miss_exits) },
|
{ "itlb_v", VCPU_STAT(itlb_virt_miss_exits) },
|
||||||
|
@ -709,10 +708,6 @@ static int emulation_exit(struct kvm_run *run, struct kvm_vcpu *vcpu)
|
||||||
case EMULATE_AGAIN:
|
case EMULATE_AGAIN:
|
||||||
return RESUME_GUEST;
|
return RESUME_GUEST;
|
||||||
|
|
||||||
case EMULATE_DO_DCR:
|
|
||||||
run->exit_reason = KVM_EXIT_DCR;
|
|
||||||
return RESUME_HOST;
|
|
||||||
|
|
||||||
case EMULATE_FAIL:
|
case EMULATE_FAIL:
|
||||||
printk(KERN_CRIT "%s: emulation at %lx failed (%08x)\n",
|
printk(KERN_CRIT "%s: emulation at %lx failed (%08x)\n",
|
||||||
__func__, vcpu->arch.pc, vcpu->arch.last_inst);
|
__func__, vcpu->arch.pc, vcpu->arch.last_inst);
|
||||||
|
|
|
@ -743,12 +743,6 @@ void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void kvmppc_complete_dcr_load(struct kvm_vcpu *vcpu,
|
|
||||||
struct kvm_run *run)
|
|
||||||
{
|
|
||||||
kvmppc_set_gpr(vcpu, vcpu->arch.io_gpr, run->dcr.data);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void kvmppc_complete_mmio_load(struct kvm_vcpu *vcpu,
|
static void kvmppc_complete_mmio_load(struct kvm_vcpu *vcpu,
|
||||||
struct kvm_run *run)
|
struct kvm_run *run)
|
||||||
{
|
{
|
||||||
|
@ -945,10 +939,6 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *run)
|
||||||
if (!vcpu->mmio_is_write)
|
if (!vcpu->mmio_is_write)
|
||||||
kvmppc_complete_mmio_load(vcpu, run);
|
kvmppc_complete_mmio_load(vcpu, run);
|
||||||
vcpu->mmio_needed = 0;
|
vcpu->mmio_needed = 0;
|
||||||
} else if (vcpu->arch.dcr_needed) {
|
|
||||||
if (!vcpu->arch.dcr_is_write)
|
|
||||||
kvmppc_complete_dcr_load(vcpu, run);
|
|
||||||
vcpu->arch.dcr_needed = 0;
|
|
||||||
} else if (vcpu->arch.osi_needed) {
|
} else if (vcpu->arch.osi_needed) {
|
||||||
u64 *gprs = run->osi.gprs;
|
u64 *gprs = run->osi.gprs;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -110,7 +110,6 @@ void kvmppc_update_timing_stats(struct kvm_vcpu *vcpu)
|
||||||
|
|
||||||
static const char *kvm_exit_names[__NUMBER_OF_KVM_EXIT_TYPES] = {
|
static const char *kvm_exit_names[__NUMBER_OF_KVM_EXIT_TYPES] = {
|
||||||
[MMIO_EXITS] = "MMIO",
|
[MMIO_EXITS] = "MMIO",
|
||||||
[DCR_EXITS] = "DCR",
|
|
||||||
[SIGNAL_EXITS] = "SIGNAL",
|
[SIGNAL_EXITS] = "SIGNAL",
|
||||||
[ITLB_REAL_MISS_EXITS] = "ITLBREAL",
|
[ITLB_REAL_MISS_EXITS] = "ITLBREAL",
|
||||||
[ITLB_VIRT_MISS_EXITS] = "ITLBVIRT",
|
[ITLB_VIRT_MISS_EXITS] = "ITLBVIRT",
|
||||||
|
|
|
@ -63,9 +63,6 @@ static inline void kvmppc_account_exit_stat(struct kvm_vcpu *vcpu, int type)
|
||||||
case EMULATED_INST_EXITS:
|
case EMULATED_INST_EXITS:
|
||||||
vcpu->stat.emulated_inst_exits++;
|
vcpu->stat.emulated_inst_exits++;
|
||||||
break;
|
break;
|
||||||
case DCR_EXITS:
|
|
||||||
vcpu->stat.dcr_exits++;
|
|
||||||
break;
|
|
||||||
case DSI_EXITS:
|
case DSI_EXITS:
|
||||||
vcpu->stat.dsi_exits++;
|
vcpu->stat.dsi_exits++;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -162,7 +162,7 @@ struct kvm_pit_config {
|
||||||
#define KVM_EXIT_TPR_ACCESS 12
|
#define KVM_EXIT_TPR_ACCESS 12
|
||||||
#define KVM_EXIT_S390_SIEIC 13
|
#define KVM_EXIT_S390_SIEIC 13
|
||||||
#define KVM_EXIT_S390_RESET 14
|
#define KVM_EXIT_S390_RESET 14
|
||||||
#define KVM_EXIT_DCR 15
|
#define KVM_EXIT_DCR 15 /* deprecated */
|
||||||
#define KVM_EXIT_NMI 16
|
#define KVM_EXIT_NMI 16
|
||||||
#define KVM_EXIT_INTERNAL_ERROR 17
|
#define KVM_EXIT_INTERNAL_ERROR 17
|
||||||
#define KVM_EXIT_OSI 18
|
#define KVM_EXIT_OSI 18
|
||||||
|
@ -268,7 +268,7 @@ struct kvm_run {
|
||||||
__u64 trans_exc_code;
|
__u64 trans_exc_code;
|
||||||
__u32 pgm_code;
|
__u32 pgm_code;
|
||||||
} s390_ucontrol;
|
} s390_ucontrol;
|
||||||
/* KVM_EXIT_DCR */
|
/* KVM_EXIT_DCR (deprecated) */
|
||||||
struct {
|
struct {
|
||||||
__u32 dcrn;
|
__u32 dcrn;
|
||||||
__u32 data;
|
__u32 data;
|
||||||
|
|
Loading…
Reference in a new issue