On 04/02/2021 15:38, Oleksandr wrote:
>>
>> Hi Andrew.
>> [Sorry for the possible format issues]
>>
>> On Tue, Feb 2, 2021 at 9:10 PM Andrew Cooper
>> <[email protected] <mailto:[email protected]>> wrote:
>>
>>     For now, simply try to map 40 frames of grant table.  This
>>     catches most of the
>>     basic errors with resource sizes found and fixed through the 4.15
>>     dev window.
>>
>>     Signed-off-by: Andrew Cooper <[email protected]
>>     <mailto:[email protected]>>
>>     ---
>>     CC: Ian Jackson <[email protected] <mailto:[email protected]>>
>>     CC: Wei Liu <[email protected] <mailto:[email protected]>>
>>     CC: Jan Beulich <[email protected] <mailto:[email protected]>>
>>     CC: Roger Pau Monné <[email protected]
>>     <mailto:[email protected]>>
>>     CC: Wei Liu <[email protected] <mailto:[email protected]>>
>>     CC: Stefano Stabellini <[email protected]
>>     <mailto:[email protected]>>
>>     CC: Julien Grall <[email protected] <mailto:[email protected]>>
>>     CC: Volodymyr Babchuk <[email protected]
>>     <mailto:[email protected]>>
>>     CC: Oleksandr <[email protected] <mailto:[email protected]>>
>>
>>     Fails against current staging:
>>
>>       XENMEM_acquire_resource tests
>>       Test x86 PV
>>         d7: grant table
>>           Fail: Map 7 - Argument list too long
>>       Test x86 PVH
>>         d8: grant table
>>           Fail: Map 7 - Argument list too long
>>
>>     The fix has already been posted:
>>       [PATCH v9 01/11] xen/memory: Fix mapping grant tables with
>>     XENMEM_acquire_resource
>>
>>     and the fixed run is:
>>
>>       XENMEM_acquire_resource tests
>>       Test x86 PV
>>         d7: grant table
>>       Test x86 PVH
>>         d8: grant table
>>
>>     ARM folk: would you mind testing this?  I'm pretty sure the
>>     create parameters
>>     are suitable, but I don't have any way to test this.
>>
>> Yes, as it was agreed on IRC, I will test this today's evening and
>> inform about the results)
>
>
> OK, well, I decided to test right away because going to be busy in the
> evening)
>
> I am based on:
> 9dc687f x86/debug: fix page-overflow bug in dbg_rw_guest_mem
>
> I noticed the error during building this test in my Yocto environment
> on Arm:
>
>
> /media/b/build/build/tmp/work/x86_64-xt-linux/dom0-image-thin-initramfs/1.0-r0/repo/build/tmp/work/aarch64-poky-linux/xen/4.14.0+gitAUTOINC+e00e0f38c3-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/8.2.0/ld:
> test-resource.o: undefined reference to symbol
> 'xendevicemodel_open@@VERS_1.0'
> /media/b/build/build/tmp/work/x86_64-xt-linux/dom0-image-thin-initramfs/1.0-r0/repo/build/tmp/work/aarch64-poky-linux/xen/4.14.0+gitAUTOINC+e00e0f38c3-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux/../../libexec/aarch64-poky-linux/gcc/aarch64-poky-linux/8.2.0/ld:
> /media/b/build/build/tmp/work/x86_64-xt-linux/dom0-image-thin-initramfs/1.0-r0/repo/build/tmp/work/aarch64-poky-linux/xen/4.14.0+gitAUTOINC+e00e0f38c3-r0/git/tools/tests/resource/../../../tools/libs/devicemodel/libxendevicemodel.so.1:
> error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status
> Makefile:38: recipe for target 'test-resource' failed
>
>
> I didn't investigate whether it is related or not. I just added as
> following:
>
> diff --git a/tools/tests/resource/Makefile b/tools/tests/resource/Makefile
> index 8a3373e..03b19ef 100644
> --- a/tools/tests/resource/Makefile
> +++ b/tools/tests/resource/Makefile
> @@ -32,6 +32,7 @@ CFLAGS += $(APPEND_CFLAGS)
>  
>  LDFLAGS += $(LDLIBS_libxenctrl)
>  LDFLAGS += $(LDLIBS_libxenforeignmemory)
> +LDFLAGS += $(LDLIBS_libxendevicemodel)
>  LDFLAGS += $(APPEND_LDFLAGS)
>  
>  test-resource: test-resource.o
>

Urgh yes - I didn't fully strip out the libxendevicemodel uses.  I'll
fix that, rather than having this test link against a library which it
doesn't use (yet).

>
> I got the following result without and with "[PATCH v9 01/11]
> xen/memory: Fix mapping grant tables with XENMEM_acquire_resource"
>
> root@generic-armv8-xt-dom0:~# test-resource
> XENMEM_acquire_resource tests
> Test ARM
>   d3: grant table
> xenforeignmemory: error: ioctl failed: Invalid argument
>     Fail: Get size: 22 - Invalid argument
>

Ah yes - you also need a bugfix in the dom0 kernel.  "xen/privcmd: allow
fetching resource sizes" which is in mainline, and also backported to
the LTS trees.

However, this did get past the bit I wasn't sure about for ARM, which is
good.

~Andrew

Reply via email to