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

Re: [RFC 09/10] x86/ioreq: guard VIO_realmode_completion with INTEL_VMX


  • To: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 14 Feb 2023 17:46:41 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=CJe1hIToLj3KLLqgTrfdF5UHgVvY/k7bIj2OVJ5I2PA=; b=EibdsFCmEDTjeMLPLwQL8aRFaLf/i7MD1kWst4B4WyM6qZJxpej9LGutdIVZHMiQQKgxCjUCDtZunErT1C1DMhOWJ+oTnkMFzX/SnytLgwM3XqAieHs65u63kLvEaiE5W00Pdn6iCbt/jMoQ5ofHTSyMJ1nqEmMv9WyKsjn1TKV5N2ca07YWR3yYSaWlp0RuACq949wbDF2hB47MmWQ1OBnhsvwl2DiZNN749Wn5DObguPgJU+RsuNW9/PmV/LUDd/uJaDYF6hneA1IQtLcRI5g/yX88yPOCa/SFhTJpp8fswm7U/Q2ut13Ssse0ZQv/XFTvqFJzHiKSgLK9+vIumA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ii0KvDSsOTp2a2sBR2pNakvk/ovygZFXs+p4UKKBuyVzHvAdzkU2ZNuro0cGAVj5pm6tv3rmMAy0OZThl6B0xCpSIBp8c7yVKYgwWhSYZu8MV/l/V9gN7WYPTGsGRb6aZMFRChI/LH5Q5db0jCibX6VOCDc60FYr8CozwwuaLDTuzuGtDBiIsZT6t/8QLIE2eUmlOhfZAfHDYtIkaFmJ+txGSj8BgvtwJNmxGw3/GPpvzGWHlUq6p+c60Ir5EeYE3ePu27eVRxJdQ2NnARZMHP6Mbsgzm1tJjVBtWvKBmKngWdA9ZbjJZg72eeB1i1S19C6CTR8Ruhc1wBVNZgZZ8w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Paul Durrant <paul@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 14 Feb 2023 16:46:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 13.02.2023 15:57, Xenia Ragiadakou wrote:
> VIO_realmode_completion is specific to vmx realmode, so guard the completion
> handling code with INTEL_VMX.

While it means slightly bigger a code change, personally I'd prefer if
VIO_realmode_completion simply didn't exist as enumerator when !VMX.
Besides ...

> --- a/xen/arch/x86/hvm/ioreq.c
> +++ b/xen/arch/x86/hvm/ioreq.c
> @@ -44,6 +44,7 @@ bool arch_vcpu_ioreq_completion(enum vio_completion 
> completion)
>  {
>      switch ( completion )
>      {
> +#ifdef CONFIG_INTEL_VMX
>      case VIO_realmode_completion:
>      {
>          struct hvm_emulate_ctxt ctxt;
> @@ -54,6 +55,7 @@ bool arch_vcpu_ioreq_completion(enum vio_completion 
> completion)
>  
>          break;
>      }
> +#endif

... this use there's exactly one further one which would need #ifdef-ing.
I think that's tolerable.

Thinking further (not necessarily for you to carry out) the x86 version
is identical to Arm's when !VMX, so it would look better to me if the
entire x86 function became conditional, the Arm one was dropped, and
common/ioreq.c provided a fallback for the case where no arch one exists.

Jan



 


Rackspace

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