* [PATCH] x86/hvm: Unify hvm_event_pending()'s API with the !CONFIG_HVM version
@ 2018-11-09 14:42 Andrew Cooper
2018-11-09 14:46 ` Wei Liu
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Andrew Cooper @ 2018-11-09 14:42 UTC (permalink / raw)
To: Xen-devel
Cc: Kevin Tian, Wei Liu, Jan Beulich, Andrew Cooper, Jun Nakajima,
Boris Ostrovsky, Brian Woods, Suravee Suthikulpanit
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Jun Nakajima <jun.nakajima@intel.com>
CC: Kevin Tian <kevin.tian@intel.com>
CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
CC: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
CC: Brian Woods <brian.woods@amd.com>
---
xen/arch/x86/hvm/svm/svm.c | 5 ++---
xen/arch/x86/hvm/vmx/vmx.c | 2 +-
xen/include/asm-x86/hvm/hvm.h | 4 ++--
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 07a5ed8..396ee4a 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1581,10 +1581,9 @@ static void svm_inject_event(const struct x86_event *event)
HVMTRACE_2D(INJ_EXC, _event.vector, _event.error_code);
}
-static int svm_event_pending(struct vcpu *v)
+static bool svm_event_pending(const struct vcpu *v)
{
- struct vmcb_struct *vmcb = v->arch.hvm.svm.vmcb;
- return vmcb->eventinj.fields.v;
+ return v->arch.hvm.svm.vmcb->eventinj.fields.v;
}
static void svm_cpu_dead(unsigned int cpu)
diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index e065f8b..365eeb2 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -1903,7 +1903,7 @@ static void vmx_inject_event(const struct x86_event *event)
HVMTRACE_2D(INJ_EXC, _event.vector, _event.error_code);
}
-static int vmx_event_pending(struct vcpu *v)
+static bool vmx_event_pending(const struct vcpu *v)
{
unsigned long intr_info;
diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h
index 2a1acd8..3d3250d 100644
--- a/xen/include/asm-x86/hvm/hvm.h
+++ b/xen/include/asm-x86/hvm/hvm.h
@@ -158,7 +158,7 @@ struct hvm_function_table {
void (*init_hypercall_page)(struct domain *d, void *hypercall_page);
- int (*event_pending)(struct vcpu *v);
+ bool (*event_pending)(const struct vcpu *v);
bool (*get_pending_event)(struct vcpu *v, struct x86_event *info);
void (*invlpg)(struct vcpu *v, unsigned long linear);
@@ -507,7 +507,7 @@ static inline void hvm_inject_page_fault(int errcode, unsigned long cr2)
hvm_inject_event(&event);
}
-static inline int hvm_event_pending(struct vcpu *v)
+static inline bool hvm_event_pending(const struct vcpu *v)
{
return hvm_funcs.event_pending(v);
}
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/hvm: Unify hvm_event_pending()'s API with the !CONFIG_HVM version
2018-11-09 14:42 [PATCH] x86/hvm: Unify hvm_event_pending()'s API with the !CONFIG_HVM version Andrew Cooper
@ 2018-11-09 14:46 ` Wei Liu
2018-11-09 14:57 ` Boris Ostrovsky
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Wei Liu @ 2018-11-09 14:46 UTC (permalink / raw)
To: Andrew Cooper
Cc: Kevin Tian, Wei Liu, Jan Beulich, Xen-devel, Jun Nakajima,
Boris Ostrovsky, Brian Woods, Suravee Suthikulpanit
On Fri, Nov 09, 2018 at 02:42:27PM +0000, Andrew Cooper wrote:
> No functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/hvm: Unify hvm_event_pending()'s API with the !CONFIG_HVM version
2018-11-09 14:42 [PATCH] x86/hvm: Unify hvm_event_pending()'s API with the !CONFIG_HVM version Andrew Cooper
2018-11-09 14:46 ` Wei Liu
@ 2018-11-09 14:57 ` Boris Ostrovsky
2018-11-12 9:57 ` Jan Beulich
2018-11-14 5:36 ` Tian, Kevin
3 siblings, 0 replies; 7+ messages in thread
From: Boris Ostrovsky @ 2018-11-09 14:57 UTC (permalink / raw)
To: Andrew Cooper, Xen-devel
Cc: Kevin Tian, Wei Liu, Jan Beulich, Jun Nakajima, Brian Woods,
Suravee Suthikulpanit
On 11/9/18 9:42 AM, Andrew Cooper wrote:
> No functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Wei Liu <wei.liu2@citrix.com>
> CC: Jun Nakajima <jun.nakajima@intel.com>
> CC: Kevin Tian <kevin.tian@intel.com>
> CC: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> CC: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> CC: Brian Woods <brian.woods@amd.com>
> ---
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/hvm: Unify hvm_event_pending()'s API with the !CONFIG_HVM version
2018-11-09 14:42 [PATCH] x86/hvm: Unify hvm_event_pending()'s API with the !CONFIG_HVM version Andrew Cooper
2018-11-09 14:46 ` Wei Liu
2018-11-09 14:57 ` Boris Ostrovsky
@ 2018-11-12 9:57 ` Jan Beulich
2018-11-12 10:07 ` Andrew Cooper
2018-11-14 5:36 ` Tian, Kevin
3 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2018-11-12 9:57 UTC (permalink / raw)
To: Andrew Cooper
Cc: Kevin Tian, Wei Liu, Suravee Suthikulpanit, Xen-devel,
Jun Nakajima, Boris Ostrovsky, Brian Woods
>>> On 09.11.18 at 15:42, <andrew.cooper3@citrix.com> wrote:
> No functional change.
So I understand that "unify" means converting the return type to
bool. You could have said so.
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/hvm: Unify hvm_event_pending()'s API with the !CONFIG_HVM version
2018-11-12 9:57 ` Jan Beulich
@ 2018-11-12 10:07 ` Andrew Cooper
2018-11-12 10:15 ` Jan Beulich
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Cooper @ 2018-11-12 10:07 UTC (permalink / raw)
To: Jan Beulich
Cc: Kevin Tian, Wei Liu, Suravee Suthikulpanit, Xen-devel,
Jun Nakajima, Boris Ostrovsky, Brian Woods
On 12/11/2018 09:57, Jan Beulich wrote:
>>>> On 09.11.18 at 15:42, <andrew.cooper3@citrix.com> wrote:
>> No functional change.
> So I understand that "unify" means converting the return type to
> bool. You could have said so.
Perhaps, but that misses the point of making the change.
The patch introducing the !CONFIG_HVM version should have used
int/non-const so the API was same, or had this patch as a prerequisite
to update the API to our new standards, and then duplicate it for the
!CONFIG_HVM case.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/hvm: Unify hvm_event_pending()'s API with the !CONFIG_HVM version
2018-11-12 10:07 ` Andrew Cooper
@ 2018-11-12 10:15 ` Jan Beulich
0 siblings, 0 replies; 7+ messages in thread
From: Jan Beulich @ 2018-11-12 10:15 UTC (permalink / raw)
To: Andrew Cooper
Cc: Kevin Tian, Wei Liu, Suravee Suthikulpanit, Xen-devel,
Jun Nakajima, Boris Ostrovsky, Brian Woods
>>> On 12.11.18 at 11:07, <andrew.cooper3@citrix.com> wrote:
> On 12/11/2018 09:57, Jan Beulich wrote:
>>>>> On 09.11.18 at 15:42, <andrew.cooper3@citrix.com> wrote:
>>> No functional change.
>> So I understand that "unify" means converting the return type to
>> bool. You could have said so.
>
> Perhaps, but that misses the point of making the change.
>
> The patch introducing the !CONFIG_HVM version should have used
> int/non-const so the API was same, or had this patch as a prerequisite
> to update the API to our new standards, and then duplicate it for the
> !CONFIG_HVM case.
All fine, just that it would have been nice if the description here
said slightly more than just "No functional change."
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/hvm: Unify hvm_event_pending()'s API with the !CONFIG_HVM version
2018-11-09 14:42 [PATCH] x86/hvm: Unify hvm_event_pending()'s API with the !CONFIG_HVM version Andrew Cooper
` (2 preceding siblings ...)
2018-11-12 9:57 ` Jan Beulich
@ 2018-11-14 5:36 ` Tian, Kevin
3 siblings, 0 replies; 7+ messages in thread
From: Tian, Kevin @ 2018-11-14 5:36 UTC (permalink / raw)
To: Andrew Cooper, Xen-devel
Cc: Wei Liu, Nakajima, Jun, Jan Beulich, Suravee Suthikulpanit,
Boris Ostrovsky, Brian Woods
> From: Andrew Cooper [mailto:andrew.cooper3@citrix.com]
> Sent: Friday, November 9, 2018 10:42 PM
>
> No functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-11-14 5:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-09 14:42 [PATCH] x86/hvm: Unify hvm_event_pending()'s API with the !CONFIG_HVM version Andrew Cooper
2018-11-09 14:46 ` Wei Liu
2018-11-09 14:57 ` Boris Ostrovsky
2018-11-12 9:57 ` Jan Beulich
2018-11-12 10:07 ` Andrew Cooper
2018-11-12 10:15 ` Jan Beulich
2018-11-14 5:36 ` Tian, Kevin
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.