Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3238198ybc; Mon, 25 Nov 2019 11:09:45 -0800 (PST) X-Google-Smtp-Source: APXvYqwPxM90OA/AWbZEUilq/DSTomKkOLXHgkUZ5pY/84JakT/lYOJRm+LBa2/4y4AAeaf0eaKX X-Received: by 2002:aa7:d147:: with SMTP id r7mr20664358edo.198.1574708985000; Mon, 25 Nov 2019 11:09:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574708984; cv=none; d=google.com; s=arc-20160816; b=FEr/srcy4pQgAeNjQxBTgz8f2wH1IddqDGBmFKSK0FGyOxa+ZkTdpRaTWwZqNfzsPo vEorhRrjYI5ysfZfZV0416gcf7LfwOgSZ9rDfUygUNw6eRciw5fmXUg275l5p7TigFmL mMD3+SoEli4e53LLb5GUHodCSUwhchxWRq6rY7/Vu4ePq9sq16MqMdCYz0UOUeXQtNWi qsSfZEY/gJ2VT1ABd+jjaQyaI8xjPT73xQ/myqyOHzYIL5T5KKoJCqULfVSSnl31kRWP EhPUAI//Tx4/CHuMdOPE0zjzIrz9Su/9SLgGdZ2IjSj91+YYAsDyQPDIYiR/PJRkGmfp 1mGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uxg5HUbuTNPv9TZS2m101TfjoAcQvznXZTZhO4Sew/M=; b=FR+F9BERmVCrNBoCOZL+xQFGcQBgOSACBXTqvV+qSB8N5WA3gmfWT0KtT98LFvxvBh E5VdK+vxTbfRxs6w62cdIK3gTyRNddydZ9Polt2K2CdkuBnIs3o8pU2QwXW+w15sIAYt VQlt70W3U9d47oe+TXqbigVNdnmZWa5tUjZxC7dbBbcFLkQYkOMW1y3B0JNSE2jKuQgg 7/HcG07zc324xEXvBNUYr7zR30r84SF58RbEAMt3ijL29zESZStoQ6lVnzmJ6MyHKM3G 2pflWM0P5rIAVxz2+V+KQaWTXjUTBOQ+vck16LVcmERzW/BbY4gBr0cDH2NpcE/F9LhW dL3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=YcVMb1LR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w2si6424065edc.300.2019.11.25.11.09.19; Mon, 25 Nov 2019 11:09:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=YcVMb1LR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727126AbfKYTHg (ORCPT + 99 others); Mon, 25 Nov 2019 14:07:36 -0500 Received: from mail-il1-f193.google.com ([209.85.166.193]:39747 "EHLO mail-il1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725870AbfKYTHg (ORCPT ); Mon, 25 Nov 2019 14:07:36 -0500 Received: by mail-il1-f193.google.com with SMTP id a7so15207774ild.6 for ; Mon, 25 Nov 2019 11:07:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uxg5HUbuTNPv9TZS2m101TfjoAcQvznXZTZhO4Sew/M=; b=YcVMb1LRVpwa6yTgLQyEh5/k5v9KJIQqzG+ilyfQm7G+taD6dWwghScTobFhZqm6oy eoZWyL79itbjaPV8niFxl3xN2KSZdY6VGbCS0sLvtLA5GfpJMXeTFotFYv7mklb7d34/ K+IhdHe94oIErw5pVUpoLK4gdqANMJCyExr8Qx0V9DhTH8CIFh8iX4SrBbryW96nMYHU MCOepLPfTvzgQdx+eZIgcl1S5zgJynSyLANVX15Rm400zIGGMBNgdVuIswbU5JrLC3m6 gpYLV2UByG9ArDO9d3sahz0j49ahMLIJ2Kxi7bqsNsUzmwgSP21ckqIvF23zTG0wmlYV 0K8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uxg5HUbuTNPv9TZS2m101TfjoAcQvznXZTZhO4Sew/M=; b=JoRcQpXWH6S5tnH8yiOqz2a7j6IQugVUsmGOKMQSyZRIH2CltBo2ePhR+U7ykS5+MW mPD43ztbqMfXZrFXh4+pVHenh0/WftSZfUTgq7bzue4gvkLLqs42tALJj/Pr0yTi8LiC mhDcBG2gbXParId9RxdfpgPP2Vyno4o5OJl55Pzn4CToBHPd78h+TxRxttZ+vNTKVxao wH2o9keh03eJedgQM8E6GNhtDDO8tn5mQS4gEnriPCQqW7wn/rPN0CT7CjXYtzV/Rfmt OOSHUw7h0UOdv+WKqX9QlfZKJ9fKESeBh03YQrv9suaBfmCIlVc4SHfhI/75PjDRAG4f /F7g== X-Gm-Message-State: APjAAAVJVjYmRxhSmPsFlNzFV4AmYC/DWamiUSUTYpQRrK1xWNk03FdN Brg0d5A7zVZmdJiABih8JwG5XR6t2+hODrUtppvreg== X-Received: by 2002:a92:c981:: with SMTP id y1mr33566633iln.53.1574708854881; Mon, 25 Nov 2019 11:07:34 -0800 (PST) MIME-Version: 1.0 References: <20190710201244.25195-1-brijesh.singh@amd.com> <20190710201244.25195-9-brijesh.singh@amd.com> In-Reply-To: <20190710201244.25195-9-brijesh.singh@amd.com> From: Peter Gonda Date: Mon, 25 Nov 2019 11:07:23 -0800 Message-ID: Subject: Re: [PATCH v3 08/11] KVM: X86: Introduce KVM_HC_PAGE_ENC_STATUS hypercall To: "Singh, Brijesh" Cc: "kvm@vger.kernel.org" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Joerg Roedel , Borislav Petkov , "Lendacky, Thomas" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > struct kvm_arch_async_pf { > diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c > index 3089942f6630..431718309359 100644 > --- a/arch/x86/kvm/svm.c > +++ b/arch/x86/kvm/svm.c > @@ -135,6 +135,8 @@ struct kvm_sev_info { > int fd; /* SEV device fd */ > unsigned long pages_locked; /* Number of pages locked */ > struct list_head regions_list; /* List of registered regions */ > + unsigned long *page_enc_bmap; > + unsigned long page_enc_bmap_size; > }; > Just a high level question. Would it be better for these bitmaps to live in kvm_memory_slot and the ioctl to be take a memslot instead of a GPA + length? The c-bit status bitmap will probably need to be checked at when checking the dirty log and KVM_GET_DIRTY_LOG operations on memslots.