Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1651944 > unrolled thread
| Started by | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| First post | 2017-05-27 19:50 +0200 |
| Last post | 2017-05-27 19:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v4 04/10] x86/hyper-v: fast hypercall implementation Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-27 19:50 +0200
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-05-27 19:50 +0200 |
| Subject | Re: [PATCH v4 04/10] x86/hyper-v: fast hypercall implementation |
| Message-ID | <tLO0F-77h-5@gated-at.bofh.it> |
On Wed, May 24, 2017 at 3:03 PM, Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
> Hyper-V supports 'fast' hypercalls when all parameters are passed through
> registers. Implement an inline version of a simpliest of these calls:
> hypercall with one 8-byte input and no output.
>
> Proper hypercall input interface (struct hv_hypercall_input) definition is
> added as well.
> + u32 hv_status_hi, hv_status_lo;
> + u32 input1_hi = (u32)(input1 >> 32);
> + u32 input1_lo = (u32)input1;
Explicit casting is redundant.
Also consider using macros.
> +/* Hypercall interface */
> +union hv_hypercall_input {
Be careful wrt union aliasing.
> + u64 as_uint64;
> + struct {
> + __u32 as_uint32_lo;
> + __u32 as_uint32_hi;
> + };
> + struct {
> + __u64 code:16;
> + __u64 fast:1;
> + __u64 varhead_size:10;
> + __u64 reserved1:5;
> + __u64 rep_count:12;
> + __u64 reserved2:4;
> + __u64 rep_start:12;
> + __u64 reserved3:4;
> + };
> +};
--
With Best Regards,
Andy Shevchenko
Back to top | Article view | linux.kernel
csiph-web