From: Andrew Cooper <andrew.cooper3@citrix.com>
To: George Dunlap <george.dunlap@citrix.com>,
Jan Beulich <JBeulich@suse.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
WeiLiu <wei.liu2@citrix.com>, Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 09/10] tools/x86emul: Advertise more CPUID features for testing purposes
Date: Mon, 27 Mar 2017 14:03:22 +0100 [thread overview]
Message-ID: <dbfa7fd3-a5fe-af46-422c-a85d3e57b37c@citrix.com> (raw)
In-Reply-To: <bdc71bb9-0c52-afc0-8ab6-aea3613d104d@citrix.com>
On 27/03/17 13:56, George Dunlap wrote:
> On 27/03/17 13:13, Jan Beulich wrote:
>>>>> On 27.03.17 at 13:20, <george.dunlap@citrix.com> wrote:
>>> On 27/03/17 10:56, Andrew Cooper wrote:
>>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>>> ---
>>>> CC: Jan Beulich <JBeulich@suse.com>
>>>> CC: George Dunlap <george.dunlap@eu.citrix.com>
>>>> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
>>>> CC: Wei Liu <wei.liu2@citrix.com>
>>>> ---
>>>> tools/tests/x86_emulator/x86_emulate.c | 41 ++++++++++++++++++++++++----------
>>>> 1 file changed, 29 insertions(+), 12 deletions(-)
>>>>
>>>> diff --git a/tools/tests/x86_emulator/x86_emulate.c
>>> b/tools/tests/x86_emulator/x86_emulate.c
>>>> index cea0595..2c49954 100644
>>>> --- a/tools/tests/x86_emulator/x86_emulate.c
>>>> +++ b/tools/tests/x86_emulator/x86_emulate.c
>>>> @@ -73,20 +73,37 @@ int emul_test_cpuid(
>>>> : "a" (leaf), "c" (subleaf));
>>>> Oh, s
>>>> /*
>>>> - * The emulator doesn't itself use MOVBE, so we can always run the
>>>> - * respective tests.
>>>> + * Some instructions and features can be emulated without specific
>>>> + * hardware support. These features are unconditionally reported here,
>>>> + * for testing and fuzzing-coverage purposes.
>>> But similarly to my question in patch 10 -- is there any chance that the
>>> emulator will ever be called with a cpuid callback that returns 'false"
>>> for these? If so, isn't there therefore a chance that there will be
>>> some sort of bug which only triggers if these bits are set to 'false'?
>> I think I've suggested before that the cpuid hook should actually
>> return void, as it can't possibly fail (now that CPUID faulting is
>> being handled in generic code).
> This isn't about failing so much as it is about reporting the presence /
> absence of hardware features. With this patch, cpuid unconditionally
> advertises the presence of a number of features (MOVBE, rtm, ADCX/ADOX,
> &c) because the emulation will work even if the features aren't actually
> present in hardware. I'm suggesting that we may want to make sure that
> we test *both* the "feature is present" path, *and* the "feature is
> missing" path.
I have some plans to make this happen, but it isn't easy with the
existing infrastructure. In the meantime, It is more important to get
better coverage.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-03-27 13:03 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-27 9:56 [PATCH 00/10] x86 emulation bugfixes and fuzzer improvements Andrew Cooper
2017-03-27 9:56 ` [PATCH 01/10] x86/emul: Correct the decoding of vlddqu Andrew Cooper
2017-03-27 11:24 ` Jan Beulich
2017-03-27 12:10 ` Andrew Cooper
2017-03-27 12:30 ` Jan Beulich
2017-03-27 9:56 ` [PATCH 02/10] x86/emul: Add feature check for clzero Andrew Cooper
2017-03-27 11:25 ` Jan Beulich
2017-03-27 11:28 ` Jan Beulich
2017-03-27 12:13 ` Andrew Cooper
2017-03-27 12:31 ` Jan Beulich
2017-03-27 13:40 ` Andrew Cooper
2017-03-27 9:56 ` [PATCH 03/10] tools/insn-fuzz: Don't use memcpy() for zero-length reads Andrew Cooper
2017-03-27 11:02 ` George Dunlap
2017-03-27 11:05 ` Andrew Cooper
2017-03-27 11:32 ` Jan Beulich
2017-03-27 12:22 ` Andrew Cooper
2017-03-27 12:35 ` Jan Beulich
2017-03-27 11:36 ` Jan Beulich
2017-03-27 12:14 ` Andrew Cooper
2017-03-27 9:56 ` [PATCH 04/10] tools/insn-fuzz: Avoid making use of static data Andrew Cooper
2017-03-27 11:39 ` Jan Beulich
2017-03-27 9:56 ` [PATCH 05/10] tools/insn-fuzz: Fix a stability bug in afl-clang-fast mode Andrew Cooper
2017-03-27 11:41 ` Jan Beulich
2017-03-27 9:56 ` [PATCH 06/10] tools/insn-fuzz: Correct hook prototypes, and assert() appropriate segments Andrew Cooper
2017-03-27 11:48 ` Jan Beulich
2017-03-27 12:49 ` Andrew Cooper
2017-03-27 9:56 ` [PATCH 07/10] tools/insn-fuzz: Provide IA32_DEBUGCTL consistently to the emulator Andrew Cooper
2017-03-27 11:53 ` Jan Beulich
2017-03-27 12:53 ` Andrew Cooper
2017-03-27 9:56 ` [PATCH 08/10] tools/insn-fuzz: Fix assertion failures in x86_emulate_wrapper() Andrew Cooper
2017-03-27 12:01 ` Jan Beulich
2017-03-27 9:56 ` [PATCH 09/10] tools/x86emul: Advertise more CPUID features for testing purposes Andrew Cooper
2017-03-27 11:20 ` George Dunlap
2017-03-27 12:13 ` Jan Beulich
2017-03-27 12:56 ` George Dunlap
2017-03-27 13:03 ` Andrew Cooper [this message]
2017-03-27 13:08 ` George Dunlap
2017-03-27 13:42 ` Jan Beulich
2017-03-27 13:49 ` Andrew Cooper
2017-03-27 13:37 ` Andrew Cooper
2017-03-27 13:45 ` Jan Beulich
2017-03-27 12:09 ` Jan Beulich
2017-03-27 13:01 ` Andrew Cooper
2017-03-27 13:40 ` Jan Beulich
2017-03-27 9:56 ` [PATCH 10/10] tools/insn-fuzz: Always use x86_swint_emulate_all Andrew Cooper
2017-03-27 11:00 ` George Dunlap
2017-03-27 13:09 ` 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=dbfa7fd3-a5fe-af46-422c-a85d3e57b37c@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=george.dunlap@citrix.com \
--cc=george.dunlap@eu.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).