Skip to contentSkip to conversation

MSR IA32_MISC_ENABLE missing on AMD (OVMF use it now)

DISCUSSION Anthony PERARD 3 participants 4 messages Mar 8, 2017

lore
Share & tools
lore
#0 lore raw

Hi,

Recently, OVMF start to read MSR 0x1a0, which cause a General Protection fault on AMD, but not in Intel. OMVF does not handle it and crash.

OVMF use msr 0x1a0, which seems to be IA32_MISC_ENABLE, to find out if the XD attribute can be use on page tables.

From a recent run (OVMF output):
http://logs.test-lab.xenproject.org/osstest/logs/106538/test-amd64-amd64-xl-qemuu-ovmf-amd64/rimava0---var-log-xen-osstest-serial-debianhvm.guest.osstest.log

This is where the read is made:
https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/CpuDxe/CpuPageTable.c#L196

It was first introduced in this commit:
"UefiCpuPkg/CpuDxe: Add memory attribute setting."
https://github.com/tianocore/edk2/commit/22292ed344b8512c838bdd162533198b51a51c0c

Is this a missing feature in Xen or a bug in OVMF?

Regards,

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw
Quoted 4 lines · Anthony PERARD

Hi,

Recently, OVMF start to read MSR 0x1a0, which cause a General Protection fault on AMD, but not in Intel. OMVF does not handle it and crash.

I don't think this MSR exists on AMD processors so that would be OVMF bug.

-boris

Quoted 10 lines

OVMF use msr 0x1a0, which seems to be IA32_MISC_ENABLE, to find out if the XD attribute can be use on page tables.

From a recent run (OVMF output):
http://logs.test-lab.xenproject.org/osstest/logs/106538/test-amd64-amd64-xl-qemuu-ovmf-amd64/rimava0---var-log-xen-osstest-serial-debianhvm.guest.osstest.log

This is where the read is made:
https://github.com/tianocore/edk2/blob/master/UefiCpuPkg/CpuDxe/CpuPageTable.c#L196

Quoted 8 lines

It was first introduced in this commit:
"UefiCpuPkg/CpuDxe: Add memory attribute setting."
https://github.com/tianocore/edk2/commit/22292ed344b8512c838bdd162533198b51a51c0c

Is this a missing feature in Xen or a bug in OVMF?

Regards,

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
Quoted 5 lines · Jan Beulich
Quoted 2 lines
Quoted 1 line
Quoted 1 line · On 08.03.17 at 16:59, <[email protected]> wrote:

Is this a missing feature in Xen or a bug in OVMF?

The easiest way for you or them to find out is to try reading the MSR on bare hardware on an AMD system. But see also Boris' reply.

:(, indeed, I've got back an GPF on AMD. But KVM lie, and give back a result.

I'll report the issue upstream.

Thanks,

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel