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

Re: [win-pv-devel] [PATCH 04/10] Separate checking upcall_pending in shared info from EvtchnPoll



On Thu, Nov 06, 2014 at 02:24:15PM +0000, Paul Durrant wrote:
> The current EvtchnPoll routine in in the shared info code is tied to
> the two level event channel ABI, wheras checking upcall_pending is ABI
> independent. Hence the check should be separated into its own method.
> 
> This patch therefore introduces version 2 of the SHARED_INFO interface,
> which has a new EvtchnUpcallPending method. Version 1 is still
> supported by having its EvtchnPoll variant call EvtchnUpcallPending
> method internally.
> 
> Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
> ---
>  include/shared_info_interface.h |  43 +++++++++-
>  include/xen.h                   |   8 ++
>  src/xen/system.c                |  20 ++++-
>  src/xenbus/evtchn.c             |  16 +++-
>  src/xenbus/shared_info.c        | 174 
> +++++++++++++++++++++++++++++-----------
>  5 files changed, 207 insertions(+), 54 deletions(-)
> 

[...]
  
> -extern VOID
> +XEN_API
> +ULONG
> +SystemVirtualCpuIndex(
> +    IN  ULONG           Index
> +    )
> +{
> +    PSYSTEM_CONTEXT     Context = &SystemContext;
> +    PSYSTEM_CPU         Cpu = &Context->Cpu[Index];
> +
> +    ASSERT3U(Index, <, MAXIMUM_PROCESSORS);
> +
> +    return Cpu->ApicID / 2;

Nack. This will break on EC2 instances that expose CPU topology by
setting the initial APIC ID appropriately (i.e., not according to the
*2 formula.

--msw

_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel


 


Rackspace

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