lkml.org 
[lkml]   [2021]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] xen/x86: fix PV trap handling on secondary processors
From
Date

On 9/16/21 11:04 AM, Jan Beulich wrote:
> {
> const struct desc_ptr *desc = this_cpu_ptr(&idt_desc);
> + unsigned i, count = (desc->size + 1) / sizeof(gate_desc);
>
> - xen_convert_trap_info(desc, traps);


Can you instead add a boolean parameter to xen_convert_trap_info() to indicate whether to skip empty entries? That will avoid (almost) duplicating the code.


-boris


> + BUG_ON(count > 256);
> +
> + for (i = 0; i < count; ++i) {
> + const gate_desc *entry = (gate_desc *)desc->address + i;
> +
> + cvt_gate_to_trap(i, entry, &traps[i]);
> + }
> }
>
> /* Load a new IDT into Xen. In principle this can be per-CPU, so we
>

\
 
 \ /
  Last update: 2021-09-17 03:36    [W:0.095 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site