Re: [libvirt] [PATCH] src: Move DLOPEN_LIBS to libraries introducing the dependency
On 08/12/2018 11:46 PM, Julio Faracco wrote: > Hi guys, > > Em sex, 10 de ago de 2018 às 11:23, Jim Fehlig escreveu: >> >> On 08/09/2018 11:45 PM, Michal Privoznik wrote: >>> There are few places where dlopen() is called. This call means we >>> have to link with DLOPEN_LIBS. However, instead of having each >>> final, installable library linking with it, move the directive to >>> the source that introduced the dependency. >>> >>> Signed-off-by: Michal Privoznik >> >> Reviewed-by: Jim Fehlig >> >>> --- >>> src/Makefile.am | 2 ++ >>> src/util/Makefile.inc.am | 1 + >>> tools/Makefile.am| 4 ++-- >>> 3 files changed, 5 insertions(+), 2 deletions(-) >>> >>> diff --git a/src/Makefile.am b/src/Makefile.am >>> index a4f213480e..61876cf382 100644 >>> --- a/src/Makefile.am >>> +++ b/src/Makefile.am >>> @@ -752,6 +752,7 @@ libvirt_setuid_rpc_client_la_CFLAGS = \ >>> $(AM_CFLAGS) \ >>> $(SECDRIVER_CFLAGS) \ >>> $(XDR_CFLAGS) \ >>> + $(DLOPEN_LIBS) \ >>> $(NULL) >>> endif WITH_SETUID_RPC_CLIENT > > I think that DLOPEN_LIBS is not needed for setuid_rpc_client. > See the error when I enable RPC libraries: > clang: error: -ldl: 'linker' input unused > [-Werror,-Wunused-command-line-argument] > Makefile:9014: recipe for target > 'util/libvirt_setuid_rpc_client_la-viralloc.lo' failed Ah, so the library compiles virjsoncompact.c in which I used as an indication where to put DLOPEN_LIBS. But now that I look at it closer it doesn't make sense for the lib to compile in the file because in config-post.h we clearly disable JANSSON support. Sigh, this jansson has brought more problems than it solved. Anyway, I think this is the fix: diff --git i/src/Makefile.am w/src/Makefile.am index 61876cf382..d9bce1e8ab 100644 --- i/src/Makefile.am +++ w/src/Makefile.am @@ -689,7 +689,6 @@ libvirt_setuid_rpc_client_la_SOURCES = \ util/virhashcode.c \ util/virhostcpu.c \ util/virjson.c \ - util/virjsoncompat.c \ util/virlog.c \ util/virobject.c \ util/virpidfile.c \ @@ -752,7 +751,6 @@ libvirt_setuid_rpc_client_la_CFLAGS = \ $(AM_CFLAGS) \ $(SECDRIVER_CFLAGS) \ $(XDR_CFLAGS) \ - $(DLOPEN_LIBS) \ $(NULL) endif WITH_SETUID_RPC_CLIENT Can you test it please? I'm no longer confident around jansson. Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 00/12] PCI passthrough support on s390
Is there any comment? I expect comments from all of you. 在 2018/8/7 下午5:10, Yi Min Zhao 写道: Abstract The PCI representation in QEMU has recently been extended for S390 allowing configuration of zPCI attributes like uid (user-defined identifier) and fid (PCI function identifier). The details can be found here: https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg07262.html To support the new zPCI feature of the S390 platform, two new XML attributes, @uid and @fid, are introduced for device addresses of type 'pci', i.e.: uid and fid are optional attributes. If they are defined by the user, unique values within the guest domain must be used. If they are not specified and the architecture requires them, they are automatically generated with non-conflicting values. Current implementation is the most seamless one for the user as it unites the address specific data of a PCI device on one XML element. It could accommodate both specifying our special parameters (uid and fid) and re-using standard statements (domain, bus, slot and function) for PCI devices. User can still specify bus/slot/function for the virtualized PCI devices in the XML. Thus uid/fid act as an extension to the PCI address and are stored in a new structure 'virZPCIDeviceAddress' which is a member of common PCI Address structure. Additionally, two hashtables are used for assignment and reservation of uid/fid. In support of extending the PCI address, a new PCI address extension flag is introduced. This extension flag allows is not only dedicated for the S390 platform but also other architectures needing certain extensions to PCI address space. Code Base = commit in master: 087de2f5a3: docs: formatdomain: fix spacing before parentheses Change Log == v2->v3: 1. Revise code style. 2. Update test cases. 3. Introduce qemuDomainCollectPCIAddressExtension() to collect PCI extension addresses. 4. Introduce virDeviceInfoPCIAddressExtensionPresent() to check if zPCI address exists. 5. Optimize zPCI address check logic. 6. Optimize passed parameters of zPCI addr alloc/release/reserve functions. 7. Report enum range error in qemuDomainDeviceSupportZPCI(). 8. Update commit messages. v1->v2: 1. Separate test commit and merge testcases into corresponding commits that introduce the functionalities firstly. 2. Spare some checks for zpci device. 3. Add vsock and controller support. 4. Add uin32 type schema. 5. Rename zpciuid and zpcifid to zpci_uid and zpci_fid. 6. Always return multibus support on S390. Yi Min Zhao (12): conf: Add definitions for 'uid' and 'fid' PCI address attributes qemu: Introduce zPCI capability conf: Introduce a new PCI address extension flag qemu: Enable PCI multi bus for S390 guests qemu: Auto add pci-root for s390/s390x guests conf: Introduce address caching for PCI extensions conf: Introduce parser, formatter for uid and fid conf: Allocate/release 'uid' and 'fid' in PCI address qemu: Generate and use zPCI device in QEMU command line qemu: Add hotpluging support for PCI devices on S390 guests docs: Add 'uid' and 'fid' information news: Update news for PCI address extension attributes docs/formatdomain.html.in | 9 +- docs/news.xml | 11 + docs/schemas/basictypes.rng| 23 ++ docs/schemas/domaincommon.rng | 1 + src/conf/device_conf.c | 78 + src/conf/device_conf.h | 8 + src/conf/domain_addr.c | 379 + src/conf/domain_addr.h | 29 ++ src/conf/domain_conf.c | 6 + src/libvirt_private.syms | 4 + src/qemu/qemu_capabilities.c | 6 + src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c| 114 +++ src/qemu/qemu_command.h| 4 + src/qemu/qemu_domain.c | 1 + src/qemu/qemu_domain_address.c | 204 ++- src/qemu/qemu_hotplug.c| 155 - src/util/virpci.h | 13 + tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.11.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.s390x.xml | 1 + tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml| 1 + tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml| 1 + tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml| 1 + tests/qemuxml2argvdata/disk-virtio-s390-zpci.args | 27 ++ tests/qemuxml2argvdata/disk-virtio-s390-zpci.xml | 17 + .../hostdev-vfio-zpci-autogenerate.args| 26 ++ .../hostdev-vfio-zpci-autogenerate.xml | 18 +
Re: [libvirt] [PATCH] qemu-doc: mark ppc/prep machine as deprecated
On Sat, Aug 11, 2018 at 12:46:45AM +0200, Hervé Poussineau wrote: > 40p machine type should be used instead. > > Signed-off-by: Hervé Poussineau > --- > qemu-deprecated.texi | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi > index 9920a85adc..9c7ff3fe2d 100644 > --- a/qemu-deprecated.texi > +++ b/qemu-deprecated.texi > @@ -218,6 +218,12 @@ support page sizes < 4096 any longer. > These machine types are very old and likely can not be used for live > migration > from old QEMU versions anymore. A newer machine type should be used instead. > > +@subsection prep (PowerPC) (since 3.1) > + > +This machine type uses an unmaintained firmware, broken in lots of ways, > +and unable to start post-2004 operating systems. 40p machine type should be > +used instead. > + > @section Device options > > @subsection Block device options Applied to ppc-for-3.1, thanks. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH v3 3/3] storage: add wipeVol to iscsi-direct storage backend
From: Clementine Hayat Signed-off-by: Clementine Hayat --- src/storage/storage_backend_iscsi_direct.c | 121 - 1 file changed, 120 insertions(+), 1 deletion(-) diff --git a/src/storage/storage_backend_iscsi_direct.c b/src/storage/storage_backend_iscsi_direct.c index 7bdd39582b..5a7d70f24d 100644 --- a/src/storage/storage_backend_iscsi_direct.c +++ b/src/storage/storage_backend_iscsi_direct.c @@ -41,6 +41,8 @@ #define ISCSI_DEFAULT_TARGET_PORT 3260 #define VIR_ISCSI_TEST_UNIT_TIMEOUT 30 * 1000 +#define BLOCK_PER_PACKET 128 +#define VOL_NAME_PREFIX "unit:0:0:" VIR_LOG_INIT("storage.storage_backend_iscsi_direct"); @@ -225,7 +227,7 @@ virISCSIDirectSetVolumeAttributes(virStoragePoolObjPtr pool, { virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); -if (virAsprintf(>name, "unit:0:0:%u", lun) < 0) +if (virAsprintf(>name, "%s%u", VOL_NAME_PREFIX, lun) < 0) return -1; if (virAsprintf(>key, "ip-%s-iscsi-%s-lun-%u", portal, def->source.devices[0].path, lun) < 0) @@ -601,12 +603,129 @@ virStorageBackendISCSIDirectRefreshPool(virStoragePoolObjPtr pool) return ret; } +static int +virStorageBackendISCSIDirectGetLun(virStorageVolDefPtr vol, + int *lun) +{ +const char *name = vol->name; +int ret = -1; + +if (!STRPREFIX(name, VOL_NAME_PREFIX)) { +virReportError(VIR_ERR_INTERNAL_ERROR, + _("Invalid volume name %s"), name); +goto cleanup; +} + +name += strlen(VOL_NAME_PREFIX); +if (virStrToLong_i(name, NULL, 10, lun) < 0) +goto cleanup; + +ret = 0; + cleanup: +return ret; +} + +static int +virStorageBackendISCSIDirectVolWipeZero(virStorageVolDefPtr vol, +struct iscsi_context *iscsi) +{ +uint32_t lba = 0; +uint32_t block_size; +uint32_t nb_block; +struct scsi_task *task = NULL; +int lun = 0; +int ret = -1; +unsigned char *data; + +if (virStorageBackendISCSIDirectGetLun(vol, ) < 0) +return ret; +if (virISCSIDirectTestUnitReady(iscsi, lun) < 0) +return ret; +if (virISCSIDirectGetVolumeCapacity(iscsi, lun, _size, _block)) +return ret; +if (VIR_ALLOC_N(data, block_size * BLOCK_PER_PACKET)) +return ret; + +while (lba < nb_block) { +if (nb_block - lba > block_size * BLOCK_PER_PACKET) { + +if (!(task = iscsi_write10_sync(iscsi, lun, lba, data, +block_size * BLOCK_PER_PACKET, +block_size, 0, 0, 0, 0, 0))) +goto cleanup; +scsi_free_scsi_task(task); +lba += BLOCK_PER_PACKET; +} else { +if (!(task = iscsi_write10_sync(iscsi, lun, lba, data, block_size, +block_size, 0, 0, 0, 0, 0))) +goto cleanup; +scsi_free_scsi_task(task); +lba++; +} +} + +ret = 0; + cleanup: +VIR_FREE(data); +return ret; +} + +static int +virStorageBackenISCSIDirectWipeVol(virStoragePoolObjPtr pool, + virStorageVolDefPtr vol, + unsigned int algorithm, + unsigned int flags) +{ +struct iscsi_context *iscsi = NULL; +char *portal = NULL; +int ret = -1; + +virCheckFlags(0, -1); + +if (!(iscsi = virStorageBackendISCSIDirectSetConnection(pool, ))) +goto cleanup; + +switch ((virStorageVolWipeAlgorithm) algorithm) { +case VIR_STORAGE_VOL_WIPE_ALG_ZERO: +if (virStorageBackendISCSIDirectVolWipeZero(vol, iscsi) < 0) { +virReportError(VIR_ERR_INTERNAL_ERROR, + _("failed to wipe volume %s"), + vol->name); +goto disconnect; +} +break; +case VIR_STORAGE_VOL_WIPE_ALG_TRIM: +case VIR_STORAGE_VOL_WIPE_ALG_NNSA: +case VIR_STORAGE_VOL_WIPE_ALG_DOD: +case VIR_STORAGE_VOL_WIPE_ALG_BSI: +case VIR_STORAGE_VOL_WIPE_ALG_GUTMANN: +case VIR_STORAGE_VOL_WIPE_ALG_SCHNEIER: +case VIR_STORAGE_VOL_WIPE_ALG_PFITZNER7: +case VIR_STORAGE_VOL_WIPE_ALG_PFITZNER33: +case VIR_STORAGE_VOL_WIPE_ALG_RANDOM: +case VIR_STORAGE_VOL_WIPE_ALG_LAST: +virReportError(VIR_ERR_INVALID_ARG, _("unsupported algorithm %d"), + algorithm); +goto disconnect; +} + +ret = 0; + disconnect: +virISCSIDirectDisconnect(iscsi); +iscsi_destroy_context(iscsi); + cleanup: +VIR_FREE(portal); +return ret; +} + + virStorageBackend virStorageBackendISCSIDirect = { .type = VIR_STORAGE_POOL_ISCSI_DIRECT, .checkPool = virStorageBackendISCSIDirectCheckPool, .findPoolSources = virStorageBackendISCSIDirectFindPoolSources, .refreshPool = virStorageBackendISCSIDirectRefreshPool, +
[libvirt] [PATCH v3 2/3] storage: add SetConnection to iscsi-direct backend
From: Clementine Hayat The code to set the connection and connect using libiscsi will always be the same. Add function to avoid code duplication. Signed-off-by: Clementine Hayat --- src/storage/storage_backend_iscsi_direct.c | 38 +++--- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/src/storage/storage_backend_iscsi_direct.c b/src/storage/storage_backend_iscsi_direct.c index 62b7e0d8bc..7bdd39582b 100644 --- a/src/storage/storage_backend_iscsi_direct.c +++ b/src/storage/storage_backend_iscsi_direct.c @@ -557,23 +557,37 @@ virStorageBackendISCSIDirectFindPoolSources(const char *srcSpec, return ret; } +struct iscsi_context * +virStorageBackendISCSIDirectSetConnection(virStoragePoolObjPtr pool, + char **portal) +{ +virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); +struct iscsi_context *iscsi = NULL; + +if (!(*iscsi = virISCSIDirectCreateContext(def->source.initiator.iqn))) +return iscsi; +if (!(*portal = virStorageBackendISCSIDirectPortal(>source))) +goto error ; +if (virStorageBackendISCSIDirectSetAuth(*iscsi, >source) < 0) +goto error ; +if (virISCSIDirectSetContext(*iscsi, def->source.devices[0].path, ISCSI_SESSION_NORMAL) < 0) +goto error ; +if (virISCSIDirectConnect(*iscsi, *portal) < 0) +goto error ; +return iscsi; + + error: +iscsi_destroy_context(iscsi); +return iscsi; +} + static int virStorageBackendISCSIDirectRefreshPool(virStoragePoolObjPtr pool) { -virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); struct iscsi_context *iscsi = NULL; char *portal = NULL; int ret = -1; - -if (!(iscsi = virISCSIDirectCreateContext(def->source.initiator.iqn))) -goto cleanup; -if (!(portal = virStorageBackendISCSIDirectPortal(>source))) -goto cleanup; -if (virStorageBackendISCSIDirectSetAuth(iscsi, >source) < 0) -goto cleanup; -if (virISCSIDirectSetContext(iscsi, def->source.devices[0].path, ISCSI_SESSION_NORMAL) < 0) -goto cleanup; -if (virISCSIDirectConnect(iscsi, portal) < 0) +if (!(iscsi = virStorageBackendISCSIDirectSetConnection(pool, ))) goto cleanup; if (virISCSIDirectReportLuns(pool, iscsi, portal) < 0) goto disconect; @@ -581,9 +595,9 @@ virStorageBackendISCSIDirectRefreshPool(virStoragePoolObjPtr pool) ret = 0; disconect: virISCSIDirectDisconnect(iscsi); +iscsi_destroy_context(iscsi); cleanup: VIR_FREE(portal); -iscsi_destroy_context(iscsi); return ret; } -- 2.18.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH v3 1/3] storage: refactor volume capacity in iscsi-direct backend
From: Clementine Hayat The size of blocks inside a volume and the number of blocks are needed later. Having a function that return thoses information will avoid code duplication. Signed-off-by: Clementine Hayat --- src/storage/storage_backend_iscsi_direct.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/storage/storage_backend_iscsi_direct.c b/src/storage/storage_backend_iscsi_direct.c index 0764356b62..62b7e0d8bc 100644 --- a/src/storage/storage_backend_iscsi_direct.c +++ b/src/storage/storage_backend_iscsi_direct.c @@ -237,13 +237,13 @@ virISCSIDirectSetVolumeAttributes(virStoragePoolObjPtr pool, } static int -virISCSIDirectSetVolumeCapacity(struct iscsi_context *iscsi, -virStorageVolDefPtr vol, -int lun) +virISCSIDirectGetVolumeCapacity(struct iscsi_context *iscsi, +int lun, +uint32_t *block_size, +uint32_t *nb_block) { struct scsi_task *task = NULL; struct scsi_inquiry_standard *inq = NULL; -long long size = 0; int ret = -1; if (!(task = iscsi_inquiry_sync(iscsi, lun, 0, 0, 64)) || @@ -282,10 +282,8 @@ virISCSIDirectSetVolumeCapacity(struct iscsi_context *iscsi, goto cleanup; } -size = rc10->block_size; -size *= rc10->lba; -vol->target.capacity = size; -vol->target.allocation = size; +*block_size = rc10->block_size; +*nb_block = rc10->lba; } @@ -303,6 +301,8 @@ virISCSIDirectRefreshVol(virStoragePoolObjPtr pool, { virStoragePoolDefPtr def = virStoragePoolObjGetDef(pool); virStorageVolDefPtr vol = NULL; +uint32_t block_size; +uint32_t nb_block; int ret = -1; virStoragePoolObjClearVols(pool); @@ -314,9 +314,12 @@ virISCSIDirectRefreshVol(virStoragePoolObjPtr pool, vol->type = VIR_STORAGE_VOL_NETWORK; -if (virISCSIDirectSetVolumeCapacity(iscsi, vol, lun) < 0) +if (virISCSIDirectGetVolumeCapacity(iscsi, lun, +_size, _block) < 0) goto cleanup; +vol->target.capacity = block_size * nb_block; +vol->target.allocation = block_size * nb_block; def->capacity += vol->target.capacity; def->allocation += vol->target.allocation; -- 2.18.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH v3 0/3] add wipeVol to iscsi-direct
From: Clementine Hayat Hello, This series of patch is the follow up of: v1:https://www.redhat.com/archives/libvir-list/2018-August/msg00557.html v2:https://www.redhat.com/archives/libvir-list/2018-August/msg00570.html Best Regards, -- Clementine Hayat Clementine Hayat (3): storage: refactor volume capacity in iscsi-direct backend storage: add SetConnection to iscsi-direct backend storage: add wipeVol to iscsi-direct storage backend src/storage/storage_backend_iscsi_direct.c | 178 ++--- 1 file changed, 157 insertions(+), 21 deletions(-) -- 2.18.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] src: Move DLOPEN_LIBS to libraries introducing the dependency
Hi guys, Em sex, 10 de ago de 2018 às 11:23, Jim Fehlig escreveu: > > On 08/09/2018 11:45 PM, Michal Privoznik wrote: > > There are few places where dlopen() is called. This call means we > > have to link with DLOPEN_LIBS. However, instead of having each > > final, installable library linking with it, move the directive to > > the source that introduced the dependency. > > > > Signed-off-by: Michal Privoznik > > Reviewed-by: Jim Fehlig > > > --- > > src/Makefile.am | 2 ++ > > src/util/Makefile.inc.am | 1 + > > tools/Makefile.am| 4 ++-- > > 3 files changed, 5 insertions(+), 2 deletions(-) > > > > diff --git a/src/Makefile.am b/src/Makefile.am > > index a4f213480e..61876cf382 100644 > > --- a/src/Makefile.am > > +++ b/src/Makefile.am > > @@ -752,6 +752,7 @@ libvirt_setuid_rpc_client_la_CFLAGS = \ > > $(AM_CFLAGS) \ > > $(SECDRIVER_CFLAGS) \ > > $(XDR_CFLAGS) \ > > + $(DLOPEN_LIBS) \ > > $(NULL) > > endif WITH_SETUID_RPC_CLIENT I think that DLOPEN_LIBS is not needed for setuid_rpc_client. See the error when I enable RPC libraries: clang: error: -ldl: 'linker' input unused [-Werror,-Wunused-command-line-argument] Makefile:9014: recipe for target 'util/libvirt_setuid_rpc_client_la-viralloc.lo' failed > > > > @@ -1000,6 +1001,7 @@ libvirt_nss_la_CFLAGS = \ > > $(NULL) > > libvirt_nss_la_LDFLAGS = \ > > $(AM_LDFLAGS) \ > > + $(DLOPEN_LIBS) \ > > $(NULL) > > endif WITH_NSS > > > > diff --git a/src/util/Makefile.inc.am b/src/util/Makefile.inc.am > > index 8ef9ee1dfa..c5c50f1844 100644 > > --- a/src/util/Makefile.inc.am > > +++ b/src/util/Makefile.inc.am > > @@ -278,6 +278,7 @@ libvirt_util_la_LIBADD = \ > > $(NUMACTL_LIBS) \ > > $(ACL_LIBS) \ > > $(GNUTLS_LIBS) \ > > + $(DLOPEN_LIBS) \ > > $(NULL) > > > > > > diff --git a/tools/Makefile.am b/tools/Makefile.am > > index 26c887649e..3e129c04c4 100644 > > --- a/tools/Makefile.am > > +++ b/tools/Makefile.am > > @@ -528,7 +528,7 @@ nss_libnss_libvirt_impl_la_CFLAGS = \ > > nss_libnss_libvirt_impl_la_LIBADD = \ > > ../gnulib/lib/libgnu.la \ > > ../src/libvirt-nss.la \ > > - $(DLOPEN_LIBS) > > + $(NULL) > > > > nss_libnss_libvirt_la_SOURCES = > > nss_libnss_libvirt_la_LDFLAGS = \ > > @@ -556,7 +556,7 @@ nss_libnss_libvirt_guest_impl_la_CFLAGS = \ > > nss_libnss_libvirt_guest_impl_la_LIBADD = \ > > ../gnulib/lib/libgnu.la \ > > ../src/libvirt-nss.la \ > > - $(DLOPEN_LIBS) > > + $(NULL) > > > > nss_libnss_libvirt_guest_la_SOURCES = > > nss_libnss_libvirt_guest_la_LDFLAGS = \ > > > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/1] bhyve: Make LPC slot number configurable
Ivan Mishonov wrote: > Yes, that makes sense. I'll try to find some time next week to redo my > code and send another patch. Since my time for working on libvirt is > very limited can you confirm that the LPC configuration should look like > this: > > > > This looks reasonable to me. However, it adds some corner cases we need to handle: 1. I'm wondering if we should still default to 31 if this entry is not specified? We can generate this entry when post-processing XML, but I'm not sure what's the best way to handle upgrades for the existing domains... 2. According to bhyve(8) manual page, lpc is only supported on bus 0, so need to add 'isa-bridge' specific validation to check that. Roman Bogorodskiy signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] esx: Fix nodeGetInfo so cpu model fits inside nodeinfo->model
Commit 6c0d0210cbcd5d647f0d882c07f077d444bc707d changed the behavior of virStr*cpy* functions, so now the nodeGetInfo call fails. Version 4.1.0 (default for Fedora 28) works: Model: Intel Core i7-4500U CPU @ 1.80G Current master tries to write "Intel Core i7-4500U CPU @ 1.80GHz", but the string is bigger than nodeinfo->model (which is a char[32]). So this patch "cuts" the string, and presents the same output from 4.1.0. Signed-off-by: Marcos Paulo de Souza --- When testing both qemu and lxc drivers, both return "x86_64", as both call virCapabilitiesGetNodeInfo in order the get all info the "node", but they are a Linux machine. When it comes to ESX, it returns a string from the ESX server, which is same info that I can find in /proc/cpuinfo of my machine (but without the () parts): model name : Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz The question is: should libvirt increase the model size, or just find a better way for ESX to present this info? src/esx/esx_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index c2154799fa..03a84d7630 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -1317,6 +1317,8 @@ esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo) ++ptr; } +/* Make sure the string fits in mode */ +dynamicProperty->val->string[sizeof(nodeinfo->model) - 1] = '\0'; if (virStrcpyStatic(nodeinfo->model, dynamicProperty->val->string) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, _("CPU Model %s too long for destination"), -- 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list