diff options
author | Bharat Bhushan <r65777@freescale.com> | 2013-07-04 02:57:46 -0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-10-17 08:49:39 -0400 |
commit | 547465ef8bcad77a3a73dad5151d9d28a0c1b88d (patch) | |
tree | b64f139c11f1611a9f5292aef2be53bfce047a72 /arch/powerpc/kvm | |
parent | b12c784123ff805c066449ca580f15a903c24994 (diff) |
KVM: PPC: E500: Using "struct debug_reg"
For KVM also use the "struct debug_reg" defined in asm/processor.h
Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/booke.c | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 1d6edf00e0e5..a972fb600a99 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c | |||
@@ -1441,7 +1441,6 @@ int kvm_vcpu_ioctl_get_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg) | |||
1441 | int r = 0; | 1441 | int r = 0; |
1442 | union kvmppc_one_reg val; | 1442 | union kvmppc_one_reg val; |
1443 | int size; | 1443 | int size; |
1444 | long int i; | ||
1445 | 1444 | ||
1446 | size = one_reg_size(reg->id); | 1445 | size = one_reg_size(reg->id); |
1447 | if (size > sizeof(val)) | 1446 | if (size > sizeof(val)) |
@@ -1449,16 +1448,24 @@ int kvm_vcpu_ioctl_get_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg) | |||
1449 | 1448 | ||
1450 | switch (reg->id) { | 1449 | switch (reg->id) { |
1451 | case KVM_REG_PPC_IAC1: | 1450 | case KVM_REG_PPC_IAC1: |
1451 | val = get_reg_val(reg->id, vcpu->arch.dbg_reg.iac1); | ||
1452 | break; | ||
1452 | case KVM_REG_PPC_IAC2: | 1453 | case KVM_REG_PPC_IAC2: |
1454 | val = get_reg_val(reg->id, vcpu->arch.dbg_reg.iac2); | ||
1455 | break; | ||
1456 | #if CONFIG_PPC_ADV_DEBUG_IACS > 2 | ||
1453 | case KVM_REG_PPC_IAC3: | 1457 | case KVM_REG_PPC_IAC3: |
1458 | val = get_reg_val(reg->id, vcpu->arch.dbg_reg.iac3); | ||
1459 | break; | ||
1454 | case KVM_REG_PPC_IAC4: | 1460 | case KVM_REG_PPC_IAC4: |
1455 | i = reg->id - KVM_REG_PPC_IAC1; | 1461 | val = get_reg_val(reg->id, vcpu->arch.dbg_reg.iac4); |
1456 | val = get_reg_val(reg->id, vcpu->arch.dbg_reg.iac[i]); | ||
1457 | break; | 1462 | break; |
1463 | #endif | ||
1458 | case KVM_REG_PPC_DAC1: | 1464 | case KVM_REG_PPC_DAC1: |
1465 | val = get_reg_val(reg->id, vcpu->arch.dbg_reg.dac1); | ||
1466 | break; | ||
1459 | case KVM_REG_PPC_DAC2: | 1467 | case KVM_REG_PPC_DAC2: |
1460 | i = reg->id - KVM_REG_PPC_DAC1; | 1468 | val = get_reg_val(reg->id, vcpu->arch.dbg_reg.dac2); |
1461 | val = get_reg_val(reg->id, vcpu->arch.dbg_reg.dac[i]); | ||
1462 | break; | 1469 | break; |
1463 | case KVM_REG_PPC_EPR: { | 1470 | case KVM_REG_PPC_EPR: { |
1464 | u32 epr = get_guest_epr(vcpu); | 1471 | u32 epr = get_guest_epr(vcpu); |
@@ -1501,7 +1508,6 @@ int kvm_vcpu_ioctl_set_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg) | |||
1501 | int r = 0; | 1508 | int r = 0; |
1502 | union kvmppc_one_reg val; | 1509 | union kvmppc_one_reg val; |
1503 | int size; | 1510 | int size; |
1504 | long int i; | ||
1505 | 1511 | ||
1506 | size = one_reg_size(reg->id); | 1512 | size = one_reg_size(reg->id); |
1507 | if (size > sizeof(val)) | 1513 | if (size > sizeof(val)) |
@@ -1512,16 +1518,24 @@ int kvm_vcpu_ioctl_set_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg) | |||
1512 | 1518 | ||
1513 | switch (reg->id) { | 1519 | switch (reg->id) { |
1514 | case KVM_REG_PPC_IAC1: | 1520 | case KVM_REG_PPC_IAC1: |
1521 | vcpu->arch.dbg_reg.iac1 = set_reg_val(reg->id, val); | ||
1522 | break; | ||
1515 | case KVM_REG_PPC_IAC2: | 1523 | case KVM_REG_PPC_IAC2: |
1524 | vcpu->arch.dbg_reg.iac2 = set_reg_val(reg->id, val); | ||
1525 | break; | ||
1526 | #if CONFIG_PPC_ADV_DEBUG_IACS > 2 | ||
1516 | case KVM_REG_PPC_IAC3: | 1527 | case KVM_REG_PPC_IAC3: |
1528 | vcpu->arch.dbg_reg.iac3 = set_reg_val(reg->id, val); | ||
1529 | break; | ||
1517 | case KVM_REG_PPC_IAC4: | 1530 | case KVM_REG_PPC_IAC4: |
1518 | i = reg->id - KVM_REG_PPC_IAC1; | 1531 | vcpu->arch.dbg_reg.iac4 = set_reg_val(reg->id, val); |
1519 | vcpu->arch.dbg_reg.iac[i] = set_reg_val(reg->id, val); | ||
1520 | break; | 1532 | break; |
1533 | #endif | ||
1521 | case KVM_REG_PPC_DAC1: | 1534 | case KVM_REG_PPC_DAC1: |
1535 | vcpu->arch.dbg_reg.dac1 = set_reg_val(reg->id, val); | ||
1536 | break; | ||
1522 | case KVM_REG_PPC_DAC2: | 1537 | case KVM_REG_PPC_DAC2: |
1523 | i = reg->id - KVM_REG_PPC_DAC1; | 1538 | vcpu->arch.dbg_reg.dac2 = set_reg_val(reg->id, val); |
1524 | vcpu->arch.dbg_reg.dac[i] = set_reg_val(reg->id, val); | ||
1525 | break; | 1539 | break; |
1526 | case KVM_REG_PPC_EPR: { | 1540 | case KVM_REG_PPC_EPR: { |
1527 | u32 new_epr = set_reg_val(reg->id, val); | 1541 | u32 new_epr = set_reg_val(reg->id, val); |