Re: [RFC][PATCH 3/5] [PATCH 3/5] kvm-ept-idle: HVA indexed EPT read

2018-09-04 Thread Fengguang Wu
3/5] kvm-ept-idle: HVA indexed EPT read On 1 Sep 2018, at 13:28, Fengguang Wu wrote: +static ssize_t ept_idle_read(struct file *file, char *buf, +size_t count, loff_t *ppos) +{ + struct task_struct *task = file->private_data; + struct ept_idle_ctrl *

RE: [RFC][PATCH 3/5] [PATCH 3/5] kvm-ept-idle: HVA indexed EPT read

2018-09-04 Thread Peng, DongX
, Ying ; Brendan Gregg ; k...@vger.kernel.org; LKML Subject: Re: [RFC][PATCH 3/5] [PATCH 3/5] kvm-ept-idle: HVA indexed EPT read On 1 Sep 2018, at 13:28, Fengguang Wu wrote: > +static ssize_t ept_idle_read(struct file *file, char *buf, > + size_t count, loff_t

Re: [RFC][PATCH 3/5] [PATCH 3/5] kvm-ept-idle: HVA indexed EPT read

2018-09-04 Thread Nikita Leshenko
On 1 Sep 2018, at 13:28, Fengguang Wu wrote: > +static ssize_t ept_idle_read(struct file *file, char *buf, > + size_t count, loff_t *ppos) > +{ > + struct task_struct *task = file->private_data; > + struct ept_idle_ctrl *eic; > + unsigned long hva_start = *ppos

[RFC][PATCH 3/5] [PATCH 3/5] kvm-ept-idle: HVA indexed EPT read

2018-09-01 Thread Fengguang Wu
For virtual machines, "accessed" bits will be set in guest page tables and EPT/NPT. So for qemu-kvm process, convert HVA to GFN to GPA, then do EPT/NPT walks. Thanks to the in-memslot linear HVA-GPA mapping, the conversion can be done efficiently, outside of the loops for page table walks. In this