[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


  • To: Matt Wilson <msw@xxxxxxxxx>
  • From: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
  • Date: Wed, 10 Dec 2014 14:10:49 +0000
  • Accept-language: en-GB, en-US
  • Cc: "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 10 Dec 2014 14:10:52 +0000
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
  • Thread-index: AQHP+c1yoch+bKh86UuUQIBjLuu7fpyIfUcAgACUEVA=
  • Thread-topic: [PATCH 04/10] Separate checking upcall_pending in shared info from EvtchnPoll

> -----Original Message-----
> From: Matt Wilson [mailto:mswilson@xxxxxxxxx] On Behalf Of Matt Wilson
> Sent: 10 December 2014 06:16
> To: Paul Durrant
> Cc: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [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.

That's a shame. The code really doesn't have much option but to use this 
mechanism as Xen provides no explicit way for an HVM guest to get vcpu ids 
until my patch "x86/hvm: Extend HVM cpuid leaf with vcpu id" goes in and use of 
the FIFO ABI requires knowledge of vcpu id.

  Paul

> 
> --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®.