aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.target2
-rw-r--r--accel/stubs/tcg-stub.c8
-rw-r--r--hw/char/spapr_vty.c18
-rw-r--r--hw/ppc/spapr.c4
-rw-r--r--target/ppc/translate_init.c4
5 files changed, 33 insertions, 3 deletions
diff --git a/Makefile.target b/Makefile.target
index e4244c1..f9a9da7 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -22,7 +22,7 @@ QEMU_PROG_BUILD = $(QEMU_PROG)
else
# system emulator name
QEMU_PROG=qemu-system-$(TARGET_NAME)$(EXESUF)
-ifneq (,$(findstring -mwindows,$(libs_softmmu)))
+ifneq (,$(findstring -mwindows,$(SDL_LIBS)))
# Terminate program name with a 'w' because the linker builds a windows executable.
QEMU_PROGW=qemu-system-$(TARGET_NAME)w$(EXESUF)
$(QEMU_PROG): $(QEMU_PROGW)
diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
index 5dd480b..ee575a8 100644
--- a/accel/stubs/tcg-stub.c
+++ b/accel/stubs/tcg-stub.c
@@ -20,3 +20,11 @@
void tb_flush(CPUState *cpu)
{
}
+
+void tb_unlock(void)
+{
+}
+
+void tlb_set_dirty(CPUState *cpu, target_ulong vaddr)
+{
+}
diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
index 0fa416c..6748334 100644
--- a/hw/char/spapr_vty.c
+++ b/hw/char/spapr_vty.c
@@ -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);
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 6285f72..4d0a84f 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -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) {
diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c
index b9c49c2..4e11e6f 100644
--- a/target/ppc/translate_init.c
+++ b/target/ppc/translate_init.c
@@ -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)