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

Re: [PATCH] x86/S3: put data segment registers into known state upon resume


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 21 Jul 2020 13:27:00 +0200
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "M. Vefa Bicakci" <m.v.b@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Delivery-date: Tue, 21 Jul 2020 11:27:08 +0000
  • Ironport-sdr: qga5tWolNgSk0o0DOp7bexDU1g8wpC7XCDftGL5zwn7Qytwf7ufpAoY6kaDmhiLnXcsx8Gwbio 2lH00iQKt3ymcwe12AP6Y0NOxx94nACWFZnjvygio8VwZ4hp3bUFOOuoAAIIURkdDHZF0VKn6l KmQzrNJ7OKd+PBIdyX0aZb+yVHvvTgG+MwjE9sytNoltIBI8Lko8YXQlDBa/mVokYSWrjmmqV9 eDDlBayy7jdE57rkSatYIW+26w+E08z/pzilR6eoQDbVmYjjf+s2Da0FdFRLQqV6B/Tvr/hX6u Bu0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Jul 20, 2020 at 05:20:15PM +0200, Jan Beulich wrote:
> wakeup_32 sets %ds and %es to BOOT_DS, while leaving %fs at what
> wakeup_start did set it to, and %gs at whatever BIOS did load into it.
> All of this may end up confusing the first load_segments() to run on
> the BSP after resume, in particular allowing a non-nul selector value
> to be left in %fs.
> 
> Alongside %ss, also put all other data segment registers into the same
> state that the boot and CPU bringup paths put them in.
> 
> Reported-by: M. Vefa Bicakci <m.v.b@xxxxxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

I wouldn't mind if the added chunk was placed before loading %ss, so
that the context of what's in %eax would be clearer.

Roger.



 


Rackspace

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