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

Re: [PATCH v3 03/11] x86/vlapic: introduce an EOI callback mechanism


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 8 Apr 2021 11:12:37 +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-SenderADCheck; bh=qKkAWnpbpPsRs/Ipu4daGC3sfX5Mrclb6hJZj1sDClA=; b=Ny8nAxMs353MxWxN7A271DDl+gV24wbr2nB87NAfzs6wyFuO87F2D/SxZf2xokBteIPwQeXXZHrmpeHRXNXsrDlPEHLaqxsN844rbwXKGtMbcc1dcovBXH/cRoX+XoxW1fJm/okkBzGd7989hJBpMHJNj78zYIunOsRC7BonQWj49Bp9a0N0IR0tI0hsBN1AMHIvYylP89BfE9Y+A3XOcxVh6Qrn3VMZgDTLxyoyed731gs3kVONsrONfDjHk96eA8dCGAr2S5417CMh1TtSpiQaXtmI+WGQ3CUwpNuNcLouB80w9F3Gbad2FewzLPeBrhpeXaJa351QECukYcOdmQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kl6YvZ7Zdzv6/v70pg+9ZgqkBynmUDM8T+mZUpO67aJyock7/R/jrbb3U6EisDXJ2xhVmeLzvjamqkQQ2echN7J2thPOHGRnNR9yeUejPs2GxMeH5w5RvBFu6DWiJi811/New98lhzp2OF+rrvaKYBSvKcCmsyxJWyhWYXiFw6Bo7jMTe/HcsC+jgMPDOLcWmOAG9rzSx5Tql39kLuJnF7C7VVbyHS+HbwdkCE/kAE+6bSjAnq453+b/f2DwZgyh3vmeQf5OZ2ao/XGIYMyLSvG11vTzjkI6cRzsUJCgAtec3GywguWmZ9vPbTtK4DhiLHbjSJw/raW3EmNB38ZZlQ==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 08 Apr 2021 09:12:57 +0000
  • Ironport-hdrordr: A9a23:Huo4K6+L+SQxzWemtrtuk+EKdb1zdoIgy1knxilNYDRIb82VkN 2vlvwH1RnyzA0cQm0khMroAsS9aFnXnKQU3aA6O7C+UA76/Fa5NY0K1/qH/xTMOQ3bstRc26 BpbrRkBLTLZ2RSoM7m7GCDfOoI78KA9MmT69v261dIYUVUZ7p77wF/Yzzrd3FeYAVdH5I2GN 69y6N81lmdUE8aZMi6GXUJNtKrz7H2vanrfAIcAFof4BSO5AnC1JfBDxOa0h0COgk/o4sKzG 6tqW3Ez5Tmid6X4Fv212jf75NZ8eGRt+drNYi3peU+bhnpggasTox9V7OFpyBdmpDS1H8a1O Pijj1lE8Nv627AXmzdm2qT5yDQlAwAxlWn6ViEjWDtqcb0LQhKdfZptMZiXTbyr28D1esMt5 5j7iaimLd8SS7kpmDb4ePFUhl7/3DE2kYKoKoooFF0FbcFZKQ5l/14wGplVK0uMQjd844dHO xnHKjnlYxrWGLfVXzfs2V1qebcJ0gbL1ODSkgGjMSfzyJbqnB/11cZ38wShB47heoAd6U=
  • Ironport-sdr: 35JU/0WhvlMOJvW5+dD5Y6RIJl6kV8hW/gLg8kmBJlpcO0DogAHt1EDJOXOKD3NoHauKuHBRAf 4V0PnUP71SdcbUYoTrhfOMS7SRV42q1rrJLD29erVNCV6+uvI04t8uTxYfrWDPph5APSBDl4se 9ZNK2hJ75uTHVJsZ2dKobX2ltFjo/5RODZXZ77Gj02b0qlQgPzUoA6S5WR+mcSBGcp6V+/IVmK b4uqUv6vmRFEGB1cdEbbwUW0L8k9yA3p8vzjn5FQUDcVSmolS6yt6YXZtM3jrdCe8EGkk2VWSW CuY=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Apr 08, 2021 at 08:20:15AM +0200, Jan Beulich wrote:
> On 07.04.2021 18:27, Roger Pau Monné wrote:
> > On Wed, Apr 07, 2021 at 04:55:43PM +0200, Jan Beulich wrote:
> >> On 31.03.2021 12:32, Roger Pau Monne wrote:
> >>> Add a new vlapic_set_irq_callback helper in order to inject a vector
> >>> and set a callback to be executed when the guest performs the end of
> >>> interrupt acknowledgment.
> >>>
> >>> Such functionality will be used to migrate the current ad hoc handling
> >>> done in vlapic_handle_EOI for the vectors that require some logic to
> >>> be executed when the end of interrupt is performed.
> >>>
> >>> The setter of the callback will be in charge for setting the callback
> >>> again on resume. That is the reason why vlapic_set_callback is not a
> >>> static function.
> >>
> >> I'm struggling with your use of "resume" here: Resuming from S3
> >> doesn't require re-doing anything that's kept in memory, does it?
> >> So what meaning does the word have here?
> > 
> > Right, I can see the confusion. Resume here means a guest being
> > migrated or restored, not Xen itself being resumed. Callbacks are not
> > part of the exported guest state, and hence any emulated device that
> > requires a callback will have to register it as part of loading the
> > saved state.
> > 
> >> Apart from this, and with the xzalloc_array() change requested
> >> by Andrew, this looks good to me.
> 
> In which case with this change and "resume" replaced suitably in the
> description

I've worded it as:

"The setter of the callback will be in charge for setting the callback
again on guest restore or resume, as callbacks are not saved as part
of the vlapic state. That is the reason why vlapic_set_callback is not
a static function."

> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Thanks. I also want to make the warning message in vlapic_set_callback
conditional to the vector being pending in ISR or IRR, so I will not
add your RB this time if that's fine.

Roger.



 


Rackspace

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