Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1619744
| From | Vitaly Kuznetsov <vkuznets@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 4/7] x86/hyperv: implement rep hypercalls |
| Date | 2017-04-10 11:10 +0200 |
| Message-ID | <tuDuG-788-17@gated-at.bofh.it> (permalink) |
| References | <ttAfw-6oW-11@gated-at.bofh.it> <ttAfw-6oW-33@gated-at.bofh.it> <ttI3o-3uy-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Jork Loeser <Jork.Loeser@microsoft.com> writes:
>> -----Original Message-----
>> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com]
>> Sent: Friday, April 7, 2017 04:27
>> To: devel@linuxdriverproject.org; x86@kernel.org
>> Cc: linux-kernel@vger.kernel.org; KY Srinivasan <kys@microsoft.com>;
>> Haiyang Zhang <haiyangz@microsoft.com>; Stephen Hemminger
>> <sthemmin@microsoft.com>; Thomas Gleixner <tglx@linutronix.de>; Ingo
>> Molnar <mingo@redhat.com>; H. Peter Anvin <hpa@zytor.com>; Steven
>> Rostedt <rostedt@goodmis.org>; Jork Loeser <Jork.Loeser@microsoft.com>
>> Subject: [PATCH 4/7] x86/hyperv: implement rep hypercalls
>
>> diff --git a/arch/x86/include/asm/mshyperv.h
>> b/arch/x86/include/asm/mshyperv.h index 9a5f58b..a2c996b 100644
>> --- a/arch/x86/include/asm/mshyperv.h
>> +++ b/arch/x86/include/asm/mshyperv.h
>> @@ -4,6 +4,7 @@
>> #include <linux/types.h>
>> #include <linux/interrupt.h>
>> #include <linux/clocksource.h>
>> +#include <linux/nmi.h>
>> #include <asm/hyperv.h>
>>
>> /*
>> @@ -253,6 +254,26 @@ static inline u64 hv_do_fast_hypercall8(u16 code,
>> u64 input1) #endif }
>>
>> +static inline u64 hv_do_rep_hypercall(u16 code, u16 rep_count, void
>> *input,
>> + void *output)
>> +{
>> + union hv_hypercall_input hc_input = { .code = code,
>> + .rep_count = rep_count};
>
> Is there a way to statically verify the re-count not to exceed 12 bits? Could a dynamic check be justified? Perhaps a function comment?
I'd like to avoid dynamic checks here to keep this as fast as
possible. Static check is probably not an option as even the only user
we have now calculates this parameter dynamically. I'll add a comment to
the function, thanks!
--
Vitaly
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/7] Hyper-V: praravirtualized remote TLB flushing and hypercall improvements Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-07 13:30 +0200
[PATCH 3/7] hyper-v: use fast hypercall for HVCALL_SIGNAL_EVENT Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-07 13:30 +0200
[PATCH 6/7] x86/hyper-v: use hypercall for remove TLB flush Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-07 13:30 +0200
RE: [PATCH 6/7] x86/hyper-v: use hypercall for remove TLB flush Jork Loeser <Jork.Loeser@microsoft.com> - 2017-04-07 22:50 +0200
Re: [PATCH 6/7] x86/hyper-v: use hypercall for remove TLB flush Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-10 19:30 +0200
RE: [PATCH 6/7] x86/hyper-v: use hypercall for remove TLB flush KY Srinivasan <kys@microsoft.com> - 2017-04-08 18:50 +0200
Re: [PATCH 6/7] x86/hyper-v: use hypercall for remove TLB flush Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-10 16:50 +0200
RE: [PATCH 6/7] x86/hyper-v: use hypercall for remove TLB flush Jork Loeser <Jork.Loeser@microsoft.com> - 2017-04-10 19:40 +0200
RE: [PATCH 6/7] x86/hyper-v: use hypercall for remove TLB flush KY Srinivasan <kys@microsoft.com> - 2017-04-11 00:10 +0200
[PATCH 4/7] x86/hyperv: implement rep hypercalls Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-07 13:30 +0200
RE: [PATCH 4/7] x86/hyperv: implement rep hypercalls Jork Loeser <Jork.Loeser@microsoft.com> - 2017-04-07 21:50 +0200
Re: [PATCH 4/7] x86/hyperv: implement rep hypercalls Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-10 11:10 +0200
[PATCH 5/7] hyper-v: globalize vp_index Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-07 13:30 +0200
RE: [PATCH 5/7] hyper-v: globalize vp_index KY Srinivasan <kys@microsoft.com> - 2017-04-08 17:50 +0200
RE: [PATCH 0/7] Hyper-V: praravirtualized remote TLB flushing and hypercall improvements KY Srinivasan <kys@microsoft.com> - 2017-04-08 17:00 +0200
csiph-web