* [PATCH v1] x86/hvm: Change return error for offline vcpus
@ 2018-09-20 12:54 Alexandru Isaila
2018-09-20 13:55 ` Jan Beulich
0 siblings, 1 reply; 3+ messages in thread
From: Alexandru Isaila @ 2018-09-20 12:54 UTC (permalink / raw)
To: xen-devel; +Cc: Alexandru Isaila, andrew.cooper3, wei.liu2, jbeulich
This patch is needed in order to have a different return error for invalid vcpu
and offline vcpu.
Signed-off-by: Alexandru Isaila <aisaila@bitdefender.com>
---
xen/arch/x86/hvm/save.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/hvm/save.c b/xen/arch/x86/hvm/save.c
index d520898843..465eb82bc6 100644
--- a/xen/arch/x86/hvm/save.c
+++ b/xen/arch/x86/hvm/save.c
@@ -165,7 +165,7 @@ 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 = -ENODATA, ctxt.cur >= sizeof(*desc) )
{
uint32_t off;
--
2.17.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] x86/hvm: Change return error for offline vcpus
2018-09-20 12:54 [PATCH v1] x86/hvm: Change return error for offline vcpus Alexandru Isaila
@ 2018-09-20 13:55 ` Jan Beulich
2018-09-20 14:26 ` Isaila Alexandru
0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2018-09-20 13:55 UTC (permalink / raw)
To: aisaila; +Cc: Andrew Cooper, Wei Liu, xen-devel
>>> On 20.09.18 at 14:54, <aisaila@bitdefender.com> wrote:
> --- a/xen/arch/x86/hvm/save.c
> +++ b/xen/arch/x86/hvm/save.c
> @@ -165,7 +165,7 @@ 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 = -ENODATA, ctxt.cur >= sizeof(*desc) )
I think this change of error code should once again only be done
for HVMSR_PER_VCPU kind records. For the others no data
appearing is _the_ indication of the instance not existing.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] x86/hvm: Change return error for offline vcpus
2018-09-20 13:55 ` Jan Beulich
@ 2018-09-20 14:26 ` Isaila Alexandru
0 siblings, 0 replies; 3+ messages in thread
From: Isaila Alexandru @ 2018-09-20 14:26 UTC (permalink / raw)
To: Jan Beulich; +Cc: Andrew Cooper, Wei Liu, xen-devel
On Thu, 2018-09-20 at 07:55 -0600, Jan Beulich wrote:
> > > > On 20.09.18 at 14:54, <aisaila@bitdefender.com> wrote:
> >
> > --- a/xen/arch/x86/hvm/save.c
> > +++ b/xen/arch/x86/hvm/save.c
> > @@ -165,7 +165,7 @@ 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 = -ENODATA, ctxt.cur >= sizeof(*desc) )
>
> I think this change of error code should once again only be done
> for HVMSR_PER_VCPU kind records. For the others no data
> appearing is _the_ indication of the instance not existing.
>
Ok, I will add a conditional for this inside the if()
Thanks,
Alex
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-20 14:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-20 12:54 [PATCH v1] x86/hvm: Change return error for offline vcpus Alexandru Isaila
2018-09-20 13:55 ` Jan Beulich
2018-09-20 14:26 ` Isaila Alexandru
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.