2014-11-03 23:53:40 +01:00
|
|
|
Index: libvirt-1.2.10/src/conf/domain_conf.c
|
2014-09-02 17:52:40 +02:00
|
|
|
===================================================================
|
2014-11-03 23:53:40 +01:00
|
|
|
--- libvirt-1.2.10.orig/src/conf/domain_conf.c
|
|
|
|
+++ libvirt-1.2.10/src/conf/domain_conf.c
|
|
|
|
@@ -10043,7 +10043,8 @@ virDomainVideoDefaultType(const virDomai
|
2014-08-22 02:16:00 +02:00
|
|
|
(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;
|
2014-11-03 23:53:40 +01:00
|
|
|
Index: libvirt-1.2.10/src/cpu/cpu_powerpc.c
|
2014-09-02 17:52:40 +02:00
|
|
|
===================================================================
|
2014-11-03 23:53:40 +01:00
|
|
|
--- libvirt-1.2.10.orig/src/cpu/cpu_powerpc.c
|
|
|
|
+++ libvirt-1.2.10/src/cpu/cpu_powerpc.c
|
2014-08-22 02:16:00 +02:00
|
|
|
@@ -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;
|
2014-11-03 23:53:40 +01:00
|
|
|
Index: libvirt-1.2.10/src/qemu/qemu_capabilities.c
|
2014-09-02 17:52:40 +02:00
|
|
|
===================================================================
|
2014-11-03 23:53:40 +01:00
|
|
|
--- libvirt-1.2.10.orig/src/qemu/qemu_capabilities.c
|
|
|
|
+++ libvirt-1.2.10/src/qemu/qemu_capabilities.c
|
|
|
|
@@ -633,7 +633,8 @@ virQEMUCapsProbeCPUModels(virQEMUCapsPtr
|
2014-08-22 02:16:00 +02:00
|
|
|
if (qemuCaps->arch == VIR_ARCH_I686 ||
|
2014-10-02 00:29:37 +02:00
|
|
|
qemuCaps->arch == VIR_ARCH_X86_64) {
|
2014-08-22 02:16:00 +02:00
|
|
|
parse = virQEMUCapsParseX86Models;
|
2014-10-02 00:29:37 +02:00
|
|
|
- } else if (qemuCaps->arch == VIR_ARCH_PPC64) {
|
|
|
|
+ } else if (qemuCaps->arch == VIR_ARCH_PPC64 ||
|
|
|
|
+ qemuCaps->arch == VIR_ARCH_PPC64LE) {
|
2014-08-22 02:16:00 +02:00
|
|
|
parse = virQEMUCapsParsePPCModels;
|
2014-10-02 00:29:37 +02:00
|
|
|
} else {
|
2014-08-22 02:16:00 +02:00
|
|
|
VIR_DEBUG("don't know how to parse %s CPU models",
|
2014-11-03 23:53:40 +01:00
|
|
|
@@ -2003,7 +2004,8 @@ bool virQEMUCapsHasPCIMultiBus(virQEMUCa
|
2014-08-22 02:16:00 +02:00
|
|
|
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:
|
|
|
|
*
|
2014-11-03 23:53:40 +01:00
|
|
|
@@ -3573,7 +3575,9 @@ virQEMUCapsSupportsChardev(virDomainDefP
|
2014-08-22 02:16:00 +02:00
|
|
|
!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);
|
2014-11-03 23:53:40 +01:00
|
|
|
Index: libvirt-1.2.10/src/qemu/qemu_command.c
|
2014-09-02 17:52:40 +02:00
|
|
|
===================================================================
|
2014-11-03 23:53:40 +01:00
|
|
|
--- libvirt-1.2.10.orig/src/qemu/qemu_command.c
|
|
|
|
+++ libvirt-1.2.10/src/qemu/qemu_command.c
|
2014-10-02 00:29:37 +02:00
|
|
|
@@ -713,7 +713,8 @@ qemuSetSCSIControllerModel(virDomainDefP
|
2014-08-22 02:16:00 +02:00
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
- if ((def->os.arch == VIR_ARCH_PPC64) &&
|
|
|
|
+ if ((def->os.arch == VIR_ARCH_PPC64 ||
|
2014-10-02 00:29:37 +02:00
|
|
|
+ def->os.arch == VIR_ARCH_PPC64LE) &&
|
|
|
|
STRPREFIX(def->os.machine, "pseries")) {
|
2014-08-22 02:16:00 +02:00
|
|
|
*model = VIR_DOMAIN_CONTROLLER_MODEL_SCSI_IBMVSCSI;
|
|
|
|
} else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_LSI)) {
|
2014-11-03 23:53:40 +01:00
|
|
|
@@ -1264,7 +1265,8 @@ int qemuDomainAssignSpaprVIOAddresses(vi
|
2014-08-22 02:16:00 +02:00
|
|
|
|
|
|
|
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 ||
|
2014-10-02 00:29:37 +02:00
|
|
|
+ def->os.arch == VIR_ARCH_PPC64LE) &&
|
|
|
|
STRPREFIX(def->os.machine, "pseries"))
|
2014-08-22 02:16:00 +02:00
|
|
|
def->serials[i]->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO;
|
|
|
|
if (qemuAssignSpaprVIOAddress(def, &def->serials[i]->info,
|
2014-11-03 23:53:40 +01:00
|
|
|
@@ -1273,7 +1275,8 @@ int qemuDomainAssignSpaprVIOAddresses(vi
|
2014-08-22 02:16:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (def->nvram) {
|
|
|
|
- if (def->os.arch == VIR_ARCH_PPC64 &&
|
|
|
|
+ if ((def->os.arch == VIR_ARCH_PPC64 ||
|
2014-10-02 00:29:37 +02:00
|
|
|
+ def->os.arch == VIR_ARCH_PPC64LE) &&
|
|
|
|
STRPREFIX(def->os.machine, "pseries"))
|
2014-08-22 02:16:00 +02:00
|
|
|
def->nvram->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO;
|
|
|
|
if (qemuAssignSpaprVIOAddress(def, &def->nvram->info,
|
2014-11-03 23:53:40 +01:00
|
|
|
@@ -4195,7 +4198,8 @@ qemuBuildUSBControllerDevStr(virDomainDe
|
2014-08-22 02:16:00 +02:00
|
|
|
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;
|
2014-11-03 23:53:40 +01:00
|
|
|
@@ -8573,7 +8577,8 @@ qemuBuildCommandLine(virConnectPtr conn,
|
2014-08-22 02:16:00 +02:00
|
|
|
!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 "
|
2014-11-03 23:53:40 +01:00
|
|
|
@@ -9771,7 +9776,8 @@ qemuBuildCommandLine(virConnectPtr conn,
|
2014-08-22 02:16:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (def->nvram) {
|
|
|
|
- if (def->os.arch == VIR_ARCH_PPC64 &&
|
|
|
|
+ if ((def->os.arch == VIR_ARCH_PPC64 ||
|
2014-10-02 00:29:37 +02:00
|
|
|
+ def->os.arch == VIR_ARCH_PPC64LE) &&
|
|
|
|
STRPREFIX(def->os.machine, "pseries")) {
|
2014-08-22 02:16:00 +02:00
|
|
|
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_NVRAM)) {
|
|
|
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
2014-11-03 23:53:40 +01:00
|
|
|
@@ -9894,7 +9900,8 @@ qemuBuildSerialChrDeviceStr(char **devic
|
2014-08-22 02:16:00 +02:00
|
|
|
{
|
|
|
|
virBuffer cmd = VIR_BUFFER_INITIALIZER;
|
|
|
|
|
2014-10-02 00:29:37 +02:00
|
|
|
- if ((arch == VIR_ARCH_PPC64) && STRPREFIX(machine, "pseries")) {
|
2014-08-22 02:16:00 +02:00
|
|
|
+ if ((arch == VIR_ARCH_PPC64 ||
|
2014-10-02 00:29:37 +02:00
|
|
|
+ arch == VIR_ARCH_PPC64LE) && STRPREFIX(machine, "pseries")) {
|
2014-08-22 02:16:00 +02:00
|
|
|
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",
|
2014-11-03 23:53:40 +01:00
|
|
|
@@ -10316,8 +10323,9 @@ qemuParseCommandLineDisk(virDomainXMLOpt
|
2014-08-22 02:16:00 +02:00
|
|
|
if (VIR_ALLOC(def->src) < 0)
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
- if (((dom->os.arch == VIR_ARCH_PPC64) &&
|
2014-10-02 00:29:37 +02:00
|
|
|
- dom->os.machine && STRPREFIX(dom->os.machine, "pseries")))
|
2014-08-22 02:16:00 +02:00
|
|
|
+ if (((dom->os.arch == VIR_ARCH_PPC64 ||
|
2014-10-02 00:29:37 +02:00
|
|
|
+ dom->os.arch == VIR_ARCH_PPC64LE) &&
|
|
|
|
+ dom->os.machine && STRPREFIX(dom->os.machine, "pseries")))
|
2014-08-22 02:16:00 +02:00
|
|
|
def->bus = VIR_DOMAIN_DISK_BUS_SCSI;
|
|
|
|
else
|
2014-10-02 00:29:37 +02:00
|
|
|
def->bus = VIR_DOMAIN_DISK_BUS_IDE;
|
2014-11-03 23:53:40 +01:00
|
|
|
@@ -10409,7 +10417,8 @@ qemuParseCommandLineDisk(virDomainXMLOpt
|
2014-08-22 02:16:00 +02:00
|
|
|
} 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 ||
|
2014-10-02 00:29:37 +02:00
|
|
|
+ dom->os.arch == VIR_ARCH_PPC64LE) &&
|
|
|
|
dom->os.machine && STRPREFIX(dom->os.machine, "pseries"))) {
|
2014-08-22 02:16:00 +02:00
|
|
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
|
|
_("pseries systems do not support ide devices '%s'"), val);
|
2014-11-03 23:53:40 +01:00
|
|
|
@@ -11654,8 +11663,9 @@ qemuParseCommandLine(virCapsPtr qemuCaps
|
2014-10-02 00:29:37 +02:00
|
|
|
}
|
2014-08-22 02:16:00 +02:00
|
|
|
if (STREQ(arg, "-cdrom")) {
|
|
|
|
disk->device = VIR_DOMAIN_DISK_DEVICE_CDROM;
|
|
|
|
- if (((def->os.arch == VIR_ARCH_PPC64) &&
|
2014-10-02 00:29:37 +02:00
|
|
|
- def->os.machine && STRPREFIX(def->os.machine, "pseries")))
|
2014-08-22 02:16:00 +02:00
|
|
|
+ if (((def->os.arch == VIR_ARCH_PPC64 ||
|
2014-10-02 00:29:37 +02:00
|
|
|
+ def->os.arch == VIR_ARCH_PPC64LE) &&
|
|
|
|
+ def->os.machine && STRPREFIX(def->os.machine, "pseries")))
|
2014-08-22 02:16:00 +02:00
|
|
|
disk->bus = VIR_DOMAIN_DISK_BUS_SCSI;
|
|
|
|
if (VIR_STRDUP(disk->dst, "hdc") < 0)
|
2014-10-02 00:29:37 +02:00
|
|
|
goto error;
|
2014-11-03 23:53:40 +01:00
|
|
|
@@ -11670,9 +11680,10 @@ qemuParseCommandLine(virCapsPtr qemuCaps
|
2014-08-22 02:16:00 +02:00
|
|
|
disk->bus = VIR_DOMAIN_DISK_BUS_IDE;
|
|
|
|
else
|
|
|
|
disk->bus = VIR_DOMAIN_DISK_BUS_SCSI;
|
|
|
|
- if (((def->os.arch == VIR_ARCH_PPC64) &&
|
2014-10-02 00:29:37 +02:00
|
|
|
- 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;
|
2014-08-22 02:16:00 +02:00
|
|
|
}
|
2014-10-02 00:29:37 +02:00
|
|
|
if (VIR_STRDUP(disk->dst, arg + 1) < 0)
|
|
|
|
goto error;
|
2014-11-03 23:53:40 +01:00
|
|
|
Index: libvirt-1.2.10/src/qemu/qemu_domain.c
|
2014-09-02 17:52:40 +02:00
|
|
|
===================================================================
|
2014-11-03 23:53:40 +01:00
|
|
|
--- libvirt-1.2.10.orig/src/qemu/qemu_domain.c
|
|
|
|
+++ libvirt-1.2.10/src/qemu/qemu_domain.c
|
2014-10-02 00:29:37 +02:00
|
|
|
@@ -980,6 +980,7 @@ qemuDomainDefPostParse(virDomainDefPtr d
|
2014-08-22 02:16:00 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
case VIR_ARCH_PPC64:
|
|
|
|
+ case VIR_ARCH_PPC64LE:
|
|
|
|
addPCIRoot = true;
|
|
|
|
addDefaultUSBKBD = true;
|
|
|
|
addDefaultUSBMouse = true;
|