* [PATCH 0/4] Add support for updated vmware hypercall instruction
@ 2019-08-18 14:33 Thomas Hellström (VMware)
2019-08-18 14:33 ` [PATCH 4/4] input/vmmouse: Update the backdoor call with support for new instructions Thomas Hellström (VMware)
2019-08-18 18:09 ` [PATCH 0/4] Add support for updated vmware hypercall instruction Borislav Petkov
0 siblings, 2 replies; 8+ messages in thread
From: Thomas Hellström (VMware) @ 2019-08-18 14:33 UTC (permalink / raw)
To: linux-kernel, pv-drivers
Cc: Thomas Hellström, Thomas Gleixner, Ingo Molnar,
Borislav Petkov, H. Peter Anvin, x86, Dmitry Torokhov,
linux-input
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <x86@kernel.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: <linux-input@vger.kernel.org>
VMware has started using "vmcall" / "vmmcall" instead of an inl instruction
for the "backdoor" interface. This series detects support for those
instructions.
Outside of the platform code we use the "ALTERNATIVES" self-patching
mechanism similarly to how this is done with KVM.
Unfortunately we need two x86 cpu feature flags for this, since we need
the default instruction to be "inl". IIRC the vmmouse driver is used by
other virtualization solutions than VMware, and those might break if
they encounter any of the other instructions.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 4/4] input/vmmouse: Update the backdoor call with support for new instructions
2019-08-18 14:33 [PATCH 0/4] Add support for updated vmware hypercall instruction Thomas Hellström (VMware)
@ 2019-08-18 14:33 ` Thomas Hellström (VMware)
2019-08-21 5:09 ` Dmitry Torokhov
2019-08-18 18:09 ` [PATCH 0/4] Add support for updated vmware hypercall instruction Borislav Petkov
1 sibling, 1 reply; 8+ messages in thread
From: Thomas Hellström (VMware) @ 2019-08-18 14:33 UTC (permalink / raw)
To: linux-kernel, pv-drivers
Cc: Thomas Hellstrom, Dmitry Torokhov, linux-input, Doug Covelli
From: Thomas Hellstrom <thellstrom@vmware.com>
Use the definition provided by include/asm/vmware.h
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: <linux-input@vger.kernel.org>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Doug Covelli <dcovelli@vmware.com>
---
drivers/input/mouse/vmmouse.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/input/mouse/vmmouse.c b/drivers/input/mouse/vmmouse.c
index 871e5b5ab129..0c7707c7bede 100644
--- a/drivers/input/mouse/vmmouse.c
+++ b/drivers/input/mouse/vmmouse.c
@@ -16,6 +16,7 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <asm/hypervisor.h>
+#include <asm/vmware.h>
#include "psmouse.h"
#include "vmmouse.h"
@@ -84,7 +85,7 @@ struct vmmouse_data {
#define VMMOUSE_CMD(cmd, in1, out1, out2, out3, out4) \
({ \
unsigned long __dummy1, __dummy2; \
- __asm__ __volatile__ ("inl %%dx" : \
+ __asm__ __volatile__ (VMWARE_HYPERCALL : \
"=a"(out1), \
"=b"(out2), \
"=c"(out3), \
--
2.20.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/4] Add support for updated vmware hypercall instruction
2019-08-18 14:33 [PATCH 0/4] Add support for updated vmware hypercall instruction Thomas Hellström (VMware)
2019-08-18 14:33 ` [PATCH 4/4] input/vmmouse: Update the backdoor call with support for new instructions Thomas Hellström (VMware)
@ 2019-08-18 18:09 ` Borislav Petkov
2019-08-18 19:02 ` Thomas Hellström (VMware)
1 sibling, 1 reply; 8+ messages in thread
From: Borislav Petkov @ 2019-08-18 18:09 UTC (permalink / raw)
To: Thomas Hellström (VMware)
Cc: linux-kernel, pv-drivers, Thomas Gleixner, Ingo Molnar,
H. Peter Anvin, x86, Dmitry Torokhov, linux-input
On Sun, Aug 18, 2019 at 04:33:12PM +0200, Thomas Hellström (VMware) wrote:
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: "H. Peter Anvin" <hpa@zytor.com>
> Cc: <x86@kernel.org>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: <linux-input@vger.kernel.org>
In the future, when you CC people on patches, pls CC them for all
patches - not only a subset. Had to fish out 3/4 and 4/4 from lkml.
Thx.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/4] Add support for updated vmware hypercall instruction
2019-08-18 18:09 ` [PATCH 0/4] Add support for updated vmware hypercall instruction Borislav Petkov
@ 2019-08-18 19:02 ` Thomas Hellström (VMware)
2019-08-18 19:37 ` Borislav Petkov
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Hellström (VMware) @ 2019-08-18 19:02 UTC (permalink / raw)
To: Borislav Petkov
Cc: linux-kernel, pv-drivers, Thomas Gleixner, Ingo Molnar,
H. Peter Anvin, x86, Dmitry Torokhov, linux-input
On 8/18/19 8:09 PM, Borislav Petkov wrote:
> On Sun, Aug 18, 2019 at 04:33:12PM +0200, Thomas Hellström (VMware) wrote:
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> Cc: Ingo Molnar <mingo@redhat.com>
>> Cc: Borislav Petkov <bp@alien8.de>
>> Cc: "H. Peter Anvin" <hpa@zytor.com>
>> Cc: <x86@kernel.org>
>> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>> Cc: <linux-input@vger.kernel.org>
> In the future, when you CC people on patches, pls CC them for all
> patches - not only a subset. Had to fish out 3/4 and 4/4 from lkml.
>
> Thx.
>
Hmm. Ok. I'll keep that in mind.
I was trying to be clever and avoid spamming people with stuff they
might not care about.
Thanks,
/Thomas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/4] Add support for updated vmware hypercall instruction
2019-08-18 19:02 ` Thomas Hellström (VMware)
@ 2019-08-18 19:37 ` Borislav Petkov
0 siblings, 0 replies; 8+ messages in thread
From: Borislav Petkov @ 2019-08-18 19:37 UTC (permalink / raw)
To: Thomas Hellström (VMware)
Cc: linux-kernel, pv-drivers, Thomas Gleixner, Ingo Molnar,
H. Peter Anvin, x86, Dmitry Torokhov, linux-input
On Sun, Aug 18, 2019 at 09:02:04PM +0200, Thomas Hellström (VMware) wrote:
> I was trying to be clever and avoid spamming people with stuff they might
> not care about.
Sure but if, for example, you're adding VMWARE_HYPERCALL in patch 2 and
the users are in the following patches, it would be helpful if I could
see them too. That is one good reason to CC everybody with the whole
patchset.
Thx.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] input/vmmouse: Update the backdoor call with support for new instructions
2019-08-18 14:33 ` [PATCH 4/4] input/vmmouse: Update the backdoor call with support for new instructions Thomas Hellström (VMware)
@ 2019-08-21 5:09 ` Dmitry Torokhov
2019-08-21 15:48 ` Thomas Hellström (VMware)
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2019-08-21 5:09 UTC (permalink / raw)
To: Thomas Hellström (VMware)
Cc: linux-kernel, pv-drivers, Thomas Hellstrom, linux-input,
Doug Covelli
On Sun, Aug 18, 2019 at 04:33:16PM +0200, Thomas Hellström (VMware) wrote:
> From: Thomas Hellstrom <thellstrom@vmware.com>
>
> Use the definition provided by include/asm/vmware.h
>
> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Cc: <linux-input@vger.kernel.org>
> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
> Reviewed-by: Doug Covelli <dcovelli@vmware.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Please feel free to merge with the rest of the patches introducing
VMWARE_HYPERCALL.
> ---
> drivers/input/mouse/vmmouse.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/mouse/vmmouse.c b/drivers/input/mouse/vmmouse.c
> index 871e5b5ab129..0c7707c7bede 100644
> --- a/drivers/input/mouse/vmmouse.c
> +++ b/drivers/input/mouse/vmmouse.c
> @@ -16,6 +16,7 @@
> #include <linux/slab.h>
> #include <linux/module.h>
> #include <asm/hypervisor.h>
> +#include <asm/vmware.h>
>
> #include "psmouse.h"
> #include "vmmouse.h"
> @@ -84,7 +85,7 @@ struct vmmouse_data {
> #define VMMOUSE_CMD(cmd, in1, out1, out2, out3, out4) \
> ({ \
> unsigned long __dummy1, __dummy2; \
> - __asm__ __volatile__ ("inl %%dx" : \
> + __asm__ __volatile__ (VMWARE_HYPERCALL : \
> "=a"(out1), \
> "=b"(out2), \
> "=c"(out3), \
> --
> 2.20.1
>
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] input/vmmouse: Update the backdoor call with support for new instructions
2019-08-21 5:09 ` Dmitry Torokhov
@ 2019-08-21 15:48 ` Thomas Hellström (VMware)
2019-08-21 16:03 ` Dmitry Torokhov
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Hellström (VMware) @ 2019-08-21 15:48 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: linux-kernel, pv-drivers, Thomas Hellstrom, linux-input,
Doug Covelli
On 8/21/19 7:09 AM, Dmitry Torokhov wrote:
> On Sun, Aug 18, 2019 at 04:33:16PM +0200, Thomas Hellström (VMware) wrote:
>> From: Thomas Hellstrom <thellstrom@vmware.com>
>>
>> Use the definition provided by include/asm/vmware.h
>>
>> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>> Cc: <linux-input@vger.kernel.org>
>> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
>> Reviewed-by: Doug Covelli <dcovelli@vmware.com>
> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>
> Please feel free to merge with the rest of the patches introducing
> VMWARE_HYPERCALL.
Thanks, Dmitry!
I have a version 2 of the patch were the only difference is that edx is
initialized to zero which is default for vmcall / vmmcall. Can I use
your ack for that one as well?
Thanks,
Thomas
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4/4] input/vmmouse: Update the backdoor call with support for new instructions
2019-08-21 15:48 ` Thomas Hellström (VMware)
@ 2019-08-21 16:03 ` Dmitry Torokhov
0 siblings, 0 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2019-08-21 16:03 UTC (permalink / raw)
To: Thomas Hellström (VMware)
Cc: linux-kernel, pv-drivers, Thomas Hellstrom, linux-input,
Doug Covelli
On Wed, Aug 21, 2019 at 05:48:23PM +0200, Thomas Hellström (VMware) wrote:
> On 8/21/19 7:09 AM, Dmitry Torokhov wrote:
> > On Sun, Aug 18, 2019 at 04:33:16PM +0200, Thomas Hellström (VMware) wrote:
> > > From: Thomas Hellstrom <thellstrom@vmware.com>
> > >
> > > Use the definition provided by include/asm/vmware.h
> > >
> > > Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > > Cc: <linux-input@vger.kernel.org>
> > > Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
> > > Reviewed-by: Doug Covelli <dcovelli@vmware.com>
> > Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> >
> > Please feel free to merge with the rest of the patches introducing
> > VMWARE_HYPERCALL.
>
> Thanks, Dmitry!
>
> I have a version 2 of the patch were the only difference is that edx is
> initialized to zero which is default for vmcall / vmmcall. Can I use your
> ack for that one as well?
Yes, sure.
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-08-21 16:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-18 14:33 [PATCH 0/4] Add support for updated vmware hypercall instruction Thomas Hellström (VMware)
2019-08-18 14:33 ` [PATCH 4/4] input/vmmouse: Update the backdoor call with support for new instructions Thomas Hellström (VMware)
2019-08-21 5:09 ` Dmitry Torokhov
2019-08-21 15:48 ` Thomas Hellström (VMware)
2019-08-21 16:03 ` Dmitry Torokhov
2019-08-18 18:09 ` [PATCH 0/4] Add support for updated vmware hypercall instruction Borislav Petkov
2019-08-18 19:02 ` Thomas Hellström (VMware)
2019-08-18 19:37 ` Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).