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

Re: [PATCH] xen/vcpu: remove vcpu_set_singleshot_timer flags field


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 18 Apr 2023 17:12:07 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pR4juPX5MTHn0GLeJm0iu0Ao2luZDAcVEmc+G0mbQek=; b=k44TbrN3uywrm+gJNqKc6DvaKL6xRHKvHaohJzWF7M2rx3Vh2qOpkYYHcQ5HiKdllDjEjeDTPLENjRwJ4HnGWy6sfylCIROB45q91u4cuZyfezIRlsqp2nRNzs13gPYicS3ptH9cvXDVoYjbgvU76XGyr0eAI4wvmgdcmmJ8c+9wj+Vp38CzRIz/r90W22iCcO2JvDwUY1uITAwCfd2vyicZsJpXse2ZrV0wnn0Z5T2x4KSiNoOS4vHKCRS2yT+KZsolhWzi8eGKdbBMyXriHpzapr/AI/Sq2pj1KkmDrJRiwoyzdU57SyR+C1QPYzOH7SuLta6jC8gPsdX/gPvgzw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z7CzyLhJ5Tdg9na78zKhXBu2r2LnAhwCa2XK7GkmZbe1QbZmRaRZrUP7fLHdUybRr4xqoHp7jAJQG25MDSW+VXRhF+4+smSf3JCNS3K+DdUiSm+HvlpNTe3w3WRT0ncGyCw5pH7wth5MwbJc3VxaatAw639GDhSrKHkf0bltNUzVBQqmILY5YEoJ+FP5xfKjTV7p8ih6jBXIaUzagEjWJOmnh3BfyU77t46PnLWod8qe7T2bv5ZsxNJkP2L58LKw8cw9QJMFm2/3g7ZHalIzgE/7kY/w3qYKRTIsyfdlTM61PFjGoXKJE/squ1e+KVz0RU4nkC2ldmI+6xrqUg0Yog==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Henry Wang <Henry.Wang@xxxxxxx>, Community Manager <community.manager@xxxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 18 Apr 2023 16:12:33 +0000
  • Ironport-data: A9a23:1VT7Wa2mZpquVKlqQPbD5VBwkn2cJEfYwER7XKvMYLTBsI5bpzEDn 2UYCmiCM//cY2KjLd0ib97lo0gFvZWGz9FgTANrpC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefTAOK6ULWeUsxIbVcMYD87jh5+kPIOjIdtgNyoayuAo tq3qMDEULOf82cc3lk8tuTS+XuDgNyo4GlD5gBnNagR1LPjvyJ94Kw3dPnZw0TQGuG4LsbiL 87fwbew+H/u/htFIrtJRZ6iLyXm6paLVeS/oiI+t5qK23CulQRrukoPD9IOaF8/ttm8t4sZJ OOhF3CHYVxB0qXkwIzxWvTDes10FfUuFLTveRBTvSEPpqFvnrSFL/hGVSkL0YMkFulfKF9rr +0JCy00LQ2bqsOJxZG4ZPRtr5F2RCXrFNt3VnBI6xj8VK9jareaBqLA6JlfwSs6gd1IEbDGf c0FZDFzbRPGJRpSJlMQD5F4l+Ct7pX9W2QA9BTJ+uxqvS6Kk1AZPLvFabI5fvSjQ8lPk1nej WXB52njWTkRNcCFyCrD+XWp7gPKtXqjBdlIS+TkqJaGhnWrmH0PS14nTWK/oNehhESQYe9VG 1c9r39GQa8asRbDosPGdw21pjuIswARX/JUEvYm80edx6zM+QGbC2MYCDlbZ7QOlMIwXy1s6 VaPkPvgHzkpu7qQIVqW8bKRsDWzJTlTKGYEbCAJVyMV7t/7uoYxgxnTCNF5H8adjNf4BDXxy DCitzUlivMYistj/6em+VHKhRq8q56PSRQ6ji3MRX6s5A59YI+jZqSr5ELd4PIGK5yWJnGeu FAUls7Y6/oBZaxhjwSISeQJWbquvvCMNWSFhUY1RsZ9sTOw53SkYIZcpilkI1tkOdoFfjmvZ 1LPvQRW59lYO37CgbJLXr9dwv8ClcDIfekJnNiPBjaSSvCdrDO6wRw=
  • Ironport-hdrordr: A9a23:dbL9MqMJF6LsncBcTuqjsMiBIKoaSvp037BL7TEVdfUxSKb0qy nAppgmPHPP5wr5IUtQ4OxoW5PwI080l6QU3WB5B97LYOCBggWVxepZnOjfKlPbehEWwdQtsZ uII5IUNDQpNykAsS8h2njfLz/8+qjhzEl1v5an856yd3ARV51d
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18/04/2023 5:02 pm, Roger Pau Monné wrote:
> On Tue, Apr 18, 2023 at 04:54:49PM +0100, Andrew Cooper wrote:
>> On 18/04/2023 4:42 pm, Roger Pau Monne wrote:
>>> The addition of the flags field in the vcpu_set_singleshot_timer in
>>> 505ef3ea8687 is an ABI breakage, as the size of the structure is
>>> increased.
>>>
>>> Remove such field addition and drop the implementation of the
>>> VCPU_SSHOTTMR_future flag.  If a timer provides an expired timeout
>>> value just inject the timer interrupt.
>>>
>>> Bump the Xen interface version, and keep the flags field and
>>> VCPU_SSHOTTMR_future available for guests using the old interface.
>>>
>>> Note the removal of the field from the vcpu_set_singleshot_timer
>>> struct allows removing the compat translation of the struct.
>>>
>>> Fixes: 505ef3ea8687 ('Add flags field to VCPUOP_set_singlsehot_timer.')
>>> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>>> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>> While everything said is true, this isn't the reason to to get rid of
>> VCPU_SSHOTTMR_future
>>
>> It 505ef3ea8687 does appear to have been an ABI break, that's
>> incidental.  It dates from 2007 so whatever we have now is the de-facto
>> ABI, whether we like it or not.
>>
>> The reason to delete this is because it is a monumentality and entirely
>> stupid idea which should have been rejected outright at the time, and
>> the only guest we can find which uses it also BUG_ON()'s in response to
>> -ETIME.
> I agree, but didn't think it was necessary to get into debating
> whether it's useful or not, since its introduction was bogus anyway.

Well - the reason to actually make a change is that (older) guests are
really exploding on that BUG_ON() for reasons outside of their own control.

And the reason to fix it by ignoring VCPU_SSHOTTMR_future is because the
entire concept is broken and should never have existed.

The ABI argument just adds to why the patch ought to have been rejected
at the time.  But it was done, and the fact it has been like this for 16
years means that the ABI shouldn't change further, even if it done in
error in the first place.

>
>> It can literally only be used to shoot yourself in the foot with, and
>> more recent Linuxes have dropped their use of it.
>>
>> The structure needs to stay it's current shape, and while it's fine to
>> hide the VCPU_SSHOTTMR_future behind an interface version macro, we do
>> need to say that it is explicitly ignored.
> Oh, I think I've dropped the comment I had added next to
> VCPU_SSHOTTMR_future that contained /* Ignored. */ (just like for the whole
> flags field).
>
> I can elaborate a bit on why VCPU_SSHOTTMR_future is not useful in the
> commit log, and add that Ignored comment to the flag.

The important thing is to not actually change the size of the structure,
and to change the commit message to explain the real reason why we need
to make the change.

~Andrew



 


Rackspace

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