From: Jan Kiszka <[email protected]>

On x86, arch_shutdown now only contains preparation steps that all have
to be called prior to issuing the shutdown to units. Rename the function
and also the iommu service it calls on x86 to reflect that. ARM and
ARM64 do not use it, thus is unaffected by this.

No functional changes.

Signed-off-by: Jan Kiszka <[email protected]>
---
 hypervisor/arch/arm-common/control.c    | 2 +-
 hypervisor/arch/x86/amd_iommu.c         | 2 +-
 hypervisor/arch/x86/control.c           | 5 ++---
 hypervisor/arch/x86/include/asm/iommu.h | 2 +-
 hypervisor/arch/x86/vtd.c               | 2 +-
 hypervisor/control.c                    | 2 +-
 hypervisor/include/jailhouse/control.h  | 4 ++--
 7 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/hypervisor/arch/arm-common/control.c 
b/hypervisor/arch/arm-common/control.c
index 4d3abd252..643c35e92 100644
--- a/hypervisor/arch/arm-common/control.c
+++ b/hypervisor/arch/arm-common/control.c
@@ -238,6 +238,6 @@ void __attribute__((noreturn)) arch_panic_stop(void)
 void arch_panic_park(void) __attribute__((alias("arm_cpu_park")));
 #endif
 
-void arch_shutdown(void)
+void arch_prepare_shutdown(void)
 {
 }
diff --git a/hypervisor/arch/x86/amd_iommu.c b/hypervisor/arch/x86/amd_iommu.c
index 6a86a38c6..a16593a30 100644
--- a/hypervisor/arch/x86/amd_iommu.c
+++ b/hypervisor/arch/x86/amd_iommu.c
@@ -713,7 +713,7 @@ int iommu_map_interrupt(struct cell *cell, u16 device_id, 
unsigned int vector,
        return -ENOSYS;
 }
 
-void iommu_shutdown(void)
+void iommu_prepare_shutdown(void)
 {
        struct amd_iommu *iommu;
        u64 ctrl_reg;
diff --git a/hypervisor/arch/x86/control.c b/hypervisor/arch/x86/control.c
index 3222b1080..7cc489f09 100644
--- a/hypervisor/arch/x86/control.c
+++ b/hypervisor/arch/x86/control.c
@@ -121,11 +121,10 @@ void arch_config_commit(struct cell *cell_added_removed)
        ioapic_config_commit(cell_added_removed);
 }
 
-void arch_shutdown(void)
+void arch_prepare_shutdown(void)
 {
        ioapic_prepare_handover();
-
-       iommu_shutdown();
+       iommu_prepare_shutdown();
 }
 
 void arch_suspend_cpu(unsigned int cpu_id)
diff --git a/hypervisor/arch/x86/include/asm/iommu.h 
b/hypervisor/arch/x86/include/asm/iommu.h
index b667576d3..24b3fceb2 100644
--- a/hypervisor/arch/x86/include/asm/iommu.h
+++ b/hypervisor/arch/x86/include/asm/iommu.h
@@ -49,7 +49,7 @@ void iommu_cell_exit(struct cell *cell);
 
 void iommu_config_commit(struct cell *cell_added_removed);
 
-void iommu_shutdown(void);
+void iommu_prepare_shutdown(void);
 
 struct per_cpu *iommu_select_fault_reporting_cpu(void);
 void iommu_check_pending_faults(void);
diff --git a/hypervisor/arch/x86/vtd.c b/hypervisor/arch/x86/vtd.c
index 067b327e6..df537cb5f 100644
--- a/hypervisor/arch/x86/vtd.c
+++ b/hypervisor/arch/x86/vtd.c
@@ -1086,7 +1086,7 @@ static void vtd_restore_ir(unsigned int unit_no, void 
*reg_base)
                             unit->fault_event_regs[n]);
 }
 
-void iommu_shutdown(void)
+void iommu_prepare_shutdown(void)
 {
        void *reg_base = dmar_reg_base;
        unsigned int n;
diff --git a/hypervisor/control.c b/hypervisor/control.c
index 889457653..858ffc745 100644
--- a/hypervisor/control.c
+++ b/hypervisor/control.c
@@ -706,7 +706,7 @@ void shutdown(void)
        struct unit *unit;
 
        pci_prepare_handover();
-       arch_shutdown();
+       arch_prepare_shutdown();
 
        for_each_unit_reverse(unit)
                unit->shutdown();
diff --git a/hypervisor/include/jailhouse/control.h 
b/hypervisor/include/jailhouse/control.h
index 274dc6420..de3836285 100644
--- a/hypervisor/include/jailhouse/control.h
+++ b/hypervisor/include/jailhouse/control.h
@@ -271,9 +271,9 @@ void arch_cell_reset(struct cell *cell);
 void arch_config_commit(struct cell *cell_added_removed);
 
 /**
- * Shutdown architecture-specific subsystems while disabling the hypervisor.
+ * Architecture-specific preparations before shutting down the hypervisor.
  */
-void arch_shutdown(void);
+void arch_prepare_shutdown(void);
 
 /**
  * Performs the architecture-specifc steps to stop the current CPU on panic.
-- 
2.13.6

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to