On 02/04/2013 02:49 PM, Seiji Aguchi wrote:
> +
> +static void switch_to_trace_idt(void *arg)
> +{
> +     store_idt(this_cpu_ptr(&orig_idt_descr));
> +     load_idt(&trace_idt_descr);
> +
> +     return;
> +}
> +
> +static void restore_original_idt(void *arg)
> +{
> +     if (this_cpu_read(orig_idt_descr.address)) {
> +             load_idt(this_cpu_ptr(&orig_idt_descr));
> +             this_cpu_write(orig_idt_descr.address, 0);
> +     }
> +
> +     return;
> +}
> +

The base address of the IDT doesn't generally change... the one
exception is when we do the funny NMI workaround.

For that reason, I would be happier if we just restored the standard
value instead of saving/restoring stuff.

The above code is probably broken if either side is in the funny NMI
zone... unless you can guarantee it is *always* in the funny NMI zone
(in which case you can just load nmi_idt_descr instead.

Steve R., do you know what the constraints are with respect to that?

        -hpa


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to