ppc patch queue 2017-11-22

Several more fixes to merge for qemu-2.11.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAloU/UUACgkQbDjKyiDZ
 s5IIzBAAl9r9G3JaJ4a56u8OhLwxIFQ9BM+RwehsPvzDZoDtWbAcD9UQvgLkatGh
 xvTpqnF3+6qhM7fVCBK7EeY9oEivHMQhOdr0480/LdG6pSQ2LH1rcRjw1qHj5aHl
 nY3sR97WuAJR4fBJRISZoYTO+0w1u77wjY+hsu57PZxX9M8S00veUQeu+xzQCY4A
 d0f3uvcvFRUPaMTJvBPok0NYz/6L5fAZ+cAUWma89erH2CLET3+VJAHd8mt8Z+22
 yaA+JIWEXBG98ufH5DeZVogZTbnBIlIjHeGwqhIkR0xL4xWTKyNFT9u+AzJfRAi+
 sKNAl/5QjwM5yoYmF9ibeK5pVJ8DVscdliuK0iHQyNzgJUaPaGoBVFbroG5XljXD
 96GAcz1PwxQKIDF8HdswselZx9zvMH4GQ6aba4we9xCjYdOmc6K6Gh9F3YEvPZ0A
 sTu66TckAbGO8WGdJgIy9K26XN2UryaocgPpWWjqJp2p/8RPGzYKhSk++lJ0bSzq
 egPSBRSUDmATjwu2ElUclx165jn3k+Jhy6aCMlL+CpZFRk2ZienN2Rqhsi59lU6q
 DKgXi9zqAs1rU2BmcUgIjmCoR9pDCBeskeQvHTj8B8bgAiGnEjDhvyLcQdM8kokN
 NKarazCJPIzNd4FTAwPU4FbduiPXQy5+6dVHmPeJcm+A3xWnDVU=
 =pUcm
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.11-20171122' into staging

ppc patch queue 2017-11-22

Several more fixes to merge for qemu-2.11.

# gpg: Signature made Wed 22 Nov 2017 04:29:57 GMT
# gpg:                using RSA key 0x6C38CACA20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
# gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>"
# gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>"
# gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>"
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-for-2.11-20171122:
  ppc: fix VTB migration
  spapr: Implement bug in spapr-vty device to be compatible with PowerVM
  hw/ppc/spapr: Fix virtio-scsi bootindex handling for LUNs >= 256

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell 2017-11-23 13:15:02 +00:00
commit 1b89975d42
3 changed files with 24 additions and 2 deletions

View File

@ -58,6 +58,24 @@ static int vty_getchars(VIOsPAPRDevice *sdev, uint8_t *buf, int max)
while ((n < max) && (dev->out != dev->in)) {
buf[n++] = dev->buf[dev->out++ % VTERM_BUFSIZE];
/* PowerVM's vty implementation has a bug where it inserts a
* \0 after every \r going to the guest. Existing guests have
* a workaround for this which removes every \0 immediately
* following a \r, so here we make ourselves bug-for-bug
* compatible, so that the guest won't drop a real \0-after-\r
* that happens to occur in a binary stream. */
if (buf[n - 1] == '\r') {
if (n < max) {
buf[n++] = '\0';
} else {
/* No room for the extra \0, roll back and try again
* next time */
dev->out--;
n--;
break;
}
}
}
qemu_chr_fe_accept_input(&dev->chardev);

View File

@ -2663,6 +2663,10 @@ static char *spapr_get_fw_dev_path(FWPathProvider *p, BusState *bus,
* swap 0100 or 10 << or 20 << ( target lun-id -- srplun )
*/
unsigned id = 0x1000000 | (d->id << 16) | d->lun;
if (d->lun >= 256) {
/* Use the LUN "flat space addressing method" */
id |= 0x4000;
}
return g_strdup_printf("%s@%"PRIX64, qdev_fw_name(dev),
(uint64_t)id << 32);
} else if (usb) {

View File

@ -8081,10 +8081,10 @@ static void gen_spr_power8_ebb(CPUPPCState *env)
/* Virtual Time Base */
static void gen_spr_vtb(CPUPPCState *env)
{
spr_register(env, SPR_VTB, "VTB",
spr_register_kvm(env, SPR_VTB, "VTB",
SPR_NOACCESS, SPR_NOACCESS,
&spr_read_tbl, SPR_NOACCESS,
0x00000000);
KVM_REG_PPC_VTB, 0x00000000);
}
static void gen_spr_power8_fscr(CPUPPCState *env)