Skip to contentSkip to conversation

use of PMU in guest generates messages in host

DISCUSSION David Ahern 3 participants 6 messages Jan 11, 2012 – Jan 12, 2012 KVM

lore
Share & tools
lore
#0 lore raw

Using latest kernel tree (e343a895a9f342f239c5e3c5ffc6c0b1707e6244) which has KVM bits for using PMU in the guest. Host and guest are both running Fedora 16, 64-bit, with this kernel.

Running this command in the guest:
perf stat -ddd -- openssl speed aes

Generates this in the host:

[74728.221863] kvm_set_msr_common: 2760 callbacks suppressed
[74728.221950] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.222115] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.222858] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.223018] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.223851] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.224009] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.224843] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.224997] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.225842] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f001
[74728.226010] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f001

David

#1 lore raw
Quoted 8 lines · David Ahern

Using latest kernel tree (e343a895a9f342f239c5e3c5ffc6c0b1707e6244) which has KVM bits for using PMU in the guest. Host and guest are both running Fedora 16, 64-bit, with this kernel.

Running this command in the guest:
perf stat -ddd -- openssl speed aes

Generates this in the host:

Quoted 12 lines
[74728.221863] kvm_set_msr_common: 2760 callbacks suppressed
[74728.221950] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.222115] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.222858] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.223018] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.223851] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.224009] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.224843] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.224997] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.225842] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f001
[74728.226010] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f001

This is MSR_OFFCORE_RSP_0 MSR which is not (yet?) supported. What is your host cpu and qemu command line?

--
Gleb.

#2 lore raw
Quoted 21 lines · Gleb Natapov
Quoted 8 lines · David Ahern

Using latest kernel tree (e343a895a9f342f239c5e3c5ffc6c0b1707e6244) which has KVM bits for using PMU in the guest. Host and guest are both running Fedora 16, 64-bit, with this kernel.

Running this command in the guest:
perf stat -ddd -- openssl speed aes

Generates this in the host:

Quoted 12 lines
[74728.221863] kvm_set_msr_common: 2760 callbacks suppressed
[74728.221950] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.222115] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.222858] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.223018] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.223851] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.224009] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.224843] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.224997] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.225842] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f001
[74728.226010] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f001
Quoted 2 lines

This is MSR_OFFCORE_RSP_0 MSR which is not (yet?) supported. What is your host cpu and qemu command line?

Host CPU: Intel(R) Xeon(R) CPU E5540 @ 2.53GHz
and '-cpu host' is used on the qemu command line.

David

#3 lore raw
Quoted 23 lines · David Ahern
Quoted 21 lines · Gleb Natapov
Quoted 20 lines · David Ahern

Using latest kernel tree (e343a895a9f342f239c5e3c5ffc6c0b1707e6244) which has KVM bits for using PMU in the guest. Host and guest are both running Fedora 16, 64-bit, with this kernel.

Running this command in the guest:
perf stat -ddd -- openssl speed aes

Generates this in the host:

[74728.221863] kvm_set_msr_common: 2760 callbacks suppressed
[74728.221950] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.222115] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.222858] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.223018] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.223851] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.224009] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.224843] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.224997] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f701
[74728.225842] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f001
[74728.226010] kvm: 28217: cpu2 unhandled wrmsr: 0x1a6 data f001
Quoted 6 lines
Quoted 2 lines

This is MSR_OFFCORE_RSP_0 MSR which is not (yet?) supported. What is your host cpu and qemu command line?

Host CPU: Intel(R) Xeon(R) CPU E5540 @ 2.53GHz
and '-cpu host' is used on the qemu command line.

Use "-cpu host,model=29" should avid this message. We need to teach guest to not use non architectural MSRs.

--
Gleb.

#4 lore raw
Quoted 8 lines · Gleb Natapov
Quoted 6 lines
Quoted 2 lines

This is MSR_OFFCORE_RSP_0 MSR which is not (yet?) supported. What is your host cpu and qemu command line?

Host CPU: Intel(R) Xeon(R) CPU E5540 @ 2.53GHz
and '-cpu host' is used on the qemu command line.

Use "-cpu host,model=29" should avid this message. We need to teach guest to not use non architectural MSRs.

Rather than teaching (changing guest code) why not change KVM to not log a message on these writes until it is supported by KVM?

David

#5 lore raw
Quoted 4 lines · David Ahern
Quoted 3 lines · Gleb Natapov
Quoted 3 lines
Quoted 2 lines

This is MSR_OFFCORE_RSP_0 MSR which is not (yet?) supported. What is your host cpu and qemu command line?

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Host CPU: Intel(R) Xeon(R) CPU E5540 @ 2.53GHz
and '-cpu host' is used on the qemu command line.

Use "-cpu host,model=29" should avid this message. We need to teach guest to not use non architectural MSRs.

Rather than teaching (changing guest code) why not change KVM to not log a message on these writes until it is supported by KVM?

Since we aren't properly emulating these registers, the guest may mulfunction. Linux does not, but another guest may. If we silence the messages, then we have a malfunctioning guest with no hint in dmesg.

Signature · 1 line
error compiling committee.c: too many arguments to function