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

Re: [PATCH] x86/svm: Don't clear clean bits on every context switch


  • To: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Tue, 6 Oct 2026 12:23:49 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=qWLsZvlZX7pSxYLD31SMhUpsra19H0qFDFuj1hVn+6M=; b=gVdFqIYzQTOKX0nmeKvQzw15NcVkiLSVZRGkUPksAu7vXt8KNJ4h9rIAaZMiwtDZ0VyA8dxnIuW7o536KKxLrR0duJJ256PJudh/5DNBP1WW75PplXxv3nEWaErDvHwlARI3+j/buq8T2RuDmdaOIdXrY5/bBuVs9+6o6Hk8yaVnS8M1bnMVNUZa6w4ITpZQCmFrEWbEmULTa9Gtk8Tabq05yXg9Jt0Jk6ERiMjPxVJ6rv72I16fbCY7rGNeXEqtLhUGV8HNSeHY+C2SLJ1hRHGb5AYzcbD/eIzVdJffCiWVqR4yFvkh8W0Bt7/8TGKKmc2cc3ByywgtHYH9Rtf1WA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aLP3CvU5c28llY55pgkw+ZraPZm4mgxZ4we+Nk9awcNu6I55lqLzy+jdHvKm+XFqrMgWq58mWvuJ1iTENN49j1vl0rQyPNolK0yJMBzzS3i40QNHtZCNeBbOO67O7Ef7JGXzHqcjnNDqAfNqRmQGvDVbGhLrW8/lYEfVZ17DGlEqv9hqb9xXAA+USPUQnQDhdVpmQzMkokQGLgtx4qZEJbrgzbfWEZUjt3qtH41Mmd4k2zfsWNvtGWzsPNo6iZVHHCKbjw1UIozWc4dwz0uCBcXRTiLWNKWLje8ie+TYmIGO9YsYiU6P7Jxco0IB4INGhBlh/GxmVWUuW5oLeqp8vA==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, Teddy Astie <teddy.astie@xxxxxxxxxx>
  • Delivery-date: Tue, 06 Oct 2026 17:01:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2026-10-06 10:48, Ross Lagerwall wrote:
Clear the cleanbits only when the VMCB is used on a different pCPU
rather than on every context switch to the vCPU. This follows the APM
guideline for when to clear the cleanbits:

"The hypervisor executes the guest on a different CPU core than one used
the last time that guest was executed."

Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>

The other times are:
"This is the first time a particular guest is run."

The vmcb page is zeroed in alloc_vmcb().

"The hypervisor has moved the guest's VMCB to a different physical page since the last time that guest was executed."

VMCBs aren't moved.

Regards,
Jason



 


Rackspace

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