All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable
@ 2019-07-16  4:26 ` Zhenzhong Duan
  0 siblings, 0 replies; 14+ messages in thread
From: Zhenzhong Duan @ 2019-07-16  4:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: xen-devel, boris.ostrovsky, jgross, sstabellini, tglx, mingo, bp,
	x86, Zhenzhong Duan

.. as "nopv" support needs it to be changeable at boot up stage.

Checkpatch reports warning, so move variable declarations from
hypervisor.c to hypervisor.h

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.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>
---
 arch/x86/include/asm/hypervisor.h | 8 ++++++++
 arch/x86/kernel/cpu/hypervisor.c  | 8 --------
 arch/x86/xen/enlighten_hvm.c      | 2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/x86/include/asm/hypervisor.h b/arch/x86/include/asm/hypervisor.h
index f7b4c53..e41cbf2 100644
--- a/arch/x86/include/asm/hypervisor.h
+++ b/arch/x86/include/asm/hypervisor.h
@@ -58,6 +58,14 @@ struct hypervisor_x86 {
 	bool ignore_nopv;
 };
 
+extern const struct hypervisor_x86 x86_hyper_vmware;
+extern const struct hypervisor_x86 x86_hyper_ms_hyperv;
+extern const struct hypervisor_x86 x86_hyper_xen_pv;
+extern const struct hypervisor_x86 x86_hyper_kvm;
+extern const struct hypervisor_x86 x86_hyper_jailhouse;
+extern const struct hypervisor_x86 x86_hyper_acrn;
+extern struct hypervisor_x86 x86_hyper_xen_hvm;
+
 extern bool nopv;
 extern enum x86_hypervisor_type x86_hyper_type;
 extern void init_hypervisor_platform(void);
diff --git a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c
index 7eaad41..553bfbf 100644
--- a/arch/x86/kernel/cpu/hypervisor.c
+++ b/arch/x86/kernel/cpu/hypervisor.c
@@ -26,14 +26,6 @@
 #include <asm/processor.h>
 #include <asm/hypervisor.h>
 
-extern const struct hypervisor_x86 x86_hyper_vmware;
-extern const struct hypervisor_x86 x86_hyper_ms_hyperv;
-extern const struct hypervisor_x86 x86_hyper_xen_pv;
-extern const struct hypervisor_x86 x86_hyper_xen_hvm;
-extern const struct hypervisor_x86 x86_hyper_kvm;
-extern const struct hypervisor_x86 x86_hyper_jailhouse;
-extern const struct hypervisor_x86 x86_hyper_acrn;
-
 static const __initconst struct hypervisor_x86 * const hypervisors[] =
 {
 #ifdef CONFIG_XEN_PV
diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
index 1756cf7..b671983 100644
--- a/arch/x86/xen/enlighten_hvm.c
+++ b/arch/x86/xen/enlighten_hvm.c
@@ -259,7 +259,7 @@ static __init void xen_hvm_guest_late_init(void)
 #endif
 }
 
-const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = {
+struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
 	.name                   = "Xen HVM",
 	.detect                 = xen_platform_hvm,
 	.type			= X86_HYPER_XEN_HVM,
-- 
1.8.3.1


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

* [Xen-devel] [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable
@ 2019-07-16  4:26 ` Zhenzhong Duan
  0 siblings, 0 replies; 14+ messages in thread
From: Zhenzhong Duan @ 2019-07-16  4:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: jgross, sstabellini, x86, Zhenzhong Duan, mingo, bp, xen-devel,
	boris.ostrovsky, tglx

.. as "nopv" support needs it to be changeable at boot up stage.

Checkpatch reports warning, so move variable declarations from
hypervisor.c to hypervisor.h

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.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>
---
 arch/x86/include/asm/hypervisor.h | 8 ++++++++
 arch/x86/kernel/cpu/hypervisor.c  | 8 --------
 arch/x86/xen/enlighten_hvm.c      | 2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/x86/include/asm/hypervisor.h b/arch/x86/include/asm/hypervisor.h
