Re: [PATCH v2] hvf: guard xgetbv call.

2021-01-11 Thread Roman Bolshakov
On Mon, Jan 11, 2021 at 09:44:40PM -0800, Hill Ma wrote: > On Sun, Jan 10, 2021 at 8:38 PM Roman Bolshakov wrote: > > I'm not sure if eax should be modified with mask because the mask has no > > value per se. I.e. eax &= supp_xcr0 from below should be placed inside > > the if. It'd express clearly

Re: [PATCH v2] hvf: guard xgetbv call.

2021-01-11 Thread Hill Ma
On Sun, Jan 10, 2021 at 8:38 PM Roman Bolshakov wrote: > I'm not sure if eax should be modified with mask because the mask has no > value per se. I.e. eax &= supp_xcr0 from below should be placed inside > the if. It'd express clearly that eax is not modified unless xgetbv is > supported. Like thi

Re: [PATCH v2] hvf: guard xgetbv call.

2021-01-10 Thread Roman Bolshakov
On Sun, Jan 10, 2021 at 01:08:54PM -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 > --- > v2: xgetbv() modified based on feedback. > > target/i386/hvf/x86_cpuid.c | 28 +

[PATCH v2] hvf: guard xgetbv call.

2021-01-10 Thread Hill Ma
This prevents illegal instruction on cpus do not support xgetbv. Buglink: https://bugs.launchpad.net/qemu/+bug/1758819 Signed-off-by: Hill Ma --- v2: xgetbv() modified based on feedback. target/i386/hvf/x86_cpuid.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletion