Re: [Qemu-devel] [PATCH] net/vmxnet3: trace support for register access

2016-01-12 Thread Miao Yan
2016-01-12 15:57 GMT+08:00 Dmitry Fleytman : > >> On 12 Jan 2016, at 09:23 AM, Miao Yan wrote: >> >> Hi Dmitry, >> >> 2016-01-12 14:43 GMT+08:00 Dmitry Fleytman : >>> >>>> On 12 Jan 2016, at 04:38 AM, Miao Yan wrote: >>>&

Re: [Qemu-devel] [PATCH] net/vmxnet3: trace support for register access

2016-01-11 Thread Miao Yan
Hi Dmitry, 2016-01-12 14:43 GMT+08:00 Dmitry Fleytman : > >> On 12 Jan 2016, at 04:38 AM, Miao Yan wrote: >> >> Turning debug printfs to trace points for register access > > Hello Miao! > > While I’m into adding trace points I don’t really like the decrease o

[Qemu-devel] [PATCH] net/vmxnet3: trace support for register access

2016-01-11 Thread Miao Yan
Turning debug printfs to trace points for register access Signed-off-by: Miao Yan --- hw/net/vmxnet3.c | 68 +--- trace-events | 6 + 2 files changed, 16 insertions(+), 58 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c

[Qemu-devel] [PATCH v3 5/5] net/vmxnet3: rename VMXNET3_DEVICE_VERSION to VMXNET3_UPT_REVISION

2015-12-22 Thread Miao Yan
VMXNET3_DEVICE_VERSION is used as return value for accessing UPT Revision Report and Selection register. So rename it to VMXNET3_UPT_REVISION. Signed-off-by: Miao Yan --- hw/net/vmxnet3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c

[Qemu-devel] [PATCH v3 1/5] net/vmxnet3: return 1 on device activation failure

2015-12-22 Thread Miao Yan
the shared memory for guest/host communication This will trigger device activation failure and kernel log will have the following message: [ 7138.403256] vmxnet3 :03:00.0 eth1: Failed to activate dev: error 1 So return 1 on device activation failure instead of -1; Signed-off

[Qemu-devel] [PATCH v3 4/5] net/vmxnet3: return 0 on unknown command

2015-12-22 Thread Miao Yan
Return 0 on unknown command, this is what esxi (5.x+) behaves. Signed-off-by: Miao Yan --- Changes in v3: - mention esxi version in commit message hw/net/vmxnet3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index b8bc360..a429405

[Qemu-devel] [PATCH v3 2/5] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command

2015-12-22 Thread Miao Yan
", lo, high); The kernel log will have something like the following message: [ 7005.70] vmxnet3 DID lo: 0x7b0, high: 0x1 Signed-off-by: Miao Yan --- Changes in v3: - mention esxi version in commit message hw/net/vmxnet3.c | 16 1 file changed, 16 insertions(+) di

[Qemu-devel] [PATCH v3 3/5] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DEV_EXTRA_INFO

2015-12-22 Thread Miao Yan
, VMXNET3_CMD_GET_DEV_EXTRA_INFO); ret = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD); pr_info("vmxnet3 dev_info: 0x%x\n", ret); The kernel log will have some like the following message: [ 7005.70] vmxnet3 dev_info: 0x0 Signed-off-by: Miao Yan --- Changes in v3: - mention esxi version in commit me

[Qemu-devel] [PATCH v3 0/5] correct some register return values for vxmnet3

2015-12-22 Thread Miao Yan
ename VMXNET3_DEVICE_VERSION to VMXNET3_UPT_REVISION Miao Yan (5): net/vmxnet3: return 1 on device activation failure net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command net/vmxnet3: return correct value for VMXNET3_CMD_GET_DEV_EXTRA_INFO net/vmxnet3: return 0 on unknown command net/vm

Re: [Qemu-devel] [PATCH 0/3] correct some register return values for vxmnet3

2015-12-22 Thread Miao Yan
2015-12-23 10:15 GMT+08:00 Jason Wang : > > > On 12/22/2015 03:05 PM, Dmitry Fleytman wrote: >> >>> On 22 Dec 2015, at 04:44 AM, Miao Yan >> <mailto:yanmiaob...@gmail.com>> wrote: >>> >>> Hi Dmitry, >>> >>> 2015-12-22 1:1