index f7b4c53..e41cbf2 100644
--- a/arch/x86/include/asm/hypervisor.h
+++ b/arch/x86/include/asm/hypervisor.h
@@ -58,6 +58,14 @@ struct hypervisor_x86 {
 	bool ignore_nopv;
 };
 
+extern const struct hypervisor_x86 x86_hyper_vmware;
+extern const struct hypervisor_x86 x86_hyper_ms_hyperv;
+extern const struct hypervisor_x86 x86_hyper_xen_pv;
+extern const struct hypervisor_x86 x86_hyper_kvm;
+extern const struct hypervisor_x86 x86_hyper_jailhouse;
+extern const struct hypervisor_x86 x86_hyper_acrn;
+extern struct hypervisor_x86 x86_hyper_xen_hvm;
+
 extern bool nopv;
 extern enum x86_hypervisor_type x86_hyper_type;
 extern void init_hypervisor_platform(void);
diff --git a/arch/x86/kernel/cpu/hypervisor.c b/arch/x86/kernel/cpu/hypervisor.c
index 7eaad41..553bfbf 100644
--- a/arch/x86/kernel/cpu/hypervisor.c
+++ b/arch/x86/kernel/cpu/hypervisor.c
@@ -26,14 +26,6 @@
 #include <asm/processor.h>
 #include <asm/hypervisor.h>
 
-extern const struct hypervisor_x86 x86_hyper_vmware;
-extern const struct hypervisor_x86 x86_hyper_ms_hyperv;
-extern const struct hypervisor_x86 x86_hyper_xen_pv;
-extern const struct hypervisor_x86 x86_hyper_xen_hvm;
-extern const struct hypervisor_x86 x86_hyper_kvm;
-extern const struct hypervisor_x86 x86_hyper_jailhouse;
-extern const struct hypervisor_x86 x86_hyper_acrn;
-
 static const __initconst struct hypervisor_x86 * const hypervisors[] =
 {
 #ifdef CONFIG_XEN_PV
diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
index 1756cf7..b671983 100644
--- a/arch/x86/xen/enlighten_hvm.c
+++ b/arch/x86/xen/enlighten_hvm.c
@@ -259,7 +259,7 @@ static __init void xen_hvm_guest_late_init(void)
 #endif
 }
 
