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

Re: [PATCH v4 2/2] x86/svm: Use the virtual NMI when available


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Abdelkareem Abdelsaamad <abdelkareem.abdelsaamad@xxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 19 Feb 2026 16:34:18 +0000
  • 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=arcselector10001; 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=sFlvpKpYZ5wOfRey52gvC90Yc7wbRWfMPrLqgbfVZw0=; b=kddUZa+ci6Uwc9h64cW8Ec2DzXsEy2tafvzD1wNuejYIRVjUC3KrRuxG5Fwy3VjJeEfnhgcMJu+6c8pC7STtsmCpC+sNmJRHn1bYtPVV4W1fkdUQXosm5a+iLDUNE4D+gwbM+x0q2NG7xlJNtTBI7JiPdrPu+pMZto2sCsnufgyHG5ronMy2udVKuCf/xwjSrV4fCcaNA1zY1qRv0pxZxrLljxGC7ALLwtTA8y1tOop4DJ+5s2M1VlL/pmdiF4Z131iekb3nH+FywJ+2Vinu4N30k90sxD8fQPb71VHL3nsoqyCDfCaYUp/Q0DH16IyxZkbPx0D4R878LQO98VuUfw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mIhof0Mdo5snoMvr/m8l2X49lHkv7Oozw4sZtJtFPlOTnwkJWSYJvEcCSJOPZlWMUER8S5NoIXCB6KvBJPpZvFzWwlQ8FudeLzXVRCXDNV2wMU0GwonkPjmeKUvy6PvXTOMaEX/g025QgxD58aJ3kQ4eoc71Q0FHuwZm/eBhJzpCnuXh0vIRoC3QaBgy40rQ6cKMJZq/uhcjZ+dhP/qRG+Wne0h/pxFW0+Tx18ksxhziz60Y3MNMRWcDj3gz3qFPv4mmoqxQVW/L9UU0c6joa3jjo4pcIMTfEfCRSXylFzY9ri/eXLgGqf7Ui9nEWPszpKzGWjM97SneP3FvLgx7fA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, roger.pau@xxxxxxxxxx, teddy.astie@xxxxxxxxxx, jason.andryuk@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 19 Feb 2026 16:34:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 19/02/2026 4:26 pm, Jan Beulich wrote:
> On 18.02.2026 15:48, Abdelkareem Abdelsaamad wrote:
>> --- a/xen/arch/x86/hvm/svm/intr.c
>> +++ b/xen/arch/x86/hvm/svm/intr.c
>> @@ -33,6 +33,14 @@ static void svm_inject_nmi(struct vcpu *v)
>>      u32 general1_intercepts = vmcb_get_general1_intercepts(vmcb);
>>      intinfo_t event;
>>  
>> +    if ( vmcb->_vintr.fields.vnmi_enable )
>> +    {
>> +        if ( !vmcb->_vintr.fields.vnmi_pending )
>> +            vmcb->_vintr.fields.vnmi_pending = 1;
> Why the (inner) conditional?
>
> Also, as I think Teddy had already indicated before, might we better not use
> the _vintr field directly, but rather use the vmcb_[gs]et_vintr() wrappers?

vNMI is not covered by the TPR cleanbit, and needs to avoid that
setter.  This register is a complete mess, given how it's grown over the
generations.

Leave it opencoded for now, and I'll see about cleaning things up when
getting properly into the nested virt work.

~Andrew



 


Rackspace

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