OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 5:07 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: x2apic in qemu
PostPosted: Sun Jan 01, 2017 5:32 pm 
Offline
Member
Member
User avatar

Joined: Thu Oct 13, 2016 4:55 pm
Posts: 1584
Has anybody tried to emulate x2apic with qemu? I can't get it working.

With TCG, I got this:
Code:
qemu-system-x86_64 -m 32 -d guest_errors -hda bin/disk.dd -cpu IvyBridge,+x2apic -monitor stdio
QEMU 2.8.50 monitor - type 'help' for more information
(qemu) warning: TCG doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]

My host cpu supports it, so I've tried KVM:
Code:
qemu-system-x86_64 -m 32 -d guest_errors -hda bin/disk.dd -enable-kvm -cpu host,+x2apic -monitor stdio
QEMU 2.8.50 monitor - type 'help' for more information
(qemu)

No errors this time, but the guest's eax=1 cpuid returns ecx 21 bit clear, no matter what I do.

I've checked qemu's source, and I've found a stupid patch that silently disables x2apic when irqchip is not used, so I've tried
Code:
qemu-system-x86_64 -m 32 -d guest_errors -hda bin/disk.dd -enable-kvm -machine kernel-irqchip=off -cpu host,+x2apic -monitor stdio
QEMU 2.8.50 monitor - type 'help' for more information
(qemu) warning: host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]

which failed as expected. Now with irqchip:
Code:
qemu-system-x86_64 -m 32 -d guest_errors -hda bin/disk.dd -enable-kvm -machine kernel-irqchip=on -cpu host,+x2apic -monitor stdio
QEMU 2.8.50 monitor - type 'help' for more information
(qemu)

No errors, but guest cpuid reports no x2apic...

I'm not sure where else to check if kernel-irqchip is used at all, all I've got is irqbypass:
Code:
# lsmod | grep kvm
kvm_intel             188416  0
kvm                   516096  1 kvm_intel
irqbypass              16384  1 kvm


Any help would be appreciated, I'd really wanna use x2apic!


Top
 Profile  
 
 Post subject: Re: x2apic in qemu
PostPosted: Sun Oct 01, 2017 9:06 am 
Offline
Member
Member

Joined: Sat Jan 21, 2017 7:35 am
Posts: 35
I have also tried to use the X2APIC feature for IA32 architecture. But, QEMU simply doesn't support this feature right now as I have seen. Even, the QEMU message says that X2APIC feature is not supported.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], DotBot [Bot], SemrushBot [Bot] and 63 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group