Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp314754pxu; Tue, 6 Oct 2020 07:08:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6aew80/TTThFLwZenUygNGTEX6tkhi4uzexa7AwwI8Thy6xatQF11b9Oz/PbbRpYfFAZS X-Received: by 2002:a1c:f608:: with SMTP id w8mr5319694wmc.161.1601993311369; Tue, 06 Oct 2020 07:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601993311; cv=none; d=google.com; s=arc-20160816; b=QVN+ZAz2b0QBeqaAKZ3kh0RPyChDXEa/q8LyrQURRAib3iFaMNPcSegDlsaJcmPioU BAkoOlv85RPCRsvUaoQ5wJX9JCP/JiNEyqPbKyvH/8xS9eRnn/4Dco5sQhkECOtTA0qQ uRubz8Q2QjRcZIpAn0RITgcC7eJn+zT7O4mYWVh8I6pUYWPpLVRt9k7NKnxVlJrO47uH 1Am/hx+7MjSm6Jjm+Zc/oqv94RwWyBxUXD8F9nHslo2IEMKtEOx/ED0AZFZSppHWiezj C9xLx3vFtb7fa5ynVGYEsaSncyIuJBMrqlru8yW9oEm0XVrqlUnbaOyxoPkAg91MEv/l 1ksw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=guYki50KQJdFnn1PZrjvoH399zUlc+hngMckBoejkYs=; b=to3imJ6GScMdFp6LIdUu/i9+SXcfq73+Nhvayjihf2dF6E8EZTqjz3Rs/ZmmWGFMLF M19sbdqfWdJoRtRJmXUk++QhPko8XIEsA0rxBCPSfIwTxzlfWD1oyBkWcK6HnxGkDz54 di3I0DHRpkgJ/iotmgVoRaaNVuPy1ATiMHL39HzfEP0+cUNHjpw1HVS5h0dtky+xZ+LW nJjfSahEjqrMQEKce4ubSmMBb/uT1NpPBHma4yvyq4/oUH8AKAZYyVkBCfrZ+1aipfLg U0Th+jC8U5moJFoCTTrjGSkCw5sOpeWMz0tCfWsLCKgny2KUdLiiklN7TB4a9JsCTA13 tAsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QmXtxQIx; 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 l25si2056272eje.688.2020.10.06.07.08.07; Tue, 06 Oct 2020 07:08:31 -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=QmXtxQIx; 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 S1726938AbgJFOFz (ORCPT + 99 others); Tue, 6 Oct 2020 10:05:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:59522 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726137AbgJFOFY (ORCPT ); Tue, 6 Oct 2020 10:05:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601993123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=guYki50KQJdFnn1PZrjvoH399zUlc+hngMckBoejkYs=; b=QmXtxQIxyxopG4uSQH3A8GyEmUgtPnVmljWVzIi+GRslfKbA2iquCTaPiKw3D4HJJR3veU TqG0SFKNaX41Y7UoGxsfPlu5MKxXmxZc1Sz2qctvnF+NFA6QNhDb9RnhMKqb0X5VAGy/S0 PgE8Ha9UxjEWJHTXZ4m4+J7/zRBfH58= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-444-K63kNEgUNW-DDnFs0cKWTA-1; Tue, 06 Oct 2020 10:05:20 -0400 X-MC-Unique: K63kNEgUNW-DDnFs0cKWTA-1 Received: by mail-wm1-f69.google.com with SMTP id u82so1161004wmu.4 for ; Tue, 06 Oct 2020 07:05:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=guYki50KQJdFnn1PZrjvoH399zUlc+hngMckBoejkYs=; b=r+CjZ7+Lt5eV8VJipgCutM7+ncHqbs38a/8DQ789zezkjvoVteu6P9EJgSsYenVolE G05aGUFVwlXOBH1gc8IBno0GJPk8bFXwpL2Ain0XOCJswUREQkcVWpuwxrDKTJMpk05/ 3K58JJm3rmnyUeVTN4pT/EIVhaU/fmUhGrFJUKJbQGhUsib6JlvztH9DZZIpwj3pKv7v Fi0HGwLtIcQgP+zSL40UbtHjWIVjn25WWI8QcZrWsfOpynk2bYZTOcAwjeLC5DRVBxNp afLrmC3nIn4m0fFD/c5lr67uOoUd1AYUQ7qG0daUZN7yDkTbkXy6ZvgCdjjPT+EWhArS nsKg== X-Gm-Message-State: AOAM532nI0QM6nazYnAgm8DSi4MhU8T/hT+C4MwVWllE45ND+2Wf5lBl hXtmnEk/vpLaaJS5ZxEMW1XaARtBvq++3fiYF3wYGG4EZyCYHcQXGl4atQyRX7F8FTCKxoKfGG6 7l2hwlkEYuRW30+4fCD4aHllH X-Received: by 2002:a1c:417:: with SMTP id 23mr4967684wme.1.1601993118923; Tue, 06 Oct 2020 07:05:18 -0700 (PDT) X-Received: by 2002:a1c:417:: with SMTP id 23mr4967661wme.1.1601993118732; Tue, 06 Oct 2020 07:05:18 -0700 (PDT) Received: from vitty.brq.redhat.com (g-server-2.ign.cz. [91.219.240.2]) by smtp.gmail.com with ESMTPSA id q20sm3953461wmc.39.2020.10.06.07.05.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Oct 2020 07:05:17 -0700 (PDT) From: Vitaly Kuznetsov To: Vivek Goyal , Sean Christopherson Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, virtio-fs-list , pbonzini@redhat.com Subject: Re: [PATCH v4] kvm,x86: Exit to user space in case page fault error In-Reply-To: <20201006134629.GB5306@redhat.com> References: <20201001215508.GD3522@redhat.com> <20201001223320.GI7474@linux.intel.com> <20201002153854.GC3119@redhat.com> <20201002183036.GB24460@linux.intel.com> <20201002192734.GD3119@redhat.com> <20201002194517.GD24460@linux.intel.com> <20201002200214.GB10232@redhat.com> <20201002211314.GE24460@linux.intel.com> <20201005153318.GA4302@redhat.com> <20201005161620.GC11938@linux.intel.com> <20201006134629.GB5306@redhat.com> Date: Tue, 06 Oct 2020 16:05:16 +0200 Message-ID: <877ds38n6r.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Vivek Goyal writes: > A. Just exit to user space with -EFAULT (using kvm request) and don't > wait for the accessing task to run on vcpu again. What if we also save the required information (RIP, GFN, ...) in the guest along with the APF token so in case of -EFAULT we can just 'crash' the guest and the required information can easily be obtained from kdump? This will solve the debugging problem even for TDX/SEV-ES (if kdump is possible there). -- Vitaly