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.xenproject.org>
Subject: Re: [PATCH v4 01/17] x86emul: support most memory accessing MMX/SSE{, 2, 3} insns
Date: Wed, 1 Mar 2017 18:08:06 +0000	[thread overview]
Message-ID: <b35affa5-a8ab-5f8c-b67c-344b79e948ce@citrix.com> (raw)
In-Reply-To: <58B6DFAA020000780013EBD8@prv-mh.provo.novell.com>

On 01/03/17 13:50, Jan Beulich wrote:
>
>> This seems rather inconsistent at the moment.
> Does it? At least in this patch I can't spot an inconsistency.

I meant in general across the current use of stubs, but perhaps that is
just because of the transition to the new model.

>
>>> @@ -6159,6 +6551,76 @@ x86_emulate(
>>>          goto cannot_emulate;
>>>      }
>>>  
>>> +    if ( state->simd_size )
>>> +    {
>>> +#ifdef __XEN__
>>> +        uint8_t *buf = stub.ptr;
>>> +#else
>>> +        uint8_t *buf = get_stub(stub);
>>> +#endif
>> Is this stale?  Everywhere else is just get_stub() without any ifdefary.
> No, it's not stale: In the hypervisor we can't use get_stub() a
> second time, or else we'll invoke map_domain_page() a second
> time, discarding (and hence leaking) the result of the earlier
> one.

As an aside, shouldn't we refcount (and at least assert) that we don't
map the same page twice, to avoid leaks?

>  And in the harness using get_stub() is the cleanest way
> to get hold of the pointer again. I've considered and tried
> several variants, but I couldn't come up with an approach not
> needing any #ifdef - if you see a way, let me know.

As it drops out in the following patch, I am not overly fussed.

~Andrew

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

  reply	other threads:[~2017-03-01 18:08 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-28 12:42 [PATCH v4 00/17] x86emul: MMX/SSEn support Jan Beulich
2017-02-28 12:49 ` [PATCH v4 01/17] x86emul: support most memory accessing MMX/SSE{, 2, 3} insns Jan Beulich
2017-03-01 13:17   ` Andrew Cooper
2017-03-01 13:50     ` Jan Beulich
2017-03-01 18:08       ` Andrew Cooper [this message]
2017-02-28 12:50 ` [PATCH v4 02/17] x86emul: support MMX/SSE{,2,3} moves Jan Beulich
2017-03-01 13:59   ` [PATCH v4 02/17] x86emul: support MMX/SSE{, 2, 3} moves Andrew Cooper
2017-03-01 14:19     ` Jan Beulich
2017-03-01 19:56       ` Andrew Cooper
2017-03-02  8:07         ` Jan Beulich
2017-02-28 12:51 ` [PATCH v4 03/17] x86emul: support MMX/SSE/SSE2 converts Jan Beulich
2017-03-01 14:09   ` Andrew Cooper
2017-02-28 12:51 ` [PATCH v4 04/17] x86emul: support {,V}{,U}COMIS{S,D} Jan Beulich
2017-03-01 14:16   ` [PATCH v4 04/17] x86emul: support {, V}{, U}COMIS{S, D} Andrew Cooper
2017-03-01 14:26     ` Jan Beulich
2017-03-01 14:31       ` Andrew Cooper
2017-02-28 12:52 ` [PATCH v4 05/17] x86emul: support MMX/SSE{, 2, 4a} insns with only register operands Jan Beulich
2017-03-01 14:36   ` Andrew Cooper
2017-03-01 14:43     ` Jan Beulich
2017-03-01 20:01       ` Andrew Cooper
2017-02-28 12:52 ` [PATCH v4 06/17] x86emul: support {,V}{LD,ST}MXCSR Jan Beulich
2017-03-01 14:57   ` Andrew Cooper
2017-02-28 12:53 ` [PATCH v4 07/17] x86emul: support {,V}MOVNTDQA Jan Beulich
2017-03-01 14:58   ` Andrew Cooper
2017-02-28 12:53 ` [PATCH v4 08/17] x86emul: test coverage for SSE/SSE2 insns Jan Beulich
2017-02-28 12:54 ` [PATCH v4 09/17] x86emul: honor MMXEXT feature flag Jan Beulich
2017-02-28 12:54 ` [PATCH v4 10/17] x86emul: add tables for 0f38 and 0f3a extension space Jan Beulich
2017-03-01 15:49   ` Andrew Cooper
2017-03-01 16:11     ` Jan Beulich
2017-03-01 20:35       ` Andrew Cooper
2017-03-02  8:15         ` Jan Beulich
2017-02-28 12:55 ` [PATCH v4 11/17] x86emul: support SSSE3 insns Jan Beulich
2017-03-01 16:06   ` Andrew Cooper
2017-02-28 12:56 ` [PATCH v4 12/17] x86emul: support SSE4.1 insns Jan Beulich
2017-03-01 16:58   ` Andrew Cooper
2017-03-02  8:26     ` Jan Beulich
2017-02-28 12:56 ` [PATCH v4 13/17] x86emul: support SSE4.2 insns Jan Beulich
2017-03-01 17:21   ` Andrew Cooper
2017-02-28 12:57 ` [PATCH v4 14/17] x86emul: test coverage for SSE3/SSSE3/SSE4* insns Jan Beulich
2017-03-01 17:22   ` Andrew Cooper
2017-02-28 12:58 ` [PATCH v4 15/17] x86emul: support PCLMULQDQ Jan Beulich
2017-03-01 17:44   ` Andrew Cooper
2017-03-02  8:30     ` Jan Beulich
2017-02-28 12:58 ` [PATCH v4 16/17] x86emul: support AESNI insns Jan Beulich
2017-02-28 12:59 ` [PATCH v4 17/17] x86emul: support SHA insns Jan Beulich
2017-03-01 17:51   ` 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=b35affa5-a8ab-5f8c-b67c-344b79e948ce@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xenproject.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).