From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KOsNt-00012V-B6 for qemu-devel@nongnu.org; Fri, 01 Aug 2008 07:01:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KOsNr-0000zw-VN for qemu-devel@nongnu.org; Fri, 01 Aug 2008 07:01:20 -0400 Received: from [199.232.76.173] (port=54711 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOsNr-0000za-0K for qemu-devel@nongnu.org; Fri, 01 Aug 2008 07:01:19 -0400 Received: from wf-out-1314.google.com ([209.85.200.171]:35706) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KOsNq-0000XK-7P for qemu-devel@nongnu.org; Fri, 01 Aug 2008 07:01:18 -0400 Received: by wf-out-1314.google.com with SMTP id 27so1352135wfd.4 for ; Fri, 01 Aug 2008 04:01:16 -0700 (PDT) Message-ID: <3e1533500808010401p2535b7c4v6af2cde623edc8a3@mail.gmail.com> Date: Fri, 1 Aug 2008 12:01:14 +0100 From: "Luis Pureza" Sender: pureza@gmail.com MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3109_10201128.1217588476420" Subject: [Qemu-devel] PATCH: Fix Sparc32 save & load Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ------=_Part_3109_10201128.1217588476420 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline The following patch fixes some issues with Sparc32 save & load operations. The most significant change is the call to cpu_set_cwp(), just prior to saving, to make sure the overflow registers are copied to the first window if the cwp is the last window. Thus, on load, all registers will have the correct values. Also, I'm saving & loading two more fields of the CPUState - interrupt_index and pil_in. I wonder if these are enough. Finally, on SPARC64 saving code, I noticed a call to qemu_get_ptimer() and replaced it with qemu_put_ptimer(). Best regards, Luis Pureza ------=_Part_3109_10201128.1217588476420 Content-Type: text/x-diff; name=Fix_Sparc32_load_restore.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_fjcopoe50 Content-Disposition: attachment; filename=Fix_Sparc32_load_restore.patch SW5kZXg6IHRhcmdldC1zcGFyYy9tYWNoaW5lLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gdGFyZ2V0LXNwYXJj L21hY2hpbmUuYwkocmV2aXNpb24gNDk3NSkKKysrIHRhcmdldC1zcGFyYy9tYWNoaW5lLmMJKHdv cmtpbmcgY29weSkKQEAgLTMxLDYgKzMxLDEwIEBACiAgICAgaW50IGk7CiAgICAgdWludDMyX3Qg dG1wOwogCisgICAgLy8gaWYgZW52LT5jd3AgPT0gZW52LT5ud2luZG93cyAtIDEsIHRoaXMgd2ls bCBzZXQgdGhlIGlucyBvZiB0aGUgbGFzdAorICAgIC8vIHdpbmRvdyBhcyB0aGUgb3V0cyBvZiB0 aGUgZmlyc3Qgd2luZG93CisgICAgY3B1X3NldF9jd3AoZW52LCBlbnYtPmN3cCk7CisKICAgICBm b3IoaSA9IDA7IGkgPCA4OyBpKyspCiAgICAgICAgIHFlbXVfcHV0X2JldGxzKGYsICZlbnYtPmdy ZWdzW2ldKTsKICAgICBxZW11X3B1dF9iZTMycyhmLCAmZW52LT5ud2luZG93cyk7CkBAIC01NCw2 ICs1OCw4IEBACiAgICAgcWVtdV9wdXRfYmUzMihmLCB0bXApOwogICAgIHFlbXVfcHV0X2JldGxz KGYsICZlbnYtPmZzcik7CiAgICAgcWVtdV9wdXRfYmV0bHMoZiwgJmVudi0+dGJyKTsKKyAgICBx ZW11X3B1dF9iZTMycyhmLCAmZW52LT5pbnRlcnJ1cHRfaW5kZXgpOworICAgIHFlbXVfcHV0X2Jl MzJzKGYsICZlbnYtPnBpbF9pbik7CiAjaWZuZGVmIFRBUkdFVF9TUEFSQzY0CiAgICAgcWVtdV9w dXRfYmUzMnMoZiwgJmVudi0+d2ltKTsKICAgICAvKiBNTVUgKi8KQEAgLTExMCw3ICsxMTYsNyBA QAogICAgIHFlbXVfcHV0X2JlNjRzKGYsICZlbnYtPmh2ZXIpOwogICAgIHFlbXVfcHV0X2JlNjRz KGYsICZlbnYtPmhzdGlja19jbXByKTsKICAgICBxZW11X3B1dF9iZTY0cyhmLCAmZW52LT5zc3Ip OwotICAgIHFlbXVfZ2V0X3B0aW1lcihmLCBlbnYtPmhzdGljayk7CisgICAgcWVtdV9wdXRfcHRp bWVyKGYsIGVudi0+aHN0aWNrKTsKICNlbmRpZgogfQogCkBAIC0xNDcsNiArMTUzLDggQEAKICAg ICBQVVRfUFNSKGVudiwgdG1wKTsKICAgICBxZW11X2dldF9iZXRscyhmLCAmZW52LT5mc3IpOwog ICAgIHFlbXVfZ2V0X2JldGxzKGYsICZlbnYtPnRicik7CisgICAgcWVtdV9nZXRfYmUzMnMoZiwg JmVudi0+aW50ZXJydXB0X2luZGV4KTsKKyAgICBxZW11X2dldF9iZTMycyhmLCAmZW52LT5waWxf aW4pOwogI2lmbmRlZiBUQVJHRVRfU1BBUkM2NAogICAgIHFlbXVfZ2V0X2JlMzJzKGYsICZlbnYt PndpbSk7CiAgICAgLyogTU1VICovCg== ------=_Part_3109_10201128.1217588476420--