[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [RFC 07/38] x86/hyperlaunch: introduce pvh domain builder
Introduce dom_construct_pvh() as a wrapper around dom0_construct_pvh(). This function will be expanded as dom0 specific construction functions are generalized. Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx> --- xen/arch/x86/dom0_build.c | 5 ++-- xen/arch/x86/hvm/Makefile | 1 + xen/arch/x86/hvm/dom_build.c | 31 +++++++++++++++++++++++ xen/arch/x86/include/asm/domain-builder.h | 2 ++ xen/arch/x86/include/asm/setup.h | 2 +- 5 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 xen/arch/x86/hvm/dom_build.c diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c index 77386cd1e20c..08fde953a1e0 100644 --- a/xen/arch/x86/dom0_build.c +++ b/xen/arch/x86/dom0_build.c @@ -15,6 +15,7 @@ #include <asm/amd.h> #include <asm/bootinfo.h> #include <asm/dom0_build.h> +#include <asm/domain-builder.h> #include <asm/guest.h> #include <asm/hpet.h> #include <asm/hvm/emulate.h> @@ -613,7 +614,7 @@ int __init dom0_setup_permissions(struct domain *d) return rc; } -int __init construct_dom0(const struct boot_domain *bd) +int __init construct_dom0(struct boot_domain *bd) { int rc; const struct domain *d = bd->d; @@ -637,7 +638,7 @@ int __init construct_dom0(const struct boot_domain *bd) opt_dom0_max_vcpus_max = bd->max_vcpus; if ( is_hvm_domain(d) ) - rc = dom0_construct_pvh(bd); + rc = dom_construct_pvh(bd); else if ( is_pv_domain(d) ) rc = dom0_construct_pv(bd); else diff --git a/xen/arch/x86/hvm/Makefile b/xen/arch/x86/hvm/Makefile index 4c1fa5c6c2bf..2c1662b66897 100644 --- a/xen/arch/x86/hvm/Makefile +++ b/xen/arch/x86/hvm/Makefile @@ -5,6 +5,7 @@ obj-y += viridian/ obj-y += asid.o obj-y += dm.o obj-bin-y += dom0_build.init.o +obj-bin-y += dom_build.init.o obj-y += domain.o obj-y += emulate.o obj-$(CONFIG_GRANT_TABLE) += grant_table.o diff --git a/xen/arch/x86/hvm/dom_build.c b/xen/arch/x86/hvm/dom_build.c new file mode 100644 index 000000000000..7206815d64a9 --- /dev/null +++ b/xen/arch/x86/hvm/dom_build.c @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * hvm/dom_build.c + * + * Dom builder for PVH guest. + * + * Copyright (C) 2017 Citrix Systems R&D + * Copyright (C) 2024 Apertus Solutions, LLC + */ + +#include <xen/init.h> + +#include <asm/bootinfo.h> +#include <asm/dom0_build.h> + +int __init dom_construct_pvh(struct boot_domain *bd) +{ + printk(XENLOG_INFO "*** Building a PVH Dom%d ***\n", bd->domid); + + return dom0_construct_pvh(bd); +} + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * tab-width: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/xen/arch/x86/include/asm/domain-builder.h b/xen/arch/x86/include/asm/domain-builder.h index dd47e9ac0dc6..ccfa4bd82acd 100644 --- a/xen/arch/x86/include/asm/domain-builder.h +++ b/xen/arch/x86/include/asm/domain-builder.h @@ -11,4 +11,6 @@ void builder_init(struct boot_info *bi); unsigned int dom_max_vcpus(struct boot_domain *bd); struct vcpu *alloc_dom_vcpu0(struct boot_domain *bd); +int dom_construct_pvh(struct boot_domain *bd); + #endif diff --git a/xen/arch/x86/include/asm/setup.h b/xen/arch/x86/include/asm/setup.h index ac34c698551e..b517da6144de 100644 --- a/xen/arch/x86/include/asm/setup.h +++ b/xen/arch/x86/include/asm/setup.h @@ -27,7 +27,7 @@ void subarch_init_memory(void); void init_IRQ(void); struct boot_domain; -int construct_dom0(const struct boot_domain *bd); +int construct_dom0(struct boot_domain *bd); void setup_io_bitmap(struct domain *d); -- 2.30.2
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |