[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] x86/hvm: change gethvmcontext_partial error code for offline vcpus



commit 7cbcd02ff302ea558d870ac7b21d30343b695af9
Author:     Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
AuthorDate: Tue Sep 25 16:29:18 2018 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Sep 25 16:29:18 2018 +0200

    x86/hvm: change gethvmcontext_partial error code for offline vcpus
    
    This patch is needed in order to have a different return error for invalid 
vcpu
    and offline vcpu on the per vcpu king.
    
    Signed-off-by: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/arch/x86/hvm/save.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/save.c b/xen/arch/x86/hvm/save.c
index d520898843..0fc59d3487 100644
--- a/xen/arch/x86/hvm/save.c
+++ b/xen/arch/x86/hvm/save.c
@@ -165,7 +165,8 @@ int hvm_save_one(struct domain *d, unsigned int typecode, 
unsigned int instance,
     if ( (rv = hvm_sr_handlers[typecode].save(v, &ctxt)) != 0 )
         printk(XENLOG_G_ERR "HVM%d save: failed to save type %"PRIu16" (%d)\n",
                d->domain_id, typecode, rv);
-    else if ( rv = -ENOENT, ctxt.cur >= sizeof(*desc) )
+    else if ( (rv = hvm_sr_handlers[typecode].kind == HVMSR_PER_VCPU ?
+               -ENODATA : -ENOENT), ctxt.cur >= sizeof(*desc) )
     {
         uint32_t off;
 
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.