All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>,
	Wei Liu <wei.liu2@citrix.com>, Juergen Gross <jgross@suse.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Re: [PATCH v2] x86emul: don't read mask register on AVX512F-incapable platforms
Date: Fri, 29 Mar 2019 04:56:10 -0600	[thread overview]
Message-ID: <5C9DF9CA0200007800222C2E@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <d9515e2d-9c21-910e-7226-130b54c17a4d@citrix.com>

>>> On 29.03.19 at 11:02, <andrew.cooper3@citrix.com> wrote:
> On 29/03/2019 09:36, Jan Beulich wrote:
>> I'd like to put up the other option then: Rather than using
>> _get_fpu() (and in particular the read_xcr() and read_cr() hooks)
>> we could read the real XCR0 here. After all we issue the KMOV not
>> because the guest has specified it, but because we need the value
>> of the register for correct fault suppression emulation.
> 
> True, and that would be rather smaller and less invasive than
> deliberately squashing the other side effects of get_fpu()

Hmm, I've tried to do this, but this is more complicated: CR0.TS
may be set, in which case we need to invoke the get_fpu() hook
to get it cleared with appropriate bookkeeping. I don't think it's
worth further complicating the code by invoking the hook _only_
in that case. So I guess we better stick to v2.

Which makes me come back to your request to drop the
cpu_has_avx512f part of the condition: Right now the fuzzer
uses emul_test_read_xcr() instead of actually fuzzing the
value. Once it does, would we expect it to never set any bits
in the returned value that aren't set in hardware, but could
in principle be set based on (real) CPUID output? In that case
I could agree to remove the extra condition.

Jan



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

  reply	other threads:[~2019-03-29 10:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-28 17:03 [PATCH] x86emul: don't read mask register on AVX512F-incapable platforms Jan Beulich
2019-03-28 17:44 ` George Dunlap
2019-03-28 18:03   ` Andrew Cooper
2019-03-29  6:59     ` Jan Beulich
2019-03-29  7:42 ` [PATCH v2] " Jan Beulich
2019-03-29  9:19   ` Andrew Cooper
2019-03-29  9:36     ` Jan Beulich
2019-03-29 10:02       ` Andrew Cooper
2019-03-29 10:56         ` Jan Beulich [this message]
2019-04-01 14:14           ` Andrew Cooper
2019-04-01 15:02             ` Jan Beulich

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=5C9DF9CA0200007800222C2E@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jgross@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wei.liu2@citrix.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.