switch hypercall restart indication from -EAGAIN to -ERESTART
PATCH 1/1 switch hypercall restart indication from -EAGAIN to -ERESTART
-EAGAIN being a return value we want to return to the actual caller in a couple of cases makes this unsuitable for restart indication, and x86 already developed two cases where -EAGAIN could not be returned as intended due to this (which is being fixed here at once).
xen/arch/arm/domain.c +1 -1
@@ -675,7 +675,7 @@ static int relinquish_memory(struct domaif (hypercall_preempt_check () ) { - ret = -EAGAIN ; + ret = -ERESTART ; goto out; } }
xen/arch/arm/p2m.c +1 -1
@@ -439,7 +439,7 @@ static int apply_p2m_changes(struct domaif (hypercall_preempt_check () ) { p2m->lowest_mapped_gfn = addr >>PAGE_SHIFT ; - rc = -EAGAIN ; + rc = -ERESTART ; goto out; } count =0 ;
xen/arch/x86/domain.c +9 -9
@@ -929,8 +929,8 @@ int arch_set_info_guest(switch ( rc ) {case -EINTR : - rc = -EAGAIN ; -case -EAGAIN : + rc = -ERESTART ; +case -ERESTART :case 0 :break ;default :
@@ -957,8 +957,8 @@ int arch_set_info_guest(switch ( rc ) {case -EINTR : - rc = -EAGAIN ; -case -EAGAIN : + rc = -ERESTART ; +case -ERESTART : v->arch.old_guest_table =pagetable_get_page (v->arch.guest_table); v->arch.guest_table =pagetable_null ();
@@ -1808,9 +1808,9 @@ static int relinquish_memory( {case 0 :break ; -case -EAGAIN : +case -ERESTART :case -EINTR : - ret = -EAGAIN ; + ret = -ERESTART ;page_list_add (page, list);set_bit (_PGT_pinned, &page->u.inuse.type_info);put_page (page);
@@ -1855,9 +1855,9 @@ static int relinquish_memory(if ( x & PGT_partial )put_page (page);put_page (page); - ret = -EAGAIN ; + ret = -ERESTART ; goto out; -case -EAGAIN : +case -ERESTART :page_list_add (page, list); page->u.inuse.type_info |= PGT_partial;if ( x & PGT_partial )
@@ -1881,7 +1881,7 @@ static int relinquish_memory(if (hypercall_preempt_check () ) { - ret = -EAGAIN ; + ret = -ERESTART ; goto out; } }
xen/arch/x86/hvm/hvm.c +7 -7
@@ -4446,7 +4446,7 @@ static int hvmop_flush_tlb_all(void)/* Avoid deadlock if more than one vcpu tries this at the same time. */ if ( !spin_trylock (&d->hypercall_deadlock_mutex) ) -return -EAGAIN ; +return -ERESTART ;/* Pause all other vcpus. */ for_each_vcpu ( d, v )
@@ -4554,7 +4554,7 @@ long do_hvm_op(unsigned long op, XEN_GUE* All foreign updates to guest state must synchronise on * the domctl_lock. */ - rc = -EAGAIN ; + rc = -ERESTART ;if ( !domctl_lock_acquire () )break ;
@@ -4816,7 +4816,7 @@ long do_hvm_op(unsigned long op, XEN_GUEif ( a.nr > ++start_iter && !(start_iter & HVMOP_op_mask) &&hypercall_preempt_check () ) { - rc = -EAGAIN ; + rc = -ERESTART ;break ; } }
@@ -4916,13 +4916,13 @@ long do_hvm_op(unsigned long op, XEN_GUE {put_gfn (d, pfn);p2m_mem_paging_populate (d, pfn); - rc = -EINVAL ;/* XXX EAGAIN */ + rc = -EAGAIN ; goto param_fail4; }if (p2m_is_shared (t) ) {put_gfn (d, pfn); - rc = -EINVAL ;/* XXX EAGAIN */ + rc = -EAGAIN ; goto param_fail4; } if ( !p2m_is_ram(t) &&
@@ -4941,7 +4941,7 @@ long do_hvm_op(unsigned long op, XEN_GUEif ( a.nr > ++start_iter && !(start_iter & HVMOP_op_mask) &&hypercall_preempt_check () ) { - rc = -EAGAIN ; + rc = -ERESTART ; goto param_fail4; } }
@@ -5056,7 +5056,7 @@ long do_hvm_op(unsigned long op, XEN_GUE } } -if ( rc == -EAGAIN ) +if ( rc == -ERESTART ) {ASSERT (!(start_iter & HVMOP_op_mask)); rc = hypercall_create_continuation(__HYPERVISOR_hvm_op, "lh",
xen/arch/x86/hvm/svm/svm.c +1 -1
@@ -1827,7 +1827,7 @@ static int svm_msr_write_intercept(unsigswitch (wrmsr_hypervisor_regs (msr, msr_content) ) { -case -EAGAIN : +case -ERESTART : result =X86EMUL_RETRY ;break ;case 0 :
xen/arch/x86/hvm/vmx/vmx.c +1 -1
@@ -2289,7 +2289,7 @@ static int vmx_msr_write_intercept(unsig !is_last_branch_msr(msr) )switch (wrmsr_hypervisor_regs (msr, msr_content) ) { -case -EAGAIN : +case -ERESTART :return X86EMUL_RETRY ;case 0 :case 1 :
xen/arch/x86/mm.c +37 -37
254 lines not on this page · raw message
xen/arch/x86/mm/mem_sharing.c +1 -1
@@ -1297,7 +1297,7 @@ int relinquish_shared_pages(struct domaiif (hypercall_preempt_check () ) { p2m->next_shared_gfn_to_relinquish = gfn +1 ; - rc = -EAGAIN ; + rc = -ERESTART ;break ; } count =0 ;
xen/arch/x86/mm/p2m-pod.c +2 -2
@@ -245,7 +245,7 @@ p2m_pod_set_cache_target(struct p2m_domaif ( preemptible && pod_target != p2m->pod.count &&hypercall_preempt_check () ) { - ret = -EAGAIN ; + ret = -ERESTART ; goto out; } }
@@ -290,7 +290,7 @@ p2m_pod_set_cache_target(struct p2m_domaif ( preemptible && pod_target != p2m->pod.count &&hypercall_preempt_check () ) { - ret = -EAGAIN ; + ret = -ERESTART ; goto out; } }
xen/arch/x86/traps.c +2 -2
@@ -650,7 +650,7 @@ int wrmsr_hypervisor_regs(uint32_t idx,if (p2m_is_paging (t) ) {p2m_mem_paging_populate (d, gmfn); -return -EAGAIN ; +return -ERESTART ; } gdprintk(XENLOG_WARNING,
@@ -2354,7 +2354,7 @@ static int emulate_privileged_op(struct {case 0 :break ; -case -EAGAIN :/* retry after preemption */ +case -ERESTART :/* retry after preemption */ goto skip;default :/* not okay */ goto fail;
xen/common/compat/domain.c +1 -1
@@ -58,7 +58,7 @@ int compat_vcpu_op(int cmd, int vcpuid, rc = v->is_initialised ? -EEXIST :arch_set_info_guest (v, cmp_ctxt);domain_unlock (d); -if ( rc == -EAGAIN ) +if ( rc == -ERESTART ) rc =hypercall_create_continuation (__HYPERVISOR_vcpu_op,"iih" , cmd, vcpuid, arg);
xen/common/domain.c +3 -1
@@ -590,6 +590,8 @@ int domain_kill(struct domain *d) rc =domain_relinquish_resources (d);if ( rc !=0 ) { +if ( rc == -ERESTART ) + rc = -EAGAIN ;BUG_ON (rc != -EAGAIN );break ; }
@@ -1067,7 +1069,7 @@ long do_vcpu_op(int cmd, int vcpuid, XENfree_vcpu_guest_context (ctxt); -if ( rc == -EAGAIN ) +if ( rc == -ERESTART ) rc =hypercall_create_continuation (__HYPERVISOR_vcpu_op,"iih" , cmd, vcpuid, arg);
xen/common/domctl.c +2 -2
@@ -342,7 +342,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xeif (guest_handle_is_null (op->u.vcpucontext.ctxt) ) { ret =vcpu_reset (v); -if ( ret == -EAGAIN ) +if ( ret == -ERESTART ) ret =hypercall_create_continuation ( __HYPERVISOR_domctl,"h" , u_domctl);break ;
@@ -374,7 +374,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xe ret =arch_set_info_guest (v, c);domain_unpause (d); -if ( ret == -EAGAIN ) +if ( ret == -ERESTART ) ret =hypercall_create_continuation ( __HYPERVISOR_domctl,"h" , u_domctl); }
xen/include/asm-x86/mm.h +1 -1
@@ -125,7 +125,7 @@ struct page_info* PGT_partial gets set, and it must be dropped when the flag gets * cleared. This is so that a get() leaving a page in partially * validated state (where the caller would drop the reference acquired -* due to the getting of the type [apparently] failing [-EAGAIN]) +* due to the getting of the type [apparently] failing [-ERESTART]) * would not accidentally result in a page left with zero general * reference count, but non-zero type reference count (possible when * the partial get() is followed immediately by domain destruction).
switch hypercall restart indication from -EAGAIN to -ERESTART
-EAGAIN being a return value we want to return to the actual caller in a couple of cases makes this unsuitable for restart indication, and x86 already developed two cases where -EAGAIN could not be returned as intended due to this (which is being fixed here at once).
xen/arch/arm/domain.c +1 -1
@@ -675,7 +675,7 @@ static int relinquish_memory(struct domaif (hypercall_preempt_check () ) { - ret = -EAGAIN ; + ret = -ERESTART ; goto out; } }
xen/arch/arm/p2m.c +1 -1
@@ -439,7 +439,7 @@ static int apply_p2m_changes(struct domaif (hypercall_preempt_check () ) { p2m->lowest_mapped_gfn = addr >>PAGE_SHIFT ; - rc = -EAGAIN ; + rc = -ERESTART ; goto out; } count =0 ;
xen/arch/x86/domain.c +9 -9
@@ -929,8 +929,8 @@ int arch_set_info_guest(switch ( rc ) {case -EINTR : - rc = -EAGAIN ; -case -EAGAIN : + rc = -ERESTART ; +case -ERESTART :case 0 :break ;default :
@@ -957,8 +957,8 @@ int arch_set_info_guest(switch ( rc ) {case -EINTR : - rc = -EAGAIN ; -case -EAGAIN : + rc = -ERESTART ; +case -ERESTART : v->arch.old_guest_table =pagetable_get_page (v->arch.guest_table); v->arch.guest_table =pagetable_null ();
@@ -1808,9 +1808,9 @@ static int relinquish_memory( {case 0 :break ; -case -EAGAIN : +case -ERESTART :case -EINTR : - ret = -EAGAIN ; + ret = -ERESTART ;page_list_add (page, list);set_bit (_PGT_pinned, &page->u.inuse.type_info);put_page (page);
@@ -1855,9 +1855,9 @@ static int relinquish_memory(if ( x & PGT_partial )put_page (page);put_page (page); - ret = -EAGAIN ; + ret = -ERESTART ; goto out; -case -EAGAIN : +case -ERESTART :page_list_add (page, list); page->u.inuse.type_info |= PGT_partial;if ( x & PGT_partial )
@@ -1881,7 +1881,7 @@ static int relinquish_memory(if (hypercall_preempt_check () ) { - ret = -EAGAIN ; + ret = -ERESTART ; goto out; } }
xen/arch/x86/hvm/hvm.c +7 -7
@@ -4446,7 +4446,7 @@ static int hvmop_flush_tlb_all(void)/* Avoid deadlock if more than one vcpu tries this at the same time. */ if ( !spin_trylock (&d->hypercall_deadlock_mutex) ) -return -EAGAIN ; +return -ERESTART ;/* Pause all other vcpus. */ for_each_vcpu ( d, v )
@@ -4554,7 +4554,7 @@ long do_hvm_op(unsigned long op, XEN_GUE* All foreign updates to guest state must synchronise on * the domctl_lock. */ - rc = -EAGAIN ; + rc = -ERESTART ;if ( !domctl_lock_acquire () )break ;
@@ -4816,7 +4816,7 @@ long do_hvm_op(unsigned long op, XEN_GUEif ( a.nr > ++start_iter && !(start_iter & HVMOP_op_mask) &&hypercall_preempt_check () ) { - rc = -EAGAIN ; + rc = -ERESTART ;break ; } }
@@ -4916,13 +4916,13 @@ long do_hvm_op(unsigned long op, XEN_GUE {put_gfn (d, pfn);p2m_mem_paging_populate (d, pfn); - rc = -EINVAL ;/* XXX EAGAIN */ + rc = -EAGAIN ; goto param_fail4; }if (p2m_is_shared (t) ) {put_gfn (d, pfn); - rc = -EINVAL ;/* XXX EAGAIN */ + rc = -EAGAIN ; goto param_fail4; } if ( !p2m_is_ram(t) &&
@@ -4941,7 +4941,7 @@ long do_hvm_op(unsigned long op, XEN_GUEif ( a.nr > ++start_iter && !(start_iter & HVMOP_op_mask) &&hypercall_preempt_check () ) { - rc = -EAGAIN ; + rc = -ERESTART ; goto param_fail4; } }
@@ -5056,7 +5056,7 @@ long do_hvm_op(unsigned long op, XEN_GUE } } -if ( rc == -EAGAIN ) +if ( rc == -ERESTART ) {ASSERT (!(start_iter & HVMOP_op_mask)); rc = hypercall_create_continuation(__HYPERVISOR_hvm_op, "lh",
xen/arch/x86/hvm/svm/svm.c +1 -1
@@ -1827,7 +1827,7 @@ static int svm_msr_write_intercept(unsigswitch (wrmsr_hypervisor_regs (msr, msr_content) ) { -case -EAGAIN : +case -ERESTART : result =X86EMUL_RETRY ;break ;case 0 :
xen/arch/x86/hvm/vmx/vmx.c +1 -1
@@ -2289,7 +2289,7 @@ static int vmx_msr_write_intercept(unsig !is_last_branch_msr(msr) )switch (wrmsr_hypervisor_regs (msr, msr_content) ) { -case -EAGAIN : +case -ERESTART :return X86EMUL_RETRY ;case 0 :case 1 :
xen/arch/x86/mm.c +37 -37
254 lines not on this page · raw message
xen/arch/x86/mm/mem_sharing.c +1 -1
@@ -1297,7 +1297,7 @@ int relinquish_shared_pages(struct domaiif (hypercall_preempt_check () ) { p2m->next_shared_gfn_to_relinquish = gfn +1 ; - rc = -EAGAIN ; + rc = -ERESTART ;break ; } count =0 ;
xen/arch/x86/mm/p2m-pod.c +2 -2
@@ -245,7 +245,7 @@ p2m_pod_set_cache_target(struct p2m_domaif ( preemptible && pod_target != p2m->pod.count &&hypercall_preempt_check () ) { - ret = -EAGAIN ; + ret = -ERESTART ; goto out; } }
@@ -290,7 +290,7 @@ p2m_pod_set_cache_target(struct p2m_domaif ( preemptible && pod_target != p2m->pod.count &&hypercall_preempt_check () ) { - ret = -EAGAIN ; + ret = -ERESTART ; goto out; } }
xen/arch/x86/traps.c +2 -2
@@ -650,7 +650,7 @@ int wrmsr_hypervisor_regs(uint32_t idx,if (p2m_is_paging (t) ) {p2m_mem_paging_populate (d, gmfn); -return -EAGAIN ; +return -ERESTART ; } gdprintk(XENLOG_WARNING,
@@ -2354,7 +2354,7 @@ static int emulate_privileged_op(struct {case 0 :break ; -case -EAGAIN :/* retry after preemption */ +case -ERESTART :/* retry after preemption */ goto skip;default :/* not okay */ goto fail;
xen/common/compat/domain.c +1 -1
@@ -58,7 +58,7 @@ int compat_vcpu_op(int cmd, int vcpuid, rc = v->is_initialised ? -EEXIST :arch_set_info_guest (v, cmp_ctxt);domain_unlock (d); -if ( rc == -EAGAIN ) +if ( rc == -ERESTART ) rc =hypercall_create_continuation (__HYPERVISOR_vcpu_op,"iih" , cmd, vcpuid, arg);
xen/common/domain.c +3 -1
@@ -590,6 +590,8 @@ int domain_kill(struct domain *d) rc =domain_relinquish_resources (d);if ( rc !=0 ) { +if ( rc == -ERESTART ) + rc = -EAGAIN ;BUG_ON (rc != -EAGAIN );break ; }
@@ -1067,7 +1069,7 @@ long do_vcpu_op(int cmd, int vcpuid, XENfree_vcpu_guest_context (ctxt); -if ( rc == -EAGAIN ) +if ( rc == -ERESTART ) rc =hypercall_create_continuation (__HYPERVISOR_vcpu_op,"iih" , cmd, vcpuid, arg);
xen/common/domctl.c +2 -2
@@ -342,7 +342,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xeif (guest_handle_is_null (op->u.vcpucontext.ctxt) ) { ret =vcpu_reset (v); -if ( ret == -EAGAIN ) +if ( ret == -ERESTART ) ret =hypercall_create_continuation ( __HYPERVISOR_domctl,"h" , u_domctl);break ;
@@ -374,7 +374,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xe ret =arch_set_info_guest (v, c);domain_unpause (d); -if ( ret == -EAGAIN ) +if ( ret == -ERESTART ) ret =hypercall_create_continuation ( __HYPERVISOR_domctl,"h" , u_domctl); }
xen/include/asm-x86/mm.h +1 -1
@@ -125,7 +125,7 @@ struct page_info* PGT_partial gets set, and it must be dropped when the flag gets * cleared. This is so that a get() leaving a page in partially * validated state (where the caller would drop the reference acquired -* due to the getting of the type [apparently] failing [-EAGAIN]) +* due to the getting of the type [apparently] failing [-ERESTART]) * would not accidentally result in a page left with zero general * reference count, but non-zero type reference count (possible when * the partial get() is followed immediately by domain destruction).
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 6 lines · Jan Beulich
-EAGAINbeing a return value we want to return to the actual caller in a couple of cases makes this unsuitable for restart indication, and x86 already developed two cases where-EAGAINcould not be returned as intended due to this (which is being fixed here at once).Signed-off-by Jan Beulich <[email protected]>
Two comments:
I notice some existing ERESTART's in xen/drivers/passthrough/iommu.c -- is that a problem or do the adjustments here take that into account?
This struck me as odd:
xen/common/domain.c int domain_kill(struct domain *d) · line 594
Quoted 6 lines
xen/common/domain.c +2
-0@@ -590,6 +590,8 @@ int domain_kill(struct domain *d) rc =domain_relinquish_resources (d);if ( rc !=0 ) { +if ( rc == -ERESTART ) + rc = -EAGAIN ;
until I realised that you intended for ERESTART to only be used internally within the hypervisor and not to be exposed to the guest. Perhaps insert the word "internal" into the Subject?
Ian.
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 12.05.14 at 16:13, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich
-EAGAINbeing a return value we want to return to the actual caller in a couple of cases makes this unsuitable for restart indication, and x86 already developed two cases where-EAGAINcould not be returned as intended due to this (which is being fixed here at once).
Quoted 8 lines
Quoted 1 line
Signed-off-by Jan Beulich <[email protected]>Two comments:
I notice some existing ERESTART's in
xen/drivers/passthrough/iommu.c-- is that a problem or do the adjustments here take that into account?
Yes, these were independent of the other call trees and hence I already used to new error code there when adding that code.
Quoted 12 lines
This struck me as odd:
xen/common/domain.c int domain_kill(struct domain *d) · line 594
Quoted 6 lines
xen/common/domain.c +2
-0@@ -590,6 +590,8 @@ int domain_kill(struct domain *d) rc =domain_relinquish_resources (d);if ( rc !=0 ) { +if ( rc == -ERESTART ) + rc = -EAGAIN ;until I realised that you intended for ERESTART to only be used internally within the hypervisor and not to be exposed to the guest. Perhaps insert the word "internal" into the Subject?
Good idea, done.
Jan
Quoted 12 lines · Jan Beulich
-EAGAINbeing a return value we want to return to the actual caller in a couple of cases makes this unsuitable for restart indication, and x86 already developed two cases where-EAGAINcould not be returned as intended due to this (which is being fixed here at once).Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/hvm/svm/svm.c static int svm_msr_write_intercept(unsig · line 1833
Quoted 8 lines
xen/arch/x86/hvm/svm/svm.c +1
-1@@ -1827,7 +1827,7 @@ static int svm_msr_write_intercept(unsigswitch (wrmsr_hypervisor_regs (msr, msr_content) ) { -case -EAGAIN : +case -ERESTART : result =X86EMUL_RETRY ;break ;case 0 :
Quoted 6 lines · Jan Beulich
-EAGAINbeing a return value we want to return to the actual caller in a couple of cases makes this unsuitable for restart indication, and x86 already developed two cases where-EAGAINcould not be returned as intended due to this (which is being fixed here at once).Signed-off-by Jan Beulich <[email protected]>
Definitely an improvement on what's there, so:
Some of the paths are a bit complex now, e.g. a preemption point being reported as EINTR by __put_page_type(), translated to ERESTART by relinquish_memory(), then to EAGAIN by domain_kill().
Are there cases where we want to return EINTR to the guest, or could we maybe use it everywhere and drop ERESTART?
Tim.
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 15.05.14 at 13:24, <[email protected]> wrote:
Some of the paths are a bit complex now, e.g. a preemption point being reported as EINTR by
__put_page_type(), translated to ERESTART byrelinquish_memory(), then to EAGAIN bydomain_kill().
That second conversion I expect to go away anyway - we shouldn't really rely on the tools to do the hypercall re-invocations. I've got this as part of another domctl/XSA-77 follow-up patch already.
Quoted 2 lines
Are there cases where we want to return EINTR to the guest, or could we maybe use it everywhere and drop ERESTART?
No, we need two distinct error codes on these paths. For now we never need to return -EINTR to the guest (and for now I also can't see when/why we would), but we'd have to convert these too should the need arise.
Jan
Quoted 8 lines · Jan Beulich
Quoted 4 lines
Quoted 1 line
Quoted 1 line · On 15.05.14 at 13:24, <[email protected]> wrote:
Some of the paths are a bit complex now, e.g. a preemption point being reported as EINTR by
__put_page_type(), translated to ERESTART byrelinquish_memory(), then to EAGAIN bydomain_kill().That second conversion I expect to go away anyway - we shouldn't really rely on the tools to do the hypercall re-invocations. I've got this as part of another domctl/XSA-77 follow-up patch already.
OK.
Quoted 7 lines
Quoted 2 lines
Are there cases where we want to return EINTR to the guest, or could we maybe use it everywhere and drop ERESTART?
No, we need two distinct error codes on these paths. For now we never need to return
-EINTRto the guest (and for now I also can't see when/why we would), but we'd have to convert these too should the need arise.
I didn't really understand that. Do you mean that there's a reason to have both EINTR and ERESTART even though we don't return EINTR to guests, or that you want to keep them separate in case we ever do want to return EINTR?
Tim.
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 15.05.14 at 14:01, <[email protected]> wrote:
Quoted 8 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 15.05.14 at 13:24, <[email protected]> wrote:
Are there cases where we want to return EINTR to the guest, or could we maybe use it everywhere and drop ERESTART?
No, we need two distinct error codes on these paths. For now we never need to return
-EINTRto the guest (and for now I also can't see when/why we would), but we'd have to convert these too should the need arise.
Quoted 4 lines
I didn't really understand that. Do you mean that there's a reason to have both EINTR and ERESTART even though we don't return EINTR to guests, or that you want to keep them separate in case we ever do want to return EINTR?
The former.
Jan
Quoted 11 lines · Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 15.05.14 at 14:01, <[email protected]> wrote:
Quoted 8 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 15.05.14 at 13:24, <[email protected]> wrote:
Are there cases where we want to return EINTR to the guest, or could we maybe use it everywhere and drop ERESTART?
No, we need two distinct error codes on these paths. For now we never need to return
-EINTRto the guest (and for now I also can't see when/why we would), but we'd have to convert these too should the need arise.
Quoted 6 lines
Quoted 4 lines
I didn't really understand that. Do you mean that there's a reason to have both EINTR and ERESTART even though we don't return EINTR to guests, or that you want to keep them separate in case we ever do want to return EINTR?
The former.
OK, thanks.
Tim.