Re: [PATCH] qemu: add support for max-ram-below-4g option

2021-04-26 Thread Zhiyong Ye
On 4/26/21 3:55 PM, Peter Krempa wrote: On Sun, Apr 25, 2021 at 17:33:31 +0800, Zhiyong Ye wrote: Limit the amount of ram below 4G. This can increase the address space used by PCI devices below 4G and it can be used by adding attributes in XML like this: ... 4096 This illustrates that

Re: [PATCH] qapi: deprecate drive-backup

2021-04-26 Thread Vladimir Sementsov-Ogievskiy
26.04.2021 21:30, John Snow wrote: On 4/26/21 2:05 PM, Daniel P. Berrangé wrote: On Mon, Apr 26, 2021 at 09:00:36PM +0300, Vladimir Sementsov-Ogievskiy wrote: 26.04.2021 20:34, John Snow wrote: On 4/23/21 8:59 AM, Vladimir Sementsov-Ogievskiy wrote: Modern way is using blockdev-add +

Re: [PATCH] qapi: deprecate drive-backup

2021-04-26 Thread Vladimir Sementsov-Ogievskiy
26.04.2021 20:34, John Snow wrote: On 4/23/21 8:59 AM, Vladimir Sementsov-Ogievskiy wrote: Modern way is using blockdev-add + blockdev-backup, which provides a lot more control on how target is opened. As example of drive-backup problems consider the following: User of drive-backup expects

Re: [PATCH] qapi: deprecate drive-backup

2021-04-26 Thread John Snow
On 4/26/21 2:41 PM, Vladimir Sementsov-Ogievskiy wrote: 26.04.2021 21:30, John Snow wrote: On 4/26/21 2:05 PM, Daniel P. Berrangé wrote: On Mon, Apr 26, 2021 at 09:00:36PM +0300, Vladimir Sementsov-Ogievskiy wrote: 26.04.2021 20:34, John Snow wrote: On 4/23/21 8:59 AM, Vladimir

Re: [PATCH] qapi: deprecate drive-backup

2021-04-26 Thread John Snow
On 4/26/21 2:05 PM, Daniel P. Berrangé wrote: On Mon, Apr 26, 2021 at 09:00:36PM +0300, Vladimir Sementsov-Ogievskiy wrote: 26.04.2021 20:34, John Snow wrote: On 4/23/21 8:59 AM, Vladimir Sementsov-Ogievskiy wrote: Modern way is using blockdev-add + blockdev-backup, which provides a lot more

Re: [PATCH] qapi: deprecate drive-backup

2021-04-26 Thread Daniel P . Berrangé
On Mon, Apr 26, 2021 at 09:00:36PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 26.04.2021 20:34, John Snow wrote: > > On 4/23/21 8:59 AM, Vladimir Sementsov-Ogievskiy wrote: > > > Modern way is using blockdev-add + blockdev-backup, which provides a > > > lot more control on how target is opened.

Re: [PATCH v2 1/4] Add SELinux policy for virt

2021-04-26 Thread Daniel P . Berrangé
On Wed, Apr 07, 2021 at 07:08:34AM -0700, Vit Mojzis wrote: > From: Nikola Knazekova > > SELinux policy was created for: > > Hypervisor drivers: > - virtqemud (QEMU/KVM) > - virtlxcd (LXC) > - virtvboxd (VirtualBox) > > Secondary drivers: > - virtstoraged (host storage mgmt) > - virtnetworkd

Re: [PATCH] qapi: deprecate drive-backup

2021-04-26 Thread John Snow
On 4/23/21 8:59 AM, Vladimir Sementsov-Ogievskiy wrote: Modern way is using blockdev-add + blockdev-backup, which provides a lot more control on how target is opened. As example of drive-backup problems consider the following: User of drive-backup expects that target will be opened in the same

Re: [PATCH v2] Add SELinux policy for virt

2021-04-26 Thread Daniel P . Berrangé
On Wed, Apr 07, 2021 at 06:14:58AM -0700, Vit Mojzis wrote: > Sorry for the long delay. This is our first request to ship a policy for > multiple selinux stores (targeted, mls and minimum). > > Changes: > * Replace all selinux-policy-%{policytype} dependencies with > selinux-policy-base > * Add

Re: [PATCH v2 1/4] Add SELinux policy for virt

2021-04-26 Thread Daniel P . Berrangé
On Wed, Apr 07, 2021 at 07:08:34AM -0700, Vit Mojzis wrote: > From: Nikola Knazekova > > SELinux policy was created for: > > Hypervisor drivers: > - virtqemud (QEMU/KVM) > - virtlxcd (LXC) > - virtvboxd (VirtualBox) > > Secondary drivers: > - virtstoraged (host storage mgmt) > - virtnetworkd

Re: [PATCH v2 4/4] selinux: add "mls" binary version of the policy

2021-04-26 Thread Daniel P . Berrangé
On Wed, Apr 07, 2021 at 07:08:37AM -0700, Vit Mojzis wrote: > Compile the module also for use with "mls" systems and allow > installation to systems with any selinux type (targeted, mls and > minimum). > > Signed-off-by: Vit Mojzis > --- > libvirt.spec.in | 53

Re: [PATCH v2] Add SELinux policy for virt

2021-04-26 Thread Daniel P . Berrangé
On Wed, Apr 07, 2021 at 06:14:58AM -0700, Vit Mojzis wrote: > Sorry for the long delay. This is our first request to ship a policy for > multiple selinux stores (targeted, mls and minimum). > > Changes: > * Replace all selinux-policy-%{policytype} dependencies with > selinux-policy-base > * Add

Re: [libvirt PATCH 07/11] ci: helper: Improve output for list-images action

2021-04-26 Thread Andrea Bolognani
On Mon, Apr 26, 2021 at 11:59:19AM +0200, Erik Skultety wrote: > On Fri, Apr 23, 2021 at 05:03:04PM +0200, Andrea Bolognani wrote: > > Later on, when we change the actions that operate on > > container images to accept an lcitool-style --cross-arch > > argument instead of expecting the name of the

[libvirt] how about add a new API for set display parameters

2021-04-26 Thread Yanzheng (A)
Hi team, struct _virHypervisorDriver now have more than 260 APIs to management various hypervisor drivers, including hardware resources and lifecycle, etc. But, there is no API for (re)set display devices and its parameters. Take the following uses the QEMU driver as an example. To update the

Re: [libvirt PATCH 10/10] virDomainAudioSDLParse: Use virXMLProp*

2021-04-26 Thread Peter Krempa
On Mon, Apr 26, 2021 at 12:48:47 +0100, Daniel P. Berrangé wrote: > On Fri, Apr 23, 2021 at 05:39:23PM +0200, Tim Wiederhake wrote: > > This strictens the parser to disallow negative values (interpreted as > > `UINT_MAX + value + 1`) for attribute `bufferCount`. > > I don't get what's different

Re: [libvirt PATCH 10/10] virDomainAudioSDLParse: Use virXMLProp*

2021-04-26 Thread Daniel P . Berrangé
On Fri, Apr 23, 2021 at 05:39:23PM +0200, Tim Wiederhake wrote: > This strictens the parser to disallow negative values (interpreted as > `UINT_MAX + value + 1`) for attribute `bufferCount`. I don't get what's different here - we were already using virStrToLong_ui to get positive values. >

Re: [libvirt PATCH 00/10] Refactor more XML parsing boilerplate code, part VI

2021-04-26 Thread Peter Krempa
On Fri, Apr 23, 2021 at 17:39:13 +0200, Tim Wiederhake wrote: > For background, see > https://listman.redhat.com/archives/libvir-list/2021-April/msg00668.html > > Tim Wiederhake (10): > virDomainGraphicsDefParseXMLSDL: Use virXMLProp* > virDomainGraphicsDefParseXMLDesktop: Use virXMLProp* >

Re: [libvirt PATCH 10/10] virDomainAudioSDLParse: Use virXMLProp*

2021-04-26 Thread Peter Krempa
On Fri, Apr 23, 2021 at 17:39:23 +0200, Tim Wiederhake wrote: > This strictens the parser to disallow negative values (interpreted as > `UINT_MAX + value + 1`) for attribute `bufferCount`. A change like this requires justification, but you've provided only an explanation. > Signed-off-by: Tim

Re: [libvirt PATCH 09/10] virDomainFeaturesDefParse: Use virXMLProp*

2021-04-26 Thread Peter Krempa
On Fri, Apr 23, 2021 at 17:39:22 +0200, Tim Wiederhake wrote: Function-level granularity for a function this massive seems to be too coarse. > Signed-off-by: Tim Wiederhake > --- > src/conf/domain_conf.c| 333 +++--- >

Re: [PATCH] security: fix virSecurityManagerGetNested access illegal address

2021-04-26 Thread Peter Krempa
On Mon, Apr 26, 2021 at 17:23:15 +0800, gong...@smartx.com wrote: >     When stop libvirtd is used, libvirtd exits the eventloop and cleans up >     the driverState first. Then release threadPool. If the workers thread >     is still executing at this time, it needs to access driverState. >     If

Re: [libvirt PATCH 06/10] virDomainSoundDefParseXML: Use virXMLProp*

2021-04-26 Thread Peter Krempa
On Fri, Apr 23, 2021 at 17:39:19 +0200, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/conf/domain_conf.c | 25 + > 1 file changed, 5 insertions(+), 20 deletions(-) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index

Re: [libvirt PATCH 08/11] ci: helper: Add _make_run_action() function

2021-04-26 Thread Erik Skultety
On Fri, Apr 23, 2021 at 05:03:05PM +0200, Andrea Bolognani wrote: > This provides a single place where we can process self._args > before handing the control over to make; later on, we're going > to implement more logic that can be shared by the build, test > and shell actions. > > Signed-off-by:

Re: [libvirt PATCH 07/11] ci: helper: Improve output for list-images action

