Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1281266
| From | Xavier Deguillard <xdeguillard@vmware.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/6] x86: Add VMWare Host Communication Macros |
| Date | 2015-12-01 23:40 +0100 |
| Message-ID | <qB1Kx-7cT-3@gated-at.bofh.it> (permalink) |
| References | <qB1rb-76P-3@gated-at.bofh.it> <qB1rb-76P-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hey Sinclair,
On Tue, Dec 01, 2015 at 02:18:47PM -0800, Sinclair Yeh wrote:
> +/**
> + * Hypervisor-specific bi-directional communication channel. Should never
> + * execute on bare metal hardware. The caller must make sure to check for
> + * supported hypervisor before using these macros.
> + *
> + * Several of the parameters are both input and output and must be initialized.
> + *
> + * @in1: [IN] Message Len or Message Cmd (HB)
> + * @in2: [IN] Message Len (HB) or Message Cmd
Can you make in1 always be the "Message Cmd" and in2 always be the
"Message len"?
> + * @port_num: [IN] port number + [channel id]
> + * @magic: [IN] hypervisor magic value
> + * @eax: [OUT] value of EAX register
> + * @ebx: [OUT] e.g. status from an HB message status command
> + * @ecx: [OUT] e.g. status from a non-HB message status command
> + * @edx: [OUT] e.g. channel id
> + * @si: [INOUT] set to 0 if not used
> + * @di: [INOUT] set to 0 if not used
> + * @bp: [INOUT] set to 0 if not used
> + */
> +#define VMW_PORT(in1, in2, port_num, magic, eax, ebx, ecx, edx, si, di) \
> +({ \
> + __asm__ __volatile__ ("inl %%dx" : \
Are those '\' aligned in the code?
> +
> +#define VMW_PORT_HB_OUT(in1, in2, port_num, magic, \
> + eax, ebx, ecx, edx, si, di, bp) \
> +({ \
> + __asm__ __volatile__ ("movq %13, %%rbp;" \
Same here.
> +
> +#define VMW_PORT_HB_IN(in1, in2, port_num, magic, \
> + eax, ebx, ecx, edx, si, di, bp) \
> +({ \
> + __asm__ __volatile__ ("push %%rbp; movq %13, %%rbp;" \
Same.
Xavier
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/6] x86: Add VMWare Host Communication Macros "Sinclair Yeh" <syeh@vmware.com> - 2015-12-01 23:20 +0100
[PATCH 2/6] x86: Update vmware.c to use the common VMW_PORT macros "Sinclair Yeh" <syeh@vmware.com> - 2015-12-01 23:20 +0100
[PATCH 6/6] VMware balloon: Update vmw_balloon.c to use the VMW_PORT macro "Sinclair Yeh" <syeh@vmware.com> - 2015-12-01 23:20 +0100
Re: [PATCH 6/6] VMware balloon: Update vmw_balloon.c to use the VMW_PORT macro Xavier Deguillard <xdeguillard@vmware.com> - 2015-12-01 23:40 +0100
Re: [PATCH 6/6] VMware balloon: Update vmw_balloon.c to use the VMW_PORT macro "Sinclair Yeh" <syeh@vmware.com> - 2015-12-02 00:20 +0100
Re: [PATCH 1/6] x86: Add VMWare Host Communication Macros Xavier Deguillard <xdeguillard@vmware.com> - 2015-12-01 23:40 +0100
Re: [PATCH 1/6] x86: Add VMWare Host Communication Macros "H. Peter Anvin" <hpa@zytor.com> - 2015-12-01 23:50 +0100
Re: [PATCH 1/6] x86: Add VMWare Host Communication Macros "Sinclair Yeh" <syeh@vmware.com> - 2015-12-04 23:40 +0100
csiph-web