|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH for-next 3/8] x86/domain: factor out pv_vcpu_destroy
No functional change.
Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
xen/arch/x86/domain.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 96c777c771..ddebff6187 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -479,17 +479,22 @@ int vcpu_initialise(struct vcpu *v)
return rc;
}
-void vcpu_destroy(struct vcpu *v)
+static void pv_vcpu_destroy(struct vcpu *v)
{
- xfree(v->arch.vm_event);
- v->arch.vm_event = NULL;
-
if ( is_pv_32bit_vcpu(v) )
{
free_compat_arg_xlat(v);
release_compat_l4(v);
}
+ xfree(v->arch.pv_vcpu.trap_ctxt);
+}
+
+void vcpu_destroy(struct vcpu *v)
+{
+ xfree(v->arch.vm_event);
+ v->arch.vm_event = NULL;
+
vcpu_destroy_fpu(v);
if ( !is_idle_domain(v->domain) )
@@ -498,8 +503,8 @@ void vcpu_destroy(struct vcpu *v)
if ( is_hvm_vcpu(v) )
hvm_vcpu_destroy(v);
else
- xfree(v->arch.pv_vcpu.trap_ctxt);
-}
+ pv_vcpu_destroy(v);
+ }
static bool emulation_flags_ok(const struct domain *d, uint32_t emflags)
{
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |