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

Re: [PATCH 3/5] x86/xstate: Rework xstate_ctxt_size() as xstate_uncompressed_size()


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 4 May 2021 13:22:52 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=7REod0m7+vTu2xuv4UEbFuo5xAcchj2VKo+YFBu1Ml8=; b=U8XG3rYC2Uly3jIBYooQ1A6cpnB/4inGrZ37ADTAzjZfUdzjFLUB8tGXKXXDJi1zDe897bT1Iu0m/7aDzw63LH6ZkyvBgjaA2qJDhfcZQ5BxERWarBUCAvhS9OAaiUUm5Oor3vd3BOMMSJMxOmqOcf/ezq4smQNIXkRj8eX9PBp2/jZ7135K6GjKkbccjHSFf31LI3zJE1yLQboXyISc22f4rnsoHy2gjSI5pxHuattI9k0VGPMgfwfXd46AuzUzcgx6ky7ZFeH0Ap+rjdn9mgOLSRTHvLTYGhPyMkZtoGB4uHCt6Xt/bEteRI7z1bO4KT/TRDvHtuQbhpNIgn5EfA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ey5WQvElTLwxfzirp71Lm/+uO0yMPHFJZX9oNvi8AbrDmwBcd7+dvg+djSbKmyPoLIergF0RCh6hofn2y/1bz+WZf/NfMuvK9xkJe29UqhikweXpQD49TB2QAtMCNQC8LAX4ohzAKdzsCzguzrGQNI4a2AX5gh+6zyP3FyD22ScPj0uCT5L1BfJjbcXDWY5TGed7iLQwkupUaghduWWpmTfocgdBFvRftfHZ/c5L1U0AmHKQlfHauJCHuY8vhPmtVxbyL58NGqL3ugHDZm27s9vq50z9dP2SY/b3PAK9158lyKhO+zwnRxXc3zxrFoRsPX0DQNhLhHEhkWFyFl5jkw==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 04 May 2021 12:23:06 +0000
  • Ironport-hdrordr: A9a23:QYBxKa0KXlVq5CrMqDxscQqjBWhyeYIsi2QD101hICF9WtCEls yogfQQ3QL1jjFUY307hdWcIsC7LE/035hz/IUXIPOeTBDr0VHYSb1KwKnD53nbGyP4/vNAzq sIScJDIfD5EFQSt6nHySaiFdJI+re62YSJocub8Ht3VwFtbMhbnmVEIyKWCFd/SgUDJbdRLv qhz/FKrTahZngbB/7TbhU4dtPOusHRk9beaQMGbiRN1CC1kTiq5LTmeiLovSs2bjUn+9Yf2F mAqSPVzOGJs/a3yhjTvlWjlah+qZ/a5fZoQOCJgsgRAD3whgivf5QJYcz+gBkF5NuBxXxvvN 7QowoxH8kb0QKsQkiF5SHD9iOl8DEy52TswVWV6EGT3vDRdXYBJOdqwad6GyGpj3YIjZVH/4 9gm1+9jd5xCyjNmSzsjuK4Ly1Cpw6PjlcJ1dIIg2c3a/p4VJZh6bYx0WlyC5k6ECfz+OkcYZ JTJfCZ3vpQfF+ABkqp2FVH8ZipVnQ3KB+MXlIPjMyTyyRXh3B01SIjtbUioks=
  • Ironport-sdr: m/21pzff3LChsq4P2PJIdFHelrqEGJGG1ocwZqdj/ldD+A3VwEWj4kiChTzGLyKzZcm0aVJga0 H5JxILQGnAREzflmqTIS6m1/m2gs8/Fpbdyy7qJvj62aQ6J3KLAhBYtwFYwXNT1q01jH4UAvya x/CblzM9x2vew7sJYkrklWvl61ze8g7+FIWt43IkoW2U7hrUlVMAEGVv28EnxT97STbDpPl8yf cT7neZuyIRXYG2f0i2hKs18yy0qu7nMTi5b8W5d+D9XABQD8siDleSOlDZipo2Aw3nzYC7FWCB cWI=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 04/05/2021 13:20, Jan Beulich wrote:
> On 03.05.2021 17:39, Andrew Cooper wrote:
>> @@ -568,16 +568,38 @@ static unsigned int hw_uncompressed_size(uint64_t xcr0)
>>      return size;
>>  }
>>  
>> -/* Fastpath for common xstate size requests, avoiding reloads of xcr0. */
>> -unsigned int xstate_ctxt_size(u64 xcr0)
>> +unsigned int xstate_uncompressed_size(uint64_t xcr0)
> Since you rewrite the function anyway, and since taking into account
> the XSS-controlled features here is going to be necessary as well
> (even if just down the road, but that's what your ultimate goal is
> from all I can tell), how about renaming the parameter to "xstates"
> or "states" at the same time?

I'm working on some cleanup of terminology, which I haven't posted yet.

For this one, I'm not sure.  For uncompressed size, we genuinely mean
user states only.  When there's a suitable constant to use, this will
gain an assertion.

~Andrew



 


Rackspace

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