)]}'
{
  "commit": "70a0c19e83aa4c71c879d51e426e89e4b3d4e014",
  "tree": "49a91fe56596c91501c340d1852a8a97689aeca0",
  "parents": [
    "d492a75cfefd9a09125ba2b007c817c1417c3820"
  ],
  "author": {
    "name": "Greg Kurz",
    "email": "groug@kaod.org",
    "time": "Thu Sep 14 12:48:04 2017 +0200"
  },
  "committer": {
    "name": "David Gibson",
    "email": "david@gibson.dropbear.id.au",
    "time": "Fri Sep 15 10:29:48 2017 +1000"
  },
  "message": "ppc/kvm: use kvm_vm_check_extension() in kvmppc_is_pr()\n\nIf the host has both KVM PR and KVM HV loaded and we pass:\n\n\t-machine pseries,accel\u003dkvm,kvm-type\u003dPR\n\nthe kvmppc_is_pr() returns false instead of true. Since the helper\nis mostly used as fallback, it doesn\u0027t have any real impact with\nrecent kernels. A notable exception is the workaround to allow\nmigration between compatible hosts with different PVRs (eg, POWER8\nand POWER8E), since KVM still doesn\u0027t provide a way to check if a\nspecific PVR is supported (see commit c363a37a450f for details).\n\nAccording to the official KVM API documentation [1], KVM_PPC_GET_PVINFO\nis \"vm ioctl\", but we check it as a global ioctl. The following function\nin KVM is hence called with kvm \u003d\u003d NULL and considers we\u0027re in HV mode.\n\nint kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)\n{\n\tint r;\n\t/* Assume we\u0027re using HV mode when the HV module is loaded */\n\tint hv_enabled \u003d kvmppc_hv_ops ? 1 : 0;\n\n\tif (kvm) {\n\t\t/*\n\t\t * Hooray - we know which VM type we\u0027re running on. Depend on\n\t\t * that rather than the guess above.\n\t\t */\n\t\thv_enabled \u003d is_kvmppc_hv_enabled(kvm);\n\t}\n\nLet\u0027s use kvm_vm_check_extension() to fix the issue.\n\n[1] https://www.kernel.org/doc/Documentation/virtual/kvm/api.txt\n\nSigned-off-by: Greg Kurz \u003cgroug@kaod.org\u003e\nReviewed-by: Thomas Huth \u003cthuth@redhat.com\u003e\nSigned-off-by: David Gibson \u003cdavid@gibson.dropbear.id.au\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6442dfcb95b3a3a4db8b017c1cdec2b58ef242a5",
      "old_mode": 33188,
      "old_path": "target/ppc/kvm.c",
      "new_id": "1deaf106d2b98c5e218bf84e66c06846cb038815",
      "new_mode": 33188,
      "new_path": "target/ppc/kvm.c"
    }
  ]
}
