IP Library Granted Patent US 12,277,432
Granted Patent B2
US 12,277,432 · App. 17/176,130 · Granted Apr 15, 2025

Methods and systems for using a peripheral device to assist virtual machine IO memory access tracking

Inventors: Chaitanya Huilgol (Bangalore, IN); J. Bradley Smith (San Jose, CA); Allen Hubbe (Durham, NC); Balakrishnan Raman (Fremont, CA); Harinadh Nagulapalli (San Jose, CA); Krishna Doddapaneni (Cupertino, CA); Murty Subba Rama Chandra Kotha (San Jose, CA); Varada Raja Kumar Kari (Bengaluru, IN)
Assignee: Pensando Systems Inc.
G06F9/45558G06F9/5077G06F12/0882G06F13/105G06F13/4221G06F9/455G06F2009/4557G06F2009/45579G06F2009/45583G06F2213/0026
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,277,432
App. No.
17/176,130
Granted
Apr 15, 2025
Kind
B2
Abstract

SR-IOV (single root IO virtualization) capable PCIe devices can implement virtual functions (VFs) that are assigned to VMs running on a host machine, thereby speeding IO operation by writing directly to the VMs' memory while bypassing the hypervisor managing the VMs. As such, VFs thwart the dirty page tracking that hypervisors use to minimize VM downtime when the VM is migrated between hosts. The SR-IOV PCIe devices can help resolve this problem by maintaining dirty page tracking data for VMs running on the host machine. The SR-IOV PCIe devices bypassing the hypervisor while writing into a memory page of the VM can set the dirty page tracking data to indicate the memory pages that are dirty (i.e., written to by the VF), and can provide access to the dirty page tracking data. The hypervisor can thereby obtain and use the dirty page tracking data.

Claims (37)

1. A method comprising:

implementing a first single root IO virtualization (SR-IOV) physical function (PF) that is a network interface card (NIC) PF;

implementing a second SR-IOV PF that is a dirty page tracker PF;

using a virtual function (VF) implemented by the NIC PF to bypass a hypervisor that is used to manage a virtual machine (VM) while writing into a memory page of the VM;

setting dirty page tracking data to indicate that the memory page is dirty in response to the VF writing into the memory page of the VM; and

providing access to the dirty page tracking data via the dirty page tracker PF.

2. The method of claim 1 wherein the NIC PF is configured to set the dirty page tracking data to indicate that the memory page is dirty in response to the NIC PF writing into the memory page.

3. The method of claim 1 wherein the dirty page tracker PF is configured to provide access to the dirty page tracking data via a circular buffer.

4. The method of claim 1 wherein a peripheral component interface express (PCIe) device is configured to implement the NIC PF and the dirty page tracker PF.

5. The method of claim 4 further including issuing a rate limiting command to the VF, wherein

the VF is configured to limit a memory write rate in response to the rate limiting command.

6. The method of claim 1 wherein the dirty page tracker PF is configured to maintain the dirty page tracking data using a bitmap and to provide an atomic read and clear operation for reading the bitmap.

7. The method of claim 1 wherein the dirty page tracking data is maintained in a bitmap, and the dirty page tracker PF provides access to the dirty page tracking data using an atomic read and clear operation.

8. The method of claim 4 wherein a network server implemented by the PCIe device provides access to the dirty page tracking data.

9. The method of claim 1 wherein:

the NIC PF is configured to initiate dirty page tracking for the VM in response to receiving a tracking start command; and

the NIC PF is configured to stop dirty page tracking for the VM in response to receiving a tracking stop command.

10. A system comprising:

a peripheral component interconnect express (PCIe) device configured to:

implement a first single root IO virtualization (SR-IOV) physical function (PF) that is a dirty page tracker PF that provides access to dirty page tracking data;

implement a second SR-IOV physical function that is a network interface card (NIC) PF that includes a virtual function (VF) that is configured to bypass a hypervisor while writing into a memory page of a virtual machine (VM) that is managed by the hypervisor; and

set the dirty page tracking data to indicate that the memory page of the VM is dirty in response to the VF bypassing the hypervisor while writing into the memory page.

11. The system of claim 10 wherein:

the dirty page tracker PF is configured for a host driver running on a host machine to access the dirty page tracking data; and

