On Wed, 2015-12-16 at 14:55 +0000, Stefano Stabellini wrote:
> On Wed, 9 Dec 2015, Ian Campbell wrote:
> > XXX TBD No support for arm64 (or even 32-bit guest on arm64).
> > XXX In particular the handling of save/restore of VFP state doesn't
> > XXX even compile for arm32. I need to investigate the best way to
> > XXX reflect the differing possible VFB states in the save record.
> > 
> > Signed-off-by: Ian Campbell <ian.campb...@citrix.com>
> > ---
> >  xen/arch/arm/hvm.c                     | 167
> > +++++++++++++++++++++++++++++++++
> >  xen/include/public/arch-arm/hvm/save.h |  38 +++++++-
> >  2 files changed, 204 insertions(+), 1 deletion(-)
> > 
> > diff --git a/xen/arch/arm/hvm.c b/xen/arch/arm/hvm.c
> > index 5fd0753..3c59e63 100644
> > --- a/xen/arch/arm/hvm.c
> > +++ b/xen/arch/arm/hvm.c
> > @@ -7,6 +7,7 @@
> >  
> >  #include <xsm/xsm.h>
> >  
> > +#include <xen/hvm/save.h>
> >  #include <public/xen.h>
> >  #include <public/hvm/params.h>
> >  #include <public/hvm/hvm_op.h>
> > @@ -65,3 +66,169 @@ long do_hvm_op(unsigned long op,
> > XEN_GUEST_HANDLE_PARAM(void) arg)
> >  
> >      return rc;
> >  }
> > +
> > +static int cpu_save(struct domain *d, hvm_domain_context_t *h)
> > +{
> > +    struct hvm_hw_cpu ctxt;
> > +    struct vcpu *v;
> 
> I wonder whether we could refactor the code to share the same underlying
> function between cpu_save and ctxt_switch_from.

One is writing to a public ABI struct (or at least a semi-public ABI) while
the other is completely internal. Other than exposing the internal struct
or use of MACROS I'm not sure it would be possible.



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to