Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1584802
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 6/6] x86/kvm/vmx: Defer TR reload after VM exit |
| Date | 2017-02-20 19:00 +0100 |
| Message-ID | <td0pH-7LH-7@gated-at.bofh.it> (permalink) |
| References | <tcZtE-7aS-23@gated-at.bofh.it> <tcZtE-7aS-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 20/02/2017 17:56, Andy Lutomirski wrote:
> +{
> + DEBUG_LOCKS_WARN_ON(preemptible());
> +
> + if (unlikely(this_cpu_read(need_tr_refresh))) {
> + force_reload_TR();
> + this_cpu_write(need_tr_refresh, false);
> + }
> +}
> +
> +/*
> + * If you do something evil that corrupts the cached TSS limit (I'm looking
> + * at you, VMX exits), call this function.
> + *
> + * The optimization here is that the TSS limit only matters for Linux if the
> + * IO bitmap is in use. If the TSS limit gets forced to its minimum value,
> + * everything works except that IO bitmap will be ignored and all CPL 3 IO
> + * instructions will #GP, which is exactly what we want for normal tasks.
> + */
> +static inline void invalidate_tss_limit(void)
> +{
> + DEBUG_LOCKS_WARN_ON(preemptible());
> +
> + if (unlikely(test_thread_flag(TIF_IO_BITMAP)))
> + refresh_TR();
This must be force_reload_TR, not refresh_TR.
Paolo
> + else
> + this_cpu_write(need_tr_refresh, true);
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 6/6] x86/kvm/vmx: Defer TR reload after VM exit Andy Lutomirski <luto@kernel.org> - 2017-02-20 18:00 +0100 Re: [PATCH 6/6] x86/kvm/vmx: Defer TR reload after VM exit Paolo Bonzini <pbonzini@redhat.com> - 2017-02-20 19:00 +0100
csiph-web