Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2537528ybl; Thu, 29 Aug 2019 09:28:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIouhoe+8qGEOuL/e2AJZnWco519pGOiOOQxYw+yc9yk9MUWdLaLu7ruKZnKKm84Th1ynV X-Received: by 2002:a65:4c4d:: with SMTP id l13mr8978175pgr.156.1567096087312; Thu, 29 Aug 2019 09:28:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567096087; cv=none; d=google.com; s=arc-20160816; b=rhrOGBDmZ7kWdhPmewmDj92VzIJa+0GipBMlow5Z0I8EBo1gNVZRzvEmEEzvB2kOjR N9akR9QZwRA9PSLnx2f0fsGZEstEM4rFgQv7tzU7YmBk0IfHvoPU8tMDhJZ4HpZ3x4SI +cRWcZeVI6JLcJwe26k+efjLhzWNgmANQxJgh2AuVyZyKDawOzHoCsVvt05unVJ4o/+x 1hCXdbrSEsTibZR1/QohTNzUM4YthMbRytL2Kz8NflOKDkzJRwWnnAxyVHopShGbq2sj PO37HDaV/eO23KjaQh8cP2QxTTGwlC2N/ML4Hra28kL2BP0ClnLOiAw6gfZPw0wMTjS7 5ERg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=UA8utgFKZuXaZ0LV4kOtxjFe+3yyEr/N8YCIDCBbIhE=; b=lPtisgdhckemiMpYKKCERlLxAmkY4lqxZ3jKsQ4SJ5fH5zYZyNaClO/QkGk4B3wMC+ ET2+VPg18tVvNZMeSqd2j75Vwz9gQYTZtzP/GxYGgzEV9JqcYaDkF2+OHHMhP3IFN668 2QOOBNDD461CpjqQ9Qn2vWyqZOIamKB7bMYeCLiCstRNOwfW29CHhq2fVlaNz2ZBxp6j 3AsbOQugJf3itjANzoUvx97jtzmPyaMSVUZOTz9CKCRUHuZXIRjSX0NLCqxnyMbVxZhv NWVJjZQ6v2b0BQul1+LbP5z2nKiUD8hb/ZIGhBeaLf0aN4wrDez8iBroUZKUQyhiMl/y 9YPw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6si2329497pgh.35.2019.08.29.09.27.51; Thu, 29 Aug 2019 09:28:07 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727731AbfH2Q0t (ORCPT + 99 others); Thu, 29 Aug 2019 12:26:49 -0400 Received: from mx2.suse.de ([195.135.220.15]:51194 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726973AbfH2Q0t (ORCPT ); Thu, 29 Aug 2019 12:26:49 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C48A8AB9B; Thu, 29 Aug 2019 16:26:47 +0000 (UTC) Date: Thu, 29 Aug 2019 18:26:41 +0200 From: Borislav Petkov To: "Singh, Brijesh" Cc: "kvm@vger.kernel.org" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , Joerg Roedel , "Lendacky, Thomas" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v3 09/11] KVM: x86: Introduce KVM_GET_PAGE_ENC_BITMAP ioctl Message-ID: <20190829162641.GB2132@zn.tnic> References: <20190710201244.25195-1-brijesh.singh@amd.com> <20190710201244.25195-10-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190710201244.25195-10-brijesh.singh@amd.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 10, 2019 at 08:13:10PM +0000, Singh, Brijesh wrote: > @@ -7767,7 +7808,8 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = { > > .need_emulation_on_page_fault = svm_need_emulation_on_page_fault, > > - .page_enc_status_hc = svm_page_enc_status_hc > + .page_enc_status_hc = svm_page_enc_status_hc, > + .get_page_enc_bitmap = svm_get_page_enc_bitmap > }; > > static int __init svm_init(void) > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 6baf48ec0ed4..59ae49b1b914 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -4927,6 +4927,18 @@ long kvm_arch_vm_ioctl(struct file *filp, > r = kvm_vm_ioctl_hv_eventfd(kvm, &hvevfd); > break; > } > + case KVM_GET_PAGE_ENC_BITMAP: { > + struct kvm_page_enc_bitmap bitmap; > + > + r = -EFAULT; > + if (copy_from_user(&bitmap, argp, sizeof(bitmap))) > + goto out; > + > + r = -ENOTTY; > + if (kvm_x86_ops->get_page_enc_bitmap) > + r = kvm_x86_ops->get_page_enc_bitmap(kvm, &bitmap); I don't know what tree you've done those patches against but against -rc6+, the first argument above needs to be vcpu->kvm: arch/x86/kvm/x86.c: In function ‘kvm_arch_vcpu_ioctl’: arch/x86/kvm/x86.c:4343:41: error: ‘kvm’ undeclared (first use in this function) r = kvm_x86_ops->get_page_enc_bitmap(kvm, &bitmap); ^~~ arch/x86/kvm/x86.c:4343:41: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [scripts/Makefile.build:280: arch/x86/kvm/x86.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [scripts/Makefile.build:497: arch/x86/kvm] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1083: arch/x86] Error 2 make: *** Waiting for unfinished jobs.... -- Regards/Gruss, Boris. SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 247165, AG München