[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v10 33/38] x86/entry: Add fred_entry_from_kvm() for VMX to handle IRQ/NMI
- To: Paolo Bonzini <pbonzini@xxxxxxxxxx>, "linux-doc@xxxxxxxxxxxxxxx" <linux-doc@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "linux-edac@xxxxxxxxxxxxxxx" <linux-edac@xxxxxxxxxxxxxxx>, "linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>, "kvm@xxxxxxxxxxxxxxx" <kvm@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: "Li, Xin3" <xin3.li@xxxxxxxxx>
- Date: Wed, 20 Sep 2023 23:10:23 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.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=kBcnxzNYWizXmc7YAUEPT5ExgluuwvJK+IEqtUpDNCY=; b=A6KCax7G8emxApzl2L5lTNABDRf5a1cho4tQyFqDFgkwUgNtaeXw/bNF9aEh+ZDslcMoot1H6UytFg20Mw1ggKRowr7LsIvQsFCfbp/F1VUREvLtezFB5mIpGncWm6Z7WQTfiQ+QDb4bPdOaZLYuDen3CtdJDY8+ugievR99LGvWZLn0EpJpAzWf5876u48JUogM6ifU6WYbjwJ2PbGfdcNe0wQLE7ZD3lbgXBHOxyU001r0Jq9nao7UQdmsCHgEKaHTZ7d61Eb6sJPnr3PkSb+I5qide0vcsAv6avmWkBMfvyhMqceQ6zytF6AeiXD9xh/izcjhpAVGfbbzjmUhuA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LfxjTU2HqFMenpMtfz+8mwAiNFrS9H3UMXopj4AyYfUwmZMjE5sFpnYuTIXcEfLPyj1YFHLJZHsX4ajquijcmUdKLn31tR+iY+Imy3Yo8aTZrIT9f/hAlbcsXvKmFV6i52fNdnYOS2dnjza7bNriNQki/feUIsxSYg0pcvPJlETPAcQXmpaXbO3gUSh7ugQENWsrPR8fZjqtCJYcElcyA3QSxTpKtRFJ5oKgxMCwuw6tdU+NRUI84xy6Y1QMBuf+zZ/7aBCfWZps2ueoE6GD5GXnECDbGZJKINl2iWwGBGvINlXBZmXj6tUmcubIOF56HWVzlyhwc4wy35xPc4gJ1Q==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com;
- Cc: "tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>, "mingo@xxxxxxxxxx" <mingo@xxxxxxxxxx>, "bp@xxxxxxxxx" <bp@xxxxxxxxx>, "dave.hansen@xxxxxxxxxxxxxxx" <dave.hansen@xxxxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "hpa@xxxxxxxxx" <hpa@xxxxxxxxx>, "Lutomirski, Andy" <luto@xxxxxxxxxx>, "Christopherson,, Sean" <seanjc@xxxxxxxxxx>, "peterz@xxxxxxxxxxxxx" <peterz@xxxxxxxxxxxxx>, "Gross, Jurgen" <jgross@xxxxxxxx>, "Shankar, Ravi V" <ravi.v.shankar@xxxxxxxxx>, "mhiramat@xxxxxxxxxx" <mhiramat@xxxxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "jiangshanlai@xxxxxxxxx" <jiangshanlai@xxxxxxxxx>
- Delivery-date: Wed, 20 Sep 2023 23:10:54 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHZ5stu3Ky8BNMeNUmgCzRftfqUcrAkCYAAgABH7XA=
- Thread-topic: [PATCH v10 33/38] x86/entry: Add fred_entry_from_kvm() for VMX to handle IRQ/NMI
> > + /*
> > + * Don't check the FRED stack level, the call stack leading to this
> > + * helper is effectively constant and shallow (relatively speaking).
>
> It's more that we don't need to protect from reentrancy. The external
> interrupt uses stack level 0 so no adjustment would be needed anyway,
> and NMI does not use an IST even in the non-FRED case.
I will incorporate this comment.
I think a VMX NMI is kind of like a user level NMI, and we don't need
to worry about nested NMIs.
>
> > + * Emulate the FRED-defined redzone and stack alignment.
> > + */
> > + sub $(FRED_CONFIG_REDZONE_AMOUNT << 6), %rsp
> > + and $FRED_STACK_FRAME_RSP_MASK, %rsp
|