- 26 7月, 2019 10 次提交
-
-
由 Stefan Berger 提交于
Implement virCommandSetSendBuffer() that allows the caller to pass a file descriptor and buffer to virCommand. virCommand will write the buffer into the file descriptor. That file descriptor could be the write end of a pipe or one of the file descriptors of a socketpair. The other file descriptor should be passed to the launched process to read the data from. Only implement the function to allocate memory for send buffers and to free them later on. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
Run 'swtpm socket --print-capabilities' and 'swtpm_setup --print-capabilities' to get the JSON object of the features the programs are supporting and parse them into a bitmap. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
Check whether previously found executables were updated and if so look for them again. This helps to use updated features of swtpm and its tools upon updating them. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
Refactor virTPMEmulatorInit to use a loop with parameters. This allows for easier extension later on. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
Move qemuTPMEmulatorInit to virTPMEmulatorInit in virtpm.c and introduce a few functions to query the executables needed for virCommands. Add locking to protect the tool paths and return a copy of the tool paths to callers wanting to access them so that we can run the initialization function multiples time later on and detect when the executable gets updated. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
The QEMU command line does not change when TPM state is encrypted compared to when it is plain. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
Add a test case for the TPM XML encryption parser and formatter. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
Extend the TPM device XML parser and XML generator with emulator state encryption support. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
Add an already existing test case tpm-emulator-tpm2 to qemuxml2xmltest.c Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Stefan Berger 提交于
Add support for usage type vTPM to secret. Extend the schema for the Secret to support the vTPM usage type and add a test case for parsing the Secret with usage type vTPM. Signed-off-by: NStefan Berger <stefanb@linux.ibm.com> Reviewed-by: NMarc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 25 7月, 2019 30 次提交
-
-
由 Jim Fehlig 提交于
The README contains a reference to GPL 2.1, which does not exist. COPYING contains 2.0 so change the README to follow. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Ján Tomko 提交于
Sadly, this idea never got implemented. Signed-off-by: NJán Tomko <jtomko@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
When using the ENUM macros, the compiler guards that the declaration and implementation are in sync. Signed-off-by: NJán Tomko <jtomko@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Ján Tomko 提交于
We don't need domain_conf or libvirt-{qemu,lxc} in these generic files. Signed-off-by: NJán Tomko <jtomko@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
qemuBlockJobRewriteConfigDiskSource rewrites the disk source only according to the 'target'. This means that if someone would change the inactive config of the VM to refer to a different disk a block job would rewrite it when finishing a job which modifies the disk source. Make sure that this does not happen by verifying that the source of the config disk is the same. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> ACKed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Since we copy everything from the original storage source including some runtime data which are not relevant for the config we should clear them. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> ACKed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Both active block commit and block copy modify the disk source of the active definition and thus also must modify the corresponding inactive definition source so that the VM starts up later. This is currently implemented in the legacy block job handler but the logic will be useful also for the new handlers. Split it out which also simplifies it. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> ACKed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
The <mirror> subelement is used in two ways: in a commit job to point to existing storage, and in a block-copy job to point to additional storage. We need a way to track only the distinct storage. This patch introduces qemuBlockJobDiskRegisterMirror which registers the mirror chain separately only for jobs which require it. This also comes with remembering that in the status XML. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> ACKed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Signed-off-by: NPeter Krempa <pkrempa@redhat.com> ACKed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Add 4 disks to the blockjob-blockdev-in.xml test case to allow adding data for block pull, block copy, block commit, and active block commit jobs. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> ACKed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
Commit c4123837 used a value from wrong enum when setting the disk's mirrorState variable. This meant that a 'READY' job would show up as 'PIVOTING'. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> ACKed-by: NEric Blake <eblake@redhat.com>
-
由 Peter Krempa 提交于
When returning to asynchronous block job handling the flag which determines the handling method should be reset prior to flushing outstanding events. If there's an event to process the handler may invoke the monitor and another event may be received. We'd not process that one. Reset the flag earlier. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
qemuDomainSnapshotDiskDataCollect copies the source of the disk from the live config into the inactive config. Move this operation earlier so that if we initialize it for use for the particular instance the run-time-only data is not copied. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
In case when the backing store can be represented with something simpler such as a URI we can use it rather than falling back to the json: pseudo-protocol. In cases when it's not worth it (e.g. with the old ugly NBD or RBD strings) let's switch to json. The function is exported as we'll need it when overwriting the ugly strings qemu would come up with during blockjobs. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
The block commit API checked 'disk->src->path' to see whether there is a reasonable disk source to be committed. As the top image can be e.g. backed by NBD the check is not good enough. Replace it by virStorageSourceIsEmpty. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
For the modern use cases we are going to use 'blockdev-snapshot' instead of 'blockdev-snapshot-sync'. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
qemuBuildStorageSourceChainAttachPrepareBlockdev prepares the full backing chain for attachment via blockdev. For snapshots we'll need to prepare one image only as it needs to be plugged on top of the existing chain. This patch introduces qemuBuildStorageSourceChainAttachPrepareBlockdevTop which prepares only @top similarly to the original function by splitting out the functionality into an internal function so that the API does not change. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
In commit 042c95bd qemuBuildStorageSourceChainAttachPrepareBlockdev was added but the comment for the function mentions qemuBuildStorageSourceChainAttachPrepareDrive. Fix the mistake. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Now that we track the job separately we watch only for the abort of the one single block job so the comment is no longer accurate. Also describing asynchronous operation is not really necessary. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
With -blockdev: - we track the job and check it after restart - have the ability to ask qemu to persist it to collect result - have the ability to report errors. This solves all points the comment outlined so remove it. Also all jobs handle the disk state modification along with the event so there's nothing special the comment says. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use job-complete/job-abort instead of the blockjob-* variants for blockdev. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
As the error message is now available and we know whether the job failed we can report an error straight away rather than having the user check the event. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Set the correct job states after the operation is requested in qemu. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
When initiating a pivot or abort of a block job we need to track which one was initiated. Currently it was done via data stashed in virDomainDiskDef. Add possibility to track this also together with the job itself. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Do decisions based on the configuration of the job rather than the data stored with the disk. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Peter Krempa 提交于
Use the stored job name rather than passing in the disk alias when referring to the job which allows the same code to work also when -blockdev will be used. Note that this API does not require the change to use 'query-job' as it will ever only work with blockjobs bound to disks due to the arguments which allow only referring to a disk. For the disk-less jobs we'll need to add a separate API later. The change to qemuMonitorGetBlockJobInfo is required as the API was stripping the 'drive-' prefix when returning the data which is not desired any more. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Pavel Hrdina 提交于
Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Pavel Hrdina 提交于
In cgroups v2 when a new group is created by default no controller is enabled so the detection code will not detect any controllers. When enabling the controllers we should also store them for the group. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Pavel Hrdina 提交于
When creating new group for cgroups v2 the we cannot check cgroups.controllers for that cgroup because the directory is created later. In that case we should check cgroups.subtree_control of parent group to get list of controllers enabled for child cgroups. In order to achieve that we will prefer the parent group if it exists, the current group will be used only for root group. Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Erik Skultety 提交于
The virsh-optparse test broke after commit 6ac402c4 because it always assumed the max memory limit can be adjusted on a running domain which used to be the case in the old code. This is only a hot fix for the CI build. The proper fix here is to re-write the whole test in a self-test/unit-test manner where we only test virsh's ability to parse various values, not running actual commands. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com> Acked-by: NPeter Krempa <pkrempa@redhat.com>
-