summaryrefslogtreecommitdiff
path: root/tools/intel_gvtg_test.c
AgeCommit message (Collapse)Author
2018-08-27Make string commands dynamic allocateRodrigo Siqueira
This patch fix the following GCC warning: intel_gvtg_test.c: In function ‘create_guest’: intel_gvtg_test.c:127:50: warning: ‘%s’ directive writing up to 4095 bytes into a region of size 4077 [-Wformat-overflow=] [..] intel_gvtg_test.c:127:5: note: ‘sprintf’ output between 36 and 8226 bytes into a destination of size 4096 [..] This patch changes the approach for allocating memory to handle QEMU commands by dynamically allocate space to save the whole command. Changes since v1: Arkadiusz Hiler: - Remove overkill allocation for handling commands - Remove unnecessary use of memset Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-11-22intel_gvtg_test: Handle system(3) return value.Tvrtko Ursulin
Avoid the build warning by checking the pkill either did not find any guests or managed to send a signal to all of them. v2: Inspect system(3) return value properly. (Petri Latvala) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-09-08build: Nuke #ifdef HAVE_CONFIG_H cargo-cultDaniel Vetter
We have it. Daniel Stone said the #ifdef HAVE_CONFIG_H comes from the X11 transition to the modular build, where in the imake -> modular build transition config.h wasn't universally available. Now we just make this a requirement (so yeah Android better generate one too). v2: Improve commit message a bit. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-06-06Fix the mac address definition typo in tools/intel_gvtg_test.Terrence Xu
Changed the "%2X" to "%02X", to prevent padding with spaces, which breaks qemu command line arguments when first RANDOM is <0x10. Signed-off-by: Sarvela Tomi P <tomi.p.sarvela@intel.com> Signed-off-by: Terrence Xu <terrence.xu@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-03-09Add the new tool for create GVT-g Linux guest based on KVMGTTerrence Xu
GVT-g (Intel® Graphics Virtualization Technology) is a full GPU virtualization solution with mediated pass-through support. This tool is for create basic Linux guest based on KVMGT with VFIO framework, it including create vgpu, create guest, check IP address, destroy guest, remove vgpu,check dmesg log, etc functions. v2: Treat this case as a free-standing tool, with detect & skip when it's not running on GVT-g capable platform or running without the required tools. v3: Make some optimizations: like "update the generate mac address scripts", "provide more useful information for end user", etc. v4: Miscellaneous cleanup (Petri) Signed-off-by: Terrence Xu <terrence.xu@intel.com> Signed-off-by: Benyu Xu <benyux.xu@intel.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com>