Re: [Qemu-devel] [PATCH v2 2/4] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command

2015-12-22 Thread Miao Yan
2015-12-23 4:49 GMT+08:00 Shmulik Ladkani : > Hi, > > On Mon, 21 Dec 2015 22:18:22 -0800 Miao Yan wrote: >> VMXNET3_CMD_GET_DID_LO should return PCI ID of the device >> and VMXNET3_CMD_GET_DID_HI should return vmxnet3 revision ID. >> >> This behavior can b

Re: [Qemu-devel] [PATCH 1/3] net/vmxnet3: return 1 on device activation failure

2015-12-22 Thread Miao Yan
2015-12-22 17:06 GMT+08:00 P J P : > +-- On Tue, 22 Dec 2015, Miao Yan wrote --+ > | > If '1' indicates the error, the 'default:' case in the same switch needs > to be > | > updated too. > | > | '1' indicates an error on device act

[Qemu-devel] [PATCH v2 0/4] correct some register return values for vxmnet3

2015-12-21 Thread Miao Yan
Qemu vmxnet3 emulation doesn't recognize VMXNET3_CMD_GET_DID_LO, VMXNET3_CMD_GET_DID_HI and VMXNET3_CMD_GET_DEV_EXTRA_INFO command and returns -1 on all of them. This patchset makes them return correct values. Changes in v2: - return 0 on unknown command Miao Yan (4): net/vmxnet3: ret

[Qemu-devel] [PATCH v2 4/4] net/vmxnet3: return 0 on unknown command

2015-12-21 Thread Miao Yan
Return 0 on unknown command, this is what esxi behaves. Signed-off-by: Miao Yan --- hw/net/vmxnet3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index b8bc360..a429405 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -1706,7

[Qemu-devel] [PATCH v2 3/4] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DEV_EXTRA_INFO

2015-12-21 Thread Miao Yan
); ret = VMXNET3_READ_BAR1_REG(adapter, VMXNET3_REG_CMD); pr_info("vmxnet3 dev_info: 0x%x\n", ret); The kernel log will have some like the following message: [ 7005.70] vmxnet3 dev_info: 0x0 Signed-off-by: Miao Yan --- Changes in v2: - update vmxnet3_handle_command not to p

[Qemu-devel] [PATCH v2 1/4] net/vmxnet3: return 1 on device activation failure

2015-12-21 Thread Miao Yan
shared memory for guest/host communication This will trigger device activation failure and kernel log will have the following message: [ 7138.403256] vmxnet3 :03:00.0 eth1: Failed to activate dev: error 1 So return 1 on device activation failure instead of -1; Signed-off-by: Miao Yan

[Qemu-devel] [PATCH v2 2/4] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command

2015-12-21 Thread Miao Yan
, lo, high); The kernel log will have something like the following message: [ 7005.70] vmxnet3 DID lo: 0x7b0, high: 0x1 Signed-off-by: Miao Yan --- Changes in v2: - update vmxnet3_handle_command not to print error when issuing these commands hw/net/vmxnet3.c | 16 1 fi

Re: [Qemu-devel] [PATCH 1/3] net/vmxnet3: return 1 on device activation failure

2015-12-21 Thread Miao Yan
2015-12-22 2:15 GMT+08:00 P J P : > +-- On Mon, 21 Dec 2015, Miao Yan wrote --+ > | So return 1 on device activation failure instead of -1; > | > | Signed-off-by: Miao Yan > | --- > | hw/net/vmxnet3.c | 2 +- > | 1 file changed, 1 insertion(+), 1 deletion(-) > | > | di

Re: [Qemu-devel] [PATCH 0/3] correct some register return values for vxmnet3

2015-12-21 Thread Miao Yan
Here DID_LO is the pci device id, DID_HIGH is 0x1 and GET_DEV_EXTRA_INFO returns 0. putting above into commit message should be enough ? > > Thanks, > Dmitry > >> On 21 Dec 2015, at 13:06 PM, Miao Yan wrote: >> >> Qemu vmxnet3 emulation doesn't recognize

[Qemu-devel] [PATCH 1/3] net/vmxnet3: return 1 on device activation failure

2015-12-21 Thread Miao Yan
When reading device status, 0 means device is successfully activated and 1 means error. So return 1 on device activation failure instead of -1; Signed-off-by: Miao Yan --- hw/net/vmxnet3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c

