|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 3/7] x86emul/test: factor out emul_test_{read_cr, cpuid}
On Mon, Dec 12, 2016 at 02:45:45AM -0700, Jan Beulich wrote:
> >>> On 12.12.16 at 10:28, <wei.liu2@xxxxxxxxxx> 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@xxxxxxxxxx>
>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> 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@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |