Re: [libvirt] 'make check' fails (qemuhotplugTest) with libvirt fakeroot build, starting with 3.1.0 release

2017-03-06 Thread Daniel P. Berrange
On Mon, Mar 06, 2017 at 12:05:58PM +0100, Predrag Ivanovic wrote: > On Mon, 06 Mar 2017 07:06:22 +0100 > Michal Privoznik wrote: > > >This is the problem. fakeroot tells the test that it is running under > >root user therefore it tries to access some dirs there (which is denied > >because of

[libvirt] [PATCH v2.1] qemu_capabilities: introduce QEMU_CAPS_SD_CARD to probe sd-card drivers

2017-03-06 Thread Chen Hanxiao
From: Chen Hanxiao This patch introduces QEMU_CAPS_SD_CARD for probing whether qemu support SD card by: {"execute": "device-list-properties", "arguments":{"typename":"sd-card"}} It will be helpful for apps which used cmd 'virsh domcaps` etc. Also helpful for:

Re: [libvirt] 'make check' fails (qemuhotplugTest) with libvirt fakeroot build, starting with 3.1.0 release

2017-03-06 Thread Michal Privoznik
On 06.03.2017 12:05, Predrag Ivanovic wrote: > On Mon, 06 Mar 2017 07:06:22 +0100 > Michal Privoznik wrote: > >> This is the problem. fakeroot tells the test that it is running under >> root user therefore it tries to access some dirs there (which is denied >> because of fakeroot). Well, we

[libvirt] [PATCH v3] Document preferred naming conventions

2017-03-06 Thread Daniel P. Berrange
This documents the preferred conventions for naming files, structs, enums, typedefs and functions. Signed-off-by: Daniel P. Berrange --- Changed in v3: - Clarify function naming wrt verb & subject - Simplify macro naming, since in practice libvirt code doesn't follow any

Re: [libvirt] [PATCH] qemuTestDriverInit: Don't access live data

2017-03-06 Thread Predrag Ivanovic
On Mon, 06 Mar 2017 08:38:00 +0100 Michal Privoznik wrote: With this patch applied to 3.1.0, 'make check' passes and the build is succesful under fakeroot. Thank you, I owe you a $BEVERAGE_OF_CHOICE :) Pedja -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH] qemu: Enforce qemuSecurity wrappers

2017-03-06 Thread Peter Krempa
On Tue, Feb 14, 2017 at 15:30:44 +0100, Michal Privoznik wrote: > Now that we have some qemuSecurity wrappers over > virSecurityManager APIs, lets make sure everybody sticks with > them. We have them for a reason and calling virSecurityManager > API directly instead of wrapper may lead into

Re: [libvirt] [PATCH] qemu: Enforce qemuSecurity wrappers

2017-03-06 Thread Michal Privoznik
On 06.03.2017 12:43, Peter Krempa wrote: > On Tue, Feb 14, 2017 at 15:30:44 +0100, Michal Privoznik wrote: >> Now that we have some qemuSecurity wrappers over >> virSecurityManager APIs, lets make sure everybody sticks with >> them. We have them for a reason and calling virSecurityManager >> API

Re: [libvirt] 'make check' fails (qemuhotplugTest) with libvirt fakeroot build, starting with 3.1.0 release

2017-03-06 Thread Predrag Ivanovic
On Mon, 06 Mar 2017 07:06:22 +0100 Michal Privoznik wrote: >This is the problem. fakeroot tells the test that it is running under >root user therefore it tries to access some dirs there (which is denied >because of fakeroot). Well, we shouldn't mkdir() from our test suite >neither - will look

[libvirt] [PATH V10 08/12] Resctrl: Compatible mode for cdp enabled

2017-03-06 Thread Eli Qiao
This patch support l3 cache allocation compatible mode if cdp enabled on host. In this case l3code/l3data has same schemata. Signed-off-by: Eli Qiao --- src/conf/domain_conf.c | 15 +-- src/util/virresctrl.c | 10 ++ 2 files changed, 23

[libvirt] [PATCH 2/4] tests: sysinfo: Export virSysinfoSetup via the private header

2017-03-06 Thread Peter Krempa
virSysinfoSetup should be used only in tests so it can be moved to the new header file rather than using an extern declaration. --- src/util/virsysinfo.c | 9 - src/util/virsysinfopriv.h | 5 + tests/sysinfotest.c | 8 +++- 3 files changed, 12 insertions(+), 10

[libvirt] [PATCH 4/4] tests: sysinfo: Add test data for HP moonshot aarch64 box

2017-03-06 Thread Peter Krempa
Since the kernel does not report much data for that box the sysinfo output is comparatively sparse. --- tests/sysinfodata/aarch64-moonshotcpuinfo.data | 72 tests/sysinfodata/aarch64-moonshotsysinfo.expect | 1 + tests/sysinfotest.c | 1 +

Re: [libvirt] [PATCH 1/3] qemu_domain: move controller post parse code into its own function

2017-03-06 Thread Andrea Bolognani
On Thu, 2017-03-02 at 09:48 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_domain.c | 202 > + > 1 file changed, 104 insertions(+), 98 deletions(-) ACK -- Andrea Bolognani / Red Hat /

[libvirt] [PATCH 0/4] Refactor and fix sysinfo data retrieval and the testing of the code

2017-03-06 Thread Peter Krempa
src/util/virsysinfo.c was a big mess of conditionally compiled functions with the same name for each platform. Also the test was run only for the current platform. Remove the churn and make all tests run on all platforms since there is no platform dependency. Peter Krempa (4): util: sysinfo:

[libvirt] [PATCH 1/4] util: sysinfo: Reduce amount of conditionally compiled code

2017-03-06 Thread Peter Krempa
Whole implementations along with helper totalling screens of code were conditionally compiled. That made the code totally unreadable and untestable. Rename functions to have the architecture in the name so that all can be compiled at the same time and introduce header to allow testing them all.

[libvirt] [PATCH 3/4] tests: sysinfo: Run all sysinfo tests all the time

2017-03-06 Thread Peter Krempa
There's no reason why we should avoid running all sysinfo tests on all platforms. Refactor the test to get rid of the conditionally compiled cruft. --- tests/sysinfotest.c | 106 1 file changed, 23 insertions(+), 83 deletions(-) diff --git

Re: [libvirt] [PATCH 2/3] qemu_domain: cleanup the controller post parse code

2017-03-06 Thread Andrea Bolognani
On Thu, 2017-03-02 at 09:48 +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_domain.c | 114 > ++--- > 1 file changed, 61 insertions(+), 53 deletions(-) Nice cleanup! ACK -- Andrea Bolognani / Red

[libvirt] [PATCH 1/6] conf: Change virNWFilterObjSaveDef to virNWFilterSaveDef

2017-03-06 Thread John Ferlan
There's no need to pass the driver pointer to nwfilter_conf, just pass the configDir. Signed-off-by: John Ferlan --- src/conf/nwfilter_conf.c | 12 +--- src/conf/nwfilter_conf.h | 4 ++-- src/libvirt_private.syms | 2 +-

Re: [libvirt] [PATCH v2] Don't print extra newline in virsh domstats output

2017-03-06 Thread John Ferlan
On 02/10/2017 10:04 AM, Nitesh Konkar wrote: > Signed-off-by: Nitesh Konkar > --- > virsh domstats --perf > Domain: 'Fedora123' > perf.cache_misses=394986 > > Domain: 'Fedora' > perf.cache_misses=447017 > > virsh domstats > Domain: 'Fedora123' >

[libvirt] [PATCH 0/6] Split out nwfilter object into its own module

2017-03-06 Thread John Ferlan
Continuing down the pile of drivers from my RFC for making a common pool object - we're now at nwfilter (still have storage and network to go). For reference see patch 3 of: http://www.redhat.com/archives/libvir-list/2017-February/msg00519.html This series works through the nwfilter conf

[libvirt] [PATCH 6/6] conf: Use consistent function name prefixes for virnwfilterobj

2017-03-06 Thread John Ferlan
Use "virNWFilterObj" as a prefix for any external API in virnwfilterobj Signed-off-by: John Ferlan --- src/conf/virnwfilterobj.c | 34 +- src/conf/virnwfilterobj.h | 6 +++--- src/libvirt_private.syms | 4 ++--

[libvirt] [PATCH 5/6] conf: Alter coding style of nwfilter function prototypes

2017-03-06 Thread John Ferlan
In an effort to be consistent with the source module, alter the function prototypes to follow the similar style of source with the "type" on one line followed by the function name and arguments on subsequent lines with with argument getting it's own line. Signed-off-by: John Ferlan

[libvirt] [PATCH 2/6] conf: Change virNWFilterObjDeleteDef to virNWFilterDeleteDef

2017-03-06 Thread John Ferlan
Rather than pass the nwfilter object, just pass the def to the function Signed-off-by: John Ferlan --- src/conf/nwfilter_conf.c | 10 -- src/conf/nwfilter_conf.h | 4 ++-- src/libvirt_private.syms | 2 +- src/nwfilter/nwfilter_driver.c | 2 +- 4

[libvirt] [PATCH 3/6] conf: Introduce virnwfilterobj

2017-03-06 Thread John Ferlan
Move all the NWFilterObj API's into their own module virnwfilterobj from the nwfilter_conf Purely code motion at this point, plus adjustments to cleanly build. Signed-off-by: John Ferlan --- po/POTFILES.in | 1 + src/Makefile.am

[libvirt] [PATCH 4/6] conf: Adjust coding style for nwfilter conf sources

2017-03-06 Thread John Ferlan
Alter the format of the code to follow more recent style guidelines of two empty lines between functions, function decls with "[static] type" on one line followed by function name with arguments to functions each on one line. Signed-off-by: John Ferlan ---

Re: [libvirt] [PATCH v2.1] qemu_capabilities: introduce QEMU_CAPS_SD_CARD to probe sd-card drivers

2017-03-06 Thread Pavel Hrdina
On Mon, Mar 06, 2017 at 07:40:30PM +0800, Chen Hanxiao wrote: > From: Chen Hanxiao > > This patch introduces QEMU_CAPS_SD_CARD for probing > whether qemu support SD card by: > > {"execute": "device-list-properties", > "arguments":{"typename":"sd-card"}} > > It will

[libvirt] [PATCH] qemu_capabilities: report SATA bus in domain capabilities

2017-03-06 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- src/qemu/qemu_capabilities.c | 4 tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml | 1 + tests/domaincapsschemadata/qemu_2.6.0-gicv2-virt.aarch64.xml | 1 +

Re: [libvirt] [PATCH] make all struct typedefs comply with proposed coding conventions

2017-03-06 Thread Daniel P. Berrange
On Mon, Mar 06, 2017 at 12:53:23PM -0500, Laine Stump wrote: > Proposed formal coding conventions encourage defining typedefs for > vir[Blah] and vir[Blah]Ptr separately from the associated struct named > _vir[Blah]: > > typedef struct _virBlah virBlah; > typedef virBlah *virBlahPtr; >

Re: [libvirt] [PATCH] Document preferred naming conventions

2017-03-06 Thread Laine Stump
On 03/06/2017 05:04 AM, Daniel P. Berrange wrote: On Mon, Mar 06, 2017 at 10:21:28AM +0100, Bjoern Walk wrote: Daniel P. Berrange [2017-03-03, 10:50AM +0100]: This documents the preferred conventions for naming files, structs, enums, typedefs and functions.

[libvirt] [PATCH] make all struct typedefs comply with proposed coding conventions

2017-03-06 Thread Laine Stump
Proposed formal coding conventions encourage defining typedefs for vir[Blah] and vir[Blah]Ptr separately from the associated struct named _vir[Blah]: typedef struct _virBlah virBlah; typedef virBlah *virBlahPtr; struct _virBlah { ... }; At some point in the past, I had

Re: [libvirt] [PATCH v3] Document preferred naming conventions

2017-03-06 Thread Daniel P. Berrange
On Mon, Mar 06, 2017 at 01:11:20PM -0500, Laine Stump wrote: > On 03/06/2017 06:09 AM, Daniel P. Berrange wrote: > > This documents the preferred conventions for naming files, > > structs, enums, typedefs and functions. > > > > Signed-off-by: Daniel P. Berrange > > --- > >

Re: [libvirt] [PATCH 3/3] qemu_domain: use correct default USB controller on ppc64

2017-03-06 Thread Andrea Bolognani
On Thu, 2017-03-02 at 09:48 +0100, Pavel Hrdina wrote: > The history of USB controller for ppc64 guest is complex and goes > back to libvirt 1.3.1 where the fun started. >  > Prior Libvirt 1.3.1 if no model for USB controller was specified > we've simply passed "-usb" on QEMU command line. >  >

Re: [libvirt] [PATCH v3] Document preferred naming conventions

2017-03-06 Thread Laine Stump
On 03/06/2017 06:09 AM, Daniel P. Berrange wrote: This documents the preferred conventions for naming files, structs, enums, typedefs and functions. Signed-off-by: Daniel P. Berrange --- Changed in v3: - Clarify function naming wrt verb & subject - Simplify macro

Re: [libvirt] [PATCH go v3] Add support for perf events

2017-03-06 Thread John Ferlan
On 02/24/2017 07:12 AM, Nitesh Konkar wrote: > Signed-off-by: Nitesh Konkar > --- > connect.go | 54 ++ > domain.go | 54 ++ > domain_compat.h | 36

Re: [libvirt] [PATCH perl v2] Add constants for new perf event support

2017-03-06 Thread John Ferlan
On 02/24/2017 01:49 AM, Nitesh Konkar wrote: > Signed-off-by: Nitesh Konkar > --- > Changes| 9 + > Virt.xs| 9 + > lib/Sys/Virt/Domain.pm | 54 > ++ > 3 files

Re: [libvirt] [PATCH v2 00/10] perf: Add software perf events

2017-03-06 Thread John Ferlan
On 02/23/2017 09:55 AM, Nitesh Konkar wrote: > This patch series adds software perf events. > The perl and go patches shall follow shortly. > > Nitesh Konkar (10): > perf: add cpu_clock software perf event support > perf: add task_clock software perf event support > perf: add page_faults

Re: [libvirt] [PATCH] vz: correct error message

2017-03-06 Thread John Ferlan
On 02/20/2017 06:40 AM, Mikhail Feoktistov wrote: > --- > src/vz/vz_sdk.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > Not sure you can take this route since "destroy" and "restart" are translatable from domain_conf POV. If you really wanted to make this ugly... Using

Re: [libvirt] [PATH V10 12/12] Resctrl: Add nodecachestats

2017-03-06 Thread Marcelo Tosatti
On Mon, Mar 06, 2017 at 05:50:43PM +0800, Eli Qiao wrote: > Add new virsh command line `nodecachestats` to expose the cache usage > on a node. > > Signed-off-by: Eli Qiao > --- > src/libvirt_private.syms | 3 ++- > src/qemu/qemu_driver.c | 12 ++ >

[libvirt] [PATCH] libvirt: document UNDEFINE_KEEP_NVRAM in UndefineFlags docs

2017-03-06 Thread Cole Robinson
--- src/libvirt-domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 619a9fc..749297f 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -6287,9 +6287,9 @@ virDomainUndefine(virDomainPtr domain) *

[libvirt] [PATCH] Add virsystemdpriv.h to UTIL_SOURCES

