Skip to contentSkip to conversation

x86/amd: don't set pv_post_outb_hook when !CONFIG_PV

PATCH In review Wei Liu 4 participants 6 messages Nov 8, 2018

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 x86/amd: don't set pv_post_outb_hook when !CONFIG_PV

Obviously it won't exist when PV is disabled.

---
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(+)
xen/arch/x86/cpu/amd.c +2 -0
index 8895c25682..e1fc88bdcf 100644
@@ -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;
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#3 lore raw
In reply to Wei Liu

xen/arch/x86/cpu/amd.c static void init_amd(struct cpuinfo_x86 *c) · line 639

Quoted 13 lines
Quoted 1 line
Quoted 1 line · On 08.11.18 at 15:58, <[email protected]> wrote:
xen/arch/x86/cpu/amd.c +2 -0
@@ -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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#4 lore raw
Quoted 10 lines · Jan Beulich
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 08.11.18 at 15:58, <[email protected]> wrote:
xen/arch/x86/cpu/amd.c +2 -0
@@ -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
Quoted 8 lines

xen/arch/x86/cpu/amd.c static void init_amd(struct cpuinfo_x86 *c) · line 639

Quoted 3 lines
xen/arch/x86/cpu/amd.c +0 -0
 			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.

Quoted 9 lines

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#5 lore raw
Quoted 21 lines
Quoted 1 line
Quoted 1 line · On 08.11.18 at 16:38, <[email protected]> wrote:
Quoted 10 lines · Jan Beulich
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 08.11.18 at 15:58, <[email protected]> wrote:
xen/arch/x86/cpu/amd.c +2 -0
@@ -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
Quoted 8 lines

xen/arch/x86/cpu/amd.c static void init_amd(struct cpuinfo_x86 *c) · line 639

Quoted 3 lines
xen/arch/x86/cpu/amd.c +0 -0
 			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.

Quoted 1 line

Do you mean to switch PV to use the same mechanism as HVM?

Yes.

Quoted 4 lines

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
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel