All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/amd: don't set pv_post_outb_hook when !CONFIG_PV
@ 2018-11-08 14:58 Wei Liu
  2018-11-08 14:58 ` Andrew Cooper
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wei Liu @ 2018-11-08 14:58 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper, Wei Liu, Jan Beulich, Roger Pau Monné

Obviously it won't exist when PV is disabled.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Based on Roger's "amd/pvh: enable ACPI C1E disable quirk on PVH Dom0".

This is the last patch needed to make CONFIG_PV work.
---
 xen/arch/x86/cpu/amd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c
index 8895c25682..e1fc88bdcf 100644
--- a/xen/arch/x86/cpu/amd.c
+++ b/xen/arch/x86/cpu/amd.c
@@ -631,7 +631,9 @@ static void init_amd(struct cpuinfo_x86 *c)
 	case 0xf ... 0x17:
 		disable_c1e(NULL);
 		if (acpi_smi_cmd && (acpi_enable_value | acpi_disable_value)) {
+#ifdef CONFIG_PV
 			pv_post_outb_hook = amd_check_disable_c1e;
+#endif
 			amd_acpi_c1e_quirk = true;
 		}
 		break;
-- 
2.11.0


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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86/amd: don't set pv_post_outb_hook when !CONFIG_PV
  2018-11-08 14:58 [PATCH] x86/amd: don't set pv_post_outb_hook when !CONFIG_PV Wei Liu
@ 2018-11-08 14:58 ` Andrew Cooper
  2018-11-08 15:18 ` Roger Pau Monné
  2018-11-08 15:34 ` Jan Beulich
  2 siblings, 0 replies; 6+ messages in thread
From: Andrew Cooper @ 2018-11-08 14:58 UTC (permalink / raw)
  To: Wei Liu, xen-devel; +Cc: Jan Beulich, Roger Pau Monné

On 08/11/18 14:58, Wei Liu wrote:
> Obviously it won't exist when PV is disabled.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86/amd: don't set pv_post_outb_hook when !CONFIG_PV
  2018-11-08 14:58 [PATCH] x86/amd: don't set pv_post_outb_hook when !CONFIG_PV Wei Liu
  2018-11-08 14:58 ` Andrew Cooper
@ 2018-11-08 15:18 ` Roger Pau Monné
  2018-11-08 15:34 ` Jan Beulich
  2 siblings, 0 replies; 6+ messages in thread
From: Roger Pau Monné @ 2018-11-08 15:18 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Jan Beulich, Andrew Cooper

On Thu, Nov 08, 2018 at 02:58:09PM +0000, Wei Liu wrote:
> Obviously it won't exist when PV is disabled.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86/amd: don't set pv_post_outb_hook when !CONFIG_PV
  2018-11-08 14:58 [PATCH] x86/amd: don't set pv_post_outb_hook when !CONFIG_PV Wei Liu
  2018-11-08 14:58 ` Andrew Cooper
  2018-11-08 15:18 ` Roger Pau Monné
@ 2018-11-08 15:34 ` Jan Beulich
  2018-11-08 15:38   ` Wei Liu
  2 siblings, 1 reply; 6+ messages in thread
From: Jan Beulich @ 2018-11-08 15:34 UTC (permalink / raw)
  To: Wei Liu; +Cc: Andrew Cooper, xen-devel, Roger Pau Monne

>>> On 08.11.18 at 15:58, <wei.liu2@citrix.com> wrote:
> --- a/xen/arch/x86/cpu/amd.c
> +++ b/xen/arch/x86/cpu/amd.c
> @@ -631,7 +631,9 @@ static void init_amd(struct cpuinfo_x86 *c)
>  	case 0xf ... 0x17:
>  		disable_c1e(NULL);
>  		if (acpi_smi_cmd && (acpi_enable_value | acpi_disable_value)) {
> +#ifdef CONFIG_PV
>  			pv_post_outb_hook = amd_check_disable_c1e;
> +#endif
>  			amd_acpi_c1e_quirk = true;
>  		}
>  		break;

Hmm, I would have hoped for this to get properly cleaned up,
as outlined in that other thread, if you already touch it. Anyway,
I see you've got the necessary acks, so the subsequent
cleanup patch will just have to delete two more lines.

Jan



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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86/amd: don't set pv_post_outb_hook when !CONFIG_PV
  2018-11-08 15:34 ` Jan Beulich