2017-03-06 Thread Daniel P. Berrange
Ensure virsystemdpriv.h gets included in dist tarballs. Signed-off-by: Daniel P. Berrange --- Pushed to fix RPM builds src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index c85927f..62c8743 100644 ---

Re: [libvirt] [PATCH] qemu_capabilities: report SATA bus in domain capabilities

2017-03-06 Thread Erik Skultety
On Mon, Mar 06, 2017 at 05:24:16PM +0100, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina > --- > src/qemu/qemu_capabilities.c | 4 > tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml | 1 + >

[libvirt] [PATCH] storage: Don't pass 'iso' format to qemu-img

2017-03-06 Thread Cole Robinson
$ virsh vol-clone /tmp/test.iso new.iso error: Failed to clone vol from test.iso error: internal error: Child process (/bin/qemu-img convert -f iso -O iso /tmp/test.iso /tmp/new.iso) unexpected exit status 1: qemu-img: Could not open '/tmp/test.iso': Unknown driver 'iso' Map iso->raw before

Re: [libvirt] [PATH V10 12/12] Resctrl: Add nodecachestats

2017-03-06 Thread Eli Qiao
-- Best regards Eli 天涯无处不重逢 a leaf duckweed belongs to the sea, where not to meet in life Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Tuesday, 7 March 2017 at 5:33 AM, Marcelo Tosatti wrote: > On Mon, Mar 06, 2017 at 05:50:43PM +0800, Eli Qiao wrote: > > Add new virsh

Re: [libvirt] [PATCH 4/4] tests: sysinfo: Add test data for HP moonshot aarch64 box

2017-03-06 Thread Peter Krempa
On Mon, Mar 06, 2017 at 16:24:39 +0100, Peter Krempa wrote: > Since the kernel does not report much data for that box the sysinfo > output is comparatively sparse. > --- > tests/sysinfodata/aarch64-moonshotcpuinfo.data | 72 > >

Re: [libvirt] [GSOC] project libvirt fuzzing

2017-03-06 Thread D L
On Sun, Mar 5, 2017 at 2:47 AM, Michal Privoznik wrote: > On 04.03.2017 07:23, Da L wrote: > > Dear all, > > > > Hey, > > > This is my first post in the list. > > Very well. Welcome. It is always nice to see people interested in libvirt. > > Hi Michal, Thank you very much

Re: [libvirt] [PATCH] Document preferred naming conventions

2017-03-06 Thread Peter Krempa
On Mon, Mar 06, 2017 at 10:21:28 +0100, Bjoern Walk wrote: > Daniel P. Berrange [2017-03-03, 10:50AM +0100]: > >This documents the preferred conventions for naming files, > >structs, enums, typedefs and functions. > > > >Signed-off-by: Daniel P. Berrange

[libvirt] [PATH V10 01/12] Resctrl: Add some utils functions

2017-03-06 Thread Eli Qiao
This patch adds some utils struct and functions to expose resctrl information. virResCtrlAvailable: if resctrl interface exist on host. virResCtrlGet: get specific type resource control information. virResCtrlInit: initialize resctrl struct from the host's sys fs. resctrlall[]: an array to

[libvirt] [PATH V10 09/12] Resctrl: concurrence support

2017-03-06 Thread Eli Qiao
The internal struct list domainall is a list which are resctral domain status shared by all VMs, especiall the default domain, each VM should access it concomitantly. Ues a mutex to control it. Each bank's cache_left field is also a global shared resource we need to be care, add a mutex for each

[libvirt] [PATH V10 10/12] Resctrl: Scan resctrl before doing cache allocation

2017-03-06 Thread Eli Qiao
Other application may touch resctrl while libvirt's running, scan resctrl again before allocating cache information to the newly created VM. Signed-off-by: Eli Qiao --- src/util/virresctrl.c | 40 1 file changed, 40 insertions(+)

[libvirt] [PATH V10 00/12] Support cache tune in libvirt

