From: Wei Liu <wei.liu2@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: AndrewCooper <andrew.cooper3@citrix.com>,
Wei Liu <wei.liu2@citrix.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v3 3/7] x86emul/test: factor out emul_test_{read_cr, cpuid}
Date: Mon, 12 Dec 2016 09:51:06 +0000 [thread overview]
Message-ID: <20161212095106.GL2709@citrix.com> (raw)
In-Reply-To: <584E7FD90200007800127D89@prv-mh.provo.novell.com>
On Mon, Dec 12, 2016 at 02:45:45AM -0700, Jan Beulich wrote:
> >>> On 12.12.16 at 10:28, <wei.liu2@citrix.com> wrote:
> > While at it, move xgetbv, all cpu_has_* and cache_line_size macros to
> > x86_emulate.h.
> >
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
>
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
> with one further cosmetic request:
>
> > --- a/tools/tests/x86_emulator/x86_emulate.c
> > +++ b/tools/tests/x86_emulator/x86_emulate.c
> > @@ -38,4 +38,43 @@ bool emul_test_make_stack_executable(void)
> > MMAP_SZ, PROT_READ|PROT_WRITE|PROT_EXEC) == 0;
> > }
> >
> > +int emul_test_cpuid(
> > + unsigned int *eax,
> > + unsigned int *ebx,
> > + unsigned int *ecx,
> > + unsigned int *edx,
> > + struct x86_emulate_ctxt *ctxt)
> > +{
> > + unsigned int leaf = *eax;
> > +
> > + asm ("cpuid" : "+a" (*eax), "+c" (*ecx), "=d" (*edx), "=b" (*ebx));
> > +
> > + /* The emulator doesn't itself use MOVBE, so we can always run the test. */
> > + if ( leaf == 1 )
> > + *ecx |= 1U << 22;
>
> The comment here wants some adjustment: "the test" is no longer
> applicable. Perhaps "respective tests"?
>
Sure. I will make the change in my branch.
Wei.
> Jan
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-12-12 9:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-12 9:28 [PATCH v3 0/7] Fuzzing targets for oss-fuzz Wei Liu
2016-12-12 9:28 ` [PATCH v3 1/7] tools/fuzz: introduce libelf target Wei Liu
2016-12-12 9:43 ` Jan Beulich
2016-12-12 9:28 ` [PATCH v3 2/7] x86emul/test: factor out emul_test_make_stack_executable Wei Liu
2016-12-12 9:28 ` [PATCH v3 3/7] x86emul/test: factor out emul_test_{read_cr, cpuid} Wei Liu
2016-12-12 9:45 ` Jan Beulich
2016-12-12 9:51 ` Wei Liu [this message]
2016-12-12 9:28 ` [PATCH v3 4/7] x86emul/test: factor out emul_test_get_fpu Wei Liu
2016-12-12 9:46 ` Jan Beulich
2016-12-12 9:28 ` [PATCH v3 5/7] tools/fuzz: introduce x86 instruction emulator target Wei Liu
2016-12-12 9:58 ` Jan Beulich
2016-12-12 11:19 ` Wei Liu
2016-12-12 11:30 ` Jan Beulich
2016-12-12 11:40 ` Wei Liu
2016-12-12 17:59 ` Ian Jackson
2016-12-12 18:00 ` Wei Liu
2016-12-12 17:51 ` Wei Liu
2016-12-13 7:42 ` Jan Beulich
2016-12-16 9:03 ` George Dunlap
2016-12-12 9:28 ` [PATCH v3 6/7] tools: hook up fuzz directory Wei Liu
2016-12-12 9:28 ` [PATCH v3 7/7] tools/fuzz: add README Wei Liu
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=20161212095106.GL2709@citrix.com \
--to=wei.liu2@citrix.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.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.