the VF is configured for a VF driver running on the VM to access the VF.

12. The system of claim 11 wherein the VF is configured to limit a memory write rate in response to receiving a rate limiting command from the PF.

13. The system of claim 11 wherein the dirty page tracker PF is configured to clear the dirty page tracking data in response to a read operation that reads the dirty page tracking data.

14. The system of claim 11 further including a network server implemented by the PCIe device that provides access to the dirty page tracking data.

15. The system of claim 11 wherein:

the NIC PF is configured to initiate dirty page tracking for the VM in response to receiving a tracking start command; and

the NIC PF is configured to stop dirty page tracking for the VM in response to receiving a tracking stop command.

16. A system comprising:

a peripheral component interconnect express (PCIe) device configured to:

implement a first single root IO virtualization (SR-IOV) physical function (PF) configured to implement a virtual function means for bypassing a hypervisor while writing into a memory page of a virtual machine (VM) that uses the hypervisor to manage the VM;

implement a means for indicating the memory page is dirty due to the virtual function means bypassing the hypervisor while writing into the memory page; and

implement a second SR-IOV PF configured to implement an access means for providing access to the means for indicating the memory page is dirty.

17. The system of claim 16 further including a means for throttling the virtual function means based on a state of the means for indicating the memory page is dirty.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 16, 2021
From: HUILGOL, CHAITANYA; SMITH, J. BRADLEY; HUBBE, ALLEN; RAMAN, BALAKRISHNAN; NAGULAPALLI, HARINADH; DODDAPANENI, KRISHNA; KOTHA, MURTY SUBBA RAMA CHANDRA; KARI, VARADA RAJA KUMAR
To: PENSANDO SYSTEMS INC.
Reel/Frame 055276/0618 →
Continuity (1)
Related Publication 20220261266A1 · Aug 18, 2022
References Cited (21)
US 9436751B1 · Serebrin · 2016 [cited by examiner]
US 9875131B2 · Tsirkin · 2018 [cited by examiner]
US 9898430B2 · Davda · 2018 [cited by examiner]
US 10592271B1 · Sicron · 2020 [cited by examiner]
US 10884790B1 · Saidi · 2021 [cited by examiner]
US 20130132952A1 · Shah · 2013 [cited by examiner]
US 20140181461A1 · Kegel et al. · 2014 [cited by applicant]
US 20150156124A1 · Tsuji · 2015 [cited by examiner]
US 20160132443A1 · Davda et al. · 2016 [cited by applicant]
US 20180060100A1 · Tsirkin · 2018 [cited by examiner]
US 20200099628A1 · Parikh · 2020 [cited by examiner]
US 20200356493A1 · Mukherjee · 2020 [cited by examiner]
WO 2021000689A1 · 2021 [cited by applicant]
Chenbo, Xia et al. “A SUIVey of Live Migration Techniques for SR-IOV Device Pass-through”, 2018 IEEE 9th International Conference on Software Engineering and Service Science (ICSESS), Nov. 23, 2018, 4 pgs. [cited by applicant]
European Search Report, application No. EP 22 15 6323, Jun. 10, 2022, 2 pgs. [cited by applicant]
Bitchebe, Stella et al. “Intel Page Modification Logging, a hardware virtualization feature: study and improvement for virtual machine working set estimation”, Jan. 26, 2020, 14 pgs. [cited by applicant]
AMD: “Specification Agreement”, AMD I/O Virtualization Technology (IOMMU) Specification, 48882—Rev 3.05-PUB—Jan. 2020, 278 pgs. [cited by applicant]
Kristiansen, Lars Bjørlykke, “PCIe Device Lending, Using Non-Transparent Bridges to Share Devices”, Master's Thesis Spring 2015, 96 pgs. [cited by applicant]
Wikipedia, “Input-output memory management unit”, https://en.wikipedia.org/wiki/Input-output_memory_management_unit, retrieved Jan. 21, 2021, 4 pgs. [cited by applicant]
lwn.net: “Kernel development”, retrieved from the internet <URL: https://lwn.net/Articles/347815/>, [retrieved on Feb. 15, 2021], 13 pgs. [cited by applicant]
Pinchart, Lauren, “Mastering the DMA and IOMMU APIs”, Embedded Linux Conference , San Jose, (2014), 102 pgs. [cited by applicant]