Skip to contentSkip to conversation

sse, mmx support for hvm guests

DISCUSSION Ashish Bijlani 2 participants 6 messages Oct 25, 2008 – Oct 29, 2008

lore
Share & tools
lore
#0 lore raw

Hi,

I've a quad-core x86_64 machine (Intel Xeon), with sse/mmx support. However, I want to disable sse/mmx support from HVM guests. How can I do this? Also, is it reasonable to expect illegal instruction fault in non-root VMX mode if a guest VM runs an application with sse/mmx instructions?

Thanks,
Ashish

#1 lore raw
Quoted 5 lines · Ashish Bijlani

I've a quad-core x86_64 machine (Intel Xeon), with sse/mmx support. However, I want to disable sse/mmx support from HVM guests. How can I do this? Also, is it reasonable to expect illegal instruction fault in non-root VMX mode if a guest VM runs an application with sse/mmx instructions?

You can hide SSE/MMX in CPUID info, so the guest should not attempt to use the instructions. This is obviously true since CPUID causes vmexit and then the instruction is always emulated. But I don't think you can make the sse/mmx instructions fault if the guest does actually try to use them anyway.

-- Keir

#2 lore raw

it's just masking the sse/mmx features from cpuid return value or something more to it? because i tried masking sse/mmx features from cpuid and now the hvm domain doesn't boot!! any idea if sse/mmx support can be disabled using bios?

Thanks,
Ashish

Quoted 18 lines · Keir Fraser
Quoted 5 lines · Ashish Bijlani

I've a quad-core x86_64 machine (Intel Xeon), with sse/mmx support. However, I want to disable sse/mmx support from HVM guests. How can I do this? Also, is it reasonable to expect illegal instruction fault in non-root VMX mode if a guest VM runs an application with sse/mmx instructions?

You can hide SSE/MMX in CPUID info, so the guest should not attempt to use the instructions. This is obviously true since CPUID causes vmexit and then the instruction is always emulated. But I don't think you can make the sse/mmx instructions fault if the guest does actually try to use them anyway.

-- Keir

#3 lore raw

Masking from CPUID should work. I'm surprised it would cause a guest to fail to boot.

K.

Quoted 28 lines · Ashish Bijlani

it's just masking the sse/mmx features from cpuid return value or something more to it? because i tried masking sse/mmx features from cpuid and now the hvm domain doesn't boot!! any idea if sse/mmx support can be disabled using bios?

Thanks,
Ashish

Quoted 18 lines · Keir Fraser
Quoted 5 lines · Ashish Bijlani

I've a quad-core x86_64 machine (Intel Xeon), with sse/mmx support. However, I want to disable sse/mmx support from HVM guests. How can I do this? Also, is it reasonable to expect illegal instruction fault in non-root VMX mode if a guest VM runs an application with sse/mmx instructions?

You can hide SSE/MMX in CPUID info, so the guest should not attempt to use the instructions. This is obviously true since CPUID causes vmexit and then the instruction is always emulated. But I don't think you can make the sse/mmx instructions fault if the guest does actually try to use them anyway.

-- Keir

#4 lore raw

Hi,

i'm working on a project that requires migration of a VM from a sse/mmx capable x86 platform to an x86 platform without sse/mmx capability. i want to emulate sse/mmu capability at runtime. one option would be to let the hypervisor emulate sse/mmx functionality upon trapping due to illegal instruction exception. however, i believe. this would be really slow and defeats the purpose of sse/mmx. i can take the emulation code from qemu/bochs. any idea on what could be a better option in terms of performance? also, i'd like to know if this is reasonble at all or am i missing something?

thanks,
ashish

Quoted 38 lines · Keir Fraser

Masking from CPUID should work. I'm surprised it would cause a guest to fail to boot.

K.

Quoted 28 lines · Ashish Bijlani

it's just masking the sse/mmx features from cpuid return value or something more to it? because i tried masking sse/mmx features from cpuid and now the hvm domain doesn't boot!! any idea if sse/mmx support can be disabled using bios?

Thanks,
Ashish

Quoted 18 lines · Keir Fraser
Quoted 5 lines · Ashish Bijlani

I've a quad-core x86_64 machine (Intel Xeon), with sse/mmx support. However, I want to disable sse/mmx support from HVM guests. How can I do this? Also, is it reasonable to expect illegal instruction fault in non-root VMX mode if a guest VM runs an application with sse/mmx instructions?

You can hide SSE/MMX in CPUID info, so the guest should not attempt to use the instructions. This is obviously true since CPUID causes vmexit and then the instruction is always emulated. But I don't think you can make the sse/mmx instructions fault if the guest does actually try to use them anyway.

-- Keir

#5 lore raw

If you would good predictable performance across both systems, at the cost of missing out on peak performance on the SSE-capable system, then hiding the feature on the more capable machine would make sense. It's also obviously easier than hacking in software emulation of SSE/MMX! You should chase down some more why that feature hiding isn't working for you. It really should.

-- Keir

Quoted 55 lines · Ashish Bijlani

Hi,

i'm working on a project that requires migration of a VM from a sse/mmx capable x86 platform to an x86 platform without sse/mmx capability. i want to emulate sse/mmu capability at runtime. one option would be to let the hypervisor emulate sse/mmx functionality upon trapping due to illegal instruction exception. however, i believe. this would be really slow and defeats the purpose of sse/mmx. i can take the emulation code from qemu/bochs. any idea on what could be a better option in terms of performance? also, i'd like to know if this is reasonble at all or am i missing something?

thanks,
ashish

Quoted 38 lines · Keir Fraser

Masking from CPUID should work. I'm surprised it would cause a guest to fail to boot.

K.

Quoted 28 lines · Ashish Bijlani

it's just masking the sse/mmx features from cpuid return value or something more to it? because i tried masking sse/mmx features from cpuid and now the hvm domain doesn't boot!! any idea if sse/mmx support can be disabled using bios?

Thanks,
Ashish

Quoted 18 lines · Keir Fraser
Quoted 5 lines · Ashish Bijlani

I've a quad-core x86_64 machine (Intel Xeon), with sse/mmx support. However, I want to disable sse/mmx support from HVM guests. How can I do this? Also, is it reasonable to expect illegal instruction fault in non-root VMX mode if a guest VM runs an application with sse/mmx instructions?

You can hide SSE/MMX in CPUID info, so the guest should not attempt to use the instructions. This is obviously true since CPUID causes vmexit and then the instruction is always emulated. But I don't think you can make the sse/mmx instructions fault if the guest does actually try to use them anyway.

-- Keir