[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f347e7f3-133f-2199-eeec-583a10c43e3c@amd.com>
Date: Thu, 29 Aug 2019 16:41:50 +0000
From: "Singh, Brijesh" <brijesh.singh@....com>
To: Borislav Petkov <bp@...e.de>
CC: "Singh, Brijesh" <brijesh.singh@....com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Radim Krčmář <rkrcmar@...hat.com>,
Joerg Roedel <joro@...tes.org>,
"Lendacky, Thomas" <Thomas.Lendacky@....com>,
"x86@...nel.org" <x86@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 09/11] KVM: x86: Introduce KVM_GET_PAGE_ENC_BITMAP
ioctl
On 8/29/19 11:26 AM, Borislav Petkov wrote:
> 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....
>
The patches were based on KVM tree July 9th
commit id: e9a83bd2322035ed9d7dcf35753d3f984d76c6a5
I have been waiting for some feedback before refreshing it. If you want
then I can refresh the patch with latest from Linus and send v4.
thanks
Powered by blists - more mailing lists