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

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


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 18 Apr 2023 18:02:30 +0200
  • 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=j+YHflBB5WhGYW9CALxtTnbjAYuGnnaW8Gd6ckZPrug=; b=POdoVM0fLNuGsuImy/DQndp2khF+PYe0dBUcEeVl2WyYwByRmeQ+f3MgSOKl0kRKG08b1VIyZ7N3Xz8HBxvzFZm4h88nBFvllyoP6bUAcLCYMKatZqmyBlUiBP1oZjx/ZF7V+HMH9wDJumTw4Y1Zn+OSRdfoId+pCyADb0g6mvrjU5INo6SagPUe+DtAQVdiSI/v2mf3jvxQAx75DtXLntzOEgo5/S6AO1mIbG2L2xJ+zIOjV1ydEncXTOVE/HBSY6BkkCacGHm21LFzxnaWQVjYzybgGOu5mQs1JIzuQlJSHwVK4ycVe6uTDfH5/0CfwKwy79GgkpJpaf61CTlrow==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aFq17xOadN19rDjjQbxlctf06EQ3MmRjzz6SAIhOV7dtaknppqHGB3uNr3BQDdMQVm7HBRPUJiZZyhYbUJY/Kyi2uB2ajUIdabNQVgXSbkaR88SLBxtwioH0KLcZ2xl2Qd2tV5edMZzDFg/xX4nJGtYpr5/TY82rBDsAq6acSj6akhTLxQ+1fzY+raz1nlzEJu895oGcvpBpM3nmmpLZ3v1i4OgooIBwyShC4nKcALLfFJsgMp2ASrivyE4oUeAzt0mLAVF2t6ZJeAB9XFgPSKJPkxQXh8Xsx/aJ57E+V4+/s1kpFi4DoFEL20uU72fO8VoYDaLIIuTodMRcHfUW3g==
  • 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:03:02 +0000
  • Ironport-data: A9a23:/pz1tKnkFhUlj60hze4WBEPo5gwFJ0RdPkR7XQ2eYbSJt1+Wr1Gzt xIeDGjUaamCYmKme4p2PI3j/U4PuJHRmtRlSgA/rHxnFSMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+a6U6icfHgqH2eIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE4p7aWaVA8w5ARkPqgX5Q+GzRH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCGpaXFCYWX8AgVe0Ew/yiTpsSq8pefSZS0mZT7I0Er7xIAahihZa07FdRwxwp5PY1B3 fUaCzVdMz+Yu/qv/I2AZ+lylv0Ad9a+aevzulk4pd3YJdAPZMmaBonvu5pf1jp2gd1SF/HDY cZfcSBocBnLfxxIPBEQFY46m+CrwHL4dlW0qnrM/fZxvzeVkVM3iee2WDbWUoXiqcF9hEGXq 3iA523kKhobKMae2XyO9XfEaurnxHunB9xKTeDhnhJsqFy9llIeCh8ubkqij9+irmu7HMBRN nVBr0LCqoB3riRHVOLVTxC+5XKJoBMYc95RCPEhrhGAzLLO5ASUDXRCSSROAPQGucksVHoV3 1mGt9rzAHpkt7j9YXma87KJqzKuKG4QJGkLaiIeZRsI5cH5p4M+hQ6JScxseIa3hNDoHTD7w xiRsTMzwb4UiKYj1bi//F3BqyKhoN7OVAFdzh7MQmuv4wd9ZYikT4+l817W6bBHNonxZkaFl GgJnY6Z9u9mMH2WvCmEQeFIELT34f+AaWTYmQQ2QMJn8Cmx8Xm+e4wW+Ct5OEpiLscDf3nuf VPXvgRSopRUORNGcJNKXm54MOxypYCIKDgvfqu8ggZmCnSpSDK6wQ==
  • Ironport-hdrordr: A9a23:HQKxf6BlCsZT1MTlHelo55DYdb4zR+YMi2TDt3oddfU1SL38qy nKpp4mPHDP5wr5NEtPpTniAtjjfZq/z/5ICOAqVN/PYOCPggCVxepZnOjfKlPbehEX9oRmpN 1dm6oVMqyMMbCt5/yKnDVRELwbsaa6GLjDv5a785/0JzsaE52J6W1Ce2GmO3wzfiZqL7wjGq GR48JWzgDQAkj+PqyAdx84t/GonayzqK7b
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

> 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.

Thanks, Roger.



 


Rackspace

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