Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1245910
| From | Radim Krčmář <rkrcmar@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 2/2] KVM: x86: map/unmap private slots in __x86_set_memory_region |
| Date | 2015-10-13 18:50 +0200 |
| Message-ID | <qjaVY-3T8-33@gated-at.bofh.it> (permalink) |
| References | <qiK5s-6T6-5@gated-at.bofh.it> <qiK5s-6T6-17@gated-at.bofh.it> <qj9ZU-2xR-17@gated-at.bofh.it> <qjaCB-3wU-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
2015-10-13 18:28+0200, Paolo Bonzini:
> On 13/10/2015 17:39, Radim Krčmář wrote:
>> 2015-10-12 14:09+0200, Paolo Bonzini:
>>> Otherwise, two copies (one of them never used and thus bogus) are
>>> allocated for the regular and SMM address spaces. This breaks
>>> SMM with EPT but without unrestricted guest support, because the
>>> SMM copy of the identity page map is all zeros.
>>
>> (Have you found out why EPT+unrestricted didn't use the alternative SMM
>> mapping as well?)
>
> Yes, that I already knew; EPT+unrestricted uses CR0.PG=0 directly so
> it doesn't use the identity page at all. (CR0.PG=0 w/o unrestricted
> instead runs with CR0.PG=1. CR3 load and store exits are enabled,
> and the guest CR3 always points to the identity page map while the
> guest runs).
Thank you.
>>> + } else {
>>> + if (!slot->npages)
>>> + return 0;
>>> +
>>> + hva = 0;
>>> + }
>>> +
>>> + old = *slot;
>>
>> (Assignment could be in the 'else' == !size branch, GCC would have fun.)
>
> It would have fun _and_ warn, which is why it's not in the else branch. :)
I wondered if its "used uninitialized" analyzer got any better :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/2] KVM: fix SMM with ept=1/unrestricted_guest=0 Paolo Bonzini <pbonzini@redhat.com> - 2015-10-12 14:10 +0200
[PATCH 2/2] KVM: x86: map/unmap private slots in __x86_set_memory_region Paolo Bonzini <pbonzini@redhat.com> - 2015-10-12 14:10 +0200
Re: [PATCH 2/2] KVM: x86: map/unmap private slots in __x86_set_memory_region Radim Krčmář <rkrcmar@redhat.com> - 2015-10-13 17:50 +0200
Re: [PATCH 2/2] KVM: x86: map/unmap private slots in __x86_set_memory_region Paolo Bonzini <pbonzini@redhat.com> - 2015-10-13 18:30 +0200
Re: [PATCH 2/2] KVM: x86: map/unmap private slots in __x86_set_memory_region Radim Krčmář <rkrcmar@redhat.com> - 2015-10-13 18:50 +0200
csiph-web