-const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = {
+struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
 	.name                   = "Xen HVM",
 	.detect                 = xen_platform_hvm,
 	.type			= X86_HYPER_XEN_HVM,
-- 
1.8.3.1


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

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

* [PATCH v8 5/5] x86/xen: Add "nopv" support for HVM guest
  2019-07-16  4:26 ` [Xen-devel] " Zhenzhong Duan
@ 2019-07-16  4:26   ` Zhenzhong Duan
  -1 siblings, 0 replies; 14+ messages in thread
From: Zhenzhong Duan @ 2019-07-16  4:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: xen-devel, boris.ostrovsky, jgross, sstabellini, tglx, mingo, bp,
	x86, Zhenzhong Duan

PVH guest needs PV extentions to work, so "nopv" parameter should be
ignored for PVH but not for HVM guest.

If PVH guest boots up via the Xen-PVH boot entry, xen_pvh is set early,
we know it's PVH guest and ignore "nopv" parameter directly.

If PVH guest boots up via the normal boot entry same as HVM guest, it's
hard to distinguish PVH and HVM guest at that time. In this case, we
have to panic early if PVH is detected and nopv is enabled to avoid a
worse situation later.

Remove static from bool_x86_init_noop/x86_op_int_noop so they could be
used globally. Move xen_platform_hvm() after xen_hvm_guest_late_init()
to avoid compile error.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Reviewed-by: 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>
---
 arch/x86/include/asm/x86_init.h |  2 ++
 arch/x86/kernel/x86_init.c      |  4 ++--
 arch/x86/xen/enlighten_hvm.c    | 43 +++++++++++++++++++++++++++++++++--------
 3 files changed, 39 insertions(+), 10 deletions(-)

diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
index b85a7c5..ac09341 100644
--- a/arch/x86/include/asm/x86_init.h
+++ b/arch/x86/include/asm/x86_init.h
@@ -301,6 +301,8 @@ struct x86_apic_ops {
 extern void x86_early_init_platform_quirks(void);
 extern void x86_init_noop(void);
 extern void x86_init_uint_noop(unsigned int unused);
+extern bool bool_x86_init_noop(void);
+extern void x86_op_int_noop(int cpu);
 extern bool x86_pnpbios_disabled(void);
 
 #endif
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index 50a2b49..1bef687 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@ -29,8 +29,8 @@ void x86_init_noop(void) { }
 void __init x86_init_uint_noop(unsigned int unused) { }
 static int __init iommu_init_noop(void) { return 0; }
 static void iommu_shutdown_noop(void) { }
-static bool __init bool_x86_init_noop(void) { return false; }
-static void x86_op_int_noop(int cpu) { }
+bool __init bool_x86_init_noop(void) { return false; }
+void x86_op_int_noop(int cpu) { }
 
 /*
  * The platform setup functions are preset with the default functions
diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
index b671983..e138f7d 100644
--- a/arch/x86/xen/enlighten_hvm.c
+++ b/arch/x86/xen/enlighten_hvm.c
@@ -231,14 +231,6 @@ bool __init xen_hvm_need_lapic(void)
 	return true;
 }
 
-static uint32_t __init xen_platform_hvm(void)
-{
-	if (xen_pv_domain())
-		return 0;
-
-	return xen_cpuid_base();
-}
-
 static __init void xen_hvm_guest_late_init(void)
 {
 #ifdef CONFIG_XEN_PVH
@@ -250,6 +242,9 @@ static __init void xen_hvm_guest_late_init(void)
 	/* PVH detected. */
 	xen_pvh = true;
 
+	if (nopv)
+		panic("\"nopv\" and \"xen_nopv\" parameters are unsupported in PVH guest.");
+
 	/* Make sure we don't fall back to (default) ACPI_IRQ_MODEL_PIC. */
 	if (!nr_ioapics && acpi_irq_model == ACPI_IRQ_MODEL_PIC)
 		acpi_irq_model = ACPI_IRQ_MODEL_PLATFORM;
@@ -259,6 +254,37 @@ static __init void xen_hvm_guest_late_init(void)
 #endif
 }
 
+static uint32_t __init xen_platform_hvm(void)
+{
+	uint32_t xen_domain = xen_cpuid_base();
+	struct x86_hyper_init *h = &x86_hyper_xen_hvm.init;
+
+	if (xen_pv_domain())
+		return 0;
+
+	if (xen_pvh_domain() && nopv) {
+		/* Guest booting via the Xen-PVH boot entry goes here */
+		pr_info("\"nopv\" parameter is ignored in PVH guest\n");
+		nopv = false;
+	} else if (nopv && xen_domain) {
+		/*
+		 * Guest booting via normal boot entry (like via grub2) goes
+		 * here.
+		 *
+		 * Use interface functions for bare hardware if nopv,
+		 * xen_hvm_guest_late_init is an exception as we need to
+		 * detect PVH and panic there.
+		 */
+		h->init_platform = x86_init_noop;
+		h->x2apic_available = bool_x86_init_noop;
+		h->init_mem_mapping = x86_init_noop;
+		h->init_after_bootmem = x86_init_noop;
+		h->guest_late_init = xen_hvm_guest_late_init;
+		x86_hyper_xen_hvm.runtime.pin_vcpu = x86_op_int_noop;
+	}
+	return xen_domain;
+}
+
 struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
 	.name                   = "Xen HVM",
 	.detect                 = xen_platform_hvm,
@@ -268,4 +294,5 @@ struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
 	.init.init_mem_mapping	= xen_hvm_init_mem_mapping,
 	.init.guest_late_init	= xen_hvm_guest_late_init,
 	.runtime.pin_vcpu       = xen_pin_vcpu,
+	.ignore_nopv            = true,
 };
