From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94FFCC35256 for ; Thu, 17 Sep 2020 10:12:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 392DB206A2 for ; Thu, 17 Sep 2020 10:12:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="T5smQWIe" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726633AbgIQKMJ (ORCPT ); Thu, 17 Sep 2020 06:12:09 -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