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

Re: [Xen-devel] [PATCH RFC V2 5/6] xen, libxc: Request page fault injection via libxc


  • To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Thu, 17 Jul 2014 15:07:41 +0300
  • Cc: mdontu@xxxxxxxxxxxxxxx, tim@xxxxxxx, JBeulich@xxxxxxxx, xen-devel@xxxxxxxxxxxxx
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Thu, 17 Jul 2014 12:06:44 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=chKyq1rM6Zb0gH49SUKd9k+Ojeft7xBFbwCWpNhQK6pnekom+MLP1rvrwOY5hG5d5RrOxtgDVov57nKDo3qFeOli6e4o2pn3Ps6DclyblMO6YfHV3bViY+fAqyTII8fw6hqB2d0sQoK4oIdlask80uycV5libJ+bHORb1OSGLX6e2A+ScwF1/+ZnS29wtbOIKC+XhKz5soRTikHmEhDbUrTn5ym1/GsOeWkWT2rl3Nu5jdl6lOmhebGUiQSuJJJap1j7f9YG0TUUc9mN/wNsy6KDClx3fWr+noPrm0QDJaVWL+5IAJET9eXkegT9FVIAxj+sdntUWX0gsihUUcxiSQ==; h=Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 07/17/2014 02:53 PM, Ian Campbell wrote:
> On Fri, 2014-07-11 at 19:06 +0100, Andrew Cooper wrote:
>> On 11/07/14 16:43, Razvan Cojocaru wrote:
>>> Added new XEN_DOMCTL_set_pagefault_info hypercall, used by libxc's
>>> new xc_domain_set_pagefault_info() function to set per-domain page
>>> fault injection information. All a call does is set per-domain info,
>>> and nothing actually happens until VMENTRY time, and then only if
>>> all conditions are met (the guest is in user mode, the set value
>>> matches CR3, and there are no other pending traps).
>>> This mechanism allows bringing in swapped-out pages for inspection.
>>>
>>> Signed-off-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
>>
>> For the record, I still think this is a bad idea to be working against a
>> guest OS paging algorithm, and I am uneasy about whether it is sensible
>> to introduce abilities like that into the Xen API.
> 
> Indeed.
> 
> From the tools side the new libxc function is a correct wrapping of the
> underlying hypercall, so if/when the hypervisor maintainers are happy
> with the interface it's fine by me, with one minor comment.

Thanks for the review!

>>> +int xc_domain_set_pagefault_info(xc_interface *xch,
>>> +                                 uint32_t domid,
>>> +                                 xen_domctl_set_pagefault_info_t *info)
>>> +{
>>> +    DECLARE_DOMCTL;
>>> +
>>> +    if (info == NULL)
>>> +        return -1;
>>> +
>>> +    domctl.cmd = XEN_DOMCTL_set_pagefault_info;
>>> +    domctl.domain = (domid_t)domid;
>>> +    domctl.u.set_pagefault_info.address_space = info->address_space;
>>> +    domctl.u.set_pagefault_info.virtual_address = info->virtual_address;
>>> +    domctl.u.set_pagefault_info.write_access = info->write_access;
> 
> Aren't these three lines just "domctl.u.set_pagefault_info = *info;"?

Yes, they are. I'll change that to the reader-friendlier one-liner.


Thanks,
Razvan Cojocaru

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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