libvirt/libvirt-ppc64le-support.patch
James Fehlig 278a149fdc Accepting request 253577 from home:jfehlig:branches:Virtualization
Note:  tarball verification is now done using %gpg_verify, along
with the .asc file the upstream libvirt maintainer now generates
for each release.  This approach requires using the upstream .gz
tarball, which is slightly larger than the regenerated .bz2 one.

- Update to libvirt 1.2.9
  - Introduce virNodeAllocPages
  - event: introduce new event for tunable values
  - Add support for fetching statistics of completed jobs
  - CVE-2014-3657: domain_conf: fix domain deadlock
  - CVE-2014-3633: qemu: blkiotune: Use correct definition when
    looking up disk
  - Many incremental improvements and bug fixes, see
    http://libvirt.org/news.html
  - Drop upstream patches: 3e745e8f-CVE-2014-3633.patch,
    libvirt-guests-wait-for-ntp.patch
- Verify tarball with associated .asc file
  Add: libvirt.keyring, libvirt-1.2.9.tar.gz.asc
  Use upstream .gz tarball instead of locally generated .bz2

OBS-URL: https://build.opensuse.org/request/show/253577
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=411
2014-10-01 22:29:37 +00:00

197 lines
9.1 KiB
Diff

Index: libvirt-1.2.9/src/conf/domain_conf.c
===================================================================
--- libvirt-1.2.9.orig/src/conf/domain_conf.c
+++ libvirt-1.2.9/src/conf/domain_conf.c
@@ -9863,7 +9863,8 @@ virDomainVideoDefaultType(const virDomai
(STREQ(def->os.type, "xen") ||
STREQ(def->os.type, "linux")))
return VIR_DOMAIN_VIDEO_TYPE_XEN;
- else if (def->os.arch == VIR_ARCH_PPC64)
+ else if (def->os.arch == VIR_ARCH_PPC64 ||
+ def->os.arch == VIR_ARCH_PPC64LE)
return VIR_DOMAIN_VIDEO_TYPE_VGA;
else
return VIR_DOMAIN_VIDEO_TYPE_CIRRUS;
Index: libvirt-1.2.9/src/cpu/cpu_powerpc.c
===================================================================
--- libvirt-1.2.9.orig/src/cpu/cpu_powerpc.c
+++ libvirt-1.2.9/src/cpu/cpu_powerpc.c
@@ -38,7 +38,7 @@
VIR_LOG_INIT("cpu.cpu_powerpc");
-static const virArch archs[] = { VIR_ARCH_PPC64 };
+static const virArch archs[] = { VIR_ARCH_PPC64, VIR_ARCH_PPC64LE };
struct ppc_vendor {
char *name;
Index: libvirt-1.2.9/src/qemu/qemu_capabilities.c
===================================================================
--- libvirt-1.2.9.orig/src/qemu/qemu_capabilities.c
+++ libvirt-1.2.9/src/qemu/qemu_capabilities.c
@@ -632,7 +632,8 @@ virQEMUCapsProbeCPUModels(virQEMUCapsPtr
if (qemuCaps->arch == VIR_ARCH_I686 ||
qemuCaps->arch == VIR_ARCH_X86_64) {
parse = virQEMUCapsParseX86Models;
- } else if (qemuCaps->arch == VIR_ARCH_PPC64) {
+ } else if (qemuCaps->arch == VIR_ARCH_PPC64 ||
+ qemuCaps->arch == VIR_ARCH_PPC64LE) {
parse = virQEMUCapsParsePPCModels;
} else {
VIR_DEBUG("don't know how to parse %s CPU models",
@@ -2001,7 +2002,8 @@ bool virQEMUCapsHasPCIMultiBus(virQEMUCa
return true;
if (def->os.arch == VIR_ARCH_PPC ||
- def->os.arch == VIR_ARCH_PPC64) {
+ def->os.arch == VIR_ARCH_PPC64||
+ def->os.arch == VIR_ARCH_PPC64LE) {
/*
* Usage of pci.0 naming:
*
@@ -3571,7 +3573,9 @@ virQEMUCapsSupportsChardev(virDomainDefP
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE))
return false;
- if ((def->os.arch == VIR_ARCH_PPC) || (def->os.arch == VIR_ARCH_PPC64)) {
+ if (def->os.arch == VIR_ARCH_PPC ||
+ def->os.arch == VIR_ARCH_PPC64 ||
+ def->os.arch == VIR_ARCH_PPC64LE) {
/* only pseries need -device spapr-vty with -chardev */
return (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
chr->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO);
Index: libvirt-1.2.9/src/qemu/qemu_command.c
===================================================================
--- libvirt-1.2.9.orig/src/qemu/qemu_command.c
+++ libvirt-1.2.9/src/qemu/qemu_command.c
@@ -713,7 +713,8 @@ qemuSetSCSIControllerModel(virDomainDefP
return -1;
}
} else {
- if ((def->os.arch == VIR_ARCH_PPC64) &&
+ if ((def->os.arch == VIR_ARCH_PPC64 ||
+ def->os.arch == VIR_ARCH_PPC64LE) &&
STRPREFIX(def->os.machine, "pseries")) {
*model = VIR_DOMAIN_CONTROLLER_MODEL_SCSI_IBMVSCSI;
} else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_LSI)) {
@@ -1260,7 +1261,8 @@ int qemuDomainAssignSpaprVIOAddresses(vi
for (i = 0; i < def->nserials; i++) {
if (def->serials[i]->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
- (def->os.arch == VIR_ARCH_PPC64) &&
+ (def->os.arch == VIR_ARCH_PPC64 ||
+ def->os.arch == VIR_ARCH_PPC64LE) &&
STRPREFIX(def->os.machine, "pseries"))
def->serials[i]->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO;
if (qemuAssignSpaprVIOAddress(def, &def->serials[i]->info,
@@ -1269,7 +1271,8 @@ int qemuDomainAssignSpaprVIOAddresses(vi
}
if (def->nvram) {
- if (def->os.arch == VIR_ARCH_PPC64 &&
+ if ((def->os.arch == VIR_ARCH_PPC64 ||
+ def->os.arch == VIR_ARCH_PPC64LE) &&
STRPREFIX(def->os.machine, "pseries"))
def->nvram->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO;
if (qemuAssignSpaprVIOAddress(def, &def->nvram->info,
@@ -4191,7 +4194,8 @@ qemuBuildUSBControllerDevStr(virDomainDe
model = def->model;
if (model == -1) {
- if (domainDef->os.arch == VIR_ARCH_PPC64)
+ if (domainDef->os.arch == VIR_ARCH_PPC64 ||
+ domainDef->os.arch == VIR_ARCH_PPC64LE)
model = VIR_DOMAIN_CONTROLLER_MODEL_USB_PCI_OHCI;
else
model = VIR_DOMAIN_CONTROLLER_MODEL_USB_PIIX3_UHCI;
@@ -8421,7 +8425,8 @@ qemuBuildCommandLine(virConnectPtr conn,
!qemuDomainMachineIsQ35(def) &&
(!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PIIX3_USB_UHCI) ||
(!virQEMUCapsGet(qemuCaps, QEMU_CAPS_PCI_OHCI) &&
- def->os.arch == VIR_ARCH_PPC64))) {
+ (def->os.arch == VIR_ARCH_PPC64 ||
+ def->os.arch == VIR_ARCH_PPC64LE)))) {
if (usblegacy) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Multiple legacy USB controllers are "
@@ -9619,7 +9624,8 @@ qemuBuildCommandLine(virConnectPtr conn,
}
if (def->nvram) {
- if (def->os.arch == VIR_ARCH_PPC64 &&
+ if ((def->os.arch == VIR_ARCH_PPC64 ||
+ def->os.arch == VIR_ARCH_PPC64LE) &&
STRPREFIX(def->os.machine, "pseries")) {
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_NVRAM)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
@@ -9737,7 +9743,8 @@ qemuBuildSerialChrDeviceStr(char **devic
{
virBuffer cmd = VIR_BUFFER_INITIALIZER;
- if ((arch == VIR_ARCH_PPC64) && STRPREFIX(machine, "pseries")) {
+ if ((arch == VIR_ARCH_PPC64 ||
+ arch == VIR_ARCH_PPC64LE) && STRPREFIX(machine, "pseries")) {
if (serial->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
serial->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO) {
virBufferAsprintf(&cmd, "spapr-vty,chardev=char%s",
@@ -10159,8 +10166,9 @@ qemuParseCommandLineDisk(virDomainXMLOpt
if (VIR_ALLOC(def->src) < 0)
goto error;
- if (((dom->os.arch == VIR_ARCH_PPC64) &&
- dom->os.machine && STRPREFIX(dom->os.machine, "pseries")))
+ if (((dom->os.arch == VIR_ARCH_PPC64 ||
+ dom->os.arch == VIR_ARCH_PPC64LE) &&
+ dom->os.machine && STRPREFIX(dom->os.machine, "pseries")))
def->bus = VIR_DOMAIN_DISK_BUS_SCSI;
else
def->bus = VIR_DOMAIN_DISK_BUS_IDE;
@@ -10252,7 +10260,8 @@ qemuParseCommandLineDisk(virDomainXMLOpt
} else if (STREQ(keywords[i], "if")) {
if (STREQ(values[i], "ide")) {
def->bus = VIR_DOMAIN_DISK_BUS_IDE;
- if (((dom->os.arch == VIR_ARCH_PPC64) &&
+ if (((dom->os.arch == VIR_ARCH_PPC64 ||
+ dom->os.arch == VIR_ARCH_PPC64LE) &&
dom->os.machine && STRPREFIX(dom->os.machine, "pseries"))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("pseries systems do not support ide devices '%s'"), val);
@@ -11497,8 +11506,9 @@ qemuParseCommandLine(virCapsPtr qemuCaps
}
if (STREQ(arg, "-cdrom")) {
disk->device = VIR_DOMAIN_DISK_DEVICE_CDROM;
- if (((def->os.arch == VIR_ARCH_PPC64) &&
- def->os.machine && STRPREFIX(def->os.machine, "pseries")))
+ if (((def->os.arch == VIR_ARCH_PPC64 ||
+ def->os.arch == VIR_ARCH_PPC64LE) &&
+ def->os.machine && STRPREFIX(def->os.machine, "pseries")))
disk->bus = VIR_DOMAIN_DISK_BUS_SCSI;
if (VIR_STRDUP(disk->dst, "hdc") < 0)
goto error;
@@ -11513,9 +11523,10 @@ qemuParseCommandLine(virCapsPtr qemuCaps
disk->bus = VIR_DOMAIN_DISK_BUS_IDE;
else
disk->bus = VIR_DOMAIN_DISK_BUS_SCSI;
- if (((def->os.arch == VIR_ARCH_PPC64) &&
- def->os.machine && STRPREFIX(def->os.machine, "pseries")))
- disk->bus = VIR_DOMAIN_DISK_BUS_SCSI;
+ if (((def->os.arch == VIR_ARCH_PPC64 ||
+ def->os.arch == VIR_ARCH_PPC64LE) &&
+ def->os.machine && STRPREFIX(def->os.machine, "pseries")))
+ disk->bus = VIR_DOMAIN_DISK_BUS_SCSI;
}
if (VIR_STRDUP(disk->dst, arg + 1) < 0)
goto error;
Index: libvirt-1.2.9/src/qemu/qemu_domain.c
===================================================================
--- libvirt-1.2.9.orig/src/qemu/qemu_domain.c
+++ libvirt-1.2.9/src/qemu/qemu_domain.c
@@ -980,6 +980,7 @@ qemuDomainDefPostParse(virDomainDefPtr d
break;
case VIR_ARCH_PPC64:
+ case VIR_ARCH_PPC64LE:
addPCIRoot = true;
addDefaultUSBKBD = true;
addDefaultUSBMouse = true;