qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hvf: guard xgetbv call.


From: Peter Maydell
Subject: Re: [PATCH] hvf: guard xgetbv call.
Date: Sat, 9 Jan 2021 11:42:18 +0000

On Sat, 9 Jan 2021 at 05:49, Roman Bolshakov <r.bolshakov@yadro.com> wrote:
>
> On Fri, Dec 18, 2020 at 06:13:47PM -0800, Hill Ma wrote:
> > This prevents illegal instruction on cpus do not support xgetbv.
> >
> > Buglink: https://bugs.launchpad.net/qemu/+bug/1758819
> > Signed-off-by: Hill Ma <maahiuzeon@gmail.com>
> > ---
> >  target/i386/hvf/x86_cpuid.c | 11 ++++++++---
> >  1 file changed, 8 insertions(+), 3 deletions(-)
> >
>
> Hi Hill,
>
> I'm sorry for delay with the review.

So, hvf added a third use of inline asm execution of "xgetbv" to
the two we had already. Now we have:
 * this in hvf
 * a use in tcg_target_init() in tcg/i386/tcg-target.c.inc
 * a use in init_cpuid_cache() in util/bufferiszero.c

Is it possible to abstract this out so we have one version
of this, not three ? I note that the other two got the "avoid
executing an illegal insn" tests right...

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]