Xen-Devel Archive on lore.kernel.org
 help / color / Atom feed
WARNING: multiple messages have this Message-ID
From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Wei Liu <wl@xen.org>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: Ping: [PATCH] x86/IO-APIC: dump full destination ID in x2APIC mode
Date: Mon, 27 May 2019 03:28:02 -0600
Message-ID: <5CEBADA20200007800232B72@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <5CA35DE90200007800232A87@prv1-mh.provo.novell.com>

>>> On 02.04.19 at 15:04,  wrote:
> 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 <jbeulich@suse.com>
> ---
> 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;
> 
> 
> 
> 





_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

From: "Jan Beulich" <JBeulich@suse.com>
To: "Andrew Cooper" <andrew.cooper3@citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>, Wei Liu <wl@xen.org>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: [Xen-devel] Ping: [PATCH] x86/IO-APIC: dump full destination ID in x2APIC mode
Date: Mon, 27 May 2019 03:28:02 -0600
Message-ID: <5CEBADA20200007800232B72@prv1-mh.provo.novell.com> (raw)
Message-ID: <20190527092802.8gfsDfnTkYAWe3wYBymfD1FIxieIcSjZxaWHyGoMDu0@z> (raw)
In-Reply-To: <5CA35DE90200007800232A87@prv1-mh.provo.novell.com>

>>> On 02.04.19 at 15:04,  wrote:
> 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 <jbeulich@suse.com>
> ---
> 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;
> 
> 
> 
> 





_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-02 13:04 Jan Beulich
2019-05-13 13:55 ` Wei Liu
2019-05-13 13:55   ` [Xen-devel] " Wei Liu
     [not found] ` <5CA35DE902000000001041B1@prv1-mh.provo.novell.com>
     [not found]   ` <5CA35DE90200007800232A87@prv1-mh.provo.novell.com>
2019-05-27  9:28     ` Jan Beulich [this message]
2019-05-27  9:28       ` [Xen-devel] Ping: " Jan Beulich
2019-06-17  8:22       ` [Xen-devel] Ping²: " Jan Beulich
2019-06-17 15:10 ` [Xen-devel] " Andrew Cooper

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5CEBADA20200007800232B72@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Xen-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/xen-devel/0 xen-devel/git/0.git
	git clone --mirror https://lore.kernel.org/xen-devel/1 xen-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 xen-devel xen-devel/ https://lore.kernel.org/xen-devel \
		xen-devel@lists.xenproject.org xen-devel@lists.xen.org
	public-inbox-index xen-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.xenproject.lists.xen-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git