2021-04-26 Thread Erik Skultety
On Fri, Apr 23, 2021 at 05:03:04PM +0200, Andrea Bolognani wrote: > This makes the output more compact by grouping together all > images that are built on the same base OS. Yes, it definitely does make the output more compact, but I'm still not completely sold on the idea that this is an actual

Re: [libvirt PATCH 03/10] virDomainGraphicsDefParseXMLSpice: Use virXMLProp*

2021-04-26 Thread Peter Krempa
On Fri, Apr 23, 2021 at 17:39:16 +0200, Tim Wiederhake wrote: > Signed-off-by: Tim Wiederhake > --- > src/conf/domain_conf.c | 251 ++--- > 1 file changed, 59 insertions(+), 192 deletions(-) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c >

Re: [libvirt PATCH 03/11] ci: util: Document that get_registry_images() returns raw data

2021-04-26 Thread Erik Skultety
On Fri, Apr 23, 2021 at 05:03:00PM +0200, Andrea Bolognani wrote: > The current documentation makes it sound like the function > will only return a simple list containing the name of each > image available on the registry, but it actually returns a > lot more information than that. > >

[PATCH] security: fix virSecurityManagerGetNested access illegal address

2021-04-26 Thread gong...@smartx.com
    When stop libvirtd is used, libvirtd exits the eventloop and cleans up     the driverState first. Then release threadPool. If the workers thread     is still executing at this time, it needs to access driverState.     If the value in driverState is not judged at this time, direct access    

Re: [PATCH] qemu: add support for max-ram-below-4g option

2021-04-26 Thread Peter Krempa
On Mon, Apr 26, 2021 at 09:20:53 +0100, Daniel P. Berrangé wrote: > On Mon, Apr 26, 2021 at 09:55:05AM +0200, Peter Krempa wrote: > > On Sun, Apr 25, 2021 at 17:33:31 +0800, Zhiyong Ye wrote: > > > Limit the amount of ram below 4G. This can increase the address space > > > used by PCI devices

Re: [PATCH v3 09/14] qemu: Refresh the actual size of virtio-mem on monitor reconnect

2021-04-26 Thread Michal Prívozník
On 4/26/21 9:52 AM, Jing Qi wrote: > S2: From the docs, "virtio-pmem" works also. > # cat pmem.xml >   >       >         /tmp/nvdimm >       >       >         131072 >         >         128 >         >           >     > # virsh attach-device pc_test pmem.xml > Device attached successfully

Re: [PATCH] qemu: add support for max-ram-below-4g option

2021-04-26 Thread Daniel P . Berrangé
On Mon, Apr 26, 2021 at 09:55:05AM +0200, Peter Krempa wrote: > On Sun, Apr 25, 2021 at 17:33:31 +0800, Zhiyong Ye wrote: > > Limit the amount of ram below 4G. This can increase the address space > > used by PCI devices below 4G and it can be used by adding attributes in > > XML like this: > > >

Re: [PATCH] qemu: add support for max-ram-below-4g option

2021-04-26 Thread Peter Krempa
On Sun, Apr 25, 2021 at 17:33:31 +0800, Zhiyong Ye wrote: > Limit the amount of ram below 4G. This can increase the address space > used by PCI devices below 4G and it can be used by adding attributes in > XML like this: > > ... > 4096 This illustrates that sharing the 'unit' argument

Re: [PATCH v3 09/14] qemu: Refresh the actual size of virtio-mem on monitor reconnect

2021-04-26 Thread Jing Qi
Tested the patch with libvirt v7.2.0-381-g3c3c55be66 & qemu-kvm-5.2.0-0.7.rc2.fc34.x86_64 S1: Start domain with virtio-mem device # virsh start pc_test # virsh dumpxml pc_test pc_test 927da985-2937-4dfe-ac13-be723293e0d9 6291456 1179648 1179648 ... 0 2048

Re: [PATCH] qapi: deprecate drive-backup

2021-04-26 Thread Peter Krempa
On Fri, Apr 23, 2021 at 15:59:00 +0300, Vladimir Sementsov-Ogievskiy wrote: > Modern way is using blockdev-add + blockdev-backup, which provides a > lot more control on how target is opened. > > As example of drive-backup problems consider the following: > > User of drive-backup expects that

Re: [libvirt PATCH 02/11] ci: util: Replace get_image_distro() with get_image_info()

2021-04-26 Thread Erik Skultety
On Fri, Apr 23, 2021 at 05:02:59PM +0200, Andrea Bolognani wrote: > This is a more flexible function that parses the name of the > container image into its components: distro name and, where > applicable, target architecture for cross-building. > > Signed-off-by: Andrea Bolognani > ---

Re: [libvirt PATCH 01/11] ci: util: Drop documentation for api_version parameter

2021-04-26 Thread Erik Skultety
On Fri, Apr 23, 2021 at 05:02:58PM +0200, Andrea Bolognani wrote: > It's a leftover from development. > > Signed-off-by: Andrea Bolognani > --- Reviewed-by: Erik Skultety