-- 
1.8.3.1


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

* [Xen-devel] [PATCH v8 5/5] x86/xen: Add "nopv" support for HVM guest
@ 2019-07-16  4:26   ` Zhenzhong Duan
  0 siblings, 0 replies; 14+ messages in thread
From: Zhenzhong Duan @ 2019-07-16  4:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: jgross, sstabellini, x86, Zhenzhong Duan, mingo, bp, xen-devel,
	boris.ostrovsky, tglx

PVH guest needs PV extentions to work, so "nopv" parameter should be
ignored for PVH but not for HVM guest.

If PVH guest boots up via the Xen-PVH boot entry, xen_pvh is set early,
we know it's PVH guest and ignore "nopv" parameter directly.

If PVH guest boots up via the normal boot entry same as HVM guest, it's
hard to distinguish PVH and HVM guest at that time. In this case, we
have to panic early if PVH is detected and nopv is enabled to avoid a
worse situation later.

Remove static from bool_x86_init_noop/x86_op_int_noop so they could be
used globally. Move xen_platform_hvm() after xen_hvm_guest_late_init()
to avoid compile error.

Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Reviewed-by: 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>
---
 arch/x86/include/asm/x86_init.h |  2 ++
 arch/x86/kernel/x86_init.c      |  4 ++--
 arch/x86/xen/enlighten_hvm.c    | 43 +++++++++++++++++++++++++++++++++--------
 3 files changed, 39 insertions(+), 10 deletions(-)

diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
index b85a7c5..ac09341 100644
--- a/arch/x86/include/asm/x86_init.h
+++ b/arch/x86/include/asm/x86_init.h
@@ -301,6 +301,8 @@ struct x86_apic_ops {
 extern void x86_early_init_platform_quirks(void);
 extern void x86_init_noop(void);
 extern void x86_init_uint_noop(unsigned int unused);
+extern bool bool_x86_init_noop(void);
+extern void x86_op_int_noop(int cpu);
 extern bool x86_pnpbios_disabled(void);
 
 #endif
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index 50a2b49..1bef687 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@ -29,8 +29,8 @@ void x86_init_noop(void) { }
 void __init x86_init_uint_noop(unsigned int unused) { }
 static int __init iommu_init_noop(void) { return 0; }
 static void iommu_shutdown_noop(void) { }
-static bool __init bool_x86_init_noop(void) { return false; }
-static void x86_op_int_noop(int cpu) { }
+bool __init bool_x86_init_noop(void) { return false; }
+void x86_op_int_noop(int cpu) { }
 
 /*
  * The platform setup functions are preset with the default functions
diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
index b671983..e138f7d 100644
--- a/arch/x86/xen/enlighten_hvm.c
+++ b/arch/x86/xen/enlighten_hvm.c
@@ -231,14 +231,6 @@ bool __init xen_hvm_need_lapic(void)
 	return true;
 }
 
-static uint32_t __init xen_platform_hvm(void)
-{
-	if (xen_pv_domain())
-		return 0;
-
-	return xen_cpuid_base();
-}
-
 static __init void xen_hvm_guest_late_init(void)
 {
 #ifdef CONFIG_XEN_PVH
@@ -250,6 +242,9 @@ static __init void xen_hvm_guest_late_init(void)
 	/* PVH detected. */
 	xen_pvh = true;
 
+	if (nopv)
+		panic("\"nopv\" and \"xen_nopv\" parameters are unsupported in PVH guest.");
+
 	/* Make sure we don't fall back to (default) ACPI_IRQ_MODEL_PIC. */
 	if (!nr_ioapics && acpi_irq_model == ACPI_IRQ_MODEL_PIC)
 		acpi_irq_model = ACPI_IRQ_MODEL_PLATFORM;
@@ -259,6 +254,37 @@ static __init void xen_hvm_guest_late_init(void)
 #endif
 }
 
+static uint32_t __init xen_platform_hvm(void)
+{
+	uint32_t xen_domain = xen_cpuid_base();
+	struct x86_hyper_init *h = &x86_hyper_xen_hvm.init;
+
+	if (xen_pv_domain())
+		return 0;
+
+	if (xen_pvh_domain() && nopv) {
+		/* Guest booting via the Xen-PVH boot entry goes here */
+		pr_info("\"nopv\" parameter is ignored in PVH guest\n");
+		nopv = false;
+	} else if (nopv && xen_domain) {
+		/*
+		 * Guest booting via normal boot entry (like via grub2) goes
+		 * here.
+		 *
+		 * Use interface functions for bare hardware if nopv,
+		 * xen_hvm_guest_late_init is an exception as we need to
+		 * detect PVH and panic there.
+		 */
+		h->init_platform = x86_init_noop;
+		h->x2apic_available = bool_x86_init_noop;
+		h->init_mem_mapping = x86_init_noop;
+		h->init_after_bootmem = x86_init_noop;
+		h->guest_late_init = xen_hvm_guest_late_init;
+		x86_hyper_xen_hvm.runtime.pin_vcpu = x86_op_int_noop;
+	}
+	return xen_domain;
+}
+
 struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
 	.name                   = "Xen HVM",
 	.detect                 = xen_platform_hvm,
@@ -268,4 +294,5 @@ struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
 	.init.init_mem_mapping	= xen_hvm_init_mem_mapping,
 	.init.guest_late_init	= xen_hvm_guest_late_init,
 	.runtime.pin_vcpu       = xen_pin_vcpu,
+	.ignore_nopv            = true,
 };
-- 
1.8.3.1


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

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

* Re: [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable
  2019-07-16  4:26 ` [Xen-devel] " Zhenzhong Duan
