)]}'
{
  "commit": "de56a948b9182fbcf92cb8212f114de096c2d574",
  "tree": "633ab73672aa2543b683686fc8fb023629c5f8f8",
  "parents": [
    "3c42bf8a717cb636e0ed2ed77194669e2ac3ed56"
  ],
  "author": {
    "name": "Paul Mackerras",
    "email": "paulus@samba.org",
    "time": "Wed Jun 29 00:21:34 2011 +0000"
  },
  "committer": {
    "name": "Avi Kivity",
    "email": "avi@redhat.com",
    "time": "Tue Jul 12 13:16:54 2011 +0300"
  },
  "message": "KVM: PPC: Add support for Book3S processors in hypervisor mode\n\nThis adds support for KVM running on 64-bit Book 3S processors,\nspecifically POWER7, in hypervisor mode.  Using hypervisor mode means\nthat the guest can use the processor\u0027s supervisor mode.  That means\nthat the guest can execute privileged instructions and access privileged\nregisters itself without trapping to the host.  This gives excellent\nperformance, but does mean that KVM cannot emulate a processor\narchitecture other than the one that the hardware implements.\n\nThis code assumes that the guest is running paravirtualized using the\nPAPR (Power Architecture Platform Requirements) interface, which is the\ninterface that IBM\u0027s PowerVM hypervisor uses.  That means that existing\nLinux distributions that run on IBM pSeries machines will also run\nunder KVM without modification.  In order to communicate the PAPR\nhypercalls to qemu, this adds a new KVM_EXIT_PAPR_HCALL exit code\nto include/linux/kvm.h.\n\nCurrently the choice between book3s_hv support and book3s_pr support\n(i.e. the existing code, which runs the guest in user mode) has to be\nmade at kernel configuration time, so a given kernel binary can only\ndo one or the other.\n\nThis new book3s_hv code doesn\u0027t support MMIO emulation at present.\nSince we are running paravirtualized guests, this isn\u0027t a serious\nrestriction.\n\nWith the guest running in supervisor mode, most exceptions go straight\nto the guest.  We will never get data or instruction storage or segment\ninterrupts, alignment interrupts, decrementer interrupts, program\ninterrupts, single-step interrupts, etc., coming to the hypervisor from\nthe guest.  Therefore this introduces a new KVMTEST_NONHV macro for the\nexception entry path so that we don\u0027t have to do the KVM test on entry\nto those exception handlers.\n\nWe do however get hypervisor decrementer, hypervisor data storage,\nhypervisor instruction storage, and hypervisor emulation assist\ninterrupts, so we have to handle those.\n\nIn hypervisor mode, real-mode accesses can access all of RAM, not just\na limited amount.  Therefore we put all the guest state in the vcpu.arch\nand use the shadow_vcpu in the PACA only for temporary scratch space.\nWe allocate the vcpu with kzalloc rather than vzalloc, and we don\u0027t use\nanything in the kvmppc_vcpu_book3s struct, so we don\u0027t allocate it.\nWe don\u0027t have a shared page with the guest, but we still need a\nkvm_vcpu_arch_shared struct to store the values of various registers,\nso we include one in the vcpu_arch struct.\n\nThe POWER7 processor has a restriction that all threads in a core have\nto be in the same partition.  MMU-on kernel code counts as a partition\n(partition 0), so we have to do a partition switch on every entry to and\nexit from the guest.  At present we require the host and guest to run\nin single-thread mode because of this hardware restriction.\n\nThis code allocates a hashed page table for the guest and initializes\nit with HPTEs for the guest\u0027s Virtual Real Memory Area (VRMA).  We\nrequire that the guest memory is allocated using 16MB huge pages, in\norder to simplify the low-level memory management.  This also means that\nwe can get away without tracking paging activity in the host for now,\nsince huge pages can\u0027t be paged or swapped.\n\nThis also adds a few new exports needed by the book3s_hv code.\n\nSigned-off-by: Paul Mackerras \u003cpaulus@samba.org\u003e\nSigned-off-by: Alexander Graf \u003cagraf@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b2511360b8f5f2e379bd7b816350b509151b4411",
      "old_mode": 33188,
      "old_path": "Documentation/virtual/kvm/api.txt",
      "new_id": "e8875fef3eb860d7f891b582908ada721eee8afa",
      "new_mode": 33188,
      "new_path": "Documentation/virtual/kvm/api.txt"
    },
    {
      "type": "modify",
      "old_id": "296c9b66c04a4c3aafa83790be9ee67c3ac0c3ad",
      "old_mode": 33188,
      "old_path": "arch/powerpc/include/asm/exception-64s.h",
      "new_id": "69435da8f2ba254873d7092ec400e7d9588bb256",
      "new_mode": 33188,
      "new_path": "arch/powerpc/include/asm/exception-64s.h"
    },
    {
      "type": "modify",
      "old_id": "0951b17f4eb57dfc22b3afa5101da671dea0d0c5",
      "old_mode": 33188,
      "old_path": "arch/powerpc/include/asm/kvm_asm.h",
      "new_id": "7b1f0e0fc6533eb20c49b5e6536f66e6baf09790",
      "new_mode": 33188,
      "new_path": "arch/powerpc/include/asm/kvm_asm.h"
    },
    {
      "type": "modify",
      "old_id": "480fff6090db7eb9cc9cb65da30966062ecd3822",
      "old_mode": 33188,
      "old_path": "arch/powerpc/include/asm/kvm_book3s.h",
      "new_id": "5537c45d626c41aaf8e06187e2db2657702f82b8",
      "new_mode": 33188,
      "new_path": "arch/powerpc/include/asm/kvm_book3s.h"
    },
    {
      "type": "modify",
      "old_id": "4cadd612d575e0723293b9c631f48390d19e69e1",
      "old_mode": 33188,
      "old_path": "arch/powerpc/include/asm/kvm_book3s_64.h",
      "new_id": "5f73388ea0afc467f7148047b0f0b13230ba39f7",
      "new_mode": 33188,
      "new_path": "arch/powerpc/include/asm/kvm_book3s_64.h"
    },
    {
      "type": "modify",
      "old_id": "3126175298647644a4a2ce13f3abed5c5d87470e",
      "old_mode": 33188,
      "old_path": "arch/powerpc/include/asm/kvm_book3s_asm.h",
      "new_id": "b7b039532fbc16c4993262aec9693a8dd6d3e549",
      "new_mode": 33188,
      "new_path": "arch/powerpc/include/asm/kvm_book3s_asm.h"
    },
    {
      "type": "modify",
      "old_id": "9c9ba3d59b1b9ce2cc82e4bc7d3fba46567bda99",
      "old_mode": 33188,
      "old_path": "arch/powerpc/include/asm/kvm_booke.h",
      "new_id": "a90e0918877738180a3f08574900b983cabfdf03",
      "new_mode": 33188,
      "new_path": "arch/powerpc/include/asm/kvm_booke.h"
    },
    {
      "type": "modify",
      "old_id": "069eb9fc6c41325140c77e9f81f69378447f1fe4",
      "old_mode": 33188,
      "old_path": "arch/powerpc/include/asm/kvm_host.h",
      "new_id": "4a3f790d5fc417edfb2488c4375db73df2a29e30",
      "new_mode": 33188,
      "new_path": "arch/powerpc/include/asm/kvm_host.h"
    },
    {
      "type": "modify",
      "old_id": "48b7ab76de2d9fae143fc03aba52abcc79ad655e",
      "old_mode": 33188,
      "old_path": "arch/powerpc/include/asm/kvm_ppc.h",
      "new_id": "0dafd53c30ed2aa6c416c7c27917560878f9926d",
      "new_mode": 33188,
      "new_path": "arch/powerpc/include/asm/kvm_ppc.h"
    },
    {
      "type": "modify",
      "old_id": "d865bd909c7d03c24d8274b0c81c7a7bd712a0f2",
      "old_mode": 33188,
      "old_path": "arch/powerpc/include/asm/mmu-hash64.h",
      "new_id": "b445e0af4c2b152e751020c4bd58a060708b5ff2",
      "new_mode": 33188,
      "new_path": "arch/powerpc/include/asm/mmu-hash64.h"
    },
    {
      "type": "modify",
      "old_id": "58f4a18ef60c1899d486f338097363ed920f1adb",
      "old_mode": 33188,
      "old_path": "arch/powerpc/include/asm/paca.h",
      "new_id": "a6da128599598c95e3ac83552b0c738b28134f62",
      "new_mode": 33188,
      "new_path": "arch/powerpc/include/asm/paca.h"
    },
    {
      "type": "modify",
      "old_id": "d879a6b91635be693ba093a0c7df2d486977df96",
      "old_mode": 33188,
      "old_path": "arch/powerpc/include/asm/reg.h",
      "new_id": "36a611b398c5775ccec16c578a9b7d507b8723ba",
      "new_mode": 33188,
      "new_path": "arch/powerpc/include/asm/reg.h"
    },
    {
      "type": "modify",
      "old_id": "dabfb7346f3687a6c873e94fbf4d7c8b8da6b4f1",
      "old_mode": 33188,
      "old_path": "arch/powerpc/kernel/asm-offsets.c",
      "new_id": "936267462cae19af35c39b976b8e73f9408f89cb",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kernel/asm-offsets.c"
    },
    {
      "type": "modify",
      "old_id": "6da00550afeab6796e5015cc708ad5d21b274a92",
      "old_mode": 33188,
      "old_path": "arch/powerpc/kernel/exceptions-64s.S",
      "new_id": "163c041cec248779f51c1858371d358dcd9bd1e7",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kernel/exceptions-64s.S"
    },
    {
      "type": "modify",
      "old_id": "60ac2a9251dbeef47d4bcd73658753335bb87251",
      "old_mode": 33188,
      "old_path": "arch/powerpc/kernel/process.c",
      "new_id": "ec2d0edeb134664c042c2c8d503caacd76b65bec",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kernel/process.c"
    },
    {
      "type": "modify",
      "old_id": "79fca2651b65909d9358f3b144d8195b66f732f0",
      "old_mode": 33188,
      "old_path": "arch/powerpc/kernel/setup-common.c",
      "new_id": "22051ef04bd9eabbfdd634d206e33e6653880c6e",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kernel/setup-common.c"
    },
    {
      "type": "modify",
      "old_id": "8ebc6700b98d18769f6e8afd1eb54f9f0363ec58",
      "old_mode": 33188,
      "old_path": "arch/powerpc/kernel/smp.c",
      "new_id": "09a85a9045d60f5a03a848da386ad44f5b69436a",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kernel/smp.c"
    },
    {
      "type": "modify",
      "old_id": "b7baff78f90ca174fd24c66675cdffe0250cb702",
      "old_mode": 33188,
      "old_path": "arch/powerpc/kvm/Kconfig",
      "new_id": "5d9b78ebbaa680f0be4fcd5a8a4cac43739bb3c7",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kvm/Kconfig"
    },
    {
      "type": "modify",
      "old_id": "bf9854fa7f63b0e6c7cdbd56ac8fb0114c6e29c3",
      "old_mode": 33188,
      "old_path": "arch/powerpc/kvm/Makefile",
      "new_id": "8a435a6da6655b3f9be4ecad8f5ea5a7f04edda9",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kvm/Makefile"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "4a4fbec61a178597738ed4630e2b322a92a0f2f0",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kvm/book3s_64_mmu_hv.c"
    },
    {
      "type": "modify",
      "old_id": "f94fd9a4c69a516d1b8127cf78a287a3cbd09381",
      "old_mode": 33188,
      "old_path": "arch/powerpc/kvm/book3s_exports.c",
      "new_id": "88c8f26add023e7d2cd6669f1e521f0f832d6ba0",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kvm/book3s_exports.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "60b7300568c83396cb4b01106de86160107bcdd0",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kvm/book3s_hv.c"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "532afaf19841918e8b4efbb83b860d7b482adc6f",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kvm/book3s_hv_interrupts.S"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "9af264840b985bd4105bbefd84339ac66161d7b9",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kvm/book3s_hv_rmhandlers.S"
    },
    {
      "type": "modify",
      "old_id": "1cc25e8c0cf18f88d4ed5c2a4d0917db037721d5",
      "old_mode": 33188,
      "old_path": "arch/powerpc/kvm/book3s_segment.S",
      "new_id": "134501691ad0ceb53e167c3c73a5d37c5f19df69",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kvm/book3s_segment.S"
    },
    {
      "type": "modify",
      "old_id": "026036efcde0edd5c73599cc3558fff40a0b0456",
      "old_mode": 33188,
      "old_path": "arch/powerpc/kvm/powerpc.c",
      "new_id": "3a4f379ee70ff64d39b86d5371b26fba62aec6d0",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kvm/powerpc.c"
    },
    {
      "type": "modify",
      "old_id": "d62a14b2cd0f384cb6f65a708cab5c17c91b8f3f",
      "old_mode": 33188,
      "old_path": "arch/powerpc/kvm/trace.h",
      "new_id": "b135d3d397db9630f1a4c7579ee0f1e4a3340a00",
      "new_mode": 33188,
      "new_path": "arch/powerpc/kvm/trace.h"
    },
    {
      "type": "modify",
      "old_id": "9c9ca7c7b49145a32ce6f5a30c0735e0748a29e5",
      "old_mode": 33188,
      "old_path": "include/linux/kvm.h",
      "new_id": "a156294fc22a34dae364251e65e156ae6eb9336f",
      "new_mode": 33188,
      "new_path": "include/linux/kvm.h"
    }
  ]
}
