From mboxrd@z Thu Jan 1 00:00:00 1970 From: Corneliu ZUZU Subject: Re: [PATCH] arm/monitor vm-events: Implement guest-request support Date: Tue, 23 Feb 2016 13:00:47 +0200 Message-ID: <56CC3BDF.5000603@bitdefender.com> References: <1455824116-13783-1-git-send-email-czuzu@bitdefender.com> <56CC21B1.70202@bitdefender.com> <56CC3A61.2060409@bitdefender.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4683459669809151794==" Return-path: In-Reply-To: <56CC3A61.2060409@bitdefender.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Razvan Cojocaru , xen-devel@lists.xen.org Cc: Tamas K Lengyel , Keir Fraser , Ian Campbell , Andrew Cooper , Stefano Stabellini , Jan Beulich List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============4683459669809151794== Content-Type: multipart/alternative; boundary="------------040307020304040205010101" This is a multi-part message in MIME format. --------------040307020304040205010101 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 2/23/2016 12:54 PM, Razvan Cojocaru wrote: > On 02/23/2016 11:09 AM, Corneliu ZUZU wrote: >> On 2/18/2016 9:35 PM, Corneliu ZUZU wrote: >>> This patch adds ARM support for guest-request monitor vm-events. >>> >>> Summary of changes: >>> == Moved to common-side: >>> * XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST handling (moved from X86 >>> arch_monitor_domctl_event to common monitor_domctl) >>> * hvm_event_guest_request, hvm_event_traps (also added target vcpu >>> as param) >>> * guest-request bits from X86 'struct arch_domain' (to common >>> 'struct domain') >>> == ARM implementations: >>> * do_hvm_op now handling of HVMOP_guest_request_vm_event => calls >>> hvm_event_guest_request (as on X86) >>> * arch_monitor_get_capabilities: updated to reflect support for >>> XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST >>> * vm_event_init_domain (does nothing), vm_event_cleanup_domain >>> == Misc: >>> * hvm_event_fill_regs renamed to arch_hvm_event_fill_regs, no longer >>> X86-specific. ARM-side implementation of this function >>> currently does >>> nothing, that will be added in a separate patch. >>> >>> Signed-off-by: Corneliu ZUZU >> Before sending in the next revision of this patch, I have a few >> questions I'd like to ask. >> That being the case, I thought it would be ok to also include *all* the >> changes that will be done in the next revision here for (potentially) >> additional feedback. >> >> Already discussed changes TBD: >> * Add #define altp2m_active(d) (0) and implement >> p2m_get_vcpu_altp2m_idx(v) for ARM to remove #ifdef CONFIG_X86 in >> hvm_event_traps (Stefano, Tamas) >> * Remove wrong copyright comment (Jan) >> * Change bitfields members type back to unsigned int (Jan) >> * Move hvm_event_traps and hvm_event_guest_request to common/vm_event.c >> and rename them to vm_event_traps and vm_event_guest_request (Jan) >> >> Questions: >> >> 1) I've noticed the practice in Xen is to prepend the arch_ prefix to >> functions that usually have a counterpart on the common-side, i.e. there >> are a lot of arch-specific functions missing this prefix. Would it then >> be advised to: >> - rename arch_monitor_get_capabilities to >> vm_event_monitor_get_capabilities and move it to vm_event.h >> - rename arch_hvm_event_fill_regs to vm_event_fill_regs and move it >> to vm_event.h > Please see the recent commit adc75eba8b15c7103a010f736fe62e3fb2383964 in > staging. > > > Cheers, > Razvan > Great, that settles arch_hvm_event_fill_regs -> vm_event_fill_regs. Should I then do the same for arch_monitor_get_capabilities (-> vm_event_monitor_get_capabilities)? Thanks, Corneliu. --------------040307020304040205010101 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 7bit
On 2/23/2016 12:54 PM, Razvan Cojocaru wrote:
On 02/23/2016 11:09 AM, Corneliu ZUZU wrote:
On 2/18/2016 9:35 PM, Corneliu ZUZU wrote:
This patch adds ARM support for guest-request monitor vm-events.

Summary of changes:
== Moved to common-side:
   * XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST handling (moved from X86
       arch_monitor_domctl_event to common monitor_domctl)
   * hvm_event_guest_request, hvm_event_traps (also added target vcpu
as param)
   * guest-request bits from X86 'struct arch_domain' (to common
'struct domain')
== ARM implementations:
   * do_hvm_op now handling of HVMOP_guest_request_vm_event => calls
       hvm_event_guest_request (as on X86)
   * arch_monitor_get_capabilities: updated to reflect support for
       XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST
   * vm_event_init_domain (does nothing), vm_event_cleanup_domain
== Misc:
   * hvm_event_fill_regs renamed to arch_hvm_event_fill_regs, no longer
       X86-specific. ARM-side implementation of this function
currently does
       nothing, that will be added in a separate patch.

Signed-off-by: Corneliu ZUZU <czuzu@bitdefender.com>
Before sending in the next revision of this patch, I have a few
questions I'd like to ask.
That being the case, I thought it would be ok to also include *all* the
changes that will be done in the next revision here for (potentially)
additional feedback.

Already discussed changes TBD:
* Add #define altp2m_active(d) (0) and implement
p2m_get_vcpu_altp2m_idx(v) for ARM to remove #ifdef CONFIG_X86 in
hvm_event_traps (Stefano, Tamas)
* Remove wrong copyright comment (Jan)
* Change bitfields members type back to unsigned int (Jan)
* Move hvm_event_traps and hvm_event_guest_request to common/vm_event.c
and rename them to vm_event_traps and vm_event_guest_request (Jan)

Questions:

1) I've noticed the practice in Xen is to prepend the arch_ prefix to
functions that usually have a counterpart on the common-side, i.e. there
are a lot of arch-specific functions missing this prefix. Would it then
be advised to:
    - rename arch_monitor_get_capabilities to
vm_event_monitor_get_capabilities and move it to vm_event.h
    - rename arch_hvm_event_fill_regs to vm_event_fill_regs and move it
to vm_event.h
Please see the recent commit adc75eba8b15c7103a010f736fe62e3fb2383964 in
staging.


Cheers,
Razvan


Great, that settles arch_hvm_event_fill_regs -> vm_event_fill_regs. Should I then do the same for arch_monitor_get_capabilities (-> vm_event_monitor_get_capabilities)?

Thanks,
Corneliu.
--------------040307020304040205010101-- --===============4683459669809151794== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============4683459669809151794==--