Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp290667pxk; Thu, 17 Sep 2020 03:14:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwI8ZqOb7NCznHJ2ML0d9VY0eybvKjc08vCDAmKImxvQM/uWj/Qktzvx9XPJokXZdxN5Y4A X-Received: by 2002:aa7:d417:: with SMTP id z23mr30943583edq.62.1600337648272; Thu, 17 Sep 2020 03:14:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600337648; cv=none; d=google.com; s=arc-20160816; b=t3mzHtnw+PRHV8CH7T1hpPynVycTwo1s7g0e6iWPbeeNzDZ577pN1P1Q5EwMCjT5cO hswZHqcNfMYAU/UdwEiRl+hCElnIqERkmIAHj7SI1NkfAPnGii9IBI76aQ8mkQ+Gh0b6 KFDBbkC9FGg9csb6Bv222RZRBL3b5ppbIUrCcX8sRqJVEVt5xllxFiuMmd5vbe6BsLK4 Q7YfoGffJIgDt37pu+BmGfmIM5BiNfMoFvuM/mPgxyV8alww2Uc+P7XtoUsFBdZ5ycPC u9EdKRQuBg67BkzlCVTM1T5g2VUuCPmea06jayWkldysUXGTPYht0/B13sYlb83STC9G Me8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/Hhy9FvabiDG5Ek4mu3Z7RZKm3yT/cj4T3OHkyQ6r2k=; b=hrcfNCx82AOrBx5tO1vxkMRaRRAC7GmhyXZ7KH5XtrYm7MfV9AJr0RvKIHLrTUlQ75 mOIWSN0IMWfqaRyPIeo/mM8JaFYEUPcGohkAew16aHr98A4IHI/a+HIpFqTeAs9PJJIG 7SH2KFl6+dT/Ed3xWLTYZK//47DetzKQK/a7T/oZUr5FZQy64VZ11eXr3S8dcZYKnfrC isf1l63zftTCMqyRVb0uvK2NxJpT7vt7ENeSue26U8c6QP4cuds/7oQb8/RHAoPv+uCb atMMEisCL3lcE/6rMFAJLyuEkd5BCNis7zzw3emu8X/SMDIZvh8WPp5PxNyyDS2FpR1h oVIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=T5smQWIe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id by20si4218405ejc.416.2020.09.17.03.13.45; Thu, 17 Sep 2020 03:14:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=T5smQWIe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726646AbgIQKMI (ORCPT + 99 others); Thu, 17 Sep 2020 06:12:08 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:25885 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726614AbgIQKME (ORCPT ); Thu, 17 Sep 2020 06:12:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600337524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/Hhy9FvabiDG5Ek4mu3Z7RZKm3yT/cj4T3OHkyQ6r2k=; b=T5smQWIerx3cHxZqLmoocFnur56sPinINIqdmrpa40VqsTgHBSR1HiY6rNYRYYXeaqMMuD fhKiBYiyiSzA1wFKzSxN1XjfEbQoKEd1UG+djmiEDDYtK9mUEbcZEkr0gFF25FcVk2yXa+ vnLcRbAa2/4vPPMt5aZlXypXn7F6BLM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-48-1yKMiu0XOV2XoIf9IxiM3g-1; Thu, 17 Sep 2020 06:10:56 -0400 X-MC-Unique: 1yKMiu0XOV2XoIf9IxiM3g-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3BC6664085; Thu, 17 Sep 2020 10:10:54 +0000 (UTC) Received: from localhost.localdomain (unknown [10.35.206.187]) by smtp.corp.redhat.com (Postfix) with ESMTP id 954451000239; Thu, 17 Sep 2020 10:10:50 +0000 (UTC) From: Maxim Levitsky To: kvm@vger.kernel.org Cc: Sean Christopherson , Vitaly Kuznetsov , Ingo Molnar , Wanpeng Li , "H. Peter Anvin" , Borislav Petkov , Jim Mattson , Paolo Bonzini , Joerg Roedel , x86@kernel.org (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)), linux-kernel@vger.kernel.org, Thomas Gleixner , Maxim Levitsky Subject: [PATCH v4 0/2] KVM: nSVM: ondemand nested state allocation Date: Thu, 17 Sep 2020 13:10:46 +0300 Message-Id: <20200917101048.739691-1-mlevitsk@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is new version of ondemand nested state allocation.=0D =0D In this version I dropped the changes to set_efer and instead=0D added a new request KVM_REQ_OUT_OF_MEMORY which makes the kvm=0D exit to userspace with KVM_EXIT_INTERNAL_ERROR=0D =0D This request is used in (unlikely) case of memory allocation=0D failure.=0D =0D Maxim Levitsky (2):=0D KVM: add request KVM_REQ_OUT_OF_MEMORY=0D KVM: nSVM: implement ondemand allocation of the nested state=0D =0D arch/x86/kvm/svm/nested.c | 42 ++++++++++++++++++++++++++++++=0D arch/x86/kvm/svm/svm.c | 54 ++++++++++++++++++++++-----------------=0D arch/x86/kvm/svm/svm.h | 7 +++++=0D arch/x86/kvm/x86.c | 7 +++++=0D include/linux/kvm_host.h | 1 +=0D 5 files changed, 87 insertions(+), 24 deletions(-)=0D =0D -- =0D 2.26.2=0D =0D