On 07/01/2020 16:17, Wei Liu wrote:
> On Sun, Jan 05, 2020 at 10:06:08PM +, Andrew Cooper wrote:
>> On 05/01/2020 21:22, Wei Liu wrote:
>>> On Sun, Jan 05, 2020 at 07:08:28PM +, Andrew Cooper wrote:
> +static inline uint64_t hv_do_hypercall(uint64_t control, paddr_t input,
>
On Sun, Jan 05, 2020 at 07:08:28PM +, Andrew Cooper wrote:
>
> > +static inline uint64_t hv_do_hypercall(uint64_t control, paddr_t input,
> > paddr_t output)
> > +{
> > +uint64_t status;
> > +
> > +asm volatile ("mov %[output], %%r8\n"
> > + "call hv_hypercall_page"
On Mon, Jan 06, 2020 at 10:38:23AM +0100, Jan Beulich wrote:
[...]
> > +
> > +static inline uint64_t hv_do_rep_hypercall(uint16_t code, uint16_t
> > rep_count,
> > + uint16_t varhead_size,
> > + paddr_t input,
On Sun, Jan 05, 2020 at 10:06:08PM +, Andrew Cooper wrote:
> On 05/01/2020 21:22, Wei Liu wrote:
> > On Sun, Jan 05, 2020 at 07:08:28PM +, Andrew Cooper wrote:
> >>> +static inline uint64_t hv_do_hypercall(uint64_t control, paddr_t input,
> >>> paddr_t output)
> >>> +{
> >>> +uint64_t
On 05.01.2020 17:47, Wei Liu wrote:
> +static inline uint64_t hv_do_fast_hypercall(uint16_t code,
> +uint64_t input1, uint64_t input2)
> +{
> +uint64_t status;
> +uint64_t control = (uint64_t)code | HV_HYPERCALL_FAST_BIT;
Unnecessary (afaict)
On 05/01/2020 21:22, Wei Liu wrote:
> On Sun, Jan 05, 2020 at 07:08:28PM +, Andrew Cooper wrote:
>>> +static inline uint64_t hv_do_hypercall(uint64_t control, paddr_t input,
>>> paddr_t output)
>>> +{
>>> +uint64_t status;
>>> +
>>> +asm volatile ("mov %[output], %%r8\n"
>>> +
On Sun, Jan 05, 2020 at 07:08:28PM +, Andrew Cooper wrote:
>
> > +static inline uint64_t hv_do_hypercall(uint64_t control, paddr_t input,
> > paddr_t output)
> > +{
> > +uint64_t status;
> > +
> > +asm volatile ("mov %[output], %%r8\n"
> > + "call hv_hypercall_page"
> +static inline uint64_t hv_do_hypercall(uint64_t control, paddr_t input,
> paddr_t output)
> +{
> +uint64_t status;
> +
> +asm volatile ("mov %[output], %%r8\n"
> + "call hv_hypercall_page"
> + : "=a" (status), "+c" (control),
> +
These functions will be used later to make hypercalls to Hyper-V.
I couldn't find reference in TLFS that Hyper-V clobbers flags and
r9-r11, but Linux's commit message says it does. Err on the safe side.
Signed-off-by: Wei Liu
---
v3:
1. Name the file hyperv-hcall.h
v2:
1. Use direct call
---