diff options
| author | Marcelo Tosatti <mtosatti@redhat.com> | 2012-10-10 18:03:54 -0400 |
|---|---|---|
| committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-10-10 18:03:54 -0400 |
| commit | 03604b31142058362db13e7881385806977893f5 (patch) | |
| tree | 8b3c7934fbfcbea5cce3e1fad82f6fd23aea1778 | |
| parent | 87cac8f879a5ecd7109dbe688087e8810b3364eb (diff) | |
| parent | 12ecd9570d8941c15602a11725ec9b0ede48d6c2 (diff) | |
Merge branch 'for-upstream' of http://github.com/agraf/linux-2.6 into queue
* 'for-upstream' of http://github.com/agraf/linux-2.6: (56 commits)
arch/powerpc/kvm/e500_tlb.c: fix error return code
KVM: PPC: Book3S HV: Provide a way for userspace to get/set per-vCPU areas
KVM: PPC: Book3S: Get/set guest FP regs using the GET/SET_ONE_REG interface
KVM: PPC: Book3S: Get/set guest SPRs using the GET/SET_ONE_REG interface
KVM: PPC: set IN_GUEST_MODE before checking requests
KVM: PPC: e500: MMU API: fix leak of shared_tlb_pages
KVM: PPC: e500: fix allocation size error on g2h_tlb1_map
KVM: PPC: Book3S HV: Fix calculation of guest phys address for MMIO emulation
KVM: PPC: Book3S HV: Remove bogus update of physical thread IDs
KVM: PPC: Book3S HV: Fix updates of vcpu->cpu
KVM: Move some PPC ioctl definitions to the correct place
KVM: PPC: Book3S HV: Handle memory slot deletion and modification correctly
KVM: PPC: Move kvm->arch.slot_phys into memslot.arch
KVM: PPC: Book3S HV: Take the SRCU read lock before looking up memslots
KVM: PPC: bookehv: Allow duplicate calls of DO_KVM macro
KVM: PPC: BookE: Support FPU on non-hv systems
KVM: PPC: 440: Implement mfdcrx
KVM: PPC: 440: Implement mtdcrx
Document IACx/DACx registers access using ONE_REG API
KVM: PPC: E500: Remove E500_TLB_DIRTY flag
...
41 files changed, 1635 insertions, 381 deletions
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index a46a416810fb..4258180b1ecd 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
| @@ -1194,12 +1194,15 @@ struct kvm_ppc_pvinfo { | |||
| 1194 | This ioctl fetches PV specific information that need to be passed to the guest | 1194 | This ioctl fetches PV specific information that need to be passed to the guest |
| 1195 | using the device tree or other means from vm context. | 1195 | using the device tree or other means from vm context. |
| 1196 | 1196 | ||
| 1197 | For now the only implemented piece of information distributed here is an array | 1197 | The hcall array defines 4 instructions that make up a hypercall. |
| 1198 | of 4 instructions that make up a hypercall. | ||
| 1199 | 1198 | ||
| 1200 | If any additional field gets added to this structure later on, a bit for that | 1199 | If any additional field gets added to this structure later on, a bit for that |
| 1201 | additional piece of information will be set in the flags bitmap. | 1200 | additional piece of information will be set in the flags bitmap. |
| 1202 | 1201 | ||
| 1202 | The flags bitmap is defined as: | ||
| 1203 | |||
| 1204 | /* the host supports the ePAPR idle hcall | ||
| 1205 | #define KVM_PPC_PVINFO_FLAGS_EV_IDLE (1<<0) | ||
| 1203 | 1206 | ||
| 1204 | 4.48 KVM_ASSIGN_PCI_DEVICE | 1207 | 4.48 KVM_ASSIGN_PCI_DEVICE |
| 1205 | 1208 | ||
| @@ -1731,7 +1734,45 @@ registers, find a list below: | |||
| 1731 | Arch | Register | Width (bits) | 1734 | Arch | Register | Width (bits) |
| 1732 | | | | 1735 | | | |
| 1733 | PPC | KVM_REG_PPC_HIOR | 64 | 1736 | PPC | KVM_REG_PPC_HIOR | 64 |
| 1734 | 1737 | PPC | KVM_REG_PPC_IAC1 | 64 | |
| 1738 | PPC | KVM_REG_PPC_IAC2 | 64 | ||
| 1739 | PPC | KVM_REG_PPC_IAC3 | 64 | ||
| 1740 | PPC | KVM_REG_PPC_IAC4 | 64 | ||
| 1741 | PPC | KVM_REG_PPC_DAC1 | 64 | ||
| 1742 | PPC | KVM_REG_PPC_DAC2 | 64 | ||
| 1743 | PPC | KVM_REG_PPC_DABR | 64 | ||
| 1744 | PPC | KVM_REG_PPC_DSCR | 64 | ||
| 1745 | PPC | KVM_REG_PPC_PURR | 64 | ||
| 1746 | PPC | KVM_REG_PPC_SPURR | 64 | ||
| 1747 | PPC | KVM_REG_PPC_DAR | 64 | ||
| 1748 | PPC | KVM_REG_PPC_DSISR | 32 | ||
| 1749 | PPC | KVM_REG_PPC_AMR | 64 | ||
| 1750 | PPC | KVM_REG_PPC_UAMOR | 64 | ||
| 1751 | PPC | KVM_REG_PPC_MMCR0 | 64 | ||
| 1752 | PPC | KVM_REG_PPC_MMCR1 | 64 | ||
| 1753 | PPC | KVM_REG_PPC_MMCRA | 64 | ||
| 1754 | PPC | KVM_REG_PPC_PMC1 | 32 | ||
| 1755 | PPC | KVM_REG_PPC_PMC2 | 32 | ||
| 1756 | PPC | KVM_REG_PPC_PMC3 | 32 | ||
| 1757 | PPC | KVM_REG_PPC_PMC4 | 32 | ||
| 1758 | PPC | KVM_REG_PPC_PMC5 | 32 | ||
| 1759 | PPC | KVM_REG_PPC_PMC6 | 32 | ||
| 1760 | PPC | KVM_REG_PPC_PMC7 | 32 | ||
| 1761 | PPC | KVM_REG_PPC_PMC8 | 32 | ||
| 1762 | PPC | KVM_REG_PPC_FPR0 | 64 | ||
| 1763 | ... | ||
| 1764 | PPC | KVM_REG_PPC_FPR31 | 64 | ||
| 1765 | PPC | KVM_REG_PPC_VR0 | 128 | ||
| 1766 | ... | ||
| 1767 | PPC | KVM_REG_PPC_VR31 | 128 | ||
| 1768 | PPC | KVM_REG_PPC_VSR0 | 128 | ||
| 1769 | ... | ||
| 1770 | PPC | KVM_REG_PPC_VSR31 | 128 | ||
| 1771 | PPC | KVM_REG_PPC_FPSCR | 64 | ||
| 1772 | PPC | KVM_REG_PPC_VSCR | 32 | ||
| 1773 | PPC | KVM_REG_PPC_VPA_ADDR | 64 | ||
| 1774 | PPC | KVM_REG_PPC_VPA_SLB | 128 | ||
| 1775 | PPC | KVM_REG_PPC_VPA_DTL | 128 | ||
| 1735 | 1776 | ||
| 1736 | 4.69 KVM_GET_ONE_REG | 1777 | 4.69 KVM_GET_ONE_REG |
| 1737 | 1778 | ||
| @@ -1747,7 +1788,7 @@ kvm_one_reg struct passed in. On success, the register value can be found | |||
| 1747 | at the memory location pointed to by "addr". | 1788 | at the memory location pointed to by "addr". |
| 1748 | 1789 | ||
| 1749 | The list of registers accessible using this interface is identical to the | 1790 | The list of registers accessible using this interface is identical to the |
| 1750 | list in 4.64. | 1791 | list in 4.68. |
| 1751 | 1792 | ||
| 1752 | 1793 | ||
| 1753 | 4.70 KVM_KVMCLOCK_CTRL | 1794 | 4.70 KVM_KVMCLOCK_CTRL |
diff --git a/arch/powerpc/include/asm/Kbuild b/arch/powerpc/include/asm/Kbuild index 7e313f1ed183..13d6b7bf3b69 100644 --- a/arch/powerpc/include/asm/Kbuild +++ b/arch/powerpc/include/asm/Kbuild | |||
| @@ -34,5 +34,6 @@ header-y += termios.h | |||
| 34 | header-y += types.h | 34 | header-y += types.h |
| 35 | header-y += ucontext.h | 35 | header-y += ucontext.h |
| 36 | header-y += unistd.h | 36 | header-y += unistd.h |
| 37 | header-y += epapr_hcalls.h | ||
| 37 | 38 | ||
| 38 | generic-y += rwsem.h | 39 | generic-y += rwsem.h |
diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h index bf2c06c33871..b8d94459a929 100644 --- a/arch/powerpc/include/asm/epapr_hcalls.h +++ b/arch/powerpc/include/asm/epapr_hcalls.h | |||
| @@ -50,10 +50,6 @@ | |||
| 50 | #ifndef _EPAPR_HCALLS_H | 50 | #ifndef _EPAPR_HCALLS_H |
| 51 | #define _EPAPR_HCALLS_H | 51 | #define _EPAPR_HCALLS_H |
| 52 | 52 | ||
| 53 | #include <linux/types.h> | ||
| 54 | #include <linux/errno.h> | ||
| 55 | #include <asm/byteorder.h> | ||
| 56 | |||
| 57 | #define EV_BYTE_CHANNEL_SEND 1 | 53 | #define EV_BYTE_CHANNEL_SEND 1 |
| 58 | #define EV_BYTE_CHANNEL_RECEIVE 2 | 54 | #define EV_BYTE_CHANNEL_RECEIVE 2 |
| 59 | #define EV_BYTE_CHANNEL_POLL 3 | 55 | #define EV_BYTE_CHANNEL_POLL 3 |
| @@ -88,7 +84,8 @@ | |||
| 88 | #define _EV_HCALL_TOKEN(id, num) (((id) << 16) | (num)) | 84 | #define _EV_HCALL_TOKEN(id, num) (((id) << 16) | (num)) |
| 89 | #define EV_HCALL_TOKEN(hcall_num) _EV_HCALL_TOKEN(EV_EPAPR_VENDOR_ID, hcall_num) | 85 | #define EV_HCALL_TOKEN(hcall_num) _EV_HCALL_TOKEN(EV_EPAPR_VENDOR_ID, hcall_num) |
| 90 | 86 | ||
| 91 | /* epapr error codes */ | 87 | /* epapr return codes */ |
| 88 | #define EV_SUCCESS 0 | ||
| 92 | #define EV_EPERM 1 /* Operation not permitted */ | 89 | #define EV_EPERM 1 /* Operation not permitted */ |
