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

Re: [PATCH 1/2] x86/vmx: Fix IRQ handling for EXIT_REASON_INIT


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 2 Nov 2023 09:57:11 +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=0lx2DBSHOCtaeXWsGPxrWeetRuva96p2S+AOcz1No1g=; b=QUZqGdmj/M6xKDAyughbw2VyJIuiATs92iYjcFBwUhSGmNqKW0L8J3HF0RM1IDWtaSR/BzDkiZJITPRprsYNMEnmjT6gp6K5RwhRQ+e8Gup/tDlnrB8agR3vtd/mKmYH7fqLcR5fdQyBu14Jljy31FTjKGR/mN5vtJyuEOHz0sUiqPbOqdQnOwlqajhksypMZKVz9ZMendVQbj1J0/dRGmKGJaRW8ZDZlR3hQkt0tngSdZ2n0F5F+mTqFi6OnjzaAEO+opu0rcroBdz0fdQXDuhJ+a4d761GtCv+9zdEoh+BGvB47+Qsmn+k+JaFv7ow9fDnk7T7c05jQSn9kMWbFw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hZzWRhi4OwfASZB966pqSquMt4OhgHcKhWd3gxgYbYw0+nG+uFats6TFIElo3b9qSxl01bj4Eh3aQ+5b7MOBmpRdWxcsYxOPwBroSugz21Otv1XKgKqRx3FvisBlCTnEpTYb8/BKGi2nlkW5zWFaOG/tOMC/4MbPA0rAtTMrlBSdxpMC71FK9DOkHTjzZfq9C4M2VX5BUG7gUobs6IZQP2g2yV5ge4JAu+4d/T5AbRYoHVAAtc3B1oA0Yz6hPqLyS6v2Ria8kGplV0zxb6HjbWa66ymCw/pA256Ntx0AhJETyiuHEcqhy16Xrxbsx3UOD20Kdh7cSFHNv5hHkdoXrw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Reima ISHII <ishiir@xxxxxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Takahiro Shinagawa <shina@xxxxxxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 02 Nov 2023 08:57:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.11.2023 20:20, Andrew Cooper wrote:
> --- a/xen/arch/x86/hvm/vmx/vmx.c
> +++ b/xen/arch/x86/hvm/vmx/vmx.c
> @@ -4097,10 +4097,6 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
>      case EXIT_REASON_MCE_DURING_VMENTRY:
>          do_machine_check(regs);
>          break;
> -
> -    case EXIT_REASON_INIT:
> -        printk(XENLOG_ERR "Error: INIT received - ignoring\n");
> -        return; /* Renter the guest without further processing */
>      }

Wouldn't the printk() better remain where it was, and just the "return" be
purged? Otherwise between here and ...

> @@ -4390,6 +4386,12 @@ void vmx_vmexit_handler(struct cpu_user_regs *regs)
>      case EXIT_REASON_TRIPLE_FAULT:
>          hvm_triple_fault();
>          break;
> +
> +    case EXIT_REASON_INIT:
> +        /* TODO: Turn into graceful shutdown. */
> +        printk(XENLOG_ERR "Error: INIT received - ignoring\n");
> +        break;

... here there are various paths which bypass the main switch(), and hence
there would be no trace left of the unexpected INIT in certain cases.

Jan



 


Rackspace

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