Disabling lapic and apic: pitfalls?
Excuse my newbie-ness in this area... I hope the answers aren't too obvious or widely known.
What are the disadvantages of disabling the LAPIC and APIC in a Linux virtual machine? What functionality is lost? What class of potential bugs might arise (or go away)?
Does the answer differ for hvm vs pvm?
Does the answer differ depending on whether the platform underlying is Intel or AMD? 32-bit vs 64-bit?
Does the answer differ for vcpus=1 vs vcpus>1 (assuming CONFIG_SMP)
(And what about for Windows of various flavors?)
For example, I can see that if lapic is enabled, an extra 1000 interrupts per second are delivered to the VM (250 for pvm). Are these useful for anything? Or are they just eating VM cycles?
I suspect that disabled apic may break driver domains or pci passthrough. True? What about lapic?
I ask all these questions because I often see problem responses of the type "Try apic=0" or "Boot with noapic" and I wonder about the side effects of such a cure. Or whether the cure should be universally applied for VMs: Depending on the answers to the above questions, perhaps the default should be off and we should be saying "Try apic=1 if you need that functionality".
Thanks,
Dan
===================================
If Xen could save time in a bottle / then clocks wouldn't virtually skew / It would save every tick / for VMs that aren't quick /
and Xen then would send them anew
(with apologies to the late great Jim Croce)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
APIC is required for multiprocessor HVM guests. It can be lived without for UP guests.
-- Keir
Quoted 43 lines · Dan Magenheimer
Excuse my newbie-ness in this area... I hope the answers aren't too obvious or widely known.
What are the disadvantages of disabling the LAPIC and APIC in a Linux virtual machine? What functionality is lost? What class of potential bugs might arise (or go away)?
Does the answer differ for hvm vs pvm?
Does the answer differ depending on whether the platform underlying is Intel or AMD? 32-bit vs 64-bit?
Does the answer differ for vcpus=1 vs vcpus>1 (assuming
CONFIG_SMP)(And what about for Windows of various flavors?)
For example, I can see that if lapic is enabled, an extra 1000 interrupts per second are delivered to the VM (250 for pvm). Are these useful for anything? Or are they just eating VM cycles?
I suspect that disabled apic may break driver domains or pci passthrough. True? What about lapic?
I ask all these questions because I often see problem responses of the type "Try apic=0" or "Boot with noapic" and I wonder about the side effects of such a cure. Or whether the cure should be universally applied for VMs: Depending on the answers to the above questions, perhaps the default should be off and we should be saying "Try apic=1 if you need that functionality".
Thanks,
Dan===================================
If Xen could save time in a bottle / then clocks wouldn't virtually skew / It would save every tick / for VMs that aren't quick /
and Xen then would send them anew
(with apologies to the late great Jim Croce)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 2 lines
APIC is required for multiprocessor HVM guests. It can be lived without for UP guests.
LAPIC or (IO)APIC or both? And a key part of the question is what does "lived without" mean (as far as functionality or performance or stability or ??? lost)?
Quoted 63 lines
-----Original Message-----
From: Keir Fraser [mailto:[email protected]]
Sent: Friday, March 14, 2008 12:49 PM
To: [email protected]; [email protected]
Subject: Re: [Xen-devel] Disabling lapic and apic: pitfalls?APIC is required for multiprocessor HVM guests. It can be lived without for
UP guests.-- Keir
Quoted 30 lines · Dan Magenheimer
Excuse my newbie-ness in this area... I hope the answers aren't too obvious or widely known.
What are the disadvantages of disabling the LAPIC and APIC in a Linux virtual machine? What functionality is lost? What class of potential bugs might arise (or go away)?
Does the answer differ for hvm vs pvm?
Does the answer differ depending on whether the platform underlying is Intel or AMD? 32-bit vs 64-bit?
Does the answer differ for vcpus=1 vs vcpus>1 (assuming
CONFIG_SMP)(And what about for Windows of various flavors?)
For example, I can see that if lapic is enabled, an extra 1000 interrupts per second are delivered to the VM (250 for pvm). Are these useful for anything? Or are they just eating VM cycles?
I suspect that disabled apic may break driver domains or pci passthrough. True? What about lapic?
I ask all these questions because I often see problem responses of the type "Try apic=0" or "Boot with noapic" and I wonder about the side effects of such a cure. Or whether the cure should be universally applied for VMs: Depending on the answers to the above questions, perhaps the default should be off and we should be saying "Try apic=1 if you need that functionality".
Quoted 6 lines
Thanks,
Dan===================================
If Xen could save time in a bottle / then clocks wouldn'tvirtually skew /
Quoted 7 lines
It would save every tick / for VMs that aren't quick / and Xen then would send them anew
(with apologies to the late great Jim Croce)
_______________________________________________
Xen-devel mailing list [email protected]
http://lists.xensource.com/xen-devel
Quoted 6 lines · Dan Magenheimer
Quoted 2 lines
APIC is required for multiprocessor HVM guests. It can be lived without for UP guests.
LAPIC or (IO)APIC or both? And a key part of the question is what does "lived without" mean (as far as functionality or performance or stability or ??? lost)?
Without LAPIC the IO-APIC is unusable, since IO-APIC-routed interrupts can only be received by a LAPIC. The advantage of an IO-APIC beyond legacy PIC is mainly that there are more PCI interrupt pins -- on our emulated IO-APIC there are 32 of them, as opposed to just four PCI-ISA links. This means that an IO-APIC is much less likely to introduce interrupt sharing among PCI devices. However, there are few enough PCI devices emulated for an HVM guest that the risk of interrupt sharing is probably not too concerning.
Beyond that, the LAPIC doesn't provide much of value in a uniprocessor environment. It has its own timer, but there are other sources for that (PIT, HPET, ...). Most other stuff is only applicable to MP systems.
-- Keir