Accepting request 245523 from home:oertel:branches:Virtualization

- remove not necessary hunks from libvirt-ppc64le-support.patch
- move new patches to section for to be upstreamed

- add patch: libvirt-power8-models.patch
  add current power8 cpu models to map 

- add patch: libvirt-ppc64le-support.patch
  add preliminary ppc64le support to libvirt

OBS-URL: https://build.opensuse.org/request/show/245523
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=399
This commit is contained in:
James Fehlig 2014-08-22 00:16:00 +00:00 committed by Git OBS Bridge
parent 7cb5558888
commit b751536fe6
4 changed files with 218 additions and 0 deletions

View File

@ -0,0 +1,18 @@
--- a/src/cpu/cpu_map.xml 2014/08/19 16:05:34 1.1
+++ b/src/cpu/cpu_map.xml 2014/08/19 16:06:53
@@ -614,5 +614,15 @@
<pvr value='0x004b0100'/>
</model>
+ <model name='POWER8_v2.0'>
+ <vendor name='IBM'/>
+ <pvr value='0x004b0200'/>
+ </model>
+
+ <model name='POWER8_v2.1'>
+ <vendor name='IBM'/>
+ <pvr value='0x004b0201'/>
+ </model>
+
</arch>
</cpus>

View File

@ -0,0 +1,178 @@
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -9515,7 +9515,8 @@
(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;
--- a/src/cpu/cpu_powerpc.c
+++ b/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;
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -624,7 +624,8 @@
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",
@@ -1984,7 +1985,8 @@
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:
*
@@ -3551,7 +3553,9 @@
!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);
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -722,7 +722,8 @@
return -1;
}
} else {
- if ((def->os.arch == VIR_ARCH_PPC64) &&
+ if ((def->os.arch == VIR_ARCH_PPC64 ||
+ def->os.arch == VIR_ARCH_PPC64LE) &&
STREQ(def->os.machine, "pseries")) {
*model = VIR_DOMAIN_CONTROLLER_MODEL_SCSI_IBMVSCSI;
} else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_SCSI_LSI)) {
@@ -1269,7 +1270,8 @@
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) &&
STREQ(def->os.machine, "pseries"))
def->serials[i]->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO;
if (qemuAssignSpaprVIOAddress(def, &def->serials[i]->info,
@@ -1278,7 +1280,8 @@
}
if (def->nvram) {
- if (def->os.arch == VIR_ARCH_PPC64 &&
+ if ((def->os.arch == VIR_ARCH_PPC64 ||
+ def->os.arch == VIR_ARCH_PPC64LE) &&
STREQ(def->os.machine, "pseries"))
def->nvram->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_SPAPRVIO;
if (qemuAssignSpaprVIOAddress(def, &def->nvram->info,
@@ -4097,7 +4100,8 @@
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;
@@ -8066,7 +8070,8 @@
!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 "
@@ -9256,7 +9261,8 @@
}
if (def->nvram) {
- if (def->os.arch == VIR_ARCH_PPC64 &&
+ if ((def->os.arch == VIR_ARCH_PPC64 ||
+ def->os.arch == VIR_ARCH_PPC64LE) &&
STREQ(def->os.machine, "pseries")) {
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_NVRAM)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
@@ -9368,7 +9374,8 @@
{
virBuffer cmd = VIR_BUFFER_INITIALIZER;
- if ((arch == VIR_ARCH_PPC64) && STREQ(machine, "pseries")) {
+ if ((arch == VIR_ARCH_PPC64 ||
+ arch == VIR_ARCH_PPC64LE) && STREQ(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",
@@ -9791,7 +9798,8 @@
if (VIR_ALLOC(def->src) < 0)
goto error;
- if (((dom->os.arch == VIR_ARCH_PPC64) &&
+ if (((dom->os.arch == VIR_ARCH_PPC64 ||
+ dom->os.arch == VIR_ARCH_PPC64LE) &&
dom->os.machine && STREQ(dom->os.machine, "pseries")))
def->bus = VIR_DOMAIN_DISK_BUS_SCSI;
else
@@ -9883,7 +9891,8 @@
} 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 && STREQ(dom->os.machine, "pseries"))) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("pseries systems do not support ide devices '%s'"), val);
@@ -11121,7 +11130,8 @@
disk->src->type = VIR_STORAGE_TYPE_FILE;
if (STREQ(arg, "-cdrom")) {
disk->device = VIR_DOMAIN_DISK_DEVICE_CDROM;
- if (((def->os.arch == VIR_ARCH_PPC64) &&
+ if (((def->os.arch == VIR_ARCH_PPC64 ||
+ def->os.arch == VIR_ARCH_PPC64LE) &&
def->os.machine && STREQ(def->os.machine, "pseries")))
disk->bus = VIR_DOMAIN_DISK_BUS_SCSI;
if (VIR_STRDUP(disk->dst, "hdc") < 0)
@@ -11137,7 +11147,8 @@
disk->bus = VIR_DOMAIN_DISK_BUS_IDE;
else
disk->bus = VIR_DOMAIN_DISK_BUS_SCSI;
- if (((def->os.arch == VIR_ARCH_PPC64) &&
+ if (((def->os.arch == VIR_ARCH_PPC64 ||
+ def->os.arch == VIR_ARCH_PPC64LE) &&
def->os.machine && STREQ(def->os.machine, "pseries")))
disk->bus = VIR_DOMAIN_DISK_BUS_SCSI;
}
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -754,6 +754,7 @@
break;
case VIR_ARCH_PPC64:
+ case VIR_ARCH_PPC64LE:
addPCIRoot = true;
addDefaultUSBKBD = true;
addDefaultUSBMouse = true;

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Thu Aug 21 01:29:21 CEST 2014 - ro@suse.de
- remove not necessary hunks from libvirt-ppc64le-support.patch
- move new patches to section for to be upstreamed
-------------------------------------------------------------------
Wed Aug 20 01:23:46 CEST 2014 - ro@suse.de
- add patch: libvirt-power8-models.patch
add current power8 cpu models to map
-------------------------------------------------------------------
Tue Aug 19 17:12:50 CEST 2014 - ro@suse.de
- add patch: libvirt-ppc64le-support.patch
add preliminary ppc64le support to libvirt
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Aug 8 03:23:10 UTC 2014 - cyliu@suse.com Fri Aug 8 03:23:10 UTC 2014 - cyliu@suse.com

View File

@ -432,6 +432,8 @@ Source99: baselibs.conf
Patch100: xen-name-for-devid.patch Patch100: xen-name-for-devid.patch
Patch101: xen-pv-cdrom.patch Patch101: xen-pv-cdrom.patch
Patch102: blockcopy-check-dst-identical-device.patch Patch102: blockcopy-check-dst-identical-device.patch
Patch103: libvirt-ppc64le-support.patch
Patch104: libvirt-power8-models.patch
# Our patches # Our patches
Patch200: libvirtd-defaults.patch Patch200: libvirtd-defaults.patch
Patch201: libvirtd-init-script.patch Patch201: libvirtd-init-script.patch
@ -946,6 +948,8 @@ namespaces.
%patch100 -p1 %patch100 -p1
%patch101 -p1 %patch101 -p1
%patch102 -p1 %patch102 -p1
%patch103 -p1
%patch104 -p1
%patch200 -p1 %patch200 -p1
%patch201 -p1 %patch201 -p1
%patch202 -p1 %patch202 -p1