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

Re: [Xen-devel] [PATCH 2/6] x86/suspend: Don't bother saving %cr3, %ss or flags

  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 17 Dec 2019 16:10:12 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@xxxxxxxxxx; spf=Pass smtp.mailfrom=roger.pau@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>
  • Delivery-date: Tue, 17 Dec 2019 15:10:24 +0000
  • Ironport-sdr: IQF0pgvInHJ5LMHjmOLoMPRds0SxIWe/v7WaPrNAsK7nabqg8dsXXZ8vPPnsCfEN5OrCEOIo0x pxwX+NCm1WdF+J8+vQvOijXeyRwvI8s/okj/dbJbuaedxHccu9c8jIr4YLlGwLVrXbp/yS4/bY USF7WpfoclofRDrn8iI0cMK2tgOLyZ3oSC1mQ9imFSl6V0MKB1fOqJ4pJqg6jSO45hzipdc3dm UCtZbaNp5ugLk/iQoMwJW5pER1HfjOWgov14tmf1Mj5KGA0yaqXuQj6tvwTXckeJcLWQyJI8PS U6c=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Dec 17, 2019 at 12:26:24PM +0000, Andrew Cooper wrote:
> On 17/12/2019 12:18, Roger Pau Monné wrote:
> > On Tue, Dec 17, 2019 at 12:06:01PM +0000, Andrew Cooper wrote:
> >> On 17/12/2019 11:52, Roger Pau Monné wrote:
> >>> On Fri, Dec 13, 2019 at 07:04:32PM +0000, Andrew Cooper wrote:
> >>>> The trampoline has already set up the idle pagetables (which are the 
> >>>> correct
> >>>> ones to use), and sanitised the flags state.
> >>> I wonder why do we have wakeup.S and wakeup_prot.S, it would be easier
> >>> to follow if it all was in the same file IMO.
> >> wakeup.S is the 16bit entry point, and lives in the trampoline below 1M.
> >>
> >> wakeup_prot.S is a bit of logic which lives in the main hypervisor.
> >>
> >> The naming could probably do with some improvement, but they can't
> >> feasibly be part of the same file.
> > Hm, I'm not sure I follow. Isn't this trampoline copied by Xen in a
> > suitable position below the 1M boundary, and hence could use symbols
> > in order to figure out which part to copy?
> >
> > Ie: both the low and the high part could live in the same file as long
> > as Xen knows how to differentiate those and which chunk needs
> > positioning below 1M?
> There is one trampoline.S (and trampoline.o) which gathers together
> various files (including wakeup.S) to construct the trampoline.

Oh, I see it's all included to make a single unit, and the symbols
used to mark the start and end of the trampoline chunk are defined
outside of the included file.

> It is not something which can be constructed simply by putting code/data
> in the requisite sections.  There are two main entrypoints, one with a
> 4k alignment requirement, one with 16 byte alignment, and we split the
> trampoline into two parts - one which is BSP-only and is several pages
> in size, and one which is post-boot which is only a single page.

Given the size of s3_resume I would guess there's space in that single
page to fit it, but since it doesn't need to live below the 1M
boundary it could be seen as a waste.

Anyway, leaving it as-is is fine since placing it in wakeup.S would be
a waste of space or require some restructuring of how the trampoline
code is assembled.

Thanks, Roger.

Xen-devel mailing list



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