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

[PATCH v2 0/6] allow xc_domain_maximum_gpfn() to observe full GFN value


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 22 Jun 2021 17:16:21 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5BzWviYvjy6fMCruQkIalETkiPlSQqLj37o2AeMY5ns=; b=g2lUkJRa4D030nYh90wVpAXUywPggepsh/4lZEf35I+cl3PJavNRL/4+kVDZsD1BPZaxU30O1VlEMckKY1ylaKLgfaPrmx95rS6uhinNibpDVDoIENaSv2BY/T2yh+hTA1wkpSJwTD2f3C9j3wkdfJBO4VeUViYJg++4myTB9Rp/WCNemqxUNY2AeNV1WbdvnNaI8sviW4f+nTFSFjBa7/ihbGIXZUV1FzilIu+ffjUG0nxQTShHofxr4kMw5TBaA5Ug/XiEiM4BN22vjMgfARop2yRv/FyXmmux1zUx11xQcj0XfRoLsrm+QEIn2qm+JLatIHQ9LuXtUAbfLgWRLg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U5JkWPuV7XEm6WzlRcKfCsSTv+8JrNsq9m0fAxRm4ZvRLyr+OoA9hdZ6pbZ/UepQVkVkTZzFO0rhp2ZKmMn7HtgcCjuOG2Y9M6QywmtiszaaMBKztd45lGrL0U9TEOnhnCU3+xwc45yrzD3BtVyIjSMFVSjFHAKjqM9YSPf5qQ/TFenixAK21W6LRovXfYMpL1DhhAMefXaXzx4b2pX/9e1efbdPS//2s0GChLKb2vG/lvqNJN0zE4op/PWk5CWxEpBcoEQ0SdmxG6zVBUJGgDKt6tX6etxl5Vf3xcVtyO7O6hAKceqcG3baNyzjCcqftbajTccKSjIAF+nex95T/g==
  • Authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>
  • Delivery-date: Tue, 22 Jun 2021 15:16:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The present remaining osstest failures are due to truncation of the GFN
resulting from the hypercall return value being passed back through the
ioctl() return value (on Linux and Solaris), which is "int", plus the
same for some further internal interfaces (osdep_hypercall(),
xencall<N>()). Some of the memory-op sub-ops, like the one involved
here, may pass back values which don't fit into "int".

Different effects can be observed with a 32- and 64-bit tool stack,
each causing one test to fail. The changes here will only deal with
the truncation resulting when sizeof(int) < sizeof(long), i.e. only on
64-bit. For the 32-bit tool stack case to work in such a situation,
yet uglier hackery would be needed. But even if the full value got
passed back, we'd then hit:

#ifdef __i386__
    /* Very large domains (> 1TB) will exhaust virtual address space. */
    if ( nr_pfns > 0x0fffffff )
    {
        errno = E2BIG;
        PERROR("Cannot save this big a guest");
        return -1;
    }
#endif

in xg_sr_save_x86_hvm.c:x86_hvm_setup() (and there's a similar check
on the restore path).

I wonder in how far a guest property can legitimately cause an osstest
push to be prevented by causing a failure like this one. And of course
I'm also puzzled by the ovmf change having managed to make it through
its push gate.

Note that I can't tell at this point whether there aren't further
issues, as I've not actually tried the ovmf case. I could easily see
there being oom issues there then, once to full value gets used for
setting up the p2m monitoring during migration. Or processing might
then take overly long.

See the individual patches for changes in v2, all of which are to
address review feedback.

1: x86/HVM: wire up multicalls
2: libxencall: osdep_hypercall() should return long
3: libxencall: introduce variant of xencall2() returning long
4: libxc: use multicall for memory-op on Linux (and Solaris)
5: libxencall: drop bogus mentioning of xencall6()
6: libxc: make xc_domain_maximum_gpfn() endianness-agnostic

Jan




 


Rackspace

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