2017-03-06 Thread Eli Qiao
Addressed comment from v9 -> v8 Marcelo: * Improve default schemata calculate, support allocate from low schemata bits for other APP. Addressed comment from v9 -> v8 Marcelo: * New public API to query cache usage Eli: * Fix core dump while multiple tasks are added. Addressed

[libvirt] [PATH V10 02/12] Resctrl: expose cache information to capabilities

2017-03-06 Thread Eli Qiao
This patch expose cache information to host's capabilites xml. For l3 cache allocation For l3 cache allocation supported cdp(seperate data/code): RFC on mailing list. https://www.redhat.com/archives/libvir-list/2017-January/msg00644.html

[libvirt] [PATH V10 03/12] Resctrl: Add new xml element to support cache tune

2017-03-06 Thread Eli Qiao
This patch adds new xml element to support cache tune as: ... ... id: any non-minus number host_id: reference of the host's cache banks id, it's from capabilities type: cache bank type size: should be multiples of the min_size of the bank on host. vcpus: cache allocation on vcpu set, if

[libvirt] [PATH V10 11/12] Resctrl: Add Public API for nodecachestats

2017-03-06 Thread Eli Qiao
This patch expose a public API virNodeCacheStats to query cache stats on a host. Signed-off-by: Eli Qiao --- daemon/remote.c| 67 ++ include/libvirt/libvirt-host.h | 32 src/driver-hypervisor.h

[libvirt] [PATH V10 07/12] Resctrl: Make sure l3data/l3code are pairs

2017-03-06 Thread Eli Qiao
l3data and l3code type of cache banks should be configured pairs. Signed-off-by: Eli Qiao --- src/conf/domain_conf.c | 19 +++ src/util/virresctrl.c | 1 - src/util/virresctrl.h | 2 ++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATH V10 06/12] Resctrl: enable l3code/l3data

2017-03-06 Thread Eli Qiao
Enable l3code/l3data while doing cache tune. l3code/l3data should use a continus cbm in their seperated schemata and the cache size are shared between them, so we need to deal them differently with l3 cache. This should enable cdp feature while mounting /sys/fs/resctrl, eg: mount -t resctrl

[libvirt] [PATH V10 12/12] Resctrl: Add nodecachestats

2017-03-06 Thread Eli Qiao
Add new virsh command line `nodecachestats` to expose the cache usage on a node. Signed-off-by: Eli Qiao --- src/libvirt_private.syms | 3 ++- src/qemu/qemu_driver.c | 12 ++ src/util/virresctrl.c| 62

[libvirt] [PATH V10 04/12] Resctrl: Add private interfaces to operate cache bank

2017-03-06 Thread Eli Qiao
virResCtrlSetCacheBanks: Set cache banks of a libvirt domain. It will create new resource domain under `/sys/fs/resctrl` and fill the schemata according the cache bank configration. virResCtrlUpdate: Destroy resctrl domain

Re: [libvirt] [PATH v9 12/12] Resctrl: Add nodecachestats

2017-03-06 Thread Eli Qiao
Best regards - Eli 天涯无处不重逢 a leaf duckweed belongs to the sea, where not to meet in life 2017-03-03 10:24 GMT+08:00 Marcelo Tosatti : > On Mon, Feb 27, 2017 at 03:22:56PM +0800, Eli Qiao wrote: > > Add new virsh command line

[libvirt] [PATH V10 05/12] Qemu: Set cache tune while booting a new domain.

2017-03-06 Thread Eli Qiao
While user can assign some specific vcpus list in , adds the vcpus' pids to cache bank, else vm->pid will be added to cache bank. Signed-off-by: Eli Qiao --- src/qemu/qemu_driver.c | 6 -- src/qemu/qemu_process.c | 54

Re: [libvirt] [RFC PATCH 00/12] Support multiple PHBs on pSeries guests

2017-03-06 Thread David Gibson
On Fri, 03 Mar 2017 09:07:53 +0100 Andrea Bolognani wrote: > On Fri, 2017-03-03 at 12:37 +1100, David Gibson wrote: > [...] > [...] > > Sorry for not keeping you up to date, here's the situation: > I got the code working with the current naming scheme and > it's not

