* [PATCH] monitor: Rename vm_event_monitor_get_capabilities to arch_monitor_get_capabilities
@ 2016-04-14 16:33 Tamas K Lengyel
2016-04-14 16:36 ` Andrew Cooper
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Tamas K Lengyel @ 2016-04-14 16:33 UTC (permalink / raw)
To: xen-devel
Cc: Tamas K Lengyel, Keir Fraser, Razvan Cojocaru, Andrew Cooper,
Julien Grall, Stefano Stabellini, Jan Beulich
The monitor_get_capabilities check actually belongs to the monitor subsystem so
relocating and renaming it to sanitize the code's name and location.
Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
Cc: Razvan Cojocaru <rcojocaru@bitdefender.com>
Cc: Keir Fraser <keir@xen.org>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@citrix.com>
Cc: Julien Grall <julien.grall@arm.com>
---
xen/arch/x86/monitor.c | 2 +-
xen/common/monitor.c | 5 ++---
xen/include/asm-arm/monitor.h | 11 ++++++++++-
xen/include/asm-arm/vm_event.h | 9 ---------
xen/include/asm-x86/monitor.h | 23 +++++++++++++++++++++++
xen/include/asm-x86/vm_event.h | 23 -----------------------
6 files changed, 36 insertions(+), 37 deletions(-)
diff --git a/xen/arch/x86/monitor.c b/xen/arch/x86/monitor.c
index 1fec412..621f91a 100644
--- a/xen/arch/x86/monitor.c
+++ b/xen/arch/x86/monitor.c
@@ -126,7 +126,7 @@ int arch_monitor_domctl_event(struct domain *d,
default:
/*
- * Should not be reached unless vm_event_monitor_get_capabilities() is
+ * Should not be reached unless arch_monitor_get_capabilities() is
* not properly implemented.
*/
ASSERT_UNREACHABLE();
diff --git a/xen/common/monitor.c b/xen/common/monitor.c
index d950a7c..7c3d1c8 100644
--- a/xen/common/monitor.c
+++ b/xen/common/monitor.c
@@ -24,7 +24,6 @@
#include <xsm/xsm.h>
#include <public/domctl.h>
#include <asm/monitor.h>
-#include <asm/vm_event.h>
int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *mop)
{
@@ -48,12 +47,12 @@ int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *mop)
if ( unlikely(mop->event > 31) )
return -EINVAL;
/* Check if event type is available. */
- if ( unlikely(!(vm_event_monitor_get_capabilities(d) & (1U << mop->event))) )
+ if ( unlikely(!(arch_monitor_get_capabilities(d) & (1U << mop->event))) )
return -EOPNOTSUPP;
break;
case XEN_DOMCTL_MONITOR_OP_GET_CAPABILITIES:
- mop->event = vm_event_monitor_get_capabilities(d);
+ mop->event = arch_monitor_get_capabilities(d);
return 0;
default:
diff --git a/xen/include/asm-arm/monitor.h b/xen/include/asm-arm/monitor.h
index 6e36e99..3fd3c9d 100644
--- a/xen/include/asm-arm/monitor.h
+++ b/xen/include/asm-arm/monitor.h
@@ -39,11 +39,20 @@ int arch_monitor_domctl_event(struct domain *d,
/*
* No arch-specific monitor vm-events on ARM.
*
- * Should not be reached unless vm_event_monitor_get_capabilities() is not
+ * Should not be reached unless arch_monitor_get_capabilities() is not
* properly implemented.
*/
ASSERT_UNREACHABLE();
return -EOPNOTSUPP;
}
+static inline uint32_t arch_monitor_get_capabilities(struct domain *d)
+{
+ uint32_t capabilities = 0;
+
+ capabilities = (1U << XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST);
+
+ return capabilities;
+}
+
#endif /* __ASM_ARM_MONITOR_H__ */
diff --git a/xen/include/asm-arm/vm_event.h b/xen/include/asm-arm/vm_event.h
index 014d9ba..a3fc4ce 100644
--- a/xen/include/asm-arm/vm_event.h
+++ b/xen/include/asm-arm/vm_event.h
@@ -59,13 +59,4 @@ static inline void vm_event_fill_regs(vm_event_request_t *req)
/* Not supported on ARM. */
}
-static inline uint32_t vm_event_monitor_get_capabilities(struct domain *d)
-{
- uint32_t capabilities = 0;
-
- capabilities = (1U << XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST);
-
- return capabilities;
-}
-
#endif /* __ASM_ARM_VM_EVENT_H__ */
diff --git a/xen/include/asm-x86/monitor.h b/xen/include/asm-x86/monitor.h
index 0954b59..446b2af 100644
--- a/xen/include/asm-x86/monitor.h
+++ b/xen/include/asm-x86/monitor.h
@@ -50,4 +50,27 @@ int arch_monitor_domctl_op(struct domain *d, struct xen_domctl_monitor_op *mop)
int arch_monitor_domctl_event(struct domain *d,
struct xen_domctl_monitor_op *mop);
+static inline uint32_t arch_monitor_get_capabilities(struct domain *d)
+{
+ uint32_t capabilities = 0;
+
+ /*
+ * At the moment only Intel HVM domains are supported. However, event
+ * delivery could be extended to AMD and PV domains.
+ */
+ if ( !is_hvm_domain(d) || !cpu_has_vmx )
+ return capabilities;
+
+ capabilities = (1U << XEN_DOMCTL_MONITOR_EVENT_WRITE_CTRLREG) |
+ (1U << XEN_DOMCTL_MONITOR_EVENT_MOV_TO_MSR) |
+ (1U << XEN_DOMCTL_MONITOR_EVENT_SOFTWARE_BREAKPOINT) |
+ (1U << XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST);
+
+ /* Since we know this is on VMX, we can just call the hvm func */
+ if ( hvm_is_singlestep_supported() )
+ capabilities |= (1U << XEN_DOMCTL_MONITOR_EVENT_SINGLESTEP);
+
+ return capabilities;
+}
+
#endif /* __ASM_X86_MONITOR_H__ */
diff --git a/xen/include/asm-x86/vm_event.h b/xen/include/asm-x86/vm_event.h
index 0470240..026f42e 100644
--- a/xen/include/asm-x86/vm_event.h
+++ b/xen/include/asm-x86/vm_event.h
@@ -44,27 +44,4 @@ void vm_event_set_registers(struct vcpu *v, vm_event_response_t *rsp);
void vm_event_fill_regs(vm_event_request_t *req);
-static inline uint32_t vm_event_monitor_get_capabilities(struct domain *d)
-{
- uint32_t capabilities = 0;
-
- /*
- * At the moment only Intel HVM domains are supported. However, event
- * delivery could be extended to AMD and PV domains.
- */
- if ( !is_hvm_domain(d) || !cpu_has_vmx )
- return capabilities;
-
- capabilities = (1U << XEN_DOMCTL_MONITOR_EVENT_WRITE_CTRLREG) |
- (1U << XEN_DOMCTL_MONITOR_EVENT_MOV_TO_MSR) |
- (1U << XEN_DOMCTL_MONITOR_EVENT_SOFTWARE_BREAKPOINT) |
- (1U << XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST);
-
- /* Since we know this is on VMX, we can just call the hvm func */
- if ( hvm_is_singlestep_supported() )
- capabilities |= (1U << XEN_DOMCTL_MONITOR_EVENT_SINGLESTEP);
-
- return capabilities;
-}
-
#endif /* __ASM_X86_VM_EVENT_H__ */
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] monitor: Rename vm_event_monitor_get_capabilities to arch_monitor_get_capabilities
2016-04-14 16:33 [PATCH] monitor: Rename vm_event_monitor_get_capabilities to arch_monitor_get_capabilities Tamas K Lengyel
@ 2016-04-14 16:36 ` Andrew Cooper
2016-04-14 17:01 ` Tamas K Lengyel
2016-04-14 16:44 ` Razvan Cojocaru
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Andrew Cooper @ 2016-04-14 16:36 UTC (permalink / raw)
To: Tamas K Lengyel, xen-devel
Cc: Stefano Stabellini, Julien Grall, Keir Fraser, Jan Beulich,
Razvan Cojocaru
On 14/04/16 17:33, Tamas K Lengyel wrote:
> The monitor_get_capabilities check actually belongs to the monitor subsystem so
> relocating and renaming it to sanitize the code's name and location.
>
> Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
> Cc: Razvan Cojocaru <rcojocaru@bitdefender.com>
> Cc: Keir Fraser <keir@xen.org>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: Stefano Stabellini <stefano.stabellini@citrix.com>
> Cc: Julien Grall <julien.grall@arm.com>
Looks sensible. Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
However, this is definitely 4.8 material at this point.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] monitor: Rename vm_event_monitor_get_capabilities to arch_monitor_get_capabilities
2016-04-14 16:33 [PATCH] monitor: Rename vm_event_monitor_get_capabilities to arch_monitor_get_capabilities Tamas K Lengyel
2016-04-14 16:36 ` Andrew Cooper
@ 2016-04-14 16:44 ` Razvan Cojocaru
2016-04-20 10:34 ` Julien Grall
2016-04-20 11:26 ` Jan Beulich
3 siblings, 0 replies; 7+ messages in thread
From: Razvan Cojocaru @ 2016-04-14 16:44 UTC (permalink / raw)
To: Tamas K Lengyel, xen-devel
Cc: Andrew Cooper, Julien Grall, Keir Fraser, Jan Beulich,
Stefano Stabellini
On 04/14/16 19:33, Tamas K Lengyel wrote:
> The monitor_get_capabilities check actually belongs to the monitor subsystem so
> relocating and renaming it to sanitize the code's name and location.
>
> Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
> Cc: Razvan Cojocaru <rcojocaru@bitdefender.com>
> Cc: Keir Fraser <keir@xen.org>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: Stefano Stabellini <stefano.stabellini@citrix.com>
> Cc: Julien Grall <julien.grall@arm.com>
Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] monitor: Rename vm_event_monitor_get_capabilities to arch_monitor_get_capabilities
2016-04-14 16:36 ` Andrew Cooper
@ 2016-04-14 17:01 ` Tamas K Lengyel
0 siblings, 0 replies; 7+ messages in thread
From: Tamas K Lengyel @ 2016-04-14 17:01 UTC (permalink / raw)
To: Andrew Cooper
Cc: Keir Fraser, Razvan Cojocaru, Julien Grall, Stefano Stabellini,
Jan Beulich, Xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 832 bytes --]
On Thu, Apr 14, 2016 at 10:36 AM, Andrew Cooper <andrew.cooper3@citrix.com>
wrote:
> On 14/04/16 17:33, Tamas K Lengyel wrote:
> > The monitor_get_capabilities check actually belongs to the monitor
> subsystem so
> > relocating and renaming it to sanitize the code's name and location.
> >
> > Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
> > Cc: Razvan Cojocaru <rcojocaru@bitdefender.com>
> > Cc: Keir Fraser <keir@xen.org>
> > Cc: Jan Beulich <jbeulich@suse.com>
> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > Cc: Stefano Stabellini <stefano.stabellini@citrix.com>
> > Cc: Julien Grall <julien.grall@arm.com>
>
> Looks sensible. Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> However, this is definitely 4.8 material at this point.
>
Certainly, all my patches at this point are for 4.8.
Thanks,
Tamas
[-- Attachment #1.2: Type: text/html, Size: 1692 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] monitor: Rename vm_event_monitor_get_capabilities to arch_monitor_get_capabilities
2016-04-14 16:33 [PATCH] monitor: Rename vm_event_monitor_get_capabilities to arch_monitor_get_capabilities Tamas K Lengyel
2016-04-14 16:36 ` Andrew Cooper
2016-04-14 16:44 ` Razvan Cojocaru
@ 2016-04-20 10:34 ` Julien Grall
2016-04-20 11:26 ` Jan Beulich
3 siblings, 0 replies; 7+ messages in thread
From: Julien Grall @ 2016-04-20 10:34 UTC (permalink / raw)
To: Tamas K Lengyel, xen-devel
Cc: Andrew Cooper, Stefano Stabellini, Keir Fraser, Jan Beulich,
Razvan Cojocaru
Hello Tamas,
On 14/04/16 17:33, Tamas K Lengyel wrote:
> The monitor_get_capabilities check actually belongs to the monitor subsystem so
> relocating and renaming it to sanitize the code's name and location.
>
> Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
> Cc: Razvan Cojocaru <rcojocaru@bitdefender.com>
> Cc: Keir Fraser <keir@xen.org>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: Stefano Stabellini <stefano.stabellini@citrix.com>
> Cc: Julien Grall <julien.grall@arm.com>
For the ARM bits:
Acked-by: Julien Grall <julien.grall@arm.com>
Regards,
> ---
> xen/arch/x86/monitor.c | 2 +-
> xen/common/monitor.c | 5 ++---
> xen/include/asm-arm/monitor.h | 11 ++++++++++-
> xen/include/asm-arm/vm_event.h | 9 ---------
> xen/include/asm-x86/monitor.h | 23 +++++++++++++++++++++++
> xen/include/asm-x86/vm_event.h | 23 -----------------------
> 6 files changed, 36 insertions(+), 37 deletions(-)
>
> diff --git a/xen/arch/x86/monitor.c b/xen/arch/x86/monitor.c
> index 1fec412..621f91a 100644
> --- a/xen/arch/x86/monitor.c
> +++ b/xen/arch/x86/monitor.c
> @@ -126,7 +126,7 @@ int arch_monitor_domctl_event(struct domain *d,
>
> default:
> /*
> - * Should not be reached unless vm_event_monitor_get_capabilities() is
> + * Should not be reached unless arch_monitor_get_capabilities() is
> * not properly implemented.
> */
> ASSERT_UNREACHABLE();
> diff --git a/xen/common/monitor.c b/xen/common/monitor.c
> index d950a7c..7c3d1c8 100644
> --- a/xen/common/monitor.c
> +++ b/xen/common/monitor.c
> @@ -24,7 +24,6 @@
> #include <xsm/xsm.h>
> #include <public/domctl.h>
> #include <asm/monitor.h>
> -#include <asm/vm_event.h>
>
> int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *mop)
> {
> @@ -48,12 +47,12 @@ int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *mop)
> if ( unlikely(mop->event > 31) )
> return -EINVAL;
> /* Check if event type is available. */
> - if ( unlikely(!(vm_event_monitor_get_capabilities(d) & (1U << mop->event))) )
> + if ( unlikely(!(arch_monitor_get_capabilities(d) & (1U << mop->event))) )
> return -EOPNOTSUPP;
> break;
>
> case XEN_DOMCTL_MONITOR_OP_GET_CAPABILITIES:
> - mop->event = vm_event_monitor_get_capabilities(d);
> + mop->event = arch_monitor_get_capabilities(d);
> return 0;
>
> default:
> diff --git a/xen/include/asm-arm/monitor.h b/xen/include/asm-arm/monitor.h
> index 6e36e99..3fd3c9d 100644
> --- a/xen/include/asm-arm/monitor.h
> +++ b/xen/include/asm-arm/monitor.h
> @@ -39,11 +39,20 @@ int arch_monitor_domctl_event(struct domain *d,
> /*
> * No arch-specific monitor vm-events on ARM.
> *
> - * Should not be reached unless vm_event_monitor_get_capabilities() is not
> + * Should not be reached unless arch_monitor_get_capabilities() is not
> * properly implemented.
> */
> ASSERT_UNREACHABLE();
> return -EOPNOTSUPP;
> }
>
> +static inline uint32_t arch_monitor_get_capabilities(struct domain *d)
> +{
> + uint32_t capabilities = 0;
> +
> + capabilities = (1U << XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST);
> +
> + return capabilities;
> +}
> +
> #endif /* __ASM_ARM_MONITOR_H__ */
> diff --git a/xen/include/asm-arm/vm_event.h b/xen/include/asm-arm/vm_event.h
> index 014d9ba..a3fc4ce 100644
> --- a/xen/include/asm-arm/vm_event.h
> +++ b/xen/include/asm-arm/vm_event.h
> @@ -59,13 +59,4 @@ static inline void vm_event_fill_regs(vm_event_request_t *req)
> /* Not supported on ARM. */
> }
>
> -static inline uint32_t vm_event_monitor_get_capabilities(struct domain *d)
> -{
> - uint32_t capabilities = 0;
> -
> - capabilities = (1U << XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST);
> -
> - return capabilities;
> -}
> -
> #endif /* __ASM_ARM_VM_EVENT_H__ */
> diff --git a/xen/include/asm-x86/monitor.h b/xen/include/asm-x86/monitor.h
> index 0954b59..446b2af 100644
> --- a/xen/include/asm-x86/monitor.h
> +++ b/xen/include/asm-x86/monitor.h
> @@ -50,4 +50,27 @@ int arch_monitor_domctl_op(struct domain *d, struct xen_domctl_monitor_op *mop)
> int arch_monitor_domctl_event(struct domain *d,
> struct xen_domctl_monitor_op *mop);
>
> +static inline uint32_t arch_monitor_get_capabilities(struct domain *d)
> +{
> + uint32_t capabilities = 0;
> +
> + /*
> + * At the moment only Intel HVM domains are supported. However, event
> + * delivery could be extended to AMD and PV domains.
> + */
> + if ( !is_hvm_domain(d) || !cpu_has_vmx )
> + return capabilities;
> +
> + capabilities = (1U << XEN_DOMCTL_MONITOR_EVENT_WRITE_CTRLREG) |
> + (1U << XEN_DOMCTL_MONITOR_EVENT_MOV_TO_MSR) |
> + (1U << XEN_DOMCTL_MONITOR_EVENT_SOFTWARE_BREAKPOINT) |
> + (1U << XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST);
> +
> + /* Since we know this is on VMX, we can just call the hvm func */
> + if ( hvm_is_singlestep_supported() )
> + capabilities |= (1U << XEN_DOMCTL_MONITOR_EVENT_SINGLESTEP);
> +
> + return capabilities;
> +}
> +
> #endif /* __ASM_X86_MONITOR_H__ */
> diff --git a/xen/include/asm-x86/vm_event.h b/xen/include/asm-x86/vm_event.h
> index 0470240..026f42e 100644
> --- a/xen/include/asm-x86/vm_event.h
> +++ b/xen/include/asm-x86/vm_event.h
> @@ -44,27 +44,4 @@ void vm_event_set_registers(struct vcpu *v, vm_event_response_t *rsp);
>
> void vm_event_fill_regs(vm_event_request_t *req);
>
> -static inline uint32_t vm_event_monitor_get_capabilities(struct domain *d)
> -{
> - uint32_t capabilities = 0;
> -
> - /*
> - * At the moment only Intel HVM domains are supported. However, event
> - * delivery could be extended to AMD and PV domains.
> - */
> - if ( !is_hvm_domain(d) || !cpu_has_vmx )
> - return capabilities;
> -
> - capabilities = (1U << XEN_DOMCTL_MONITOR_EVENT_WRITE_CTRLREG) |
> - (1U << XEN_DOMCTL_MONITOR_EVENT_MOV_TO_MSR) |
> - (1U << XEN_DOMCTL_MONITOR_EVENT_SOFTWARE_BREAKPOINT) |
> - (1U << XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST);
> -
> - /* Since we know this is on VMX, we can just call the hvm func */
> - if ( hvm_is_singlestep_supported() )
> - capabilities |= (1U << XEN_DOMCTL_MONITOR_EVENT_SINGLESTEP);
> -
> - return capabilities;
> -}
> -
> #endif /* __ASM_X86_VM_EVENT_H__ */
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] monitor: Rename vm_event_monitor_get_capabilities to arch_monitor_get_capabilities
2016-04-14 16:33 [PATCH] monitor: Rename vm_event_monitor_get_capabilities to arch_monitor_get_capabilities Tamas K Lengyel
` (2 preceding siblings ...)
2016-04-20 10:34 ` Julien Grall
@ 2016-04-20 11:26 ` Jan Beulich
2016-04-20 11:31 ` Julien Grall
3 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2016-04-20 11:26 UTC (permalink / raw)
To: tamas
Cc: keir, rcojocaru, andrew.cooper3, julien.grall,
stefano.stabellini, xen-devel
>>> Tamas K Lengyel <tamas@tklengyel.com> 04/14/16 6:34 PM >>>
>+static inline uint32_t arch_monitor_get_capabilities(struct domain *d)
>+{
>+ uint32_t capabilities = 0;
Pointless initializer.
>+ capabilities = (1U << XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST);
>+
>+ return capabilities;
>+}
Even more - the entire function body could be just a single return statement.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] monitor: Rename vm_event_monitor_get_capabilities to arch_monitor_get_capabilities
2016-04-20 11:26 ` Jan Beulich
@ 2016-04-20 11:31 ` Julien Grall
0 siblings, 0 replies; 7+ messages in thread
From: Julien Grall @ 2016-04-20 11:31 UTC (permalink / raw)
To: Jan Beulich, tamas
Cc: andrew.cooper3, keir, stefano.stabellini, rcojocaru, xen-devel
Hi Jan,
On 20/04/16 12:26, Jan Beulich wrote:
>>>> Tamas K Lengyel <tamas@tklengyel.com> 04/14/16 6:34 PM >>>
>> +static inline uint32_t arch_monitor_get_capabilities(struct domain *d)
>> +{
>> + uint32_t capabilities = 0;
>
> Pointless initializer.
>
>> + capabilities = (1U << XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST);
>> +
>> + return capabilities;
>> +}
>
> Even more - the entire function body could be just a single return statement.
Your comments are valid, however this patch is only code movements. If
you want the code to be fixed, then it should be a separate patch.
Regards,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-04-20 11:31 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-14 16:33 [PATCH] monitor: Rename vm_event_monitor_get_capabilities to arch_monitor_get_capabilities Tamas K Lengyel
2016-04-14 16:36 ` Andrew Cooper
2016-04-14 17:01 ` Tamas K Lengyel
2016-04-14 16:44 ` Razvan Cojocaru
2016-04-20 10:34 ` Julien Grall
2016-04-20 11:26 ` Jan Beulich
2016-04-20 11:31 ` Julien Grall
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.