mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Roger Pau Monne <roger.pau@citrix.com>, linux-kernel@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH 1/2] xen/x2apic: enable x2apic mode when supported
Date: Thu, 20 Jan 2022 20:01:57 -0500	[thread overview]
Message-ID: <a34aff19-4530-7f44-c849-4b3eb2aa3d00@oracle.com> (raw)
In-Reply-To: <20220120152527.7524-2-roger.pau@citrix.com>



On 1/20/22 10:25 AM, Roger Pau Monne wrote:
> There's no point in disabling x2APIC mode when running as a Xen HVM
> guest, just enable it when available.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Cc: Juergen Gross <jgross@suse.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: x86@kernel.org
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: xen-devel@lists.xenproject.org
> ---
>   arch/x86/xen/enlighten_hvm.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
> index 42300941ec29..ab8171cbee23 100644
> --- a/arch/x86/xen/enlighten_hvm.c
> +++ b/arch/x86/xen/enlighten_hvm.c
> @@ -9,6 +9,7 @@
>   #include <xen/events.h>
>   #include <xen/interface/memory.h>
>   
> +#include <asm/apic.h>
>   #include <asm/cpu.h>
>   #include <asm/smp.h>
>   #include <asm/io_apic.h>
> @@ -248,7 +249,7 @@ bool __init xen_hvm_need_lapic(void)
>   		return false;
>   	if (!xen_hvm_domain())
>   		return false;
> -	if (xen_feature(XENFEAT_hvm_pirqs) && xen_have_vector_callback)
> +	if (!x2apic_supported())
>   		return false;
>   	return true;
>   }


Then it seems this whole routine can be reduced to just

	return x2apic_supported();

and then dropped altogether and x2apic_supported() moved to xen_x2apic_para_available(). Domain type checks here are not really needed since this can only be called on HVM guests.


-boris

  reply	other threads:[~2022-01-21  1:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20 15:25 [PATCH 0/2] xen/x86: use extended destination mode if available Roger Pau Monne
2022-01-20 15:25 ` [PATCH 1/2] xen/x2apic: enable x2apic mode when supported Roger Pau Monne
2022-01-21  1:01   ` Boris Ostrovsky [this message]
2022-01-21  9:01     ` [PATCH] xen/x2apic: enable x2apic mode when supported for HVM Roger Pau Monne
2022-01-21 20:30       ` Boris Ostrovsky
2022-02-03  6:50       ` Juergen Gross
2022-01-20 15:25 ` [PATCH 2/2] xen/x86: detect support for extended destination ID Roger Pau Monne
2022-02-07  9:03   ` Juergen Gross

Reply instructions:

You may reply publicly 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=a34aff19-4530-7f44-c849-4b3eb2aa3d00@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®