[Qemu-devel] [PATCH 2/3] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command

2015-12-21 Thread Miao Yan
VMXNET3_CMD_GET_DID_LO should return PCI ID of the device and VMXNET3_CMD_GET_DID_HI should return vmxnet3 revision ID. Signed-off-by: Miao Yan --- hw/net/vmxnet3.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 9185408..3517aab 100644

[Qemu-devel] [PATCH 3/3] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DEV_EXTRA_INFO

2015-12-21 Thread Miao Yan
VMXNET3_CMD_GET_DEV_EXTRA_INFO should return 0 for emulation mode Signed-off-by: Miao Yan --- hw/net/vmxnet3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 3517aab..5b96a02 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -1659,6 +1659,7

[Qemu-devel] [PATCH 0/3] correct some register return values for vxmnet3

2015-12-21 Thread Miao Yan
Qemu vmxnet3 emulation doesn't recognize VMXNET3_CMD_GET_DID_LO, VMXNET3_CMD_GET_DID_HI and VMXNET3_CMD_GET_DEV_EXTRA_INFO command and returns -1 on all of them. This patchset makes them return correct values. Miao Yan (3): net/vmxnet3: return 1 on device activation failure net/vm

Re: [Qemu-devel] guest kernel in the host RAM

2015-12-16 Thread Miao Yan
2015-12-15 19:27 GMT+08:00 Denis V. Lunev : > Hello, Paolo! > > There is a plan or idea to improve current implementation > of Clear Containers for QEMU. Patches about NVDIMM > are floating in the list, you have proposed special > boot firmware for a case. > > The idea is that we could boot with th

Re: [Qemu-devel] net: vmxnet3: memory leakage issue

2015-12-15 Thread Miao Yan
2015-12-14 19:58 GMT+08:00 P J P : > Hello Dmitry, Jason > > +-- On Sun, 13 Dec 2015, Dmitry Fleytman wrote --+ > | According to Linux driver code VMXNET3_CMD_QUIESCE_DEV does not flip > | paused/active states. It always disables device, see vmxnet3_resume() for > | > | >

[Qemu-devel] [PATCH v3 4/4] net/vmxnet3: remove redundant VMW_SHPRN(...) definition

2015-12-07 Thread Miao Yan
Macro VMW_SHPRN(...) is already defined vmxnet3_debug.h, so remove the duplication Signed-off-by: Miao Yan Reviewed-by: Eric Blake --- hw/net/vmware_utils.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/net/vmware_utils.h b/hw/net/vmware_utils.h index 1099df6

[Qemu-devel] [PATCH v3 1/4] net/vmxnet3: fix a build error when enabling debug output

2015-12-07 Thread Miao Yan
Macro MAC_FMT and MAC_ARG are not defined, but used in vmxnet3_net_init(). This will cause build error when debug level is raised in vmxnet3_debug.h (enable all VMXNET3_DEBUG_xxx). Use VMXNET_MF and VXMNET_MA instead. Signed-off-by: Miao Yan Reviewed-by: Eric Blake --- Changes in v3: - add

[Qemu-devel] [PATCH v3 3/4] net/vmxnet3: fix debug macro pattern for vmxnet3

2015-12-07 Thread Miao Yan
break in the future when SOME_DEBUG is enabled because of lack of testing. This patch changes this to the following: #define debug(...) \ do { if (SOME_DEBUG_ENABLED) printf(...); } while (0) Signed-off-by: Miao Yan Reviewed-by: Eric Blake --- hw/net/vmxnet_debug.h | 139

[Qemu-devel] [PATCH v3 2/4] net/vmxnet3: use %zu for size_t in printf

2015-12-07 Thread Miao Yan
Use %zu specifier for size_t in printf, otherwise build would fail on platforms where size_t is not unsigned long Signed-off-by: Miao Yan --- hw/net/vmxnet3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index ea3d9b7..e168285

[Qemu-devel] [PATCH v3 0/4] fix debug macro pattern for vmxnet3

2015-12-07 Thread Miao Yan
v3: - fix a build error on 32 bit platforms Changes in v2: - fix grammar errors in commit log Miao Yan (4): net/vmxnet3: fix a build error when enabling debug output net/vmxnet3: use %zu for size_t in printf net/vmxnet3: fix debug macro pattern for vmxnet3 net/vmxnet3: remove redundant

