Message ID | 20230412213510.1220557-12-amoorthy@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <kvm-owner@vger.kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5FF7C7619A for <kvm@archiver.kernel.org>; Wed, 12 Apr 2023 21:35:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230031AbjDLVff (ORCPT <rfc822;kvm@archiver.kernel.org>); Wed, 12 Apr 2023 17:35:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229897AbjDLVf0 (ORCPT <rfc822;kvm@vger.kernel.org>); Wed, 12 Apr 2023 17:35:26 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8D6C76BB for <kvm@vger.kernel.org>; Wed, 12 Apr 2023 14:35:25 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-54f8d4f1ca1so37088367b3.20 for <kvm@vger.kernel.org>; Wed, 12 Apr 2023 14:35:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1681335325; x=1683927325; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=+2CX14Kj8/FFXl+IH0W/8FGtmxWGznSGRKdbhRDJLUc=; b=p8bqpn4Dk9Gz6MN4ywNEmQtagtzpLIxrNnIs/78XOR/BZCZsaubThr5jZlBe3A9/Bo xUGwI26ti8RR6P8GdBzrDgrFhOrTjkeh9AtMCg/Q9PFIi3EAVKhB8I8p0MNXBEhdx058 qHIdK5MhwqEdX2g5KKNjLJnb/mhhyuldqk8s0eAqYV4nAchHoT628Fnj3jVtkCgj0KSZ NQjg5DjX1iidMjq4DxkyjK7XFXry1UsIBkfsDw0DlcBJI06XomtB15gsVc+JjM+Pceog lgxYPlOh7M/77mtkNft0npiYroONt+2TYP1Jm1lm0UlYFodlTIf10FXcOnCumbISliIr sCqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681335325; x=1683927325; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+2CX14Kj8/FFXl+IH0W/8FGtmxWGznSGRKdbhRDJLUc=; b=ChxqHyQZSKqz5TqsuXZaMTT/mL/PvWSVMVYgk1nQkB8bJhVIuHyHxZq1ySsjJZhTnO c71pjIvklr9VrjFhr48A+vwfg8vuTRgYQ1kdwXoA+undClk1ygOwfLeo6s4Qn97c2PMS tZQxYkByQmh8Wv3wTQb+bqnyy3wsZ5SDreq4cf1NZTr5swJ3t8ZX1HumBPqlMe8D0lzZ oJXgrrmj0BHNYWz+7ynHqoXxZ374jJOREIhy9gx79vv4hKGdknrEbUCr/JSW/d+3IUKE rn4dBpwsF3DHhbMTDaY9Ai5yDoab2/3+xOqvjw9CQHR5spwfFQlRjuRnhaYPjjKBK80x v5ig== X-Gm-Message-State: AAQBX9cz7DUKbXL4Mqtm+/3gfungVwJX0ATtM8tmp8vsR3ju9YsZBNvJ Xbxos6Ea35Bx2miZz2X+iNSEzuAL5mY/pA== X-Google-Smtp-Source: AKy350ZoVAtaYWZqyK/PKLeLB7f5y1zErH4zuwClH5USqCfQLe7jp2ooTV3DJsYLDFSWaoh1ky/XqCmcJ18/XA== X-Received: from laogai.c.googlers.com ([fda3:e722:ac3:cc00:2b:7d90:c0a8:2c9]) (user=amoorthy job=sendgmr) by 2002:a0d:ec02:0:b0:54c:2723:560d with SMTP id q2-20020a0dec02000000b0054c2723560dmr8679ywn.3.1681335325180; Wed, 12 Apr 2023 14:35:25 -0700 (PDT) Date: Wed, 12 Apr 2023 21:34:59 +0000 In-Reply-To: <20230412213510.1220557-1-amoorthy@google.com> Mime-Version: 1.0 References: <20230412213510.1220557-1-amoorthy@google.com> X-Mailer: git-send-email 2.40.0.577.gac1e443424-goog Message-ID: <20230412213510.1220557-12-amoorthy@google.com> Subject: [PATCH v3 11/22] KVM: x86: Annotate -EFAULTs from setup_vmgexit_scratch() From: Anish Moorthy <amoorthy@google.com> To: pbonzini@redhat.com, maz@kernel.org Cc: oliver.upton@linux.dev, seanjc@google.com, jthoughton@google.com, amoorthy@google.com, bgardon@google.com, dmatlack@google.com, ricarkol@google.com, axelrasmussen@google.com, peterx@redhat.com, kvm@vger.kernel.org, kvmarm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: <kvm.vger.kernel.org> X-Mailing-List: kvm@vger.kernel.org |
Series |
Improve scalability of KVM + userfaultfd live migration via annotated memory faults.
|
expand
|
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c index c25aeb550cd97..9ef121f71dc26 100644 --- a/arch/x86/kvm/svm/sev.c +++ b/arch/x86/kvm/svm/sev.c @@ -2683,6 +2683,7 @@ static int setup_vmgexit_scratch(struct vcpu_svm *svm, bool sync, u64 len) pr_err("vmgexit: kvm_read_guest for scratch area failed\n"); kvfree(scratch_va); + kvm_populate_efault_info(&svm->vcpu, scratch_gpa_beg, len); return -EFAULT; }
Implement KVM_CAP_MEMORY_FAULT_INFO for efaults generated by setup_vmgexit_scratch(). Signed-off-by: Anish Moorthy <amoorthy@google.com> --- arch/x86/kvm/svm/sev.c | 1 + 1 file changed, 1 insertion(+)