@ 2018-11-08 15:38   ` Wei Liu
  2018-11-08 15:46     ` Jan Beulich
  0 siblings, 1 reply; 6+ messages in thread
From: Wei Liu @ 2018-11-08 15:38 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Andrew Cooper, Roger Pau Monne, Wei Liu, xen-devel

On Thu, Nov 08, 2018 at 08:34:35AM -0700, Jan Beulich wrote:
> >>> On 08.11.18 at 15:58, <wei.liu2@citrix.com> wrote:
> > --- a/xen/arch/x86/cpu/amd.c
> > +++ b/xen/arch/x86/cpu/amd.c
> > @@ -631,7 +631,9 @@ static void init_amd(struct cpuinfo_x86 *c)
> >  	case 0xf ... 0x17:
> >  		disable_c1e(NULL);
> >  		if (acpi_smi_cmd && (acpi_enable_value | acpi_disable_value)) {
> > +#ifdef CONFIG_PV
> >  			pv_post_outb_hook = amd_check_disable_c1e;
> > +#endif
> >  			amd_acpi_c1e_quirk = true;
> >  		}
> >  		break;
> 
> Hmm, I would have hoped for this to get properly cleaned up,
> as outlined in that other thread, if you already touch it. Anyway,
> I see you've got the necessary acks, so the subsequent
> cleanup patch will just have to delete two more lines.

Do you mean to switch PV to use the same mechanism as HVM? I don't have
a machine to test this code path at the moment, so it will need to wait
a bit. In the mean time I would like to tick one of the big work items
off of my list.

Wei.

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

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] x86/amd: don't set pv_post_outb_hook when !CONFIG_PV
  2018-11-08 15:38   ` Wei Liu
@ 2018-11-08 15:46     ` Jan Beulich
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Beulich @ 2018-11-08 15:46 UTC (permalink / raw)
  To: Wei Liu; +Cc: Andrew Cooper, xen-devel, Roger Pau Monne

>>> On 08.11.18 at 16:38, <wei.liu2@citrix.com> wrote:
> On Thu, Nov 08, 2018 at 08:34:35AM -0700, Jan Beulich wrote:
>> >>> On 08.11.18 at 15:58, <wei.liu2@citrix.com> wrote:
>> > --- a/xen/arch/x86/cpu/amd.c
>> > +++ b/xen/arch/x86/cpu/amd.c
>> > @@ -631,7 +631,9 @@ static void init_amd(struct cpuinfo_x86 *c)
>> >  	case 0xf ... 0x17:
>> >  		disable_c1e(NULL);
>> >  		if (acpi_smi_cmd && (acpi_enable_value | acpi_disable_value)) {
>> > +#ifdef CONFIG_PV
>> >  			pv_post_outb_hook = amd_check_disable_c1e;
>> > +#endif
>> >  			amd_acpi_c1e_quirk = true;
>> >  		}
>> >  		break;
>> 
>> Hmm, I would have hoped for this to get properly cleaned up,
>> as outlined in that other thread, if you already touch it. Anyway,
>> I see you've got the necessary acks, so the subsequent
>> cleanup patch will just have to delete two more lines.
> 
> Do you mean to switch PV to use the same mechanism as HVM?

Yes.

> I don't have
> a machine to test this code path at the moment, so it will need to wait
> a bit. In the mean time I would like to tick one of the big work items
> off of my list.

I didn't mean to keep you from committing it. As said - you have the
necessary ack.

Jan



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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-11-08 15:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-08 14:58 [PATCH] x86/amd: don't set pv_post_outb_hook when !CONFIG_PV Wei Liu
2018-11-08 14:58 ` Andrew Cooper
2018-11-08 15:18 ` Roger Pau Monné
2018-11-08 15:34 ` Jan Beulich
2018-11-08 15:38   ` Wei Liu
2018-11-08 15:46     ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.