Re: [libvirt] [PATCH 0/3] Clean

2017-03-06 Thread Michal Privoznik
On 04.03.2017 16:00, John Ferlan wrote: > More "fallout" from the RFC series to make a common pool object: > > http://www.redhat.com/archives/libvir-list/2017-February/msg00519.html > > were changes made along the way in the test_driver code to "commonalize" > the various

Re: [libvirt] [PATCH] Document preferred naming conventions

2017-03-06 Thread Bjoern Walk
Daniel P. Berrange [2017-03-03, 10:50AM +0100]: This documents the preferred conventions for naming files, structs, enums, typedefs and functions. Signed-off-by: Daniel P. Berrange --- HACKING | 71

Re: [libvirt] [PATCH] Document preferred naming conventions

2017-03-06 Thread Bjoern Walk
Peter Krempa [2017-03-06, 10:40AM +0100]: On Mon, Mar 06, 2017 at 10:21:28 +0100, Bjoern Walk wrote: I personally would prefer this style: typedef struct _virHashTable { ... } virHashTable, *virHashTablePtr; This is done for example in

Re: [libvirt] [PATH V10 00/12] Support cache tune in libvirt

2017-03-06 Thread Peter Krempa
Please configure 'git send-email' or the tool you use to format and send patches properly. You are consistently sending patches with "PATH" instead of "PATCH" in the subject. On Mon, Mar 06, 2017 at 17:50:31 +0800, Eli Qiao wrote: > Addressed comment from v9 -> v8 [...] signature.asc

[libvirt] [PATCH resend V10 01/12] Resctrl: Add some utils functions

2017-03-06 Thread Eli Qiao
This patch adds some utils struct and functions to expose resctrl information. virResCtrlAvailable: if resctrl interface exist on host. virResCtrlGet: get specific type resource control information. virResCtrlInit: initialize resctrl struct from the host's sys fs. resctrlall[]: an array to

[libvirt] [PATCH resend V10 02/12] Resctrl: expose cache information to capabilities

2017-03-06 Thread Eli Qiao
This patch expose cache information to host's capabilites xml. For l3 cache allocation For l3 cache allocation supported cdp(seperate data/code): RFC on mailing list. https://www.redhat.com/archives/libvir-list/2017-January/msg00644.html

[libvirt] [PATCH resend V10 12/12] Resctrl: Add nodecachestats

2017-03-06 Thread Eli Qiao
Add new virsh command line `nodecachestats` to expose the cache usage on a node. Signed-off-by: Eli Qiao --- src/libvirt_private.syms | 3 ++- src/qemu/qemu_driver.c | 12 ++ src/util/virresctrl.c| 62

[libvirt] [PATCH resend V10 00/12] Support cache tune in libvirt

2017-03-06 Thread Eli Qiao
Addressed comment from v10 -> v9 Marcelo: * Improve default schemata calculate, support allocate from low schemata bits for other APP. Addressed comment from v9 -> v8 Marcelo: * New public API to query cache usage Eli: * Fix core dump while multiple tasks are added.

[libvirt] [PATCH resend V10 03/12] Resctrl: Add new xml element to support cache tune

2017-03-06 Thread Eli Qiao
This patch adds new xml element to support cache tune as: ... ... id: any non-minus number host_id: reference of the host's cache banks id, it's from capabilities type: cache bank type size: should be multiples of the min_size of the bank on host. vcpus: cache allocation on vcpu set, if

[libvirt] [PATCH resend V10 09/12] Resctrl: concurrence support

2017-03-06 Thread Eli Qiao
The internal struct list domainall is a list which are resctral domain status shared by all VMs, especiall the default domain, each VM should access it concomitantly. Ues a mutex to control it. Each bank's cache_left field is also a global shared resource we need to be care, add a mutex for each