@ 2019-07-17  4:58   ` Juergen Gross
  -1 siblings, 0 replies; 14+ messages in thread
From: Juergen Gross @ 2019-07-17  4:58 UTC (permalink / raw)
  To: Zhenzhong Duan, linux-kernel
  Cc: bp, sstabellini, x86, tglx, xen-devel, boris.ostrovsky, mingo

On 16.07.19 06:26, Zhenzhong Duan wrote:
> .. as "nopv" support needs it to be changeable at boot up stage.
> 
> Checkpatch reports warning, so move variable declarations from
> hypervisor.c to hypervisor.h
> 
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>

Reviewed-by: Juergen Gross <jgross@suse.com>

... and complete series applied to xen/tip.git for-linus-5.3a


Juergen

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

* Re: [Xen-devel] [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable
@ 2019-07-17  4:58   ` Juergen Gross
  0 siblings, 0 replies; 14+ messages in thread
From: Juergen Gross @ 2019-07-17  4:58 UTC (permalink / raw)
  To: Zhenzhong Duan, linux-kernel
  Cc: sstabellini, x86, mingo, bp, xen-devel, boris.ostrovsky, tglx

On 16.07.19 06:26, Zhenzhong Duan wrote:
> .. as "nopv" support needs it to be changeable at boot up stage.
> 
> Checkpatch reports warning, so move variable declarations from
> hypervisor.c to hypervisor.h
> 
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>

Reviewed-by: Juergen Gross <jgross@suse.com>

... and complete series applied to xen/tip.git for-linus-5.3a


Juergen

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

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

