From: "Jan Beulich" Subject: Re: [RFC] Add the panic info when disable VT-d Date: Mon, 19 Jan 2015 10:38:07 +0000 Message-ID: <54BCEC9F0200007800056556@mail.emea.novell.com> References: <1421658047-21242-1-git-send-email-liang.z.li@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1421658047-21242-1-git-send-email-liang.z.li@intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Liang Li Cc: yang.z.zhang@intel.com, andrew.cooper3@citrix.com, keir@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 19.01.15 at 10:00, wrote: > --- a/xen/arch/x86/apic.c > +++ b/xen/arch/x86/apic.c > @@ -915,6 +915,11 @@ void __init x2apic_bsp_setup(void) > return; > } > printk("x2APIC: Already enabled by BIOS: Ignoring cmdline disable.\n"); > + } else { > + if ( !iommu_enable) { > + panic("x2APIC should be disabled while IOMMU is disabled," > + "try to set x2apic=0 in cmdline and disable x2apic in BIOS"); > + } Putting aside the coding style violations (figure braces on their own lines, no hard tabs), you tie this to the wrong thing: You need interrupt remapping to be enabled, whereas iommu_enable may only mean DMA remapping. And I'm afraid you'd run into an ordering problem (iommu_intremap getting set to its final value vs. the code above being run) if you tried to correct this. Jan