xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Xen-devel <xen-devel@lists.xen.org>,
	"Wei Liu" <wei.liu2@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH v2 4/5] x86/pv: Drop {compat_, }create_bounce_frame() and use the C version instead
Date: Fri, 7 Sep 2018 15:17:46 +0100	[thread overview]
Message-ID: <e35d87d0-227b-c2a4-f70f-ebba1cb41796@citrix.com> (raw)
In-Reply-To: <5A9D1B9202000078001AE6B4@prv-mh.provo.novell.com>

On 05/03/18 09:27, Jan Beulich wrote:
>>>> On 27.02.18 at 15:50, <andrew.cooper3@citrix.com> wrote:
>> -compat_create_bounce_frame:
>> -        ASSERT_INTERRUPTS_ENABLED
>> -        mov   %fs,%edi
>> -        ASM_STAC
>> -        testb $2,UREGS_cs+8(%rsp)
>> -        jz    1f
>> -        /* Push new frame at registered guest-OS stack base. */
>> -        movl  VCPU_kernel_sp(%rbx),%esi
>> -.Lft1:  mov   VCPU_kernel_ss(%rbx),%fs
> Note how we did take into consideration the segment base here;
> pv_create_bounce_frame() doesn't. Hence while the patch here
> is
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> I'm afraid I have to withdraw the respective tag for the earlier one
> (despite realizing that there are other places where we [wrongly]
> assume stack segments to be flat).

For the failsafe callback, %ss is set to be flat, and then a bounce
frame is created at the current kernel_sp.

Despite the impression the API might give, a 32bit PV kernel cannot use
a non-flat stack segment.  No PV guest (not even MiniOS) uses a non-flat
layout, so while this is a change of behaviour, its not going to break
anything.

~Andrew

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

  reply	other threads:[~2018-09-07 14:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27 14:50 [PATCH v2 0/5] x86: Lift create_exception_frame() up out of C Andrew Cooper
2018-02-27 14:50 ` [PATCH v2 1/5] x86/entry: Correct comparisons against boolean variables Andrew Cooper
2018-03-02 16:27   ` Jan Beulich
2018-03-02 17:32   ` Wei Liu
2018-02-27 14:50 ` [PATCH v2 2/5] x86/pv: Drop int80_bounce from struct pv_vcpu Andrew Cooper
2018-02-27 14:50 ` [PATCH v2 3/5] x86/pv: Introduce pv_create_exception_frame() Andrew Cooper
2018-03-02 16:44   ` Jan Beulich
2018-02-27 14:50 ` [PATCH v2 4/5] x86/pv: Drop {compat_, }create_bounce_frame() and use the C version instead Andrew Cooper
2018-03-05  9:27   ` Jan Beulich
2018-09-07 14:17     ` Andrew Cooper [this message]
2018-09-07 15:49       ` Jan Beulich
2018-02-27 14:50 ` [PATCH v2 5/5] x86/pv: Implement the failsafe callback using the general path Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e35d87d0-227b-c2a4-f70f-ebba1cb41796@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).