* Re: [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable
  2019-07-16  4:26 ` [Xen-devel] " Zhenzhong Duan
@ 2019-07-17  6:46   ` Joe Perches
  -1 siblings, 0 replies; 14+ messages in thread
From: Joe Perches @ 2019-07-17  6:46 UTC (permalink / raw)
  To: Zhenzhong Duan, linux-kernel
  Cc: xen-devel, boris.ostrovsky, jgross, sstabellini, tglx, mingo, bp, x86

On Tue, 2019-07-16 at 12:26 +0800, Zhenzhong Duan wrote:
> .. as "nopv" support needs it to be changeable at boot up stage.
> 
> Checkpatch reports warning, so move variable declarations from
> hypervisor.c to hypervisor.h
[]
> diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
[]
> @@ -259,7 +259,7 @@ static __init void xen_hvm_guest_late_init(void)
>  #endif
>  }
>  
> -const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = {
> +struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {

static?



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

* Re: [Xen-devel] [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable
@ 2019-07-17  6:46   ` Joe Perches
  0 siblings, 0 replies; 14+ messages in thread
From: Joe Perches @ 2019-07-17  6:46 UTC (permalink / raw)
  To: Zhenzhong Duan, linux-kernel
  Cc: jgross, sstabellini, x86, mingo, bp, xen-devel, boris.ostrovsky, tglx

On Tue, 2019-07-16 at 12:26 +0800, Zhenzhong Duan wrote:
> .. as "nopv" support needs it to be changeable at boot up stage.
> 
> Checkpatch reports warning, so move variable declarations from
> hypervisor.c to hypervisor.h
[]
> diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
[]
> @@ -259,7 +259,7 @@ static __init void xen_hvm_guest_late_init(void)
>  #endif
>  }
>  
> -const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = {
> +struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {

static?



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

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

* Re: [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable
  2019-07-17  6:46   ` [Xen-devel] " Joe Perches
@ 2019-07-17  6:49     ` Juergen Gross
  -1 siblings, 0 replies; 14+ messages in thread
From: Juergen Gross @ 2019-07-17  6:49 UTC (permalink / raw)
  To: Joe Perches, Zhenzhong Duan, linux-kernel
  Cc: bp, sstabellini, x86, tglx, xen-devel, boris.ostrovsky, mingo

On 17.07.19 08:46, Joe Perches wrote:
> On Tue, 2019-07-16 at 12:26 +0800, Zhenzhong Duan wrote:
>> .. as "nopv" support needs it to be changeable at boot up stage.
>>
>> Checkpatch reports warning, so move variable declarations from
>> hypervisor.c to hypervisor.h
> []
>> diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
> []
>> @@ -259,7 +259,7 @@ static __init void xen_hvm_guest_late_init(void)
>>   #endif
>>   }
>>   
>> -const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = {
>> +struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
> 
> static?

It is being referenced from arch/x86/kernel/cpu/hypervisor.c


Juergen

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

* Re: [Xen-devel] [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable
@ 2019-07-17  6:49     ` Juergen Gross
  0 siblings, 0 replies; 14+ messages in thread
From: Juergen Gross @ 2019-07-17  6:49 UTC (permalink / raw)
  To: Joe Perches, Zhenzhong Duan, linux-kernel
  Cc: sstabellini, x86, mingo, bp, xen-devel, boris.ostrovsky, tglx

On 17.07.19 08:46, Joe Perches wrote:
> On Tue, 2019-07-16 at 12:26 +0800, Zhenzhong Duan wrote:
>> .. as "nopv" support needs it to be changeable at boot up stage.
>>
>> Checkpatch reports warning, so move variable declarations from
>> hypervisor.c to hypervisor.h
> []
>> diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
> []
>> @@ -259,7 +259,7 @@ static __init void xen_hvm_guest_late_init(void)
>>   #endif
>>   }
>>   
>> -const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = {
>> +struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
> 
> static?

It is being referenced from arch/x86/kernel/cpu/hypervisor.c


Juergen

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

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

* Re: [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable
  2019-07-17  6:49     ` [Xen-devel] " Juergen Gross
@ 2019-07-17 17:22       ` Joe Perches
  -1 siblings, 0 replies; 14+ messages in thread
From: Joe Perches @ 2019-07-17 17:22 UTC (permalink / raw)
  To: Juergen Gross, Zhenzhong Duan, linux-kernel
  Cc: bp, sstabellini, x86, tglx, xen-devel, boris.ostrovsky, mingo

On Wed, 2019-07-17 at 08:49 +0200, Juergen Gross wrote:
> On 17.07.19 08:46, Joe Perches wrote:
> > On Tue, 2019-07-16 at 12:26 +0800, Zhenzhong Duan wrote:
> > > .. as "nopv" support needs it to be changeable at boot up stage.
> > > 
> > > Checkpatch reports warning, so move variable declarations from
> > > hypervisor.c to hypervisor.h
> > []
> > > diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
> > []
> > > @@ -259,7 +259,7 @@ static __init void xen_hvm_guest_late_init(void)
> > >   #endif
> > >   }
> > >   
> > > -const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = {
> > > +struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
> > 
> > static?
> 
> It is being referenced from arch/x86/kernel/cpu/hypervisor.c

But wasn't it also removed from the list of externs?

Rereading the .h file, no it wasn't.  I missed that.

Perhaps the extern list could be reordered to move this
x86_hyper_xen_hvm to be next to x86_hyper_type.

I also suggest that "extern bool nopv" might be a bit
non-specific and could use a longer identifier.



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

* Re: [Xen-devel] [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable
@ 2019-07-17 17:22       ` Joe Perches
  0 siblings, 0 replies; 14+ messages in thread
From: Joe Perches @ 2019-07-17 17:22 UTC (permalink / raw)
  To: Juergen Gross, Zhenzhong Duan, linux-kernel
  Cc: sstabellini, x86, mingo, bp, xen-devel, boris.ostrovsky, tglx

On Wed, 2019-07-17 at 08:49 +0200, Juergen Gross wrote:
> On 17.07.19 08:46, Joe Perches wrote:
> > On Tue, 2019-07-16 at 12:26 +0800, Zhenzhong Duan wrote:
> > > .. as "nopv" support needs it to be changeable at boot up stage.
> > > 
> > > Checkpatch reports warning, so move variable declarations from
> > > hypervisor.c to hypervisor.h
> > []
> > > diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
> > []
> > > @@ -259,7 +259,7 @@ static __init void xen_hvm_guest_late_init(void)
> > >   #endif
> > >   }
> > >   
> > > -const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = {
> > > +struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
> > 
> > static?
> 
> It is being referenced from arch/x86/kernel/cpu/hypervisor.c

But wasn't it also removed from the list of externs?

Rereading the .h file, no it wasn't.  I missed that.

Perhaps the extern list could be reordered to move this
x86_hyper_xen_hvm to be next to x86_hyper_type.

I also suggest that "extern bool nopv" might be a bit
non-specific and could use a longer identifier.



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

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

* Re: [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable
  2019-07-17 17:22       ` [Xen-devel] " Joe Perches
@ 2019-07-18  3:48         ` Juergen Gross
  -1 siblings, 0 replies; 14+ messages in thread
From: Juergen Gross @ 2019-07-18  3:48 UTC (permalink / raw)
  To: Joe Perches, Zhenzhong Duan, linux-kernel
  Cc: bp, sstabellini, x86, tglx, xen-devel, boris.ostrovsky, mingo

On 17.07.19 19:22, Joe Perches wrote:
> On Wed, 2019-07-17 at 08:49 +0200, Juergen Gross wrote:
>> On 17.07.19 08:46, Joe Perches wrote:
>>> On Tue, 2019-07-16 at 12:26 +0800, Zhenzhong Duan wrote:
>>>> .. as "nopv" support needs it to be changeable at boot up stage.
>>>>
>>>> Checkpatch reports warning, so move variable declarations from
>>>> hypervisor.c to hypervisor.h
>>> []
>>>> diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
>>> []
>>>> @@ -259,7 +259,7 @@ static __init void xen_hvm_guest_late_init(void)
>>>>    #endif
>>>>    }
>>>>    
>>>> -const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = {
>>>> +struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
>>>
>>> static?
>>
>> It is being referenced from arch/x86/kernel/cpu/hypervisor.c
> 
> But wasn't it also removed from the list of externs?
> 
> Rereading the .h file, no it wasn't.  I missed that.
> 
> Perhaps the extern list could be reordered to move this
> x86_hyper_xen_hvm to be next to x86_hyper_type.
> 
> I also suggest that "extern bool nopv" might be a bit
> non-specific and could use a longer identifier.

You are a little bit late. It has been this way since V5 of the series
posted on July 3rd.

I have pushed the series to my tree already and I'm about to send the
pull request.

Followup patches welcome. :-)


Juergen

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

* Re: [Xen-devel] [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable
@ 2019-07-18  3:48         ` Juergen Gross
  0 siblings, 0 replies; 14+ messages in thread
From: Juergen Gross @ 2019-07-18  3:48 UTC (permalink / raw)
  To: Joe Perches, Zhenzhong Duan, linux-kernel
  Cc: sstabellini, x86, mingo, bp, xen-devel, boris.ostrovsky, tglx

On 17.07.19 19:22, Joe Perches wrote:
> On Wed, 2019-07-17 at 08:49 +0200, Juergen Gross wrote:
>> On 17.07.19 08:46, Joe Perches wrote:
>>> On Tue, 2019-07-16 at 12:26 +0800, Zhenzhong Duan wrote:
>>>> .. as "nopv" support needs it to be changeable at boot up stage.
>>>>
>>>> Checkpatch reports warning, so move variable declarations from
>>>> hypervisor.c to hypervisor.h
>>> []
>>>> diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
>>> []
>>>> @@ -259,7 +259,7 @@ static __init void xen_hvm_guest_late_init(void)
>>>>    #endif
>>>>    }
>>>>    
>>>> -const __initconst struct hypervisor_x86 x86_hyper_xen_hvm = {
>>>> +struct hypervisor_x86 x86_hyper_xen_hvm __initdata = {
>>>
>>> static?
>>
>> It is being referenced from arch/x86/kernel/cpu/hypervisor.c
> 
> But wasn't it also removed from the list of externs?
> 
> Rereading the .h file, no it wasn't.  I missed that.
> 
> Perhaps the extern list could be reordered to move this
> x86_hyper_xen_hvm to be next to x86_hyper_type.
> 
> I also suggest that "extern bool nopv" might be a bit
> non-specific and could use a longer identifier.

You are a little bit late. It has been this way since V5 of the series
posted on July 3rd.

I have pushed the series to my tree already and I'm about to send the
pull request.

Followup patches welcome. :-)


Juergen

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

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

end of thread, other threads:[~2019-07-18  3:49 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-16  4:26 [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable Zhenzhong Duan
2019-07-16  4:26 ` [Xen-devel] " Zhenzhong Duan
2019-07-16  4:26 ` [PATCH v8 5/5] x86/xen: Add "nopv" support for HVM guest Zhenzhong Duan
2019-07-16  4:26   ` [Xen-devel] " Zhenzhong Duan
2019-07-17  4:58 ` [PATCH v8 4/5] x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable Juergen Gross
2019-07-17  4:58   ` [Xen-devel] " Juergen Gross
2019-07-17  6:46 ` Joe Perches
2019-07-17  6:46   ` [Xen-devel] " Joe Perches
2019-07-17  6:49   ` Juergen Gross
2019-07-17  6:49     ` [Xen-devel] " Juergen Gross
2019-07-17 17:22     ` Joe Perches
2019-07-17 17:22       ` [Xen-devel] " Joe Perches
2019-07-18  3:48       ` Juergen Gross
2019-07-18  3:48         ` [Xen-devel] " Juergen Gross

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.