Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1703395
| From | Bandan Das <bsd@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] KVM: nVMX: Emulate EPTP switching for the L1 hypervisor |
| Date | 2017-08-03 22:00 +0200 |
| Message-ID | <uaurM-4Ef-19@gated-at.bofh.it> (permalink) |
| References | <u9OLT-21p-5@gated-at.bofh.it> <u9OLU-21p-17@gated-at.bofh.it> <uamDU-7Ls-21@gated-at.bofh.it> <uanJE-8s6-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 03/08/2017 13:39, David Hildenbrand wrote:
>>> + /* AD, if set, should be supported */
>>> + if ((address & VMX_EPT_AD_ENABLE_BIT)) {
>>> + if (!enable_ept_ad_bits)
>>> + return false;
>> In theory (I guess) we would have to check here if
>> (vmx->nested.nested_vmx_ept_caps & VMX_EPT_AD_BIT)
>
> Yes, that's a more correct check than enable_ept_ad_bits.
>
>>>
>>> + page = nested_get_page(vcpu, vmcs12->eptp_list_address);
>>> + if (!page)
>>> + return 1;
>>> +
>>> + l1_eptp_list = kmap(page);
>>> + address = l1_eptp_list[index];
>>> + accessed_dirty = !!(address & VMX_EPT_AD_ENABLE_BIT);
>>
>> Minor nit: Can't you directly do
>>
>> kunmap(page);
>> nested_release_page_clean(page);
>>
>> at this point?
>>
>> We can fix this up later.
>
> You actually can do simply kvm_vcpu_read_guest_page(vcpu,
> vmcs12->eptp_list_address >> PAGE_SHIFT, &address, index * 8, 8).
Thanks Paolo, for the interesting tip. David, I sent a new version with the correct
check for AD and using this instead of kmap(page).
> Paolo
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 3/3] KVM: nVMX: Emulate EPTP switching for the L1 hypervisor Bandan Das <bsd@redhat.com> - 2017-08-02 01:30 +0200
Re: [PATCH 3/3] KVM: nVMX: Emulate EPTP switching for the L1 hypervisor David Hildenbrand <david@redhat.com> - 2017-08-03 13:40 +0200
Re: [PATCH 3/3] KVM: nVMX: Emulate EPTP switching for the L1 hypervisor David Hildenbrand <david@redhat.com> - 2017-08-03 14:50 +0200
Re: [PATCH 3/3] KVM: nVMX: Emulate EPTP switching for the L1 hypervisor Paolo Bonzini <pbonzini@redhat.com> - 2017-08-03 14:50 +0200
Re: [PATCH 3/3] KVM: nVMX: Emulate EPTP switching for the L1 hypervisor Bandan Das <bsd@redhat.com> - 2017-08-03 22:00 +0200
csiph-web