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

Re: xen | Failed pipeline for staging | 6a47ba2f



On Sat, 29 Apr 2023, Stefano Stabellini wrote:
> Your guess was correct. I have done more bisecting today. The culprit is
> the following commit (I reverted only this commit and ran 25 tests
> successfully, usually it fails in less than 5):
> 
> e522c98c3    tools: Refactor console/io.c to avoid using xc_domain_getinfo()

I did more debugging. One problem seems to be that
XEN_SYSCTL_getdomaininfolist is buggy in the hypervisor. The field
u.getdomaininfolist.num_domains is not copied back to the guest. It
doesn't look like the hypercall would behave well for more than 1 guest.
I am appending the fix.

This is not sufficient to fix the failure. On a hunch, I made this
change:


        /* Fetch info on every valid domain except for dom0 */
-       ret = xc_domain_getinfolist(xc, 1, DOMID_FIRST_RESERVED - 1, 
domaininfo);
+       ret = xc_domain_getinfolist(xc, 1, 10, domaininfo);
        if (ret < 0)
                return;
 
With it, everything works. I have run out of time today for my
investigation.


I would like to take the opportunity to highlight that gitlab-ci did a
very good job spotting an issue. I am glad we are starting to reap the
benefits of all the hard work we put into it.

Cheers,

Stefano

---
xen: fix broken XEN_SYSCTL_getdomaininfolist hypercall

XEN_SYSCTL_getdomaininfolist doesn't actually update the guest
num_domains field, only its local copy. Fix that.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxx>

diff --git a/xen/common/sysctl.c b/xen/common/sysctl.c
index 02505ab044..0e1097be96 100644
--- a/xen/common/sysctl.c
+++ b/xen/common/sysctl.c
@@ -107,10 +107,8 @@ long do_sysctl(XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) 
u_sysctl)
         
         rcu_read_unlock(&domlist_read_lock);
         
-        if ( ret != 0 )
-            break;
-        
         op->u.getdomaininfolist.num_domains = num_domains;
+        __copy_field_to_guest(u_sysctl, op, u.getdomaininfolist.num_domains);
     }
     break;
 



 


Rackspace

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