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

Re: [PATCH v1 4/5] x86/nestedsvm: update vmcb correctly


  • To: abdelkareem.abdelsaamad@xxxxxxxxxx
  • From: chunjie.zhu@xxxxxxxxxx
  • Date: Thu, 26 Nov 2026 18:34:20 +0800
  • 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=y0f8OYDJlKJydwPxHZsSA3IOV/pqVClfbloEvnh5JD4=; b=lf2G2m8K74ejbmoXi7kS50nCU0RonT40Yerrqy56NtvoeXkgHJM86Eymwe/54mG5KQ40QNgdkYPKaCq5uKDsJEGImrYh6i+b+C+muxsA8YATuIEJiNEHPbKOoZPZ4FMMW0QuyN20WiCFuzLIJsqEJdoS8JFwsGah9qj1ekEyjAQkrG7GRnM0knRLiYWvVodmoQhk1nf/EenIIqPxCB84dYLpNC5twPSGlbWkYKZFtSoELQNO+8wcf4lVCjYSu3FqZwQOtz1Hnyc/q+cFXp+v6uJSvVcnb0lZYOg4s2v+0NHH0udDfN8h/g252yJ93KpmB4yvjeydAnN6mS/aTQGpOQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XHI6KdKz2ebkqYmrvOPWdwQa+K2jv241WLKw1T9C+JzNTruUVE77Mxfj3fityCHV6QlwLzT4iICB5RQmnEcXkM3nKYbVnsBQRHyM6NnPPgY5cjOQRXbunnm9R/RKVMnvR1xYsa8Nt5W14+UJ6XE/TqAl2u7AsnMPm6L4VrBh9l8rBrHEtYFONNhZpb62qq8/mqsBPDAVZFQoZngvNkWy2wv6fjUcyf9cL+TAb97/pvrxVvmLFTgVo8q5lk9i/MQZus/lKipa2kiOzJ08Tb+qpmld+r1Zu7RETSBxZXfuDTMLPTKWLLpi5n88z2qME3/WQxSuDNF0I9LXg/SJjo20iA==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-Id:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: andrew.cooper3@xxxxxxxxxx, chunjie.zhu@xxxxxxxxxx, jason.andryuk@xxxxxxx, jbeulich@xxxxxxxx, roger@xxxxxxxxxxxxxx, teddy.astie@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, Lin Liu <lin.liu01@xxxxxxxxxx>
  • Delivery-date: Thu, 26 Nov 2026 10:34:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Nov 18, 2026 at 02:08:11PM +0000, Abdelkareem Abdelsaamad wrote:
> > +     * Virtual Interrupts.  #VMEXIT writes back V_TPR and V_IRQ (APM vol.2
> > +     * 15.6); the remaining fields do not change.
> Not sure if this has changed recently but the APM also mentions the
> INTERRUPT_SHADOW bits? Not sure if the plural bits means also
> GUEST_INTERRUPT_MASK?

Thanks for the review, Abdelkareem.

You are right that the comment is misleading.  The code is not affected:
the int_stat field (INTERRUPT_SHADOW and GUEST_INTERRUPT_MASK) is copied
back as a whole right after this block, via
"ns_vmcb->int_stat = n2vmcb->int_stat;".  The comment only describes
_vintr, so saying "the remaining fields do not change" next to it reads
as if int_stat is not written back.

Also, I have to apologise for the format of this v1.  It is not a proper
patch series: I squashed changes written by several other people into a
single "update vmcb correctly" patch, and left only my own
Signed-off-by on it.  This hunk is an example.  The comment and the
change to copy back only V_TPR, V_IRQ and (if enabled by L1) vGIF come
from Lin Liu's "x86/nestedsvm: write back only what #VMEXIT updates",
and the APM references (vol.2 15.5, 15.6, 15.33.2) are from his commit
message, not from me.  That makes it hard to review, and loses the
authorship and the reasoning in the original commit messages.

v2 ("[PATCH v2 00/13] x86/nestedsvm: rework nested VMRUN/VMEXIT
handling") already splits the work into smaller, separate patches, but
I will make sure that every patch keeps its original author and commit
message, and that each patch does one thing.

Patches this large are also very hard to review.  From now on I will
split the changes into small patches and submit them one by one, so that
each can be reviewed and committed on its own.




 


Rackspace

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