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

[xen master] Revert "x86: generalize padding field handling"



commit e52716154da04967f9b9d7cf9a1655ea4bcd9e93
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Sep 7 10:34:03 2020 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Sep 7 10:34:03 2020 +0200

    Revert "x86: generalize padding field handling"
    
    This reverts commit 696c273f3d9a169911308fb7e0a702a3eb6a150d.
    
    I was based on the flase assumption that padding fields need no
    copying: If native code checks such fields, they of course need
    copying in. And if the ABI specifies them to be zero on
    completion, we also need to copy them out.
---
 xen/common/compat/memory.c | 3 ---
 xen/tools/get-fields.sh    | 8 ++++----
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/xen/common/compat/memory.c b/xen/common/compat/memory.c
index 215b8f52d6..3851f756c7 100644
--- a/xen/common/compat/memory.c
+++ b/xen/common/compat/memory.c
@@ -354,13 +354,10 @@ int compat_memory_op(unsigned int cmd, 
XEN_GUEST_HANDLE_PARAM(void) compat)
                 return -EFAULT;
 
 #define XLAT_vnuma_topology_info_HNDL_vdistance_h(_d_, _s_)            \
-            case XLAT_vnuma_topology_info_vdistance_pad:                \
             guest_from_compat_handle((_d_)->vdistance.h, (_s_)->vdistance.h)
 #define XLAT_vnuma_topology_info_HNDL_vcpu_to_vnode_h(_d_, _s_)                
\
-            case XLAT_vnuma_topology_info_vcpu_to_vnode_pad:            \
             guest_from_compat_handle((_d_)->vcpu_to_vnode.h, 
(_s_)->vcpu_to_vnode.h)
 #define XLAT_vnuma_topology_info_HNDL_vmemrange_h(_d_, _s_)            \
-            case XLAT_vnuma_topology_info_vmemrange_pad:                \
             guest_from_compat_handle((_d_)->vmemrange.h, (_s_)->vmemrange.h)
 
             XLAT_vnuma_topology_info(nat.vnuma, &cmp.vnuma);
diff --git a/xen/tools/get-fields.sh b/xen/tools/get-fields.sh
index 753e37eb2e..002db2093f 100644
--- a/xen/tools/get-fields.sh
+++ b/xen/tools/get-fields.sh
@@ -218,7 +218,7 @@ for line in sys.stdin.readlines():
                                fi
                                ;;
                        [\,\;])
-                               if [ $level = 2 -a -n "$(echo $id | $SED 
's,_\?pad[[:digit:]]*,,')" ]
+                               if [ $level = 2 -a -n "$(echo $id | $SED 
's,^_pad[[:digit:]]*,,')" ]
                                then
                                        if [ $kind = union ]
                                        then
@@ -347,7 +347,7 @@ build_body ()
                        fi
                        ;;
                [\,\;])
-                       if [ $level = 2 -a -n "$(echo $id | $SED 
's,_\?pad[[:digit:]]*,,')" ]
+                       if [ $level = 2 -a -n "$(echo $id | $SED 
's,^_pad[[:digit:]]*,,')" ]
                        then
                                if [ -z "$array" -a -z "$array_type" ]
                                then
@@ -437,7 +437,7 @@ check_field ()
                                id=$token
                                ;;
                        [\,\;])
-                               if [ $level = 2 -a -n "$(echo $id | $SED 
's,_\?pad[[:digit:]]*,,')" ]
+                               if [ $level = 2 -a -n "$(echo $id | $SED 
's,^_pad[[:digit:]]*,,')" ]
                                then
                                        check_field $1 $2 $3.$id "$fields"
                                        test "$token" != ";" || fields= id=
@@ -491,7 +491,7 @@ build_check ()
                        test $level != 2 -o $arrlvl != 1 || id=$token
                        ;;
                [\,\;])
-                       if [ $level = 2 -a -n "$(echo $id | $SED 
's,_\?pad[[:digit:]]*,,')" ]
+                       if [ $level = 2 -a -n "$(echo $id | $SED 
's,^_pad[[:digit:]]*,,')" ]
                        then
                                check_field $kind $1 $id "$fields"
                                test "$token" != ";" || fields= id=
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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