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

[PATCH v3 00/11] x86/intr: introduce EOI callbacks and fix vPT


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Wed, 31 Mar 2021 12:32:52 +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=k5uDutd4OrUzZF9dpiK3BecJLbNCTSNgtYFMzSQYNMk=; b=fn1w84bu9urHhZPeRT/7Z+OhoB7kUz4AEXF/MCr3B+S7QUglCo8Md8xMEmlzbfNS6lytwhdMsHqTXIaz/z88LD9W4sIXB0MXvAMy2/9WDVJ3n0W7MXcD7WCYieN0X3mKXoSnKKioM7XCt/eP0OnPW/xh8YEMY+/7BstvAA4XCQoczUU65qymuitoG74wknN0Tccp8nSdgb4/h+aLHplHHAySBMUDnCEOMYljMQAy9o30FBPyLD1qE0UAb1Y2487TksBH4dwuClX8WLvOoOFU9wFFPMTytNG/A76EI5A5kpEbv6hj9ZJlkbbkYBcGteHVld8NHt0PO7P1Nadet3Csow==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S3xwStePB3EOcI+Ob3u5/H0pd7o2fee7nqKiC/XU8syvXuK6dD5brIPPly3f2++n9p+J9bCA+X0YzeI50QE8IFzT1/93n+bL3CrwqMG/KRkyAgdChP76dNyJZ6il8QCgwXB4Kk4JaPcL1XZquurQ5KU6GpmYdfx61qTN+wvohFxuGxeGPJO5v2kS1Uc1yDBQ2LJ1ik865sZXx5FAMpJEVNy0DMo1pa7UjS7i24M06eHLNrGm8pTXgtArRVLmVH0v8ZdLEw3+/wOA+lF4Ml9UuWVJBlovCkRAcqJHcr1dCw5wuTScRj56G5GPlGFQLVhC66dNAV4GE/J68Tcbc1SwQg==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>
  • Delivery-date: Wed, 31 Mar 2021 10:35:48 +0000
  • Ironport-hdrordr: A9a23:NtJ0oaFWq0EWyM6TpLqFMpHXdLJzesId70hD6mlYVQFVfsuEl8 qngfQc0lvOhCwMXWw78OrsBICrR3TA+ZlppbQAJLvKZniChEKEDqFHqbHjzTrpBjHk+odmv5 tIXqBiBLTLYmRSot395GCDfeoI5Pmi3OSWifzFz3FrJDsaCZ1IywtiEA6UHglXaWB9ZaYRL5 aX6spZqzfIQx1+AviTPXUZQ/PF4+TCiZOOW3U7LiQ64wqDhy7A0s+YLzGk2H4lMg9n8PMZ3k Xu1yf44aiitP/T8G6n60bjq654tfGk5t9KBMmngtUYJDP2mm+TFflccozHhh8ZiqWC70srjc ntrn4bTrhOwkKURE6Zi1/M3BTtyzkn4XOK8y7mvVLT5fbXaRh/Lugpv/M8TjLpr3AOkfs57Y dwm0WejJZTBQOoplWE2/H4EytEu2DxnWAvioco/htieLpbUpB9h6oF8nhYFZ8RdRiKk7wPIa 1VAMbQ6O0+SyL9U1np+m1mwNmbVn8uBBuxQk8bpsyP0zRN9UoJtncl+A==
  • Ironport-sdr: NbvWk5CaU+ZTzThIwBlND9TovZdaEiHDNfJRP/OM6osZi0ynmbZ2YjvQk7L6MqhQx9MNWtvTlw pxoagTdwNdtnzNeGVeJ8VCC0DT4o5KmG8BxirZDAsIzrFSfoyt5MY82YPlpmM3COdWXoL+t+5Y 3si7uh/8DeOp7ykzsAfEE9QKvxQG3YfJcoOtVDeppbMyEJhBWaklVYdPsKwKtIjq93xNrBpcqw oe0zk30p6SAq5J3fccjFf5EEd4mR1jTtINkpsmqk2pkHDl+iBd6JU1GeO+/ykhsuDNDmy+IZZR u7E=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hello,

The following series introduces EOI callbacks and switches a number of
subsystems to use them. The first one is vmsi and dpci, which are quite
straight forward to switch since they used to open code hooks in the EOI
handlers.

Finally HVM virtual timers are also switched to a different model where
EOI callbacks are used instead of checking at every return to guest
whether a timer interrupt is being injected. Note that such change also
fixes a bug in virtual periodic timers that prevented injecting to a vCPU
different than the one where the timer is assigned (and that would
currently match the i8259 target).

Those changes are paired together so that practical applications of
having EOI callbacks can be seen in action.

Note that further cleanup can be done, but I think the series is already
big enough and provides a clear benefit.

A couple of notes from the testing performed:
 - PVH dom0.
 - Windows guest, limited to 2% capacity to test delay for missed ticks
   mode - time is consistent in the guest.
 - Windows guest migration.
 - PCI passthrough to a guest.

Thanks, Roger.

Roger Pau Monne (11):
  x86/hvm: drop vcpu parameter from vlapic EOI callbacks
  x86/hvm: drop domain parameter from vioapic/vpic EOI callbacks
  x86/vlapic: introduce an EOI callback mechanism
  x86/vmsi: use the newly introduced EOI callbacks
  x86/vioapic: switch to use the EOI callback mechanism
  x86/hvm: allowing registering EOI callbacks for GSIs
  x86/dpci: move code
  x86/dpci: switch to use a GSI EOI callback
  x86/vpt: switch interrupt injection model
  x86/vpt: remove vPT timers per-vCPU lists
  x86/vpt: introduce a per-vPT lock

 xen/arch/x86/domain.c             |   4 +-
 xen/arch/x86/emul-i8254.c         |   1 +
 xen/arch/x86/hvm/hpet.c           |   8 +-
 xen/arch/x86/hvm/hvm.c            |  23 +-
 xen/arch/x86/hvm/irq.c            |  63 ++++
 xen/arch/x86/hvm/rtc.c            |   1 +
 xen/arch/x86/hvm/svm/intr.c       |   3 -
 xen/arch/x86/hvm/vioapic.c        | 149 ++++++----
 xen/arch/x86/hvm/vlapic.c         |  74 ++++-
 xen/arch/x86/hvm/vmsi.c           |  35 ++-
 xen/arch/x86/hvm/vmx/intr.c       |  59 ----
 xen/arch/x86/hvm/vpic.c           |   9 +-
 xen/arch/x86/hvm/vpt.c            | 476 +++++++++---------------------
 xen/drivers/passthrough/x86/hvm.c | 219 ++++++++------
 xen/include/asm-x86/hvm/io.h      |   3 +-
 xen/include/asm-x86/hvm/irq.h     |  21 ++
 xen/include/asm-x86/hvm/vcpu.h    |   4 -
 xen/include/asm-x86/hvm/vioapic.h |   2 +-
 xen/include/asm-x86/hvm/vlapic.h  |  18 +-
 xen/include/asm-x86/hvm/vpt.h     |  26 +-
 20 files changed, 601 insertions(+), 597 deletions(-)

-- 
2.30.1




 


Rackspace

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