Re: [PATCH 6/6] VMware balloon: Update vmw_balloon.c to use the VMW_PORT macro
On Thu, Mar 31, 2016 at 09:30:37AM -0700, Greg KH wrote: > On Thu, Mar 31, 2016 at 07:39:53AM -0700, Sinclair Yeh wrote: > > Hi, > > > > Does any one know when this series will be applied? > > No idea, it's not going through my tree, as I don't have these in my > queue anymore... Ok, I'm not sure what else to do. I've already updated the series once because it didn't get picked up last December. Can anyone on the x86 list pick this up? Sinclair ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH 6/6] VMware balloon: Update vmw_balloon.c to use the VMW_PORT macro
On Thu, Mar 31, 2016 at 07:39:53AM -0700, Sinclair Yeh wrote: > Hi, > > Does any one know when this series will be applied? No idea, it's not going through my tree, as I don't have these in my queue anymore... greg k-h ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH 6/6] VMware balloon: Update vmw_balloon.c to use the VMW_PORT macro
Hi, Does any one know when this series will be applied? Sinclair On Mon, Feb 08, 2016 at 11:41:57AM -0800, Greg KH wrote: > On Tue, Jan 19, 2016 at 01:46:05PM -0800, Sinclair Yeh wrote: > > Updated VMWARE_BALLOON_CMD to use the common VMW_PORT macro. > > Doing this rather than replacing all instances of VMWARE_BALLOON_CMD > > to minimize code change. > > > > Signed-off-by: Sinclair Yeh> > Reviewed-by: Thomas Hellstrom > > Reviewed-by: Alok N Kataria > > Acked-by: Xavier Deguillard > > Cc: pv-driv...@vmware.com > > Cc: Xavier Deguillard > > Cc: linux-ker...@vger.kernel.org > > Cc: virtualization@lists.linux-foundation.org > > Cc: Greg Kroah-Hartman > > > Acked-by: Greg Kroah-Hartman > > > -#define VMWARE_BALLOON_CMD(cmd, arg1, arg2, result)\ > > -({ \ > > - unsigned long __status, __dummy1, __dummy2, __dummy3; \ > > - __asm__ __volatile__ ("inl %%dx" : \ > > - "=a"(__status), \ > > - "=c"(__dummy1), \ > > - "=d"(__dummy2), \ > > - "=b"(result), \ > > - "=S" (__dummy3) : \ > > - "0"(VMW_BALLOON_HV_MAGIC), \ > > - "1"(VMW_BALLOON_CMD_##cmd), \ > > - "2"(VMW_BALLOON_HV_PORT), \ > > - "3"(arg1), \ > > - "4" (arg2) :\ > > - "memory"); \ > > - if (VMW_BALLOON_CMD_##cmd == VMW_BALLOON_CMD_START) \ > > - result = __dummy1; \ > > - result &= -1UL; \ > > - __status & -1UL;\ > > +#define VMWARE_BALLOON_CMD(cmd, arg1, arg2, result) > > \ > > +({ \ > > + unsigned long __status, __dummy1, __dummy2; \ > > + unsigned long __si, __di; \ > > + VMW_PORT(VMW_BALLOON_CMD_##cmd, arg1, arg2, 0, \ > > +VMW_BALLOON_HV_PORT, VMW_BALLOON_HV_MAGIC, \ > > +__status, result, __dummy1, __dummy2, __si, __di); \ > > + if (VMW_BALLOON_CMD_##cmd == VMW_BALLOON_CMD_START) \ > > + result = __dummy1; \ > > + result &= -1UL; \ > > + __status & -1UL;\ > > }) > > Honestly, it doesn't look anymore "readable" to me, but it's your code > to maintain, not mine... :) > ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH 6/6] VMware balloon: Update vmw_balloon.c to use the VMW_PORT macro
On Tue, Jan 19, 2016 at 01:46:05PM -0800, Sinclair Yeh wrote: > Updated VMWARE_BALLOON_CMD to use the common VMW_PORT macro. > Doing this rather than replacing all instances of VMWARE_BALLOON_CMD > to minimize code change. > > Signed-off-by: Sinclair Yeh> Reviewed-by: Thomas Hellstrom > Reviewed-by: Alok N Kataria > Acked-by: Xavier Deguillard > Cc: pv-driv...@vmware.com > Cc: Xavier Deguillard > Cc: linux-ker...@vger.kernel.org > Cc: virtualization@lists.linux-foundation.org > Cc: Greg Kroah-Hartman Acked-by: Greg Kroah-Hartman > -#define VMWARE_BALLOON_CMD(cmd, arg1, arg2, result) \ > -({ \ > - unsigned long __status, __dummy1, __dummy2, __dummy3; \ > - __asm__ __volatile__ ("inl %%dx" : \ > - "=a"(__status), \ > - "=c"(__dummy1), \ > - "=d"(__dummy2), \ > - "=b"(result), \ > - "=S" (__dummy3) : \ > - "0"(VMW_BALLOON_HV_MAGIC), \ > - "1"(VMW_BALLOON_CMD_##cmd), \ > - "2"(VMW_BALLOON_HV_PORT), \ > - "3"(arg1), \ > - "4" (arg2) :\ > - "memory"); \ > - if (VMW_BALLOON_CMD_##cmd == VMW_BALLOON_CMD_START) \ > - result = __dummy1; \ > - result &= -1UL; \ > - __status & -1UL;\ > +#define VMWARE_BALLOON_CMD(cmd, arg1, arg2, result) \ > +({ \ > + unsigned long __status, __dummy1, __dummy2; \ > + unsigned long __si, __di; \ > + VMW_PORT(VMW_BALLOON_CMD_##cmd, arg1, arg2, 0, \ > + VMW_BALLOON_HV_PORT, VMW_BALLOON_HV_MAGIC, \ > + __status, result, __dummy1, __dummy2, __si, __di); \ > + if (VMW_BALLOON_CMD_##cmd == VMW_BALLOON_CMD_START) \ > + result = __dummy1; \ > + result &= -1UL; \ > + __status & -1UL;\ > }) Honestly, it doesn't look anymore "readable" to me, but it's your code to maintain, not mine... :) ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
[PATCH 6/6] VMware balloon: Update vmw_balloon.c to use the VMW_PORT macro
Updated VMWARE_BALLOON_CMD to use the common VMW_PORT macro. Doing this rather than replacing all instances of VMWARE_BALLOON_CMD to minimize code change. Signed-off-by: Sinclair YehReviewed-by: Thomas Hellstrom Reviewed-by: Alok N Kataria Acked-by: Xavier Deguillard Cc: pv-driv...@vmware.com Cc: Xavier Deguillard Cc: linux-ker...@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: Greg Kroah-Hartman --- v1 Swapped parameters 1 and 2 to VMW_PORT because the macro has been updated v2 Updated VMW_PORT() usage because the macro and vmw_balloon.c's usage have changed. --- drivers/misc/vmw_balloon.c | 31 --- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index 1e688bf..6476b74 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/misc/vmw_balloon.c @@ -46,6 +46,7 @@ #include #include #include +#include MODULE_AUTHOR("VMware, Inc."); MODULE_DESCRIPTION("VMware Memory Control (Balloon) Driver"); @@ -197,25 +198,17 @@ static void vmballoon_batch_set_pa(struct vmballoon_batch_page *batch, int idx, } -#define VMWARE_BALLOON_CMD(cmd, arg1, arg2, result)\ -({ \ - unsigned long __status, __dummy1, __dummy2, __dummy3; \ - __asm__ __volatile__ ("inl %%dx" : \ - "=a"(__status), \ - "=c"(__dummy1), \ - "=d"(__dummy2), \ - "=b"(result), \ - "=S" (__dummy3) : \ - "0"(VMW_BALLOON_HV_MAGIC), \ - "1"(VMW_BALLOON_CMD_##cmd), \ - "2"(VMW_BALLOON_HV_PORT), \ - "3"(arg1), \ - "4" (arg2) :\ - "memory"); \ - if (VMW_BALLOON_CMD_##cmd == VMW_BALLOON_CMD_START) \ - result = __dummy1; \ - result &= -1UL; \ - __status & -1UL;\ +#define VMWARE_BALLOON_CMD(cmd, arg1, arg2, result)\ +({ \ + unsigned long __status, __dummy1, __dummy2; \ + unsigned long __si, __di; \ + VMW_PORT(VMW_BALLOON_CMD_##cmd, arg1, arg2, 0, \ +VMW_BALLOON_HV_PORT, VMW_BALLOON_HV_MAGIC, \ +__status, result, __dummy1, __dummy2, __si, __di); \ + if (VMW_BALLOON_CMD_##cmd == VMW_BALLOON_CMD_START) \ + result = __dummy1; \ + result &= -1UL; \ + __status & -1UL;\ }) #ifdef CONFIG_DEBUG_FS -- 1.9.1 ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
[PATCH 6/6] VMware balloon: Update vmw_balloon.c to use the VMW_PORT macro
Updated VMWARE_BALLOON_CMD to use the common VMW_PORT macro. Doing this rather than replacing all instances of VMWARE_BALLOON_CMD to minimize code change. Signed-off-by: Sinclair YehReviewed-by: Thomas Hellstrom Reviewed-by: Alok N Kataria Cc: pv-driv...@vmware.com Cc: Xavier Deguillard Cc: linux-ker...@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Cc: Greg Kroah-Hartman --- v1 Swapped parameters 1 and 2 to VMW_PORT because the macro has been updated --- drivers/misc/vmw_balloon.c | 29 - 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index ffb5634..f8f60ca 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/misc/vmw_balloon.c @@ -43,6 +43,7 @@ #include #include #include +#include MODULE_AUTHOR("VMware, Inc."); MODULE_DESCRIPTION("VMware Memory Control (Balloon) Driver"); @@ -142,23 +143,17 @@ enum vmwballoon_capabilities { #define VMW_BALLOON_SUCCESS_WITH_CAPABILITIES (0x0300) -#define VMWARE_BALLOON_CMD(cmd, data, result) \ -({ \ - unsigned long __status, __dummy1, __dummy2; \ - __asm__ __volatile__ ("inl %%dx" : \ - "=a"(__status), \ - "=c"(__dummy1), \ - "=d"(__dummy2), \ - "=b"(result) : \ - "0"(VMW_BALLOON_HV_MAGIC), \ - "1"(VMW_BALLOON_CMD_##cmd), \ - "2"(VMW_BALLOON_HV_PORT), \ - "3"(data) : \ - "memory"); \ - if (VMW_BALLOON_CMD_##cmd == VMW_BALLOON_CMD_START) \ - result = __dummy1; \ - result &= -1UL; \ - __status & -1UL;\ +#define VMWARE_BALLOON_CMD(cmd, data, result) \ +({\ + unsigned long __status, __dummy1, __dummy2;\ + unsigned long __si = 0, __di = 0; \ + VMW_PORT(VMW_BALLOON_CMD_##cmd, data, VMW_BALLOON_HV_PORT, \ +VMW_BALLOON_HV_MAGIC, \ +__status, result, __dummy1, __dummy2, __si, __di);\ + if (VMW_BALLOON_CMD_##cmd == VMW_BALLOON_CMD_START)\ + result = __dummy1; \ + result &= -1UL;\ + __status & -1UL; \ }) #ifdef CONFIG_DEBUG_FS -- 1.9.1 ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH 6/6] VMware balloon: Update vmw_balloon.c to use the VMW_PORT macro
Hey Sinclair, On Tue, Dec 01, 2015 at 02:18:52PM -0800, Sinclair Yeh wrote: > +#define VMWARE_BALLOON_CMD(cmd, data, result) \ > +({ \ > + unsigned long __status, __dummy1, __dummy2;\ > + unsigned long __si = 0, __di = 0; \ > + VMW_PORT(data, VMW_BALLOON_CMD_##cmd, VMW_BALLOON_HV_PORT, \ > + VMW_BALLOON_HV_MAGIC, \ > + __status, result, __dummy1, __dummy2, __si, __di);\ > + if (VMW_BALLOON_CMD_##cmd == VMW_BALLOON_CMD_START)\ > + result = __dummy1; \ > + result &= -1UL;\ > + __status & -1UL; \ > }) You need to indent the '\' with tabs only, and it looks like spaces are present here (which is also why they don't look aligned). Other than that I'm good with this: Acked-by: Xavier DeguillardXavier ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
[PATCH 6/6] VMware balloon: Update vmw_balloon.c to use the VMW_PORT macro
Signed-off-by: Sinclair YehReviewed-by: Thomas Hellstrom Reviewed-by: Alok N Kataria Cc: pv-driv...@vmware.com Cc: Xavier Deguillard Cc: linux-ker...@vger.kernel.org Cc: virtualization@lists.linux-foundation.org --- drivers/misc/vmw_balloon.c | 29 - 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/drivers/misc/vmw_balloon.c b/drivers/misc/vmw_balloon.c index ffb5634..90a0d07 100644 --- a/drivers/misc/vmw_balloon.c +++ b/drivers/misc/vmw_balloon.c @@ -43,6 +43,7 @@ #include #include #include +#include MODULE_AUTHOR("VMware, Inc."); MODULE_DESCRIPTION("VMware Memory Control (Balloon) Driver"); @@ -142,23 +143,17 @@ enum vmwballoon_capabilities { #define VMW_BALLOON_SUCCESS_WITH_CAPABILITIES (0x0300) -#define VMWARE_BALLOON_CMD(cmd, data, result) \ -({ \ - unsigned long __status, __dummy1, __dummy2; \ - __asm__ __volatile__ ("inl %%dx" : \ - "=a"(__status), \ - "=c"(__dummy1), \ - "=d"(__dummy2), \ - "=b"(result) : \ - "0"(VMW_BALLOON_HV_MAGIC), \ - "1"(VMW_BALLOON_CMD_##cmd), \ - "2"(VMW_BALLOON_HV_PORT), \ - "3"(data) : \ - "memory"); \ - if (VMW_BALLOON_CMD_##cmd == VMW_BALLOON_CMD_START) \ - result = __dummy1; \ - result &= -1UL; \ - __status & -1UL;\ +#define VMWARE_BALLOON_CMD(cmd, data, result) \ +({\ + unsigned long __status, __dummy1, __dummy2;\ + unsigned long __si = 0, __di = 0; \ + VMW_PORT(data, VMW_BALLOON_CMD_##cmd, VMW_BALLOON_HV_PORT, \ +VMW_BALLOON_HV_MAGIC, \ +__status, result, __dummy1, __dummy2, __si, __di);\ + if (VMW_BALLOON_CMD_##cmd == VMW_BALLOON_CMD_START)\ + result = __dummy1; \ + result &= -1UL;\ + __status & -1UL; \ }) #ifdef CONFIG_DEBUG_FS -- 1.9.1 ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Re: [PATCH 6/6] VMware balloon: Update vmw_balloon.c to use the VMW_PORT macro
Thanks! Done. On Tue, Dec 01, 2015 at 02:38:01PM -0800, Xavier Deguillard wrote: > Hey Sinclair, > > On Tue, Dec 01, 2015 at 02:18:52PM -0800, Sinclair Yeh wrote: > > +#define VMWARE_BALLOON_CMD(cmd, data, result) \ > > +({\ > > + unsigned long __status, __dummy1, __dummy2;\ > > + unsigned long __si = 0, __di = 0; \ > > + VMW_PORT(data, VMW_BALLOON_CMD_##cmd, VMW_BALLOON_HV_PORT, \ > > +VMW_BALLOON_HV_MAGIC, \ > > +__status, result, __dummy1, __dummy2, __si, __di);\ > > + if (VMW_BALLOON_CMD_##cmd == VMW_BALLOON_CMD_START)\ > > + result = __dummy1; \ > > + result &= -1UL;\ > > + __status & -1UL; \ > > }) > > You need to indent the '\' with tabs only, and it looks like spaces are > present here (which is also why they don't look aligned). > > Other than that I'm good with this: > > Acked-by: Xavier Deguillard> > Xavier ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization