[{"id":1778297,"web_url":"http://patchwork.ozlabs.org/comment/1778297/","msgid":"<e37fe041-e70a-e9b3-34cf-d0b92b6b863f@redhat.com>","list_archive_url":null,"date":"2017-10-02T12:38:24","subject":"Re: [Qemu-devel] [PATCH v2 0/2] kvm: use kvm_vm_check_extension()\n\twith VM capabilities","submitter":{"id":2701,"url":"http://patchwork.ozlabs.org/api/people/2701/","name":"Paolo Bonzini","email":"pbonzini@redhat.com"},"content":"On 21/09/2017 18:00, Greg Kurz wrote:\n> Some VM capabilities are currently checked with kvm_check_extension(). This\n> doesn't have any impact for most host architectures because they don't depend\n> on the KVM type. However, this is a problem for server-class ppc hosts that\n> can support the PR and HV KVM types. Both implementations can co-exist in the\n> kernel at the same time and we decide which one will be used with the \"type\"\n> argument of the KVM_CREATE_VM ioctl.\n> \n> Each KVM type has a different set of capabilities, and checking them with\n> kvm_check_extension() will always cause KVM to assume we're in HV mode,\n> even if they are VM specific and we have explicitely requested to run in\n> PR mode. This may produce unexpected results.\n> \n> Similar issues were recently fixed in the ppc code:\n> \n> https://github.com/qemu/qemu/commit/70a0c19e83aa4c71c879d51e426e89e4b3d4e014\n> https://github.com/dgibson/qemu/commit/b152d74ebaed61f89fa1ab2c9b1526d9e9dabae5\n> \n> This series focuses on capabilities that are checked by the common code.\n\nQueued, thanks.\n\nPaolo\n\n> --\n> Greg\n> \n> ---\n> \n> Greg Kurz (2):\n>       kvm: check KVM_CAP_SYNC_MMU with kvm_vm_check_extension()\n>       kvm: check KVM_CAP_NR_VCPUS with kvm_vm_check_extension()\n> \n> \n>  accel/kvm/kvm-all.c    |   51 +++++++++++++++++++++++++-----------------------\n>  accel/stubs/kvm-stub.c |    4 ++--\n>  include/sysemu/kvm.h   |    2 +-\n>  3 files changed, 30 insertions(+), 27 deletions(-)\n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@gnu.org;\n\treceiver=<UNKNOWN>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=pbonzini@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y5MDD5nmTz9t48\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon,  2 Oct 2017 23:39:08 +1100 (AEDT)","from localhost ([::1]:52095 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@gnu.org>)\n\tid 1dz002-0008ST-Uc\n\tfor incoming@patchwork.ozlabs.org; Mon, 02 Oct 2017 08:39:06 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:40924)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pbonzini@redhat.com>) id 1dyzzU-0008SJ-Sq\n\tfor qemu-devel@nongnu.org; Mon, 02 Oct 2017 08:38:37 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pbonzini@redhat.com>) id 1dyzzQ-0005s7-HW\n\tfor qemu-devel@nongnu.org; Mon, 02 Oct 2017 08:38:32 -0400","from mx1.redhat.com ([209.132.183.28]:40944)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <pbonzini@redhat.com>)\n\tid 1dyzzQ-0005rY-As; Mon, 02 Oct 2017 08:38:28 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 2FD9E81E0F;\n\tMon,  2 Oct 2017 12:38:27 +0000 (UTC)","from [10.36.118.50] (unknown [10.36.118.50])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id C2B79614F9;\n\tMon,  2 Oct 2017 12:38:25 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 2FD9E81E0F","To":"Greg Kurz <groug@kaod.org>, qemu-devel@nongnu.org","References":"<150600964184.30533.472565821627831467.stgit@bahia.lan>","From":"Paolo Bonzini <pbonzini@redhat.com>","Message-ID":"<e37fe041-e70a-e9b3-34cf-d0b92b6b863f@redhat.com>","Date":"Mon, 2 Oct 2017 14:38:24 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<150600964184.30533.472565821627831467.stgit@bahia.lan>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tMon, 02 Oct 2017 12:38:27 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2 0/2] kvm: use kvm_vm_check_extension()\n\twith VM capabilities","X-BeenThere":"qemu-devel@gnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.gnu.org>","List-Unsubscribe":"<https://lists.gnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@gnu.org?subject=unsubscribe>","List-Archive":"<http://lists.gnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@gnu.org>","List-Help":"<mailto:qemu-devel-request@gnu.org?subject=help>","List-Subscribe":"<https://lists.gnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@gnu.org?subject=subscribe>","Cc":"Thomas Huth <thuth@redhat.com>, qemu-ppc@nongnu.org,\n\tDavid Gibson <david@gibson.dropbear.id.au>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@gnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@gnu.org>"}}]