qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org
Subject: [Qemu-devel] [PULL 7/9] pckbd: set bits 2-3-6-7 of the output port by default
Date: Sat,  3 Jan 2015 09:45:07 +0100	[thread overview]
Message-ID: <1420274709-30199-8-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1420274709-30199-1-git-send-email-pbonzini@redhat.com>

OSes typically write 0xdd/0xdf to turn the A20 line off and on.  This
has bits 2-3-6-7 on, so that the output port subsection is migrated.
Change the reset value and migration default to include those four
bits, thus avoiding that the subsection is migrated.

This strictly speaking changes guest ABI, but the long time during which
we have not migrated the value means that the guests really do not care
much; so the change is for all machine types.

Reported-by: Igor Mammedov <imammedo@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/input/pckbd.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c
index 2b0cd3d..9b9a7d7 100644
--- a/hw/input/pckbd.c
+++ b/hw/input/pckbd.c
@@ -101,6 +101,12 @@
 #define KBD_OUT_OBF             0x10    /* Keyboard output buffer full */
 #define KBD_OUT_MOUSE_OBF       0x20    /* Mouse output buffer full */
 
+/* OSes typically write 0xdd/0xdf to turn the A20 line off and on.
+ * We make the default value of the outport include these four bits,
+ * so that the subsection is rarely necessary.
+ */
+#define KBD_OUT_ONES            0xcc
+
 /* Mouse Commands */
 #define AUX_SET_SCALE11		0xE6	/* Set 1:1 scaling */
 #define AUX_SET_SCALE21		0xE7	/* Set 2:1 scaling */
@@ -367,13 +373,13 @@ static void kbd_reset(void *opaque)
 
     s->mode = KBD_MODE_KBD_INT | KBD_MODE_MOUSE_INT;
     s->status = KBD_STAT_CMD | KBD_STAT_UNLOCKED;
-    s->outport = KBD_OUT_RESET | KBD_OUT_A20;
+    s->outport = KBD_OUT_RESET | KBD_OUT_A20 | KBD_OUT_ONES;
     s->outport_present = false;
 }
 
 static uint8_t kbd_outport_default(KBDState *s)
 {
-    return KBD_OUT_RESET | KBD_OUT_A20
+    return KBD_OUT_RESET | KBD_OUT_A20 | KBD_OUT_ONES
            | (s->status & KBD_STAT_OBF ? KBD_OUT_OBF : 0)
            | (s->status & KBD_STAT_MOUSE_OBF ? KBD_OUT_MOUSE_OBF : 0);
 }
-- 
1.8.3.1

  parent reply	other threads:[~2015-01-03  8:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-03  8:45 [Qemu-devel] [PULL 0/9] Misc changes for 2015-01-03 (icount, migration, iscsi, sdhci-pci) Paolo Bonzini
2015-01-03  8:45 ` [Qemu-devel] [PULL 1/9] atomic: fix position of volatile qualifier Paolo Bonzini
2015-01-03  8:45 ` [Qemu-devel] [PULL 2/9] target-ppc: pass DisasContext to SPR generator functions Paolo Bonzini
2015-01-03  8:45 ` [Qemu-devel] [PULL 3/9] cpu-exec: add a new CF_USE_ICOUNT cflag Paolo Bonzini
2015-01-03  8:45 ` [Qemu-devel] [PULL 4/9] translate: check cflags instead of use_icount global Paolo Bonzini
2015-01-03  8:45 ` [Qemu-devel] [PULL 5/9] gen-icount: " Paolo Bonzini
2015-01-03  8:45 ` [Qemu-devel] [PULL 6/9] serial: refine serial_thr_ipending_needed Paolo Bonzini
2015-01-03  8:45 ` Paolo Bonzini [this message]
2015-01-03  8:45 ` [Qemu-devel] [PULL 8/9] block/iscsi: fix uninitialized variable Paolo Bonzini
2015-01-03  8:45 ` [Qemu-devel] [PULL 9/9] pci: move REDHAT_SDHCI device ID to make room for Rocker Paolo Bonzini
2015-01-09 17:58 ` [Qemu-devel] [PULL 0/9] Misc changes for 2015-01-03 (icount, migration, iscsi, sdhci-pci) Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1420274709-30199-8-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).