Re: [Qemu-devel] [PATCH v2 2/3] net/vmxnet3: fix debug macro pattern for vmxnet3

2015-12-07 Thread Miao Yan
2015-12-08 6:04 GMT+08:00 Eric Blake : > On 12/06/2015 07:47 PM, Jason Wang wrote: >> >> >> On 12/05/2015 04:55 PM, Miao Yan wrote: >>> Vmxnet3 uses the following debug macro style: >>> >>> #ifdef SOME_DEBUG >>> # define debug(...) do{

[Qemu-devel] [PATCH v2 0/3] fix debug macro pattern for vmxnet3

2015-12-05 Thread Miao Yan
patch 1/3 "fix a build error when enabling debug output" has already been applied to -net tree by Jason Wang as a separate patch, it's included here for completeness because the other two depend on it. Miao Yan (3): net/vmxnet3.c: fix a build error when enabling debug output n

[Qemu-devel] [PATCH v2 2/3] net/vmxnet3: fix debug macro pattern for vmxnet3

2015-12-05 Thread Miao Yan
break in the future when SOME_DEBUG is enabled because of lack of testing. This patch changes this to the following: #define debug(...) \ do { if (SOME_DEBUG_ENABLED) printf(...); } while (0) Signed-off-by: Miao Yan Reviewed-by: Eric Blake --- Changes in v2: - Fix grammar error in commit log

[Qemu-devel] [PATCH v2 3/3] net/vmxnet3: remove redundant VMW_SHPRN(...) definition

2015-12-05 Thread Miao Yan
Macro VMW_SHPRN(...) is already defined vmxnet3_debug.h, so remove the duplication Signed-off-by: Miao Yan Reviewed-by: Eric Blake --- hw/net/vmware_utils.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/net/vmware_utils.h b/hw/net/vmware_utils.h index 1099df6

[Qemu-devel] [PATCH v2 1/3] net/vmxnet3.c: fix a build error when enabling debug output

2015-12-05 Thread Miao Yan
Macro MAC_FMT and MAC_ARG are not defined, but used in vmxnet3_net_init(). This will cause build error when debug level is raised in vmxnet3_debug.h (enable all VMXNET3_DEBUG_xxx). Use VMXNET_MF and VXMNET_MA instead. Signed-off-by: Miao Yan --- hw/net/vmxnet3.c | 2 +- 1 file changed, 1

Re: [Qemu-devel] [PATCH 1/2] net/vmxnet3: fix debug macro pattern for vmxnet3

2015-12-04 Thread Miao Yan
2015-12-04 21:18 GMT+08:00 Eric Blake : > On 12/04/2015 02:19 AM, Miao Yan wrote: >> Vmxnet3 uses the following debug macro style: >> > > When sending a patch series, it's best to include a 0/2 cover letter > (some of the maintainer tooling works better if it ca

[Qemu-devel] [PATCH 2/2] net/vmxnet3: remove redundant VMW_SHPRN(...) definition

2015-12-04 Thread Miao Yan
Macro VMW_SHPRN(...) is already defined vmxnet3_debug.h, so remove the duplication Signed-off-by: Miao Yan --- hw/net/vmware_utils.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/net/vmware_utils.h b/hw/net/vmware_utils.h index 1099df6..c2c2f90 100644 --- a/hw/net

[Qemu-devel] [PATCH 1/2] net/vmxnet3: fix debug macro pattern for vmxnet3

2015-12-04 Thread Miao Yan
break in the future when SOME_DEBUG is enabled because of lacking of testing. This patch changes this to the following: #define debug(...) \ do { if (SOME_DEBUG_ENABLED) printf(...); } while (0) Signed-off-by: Miao Yan --- hw/net/vmxnet_debug.h | 139

[Qemu-devel] [PATCH] net/vmxnet3.c: fix a build error when enabling debug output

2015-12-03 Thread Miao Yan
Macro MAC_FMT and MAC_ARG are not defined, but used in vmxnet3_net_init(). This will cause build error when debug level is raised in vmxnet3_debug.h (enable all VMXNET3_DEBUG_xxx). Use VMXNET_MF and VXMNET_MA instead. Signed-off-by: Miao Yan --- hw/net/vmxnet3.c | 2 +- 1 file changed, 1