From patchwork Tue Apr 2 13:04:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 10881663 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF1C5922 for ; Tue, 2 Apr 2019 13:06:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D996526224 for ; Tue, 2 Apr 2019 13:06:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CDF1B2841F; Tue, 2 Apr 2019 13:06:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7711A26224 for ; Tue, 2 Apr 2019 13:06:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hBJ5v-00088k-96; Tue, 02 Apr 2019 13:04:51 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hBJ5u-00088b-95 for xen-devel@lists.xenproject.org; Tue, 02 Apr 2019 13:04:50 +0000 X-Inumbo-ID: e44968e6-5547-11e9-8201-3fcb9835ed6a Received: from prv1-mh.provo.novell.com (unknown [137.65.248.33]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e44968e6-5547-11e9-8201-3fcb9835ed6a; Tue, 02 Apr 2019 13:04:47 +0000 (UTC) Received: from INET-PRV1-MTA by prv1-mh.provo.novell.com with Novell_GroupWise; Tue, 02 Apr 2019 07:04:47 -0600 Message-Id: <5CA35DE90200007800223E5A@prv1-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 18.1.0 Date: Tue, 02 Apr 2019 07:04:41 -0600 From: "Jan Beulich" To: "xen-devel" Mime-Version: 1.0 Content-Disposition: inline Subject: [Xen-devel] [PATCH] x86/IO-APIC: dump full destination ID in x2APIC mode X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Wei Liu , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP In x2APIC mode it is 32 bits wide. In __print_IO_APIC() drop logging of both physical and logical IDs: The latter covers a superset of the bits of the former in the RTE, and we write full 8-bit values anyway even in physical mode for all ordinary interrupts, regardless of INT_DEST_MODE (see the users of SET_DEST()). Adjust other column arrangement (and heading) a little as well. Signed-off-by: Jan Beulich Reviewed-by: Wei Liu Acked-by: Andrew Cooper --- I'm sure I had found some place where the wider destination ID is documented for physical mode, but I wasn't able to find it again when I searched now. All Intel chipset docs I've looked at claim it's only 4 bits that are used / supposed to be stored. --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1191,21 +1191,21 @@ static void /*__init*/ __print_IO_APIC(b printk(KERN_DEBUG ".... IRQ redirection table:\n"); - printk(KERN_DEBUG " NR Log Phy Mask Trig IRR Pol" - " Stat Dest Deli Vect: \n"); + printk(KERN_DEBUG " NR %s Msk Trg IRR Pol Stat DstM DelM Vec\n", + x2apic_enabled ? " DestID" : "Dst"); for (i = 0; i <= reg_01.bits.entries; i++) { struct IO_APIC_route_entry entry; entry = ioapic_read_entry(apic, i, 0); - printk(KERN_DEBUG " %02x %03X %02X ", - i, - entry.dest.logical.logical_dest, - entry.dest.physical.physical_dest - ); + if ( x2apic_enabled ) + printk(KERN_DEBUG " %02x %08x", i, entry.dest.dest32); + else + printk(KERN_DEBUG " %02x %02x ", i, + entry.dest.logical.logical_dest); - printk("%1d %1d %1d %1d %1d %1d %1d %02X\n", + printk(" %d %d %d %d %d %d %d %02X\n", entry.mask, entry.trigger, entry.irr, @@ -2481,12 +2481,14 @@ void dump_ioapic_irq_info(void) rte = ioapic_read_entry(entry->apic, pin, 0); printk("vec=%02x delivery=%-5s dest=%c status=%d " - "polarity=%d irr=%d trig=%c mask=%d dest_id:%d\n", + "polarity=%d irr=%d trig=%c mask=%d dest_id:%0*x\n", rte.vector, delivery_mode_2_str(rte.delivery_mode), rte.dest_mode ? 'L' : 'P', rte.delivery_status, rte.polarity, rte.irr, rte.trigger ? 'L' : 'E', rte.mask, - rte.dest.logical.logical_dest); + x2apic_enabled ? 8 : 2, + x2apic_enabled ? rte.dest.dest32 + : rte.dest.logical.logical_dest); if ( entry->next == 0 ) break;