[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 03/16] x86: make traps.c build with !CONFIG_PV



On Fri, Oct 26, 2018 at 10:02:19AM -0600, Jan Beulich wrote:
> >>> On 19.10.18 at 16:28, <wei.liu2@xxxxxxxxxx> wrote:
> > @@ -1337,8 +1339,15 @@ static int fixup_page_fault(unsigned long addr, 
> > struct cpu_user_regs *regs)
> >      {
> >          if ( !(regs->error_code & (PFEC_user_mode | PFEC_reserved_bit)) &&
> >               (addr >= GDT_LDT_VIRT_START) && (addr < GDT_LDT_VIRT_END) )
> > +        {
> > +#ifdef CONFIG_PV
> >              return handle_gdt_ldt_mapping_fault(
> >                  addr - GDT_LDT_VIRT_START, regs);
> > +#else
> > +            ASSERT_UNREACHABLE();
> 
> I'm not convinced: A buggy access to this range should lead to
> an unhandled #PF, not an assertion failure.

OK. In that case ASSERT_UNREACHABLE is not needed here. Since this whole
snippet ends up returning 0 anyway I will put the inner if statement
under CONFIG_PV.

Wei.

> 
> Jan
> 
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.