Re: [libvirt] [PATCH] Document preferred naming conventions

2017-03-06 Thread Daniel P. Berrange
On Mon, Mar 06, 2017 at 10:21:28AM +0100, Bjoern Walk wrote: > Daniel P. Berrange [2017-03-03, 10:50AM +0100]: > > This documents the preferred conventions for naming files, > > structs, enums, typedefs and functions. > > > > Signed-off-by: Daniel P. Berrange

[libvirt] [PATCH resend V10 10/12] Resctrl: Scan resctrl before doing cache allocation

2017-03-06 Thread Eli Qiao
Other application may touch resctrl while libvirt's running, scan resctrl again before allocating cache information to the newly created VM. Signed-off-by: Eli Qiao --- src/util/virresctrl.c | 40 1 file changed, 40 insertions(+)

[libvirt] [PATCH resend V10 06/12] Resctrl: enable l3code/l3data

2017-03-06 Thread Eli Qiao
Enable l3code/l3data while doing cache tune. l3code/l3data should use a continus cbm in their seperated schemata and the cache size are shared between them, so we need to deal them differently with l3 cache. This should enable cdp feature while mounting /sys/fs/resctrl, eg: mount -t resctrl

[libvirt] [PATCH resend V10 04/12] Resctrl: Add private interfaces to operate cache bank

2017-03-06 Thread Eli Qiao
virResCtrlSetCacheBanks: Set cache banks of a libvirt domain. It will create new resource domain under `/sys/fs/resctrl` and fill the schemata according the cache bank configration. virResCtrlUpdate: Destroy resctrl domain

[libvirt] [PATCH resend V10 08/12] Resctrl: Compatible mode for cdp enabled

2017-03-06 Thread Eli Qiao
This patch support l3 cache allocation compatible mode if cdp enabled on host. In this case l3code/l3data has same schemata. Signed-off-by: Eli Qiao --- src/conf/domain_conf.c | 15 +-- src/util/virresctrl.c | 10 ++ 2 files changed, 23

[libvirt] [PATCH resend V10 07/12] Resctrl: Make sure l3data/l3code are pairs

2017-03-06 Thread Eli Qiao
l3data and l3code type of cache banks should be configured pairs. Signed-off-by: Eli Qiao --- src/conf/domain_conf.c | 19 +++ src/util/virresctrl.c | 1 - src/util/virresctrl.h | 2 ++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git

[libvirt] [PATCH resend V10 11/12] Resctrl: Add Public API for nodecachestats

2017-03-06 Thread Eli Qiao
This patch expose a public API virNodeCacheStats to query cache stats on a host. Signed-off-by: Eli Qiao --- daemon/remote.c| 67 ++ include/libvirt/libvirt-host.h | 32 src/driver-hypervisor.h

[libvirt] [PATCH resend V10 05/12] Qemu: Set cache tune while booting a new domain.

2017-03-06 Thread Eli Qiao
While user can assign some specific vcpus list in , adds the vcpus' pids to cache bank, else vm->pid will be added to cache bank. Signed-off-by: Eli Qiao --- src/qemu/qemu_driver.c | 6 -- src/qemu/qemu_process.c | 54

Re: [libvirt] [PATCH 1/2] qemu: hotplug: Add debug log when dispatching device removal to existing thread

2017-03-06 Thread Marc Hartmayer
On Fri, Mar 03, 2017 at 04:11 PM +0100, Peter Krempa wrote: > Note that the waiting thread is singalled in the debug logs to simplify s/singalled/signaled > debugging. > --- > src/qemu/qemu_hotplug.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [libvirt] [PATCH 0/4] Split out interface object into its own module

2017-03-06 Thread Michal Privoznik
On 04.03.2017 14:12, John Ferlan wrote: > Feedback from the initial pass at RFC for making a common pool object was > that it got really confusing trying to manage the multitude of changes. > See patch 3 of the series: > > http://www.redhat.com/archives/libvir-list/2017-February/msg00519.html >