* [PATCH v2 1/8] Add CP0 MemoryMapID register implementation
@ 2024-10-18 13:18 Aleksandar Rakic
2024-10-19 7:43 ` Aleksandar Rikalo
2024-10-26 4:58 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 3+ messages in thread
From: Aleksandar Rakic @ 2024-10-18 13:18 UTC (permalink / raw)
To: qemu-devel@nongnu.org
Cc: Djordje Todorovic, cfu@mips.com, arikalo@gmail.com,
peter.maydell@linaro.org
Add CP0 MemoryMapID register implementation.
Cherry-picked 9e0cb40adb110c2c76e2e97719ba8afcce72bcf5
from https://github.com/MIPS/gnutools-qemu
Signed-off-by: Yongbok Kim <yongbok.kim@mips.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Aleksandar Rakic <aleksandar.rakic@htecgroup.com>
---
target/mips/sysemu/machine.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/target/mips/sysemu/machine.c b/target/mips/sysemu/machine.c
index 213fd637fc..91cd9f1900 100644
--- a/target/mips/sysemu/machine.c
+++ b/target/mips/sysemu/machine.c
@@ -142,6 +142,7 @@ static int get_tlb(QEMUFile *f, void *pv, size_t size,
qemu_get_betls(f, &v->VPN);
qemu_get_be32s(f, &v->PageMask);
qemu_get_be16s(f, &v->ASID);
+ qemu_get_be32s(f, &v->MMID);
qemu_get_be16s(f, &flags);
v->G = (flags >> 10) & 1;
v->C0 = (flags >> 7) & 3;
@@ -167,6 +168,7 @@ static int put_tlb(QEMUFile *f, void *pv, size_t size,
r4k_tlb_t *v = pv;
uint16_t asid = v->ASID;
+ uint32_t mmid = v->MMID;
uint16_t flags = ((v->EHINV << 15) |
(v->RI1 << 14) |
(v->RI0 << 13) |
@@ -183,6 +185,7 @@ static int put_tlb(QEMUFile *f, void *pv, size_t size,
qemu_put_betls(f, &v->VPN);
qemu_put_be32s(f, &v->PageMask);
qemu_put_be16s(f, &asid);
+ qemu_put_be32s(f, &mmid);
qemu_put_be16s(f, &flags);
qemu_put_be64s(f, &v->PFN[0]);
qemu_put_be64s(f, &v->PFN[1]);
@@ -204,8 +207,8 @@ static const VMStateInfo vmstate_info_tlb = {
static const VMStateDescription vmstate_tlb = {
.name = "cpu/tlb",
- .version_id = 2,
- .minimum_version_id = 2,
+ .version_id = 3,
+ .minimum_version_id = 3,
.fields = (const VMStateField[]) {
VMSTATE_UINT32(nb_tlb, CPUMIPSTLBContext),
VMSTATE_UINT32(tlb_in_use, CPUMIPSTLBContext),
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/8] Add CP0 MemoryMapID register implementation
2024-10-18 13:18 [PATCH v2 1/8] Add CP0 MemoryMapID register implementation Aleksandar Rakic
@ 2024-10-19 7:43 ` Aleksandar Rikalo
2024-10-26 4:58 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Aleksandar Rikalo @ 2024-10-19 7:43 UTC (permalink / raw)
To: Aleksandar Rakic
Cc: qemu-devel@nongnu.org, Djordje Todorovic, cfu@mips.com,
peter.maydell@linaro.org
[-- Attachment #1: Type: text/plain, Size: 501 bytes --]
Add CP0 MemoryMapID register implementation.
>
> Cherry-picked 9e0cb40adb110c2c76e2e97719ba8afcce72bcf5
> from https://github.com/MIPS/gnutools-qemu
>
> Signed-off-by: Yongbok Kim <yongbok.kim@mips.com>
> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
> Signed-off-by: Aleksandar Rakic <aleksandar.rakic@htecgroup.com>
> ---
> target/mips/sysemu/machine.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
Reviewed-by: Aleksandar Rikalo <arikalo@gmail.com>
-- Aleksandar
[-- Attachment #2: Type: text/html, Size: 1158 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/8] Add CP0 MemoryMapID register implementation
2024-10-18 13:18 [PATCH v2 1/8] Add CP0 MemoryMapID register implementation Aleksandar Rakic
2024-10-19 7:43 ` Aleksandar Rikalo
@ 2024-10-26 4:58 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-10-26 4:58 UTC (permalink / raw)
To: Aleksandar Rakic, qemu-devel@nongnu.org
Cc: Djordje Todorovic, cfu@mips.com, arikalo@gmail.com,
peter.maydell@linaro.org
On 18/10/24 10:18, Aleksandar Rakic wrote:
> Add CP0 MemoryMapID register implementation.
>
> Cherry-picked 9e0cb40adb110c2c76e2e97719ba8afcce72bcf5
> from https://github.com/MIPS/gnutools-qemu
>
> Signed-off-by: Yongbok Kim <yongbok.kim@mips.com>
> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
> Signed-off-by: Aleksandar Rakic <aleksandar.rakic@htecgroup.com>
> ---
> target/mips/sysemu/machine.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
Queued rewording commit description as:
target/mips: Migrate TLB MemoryMapID register
Include CP0 MemoryMapID register in migration state.
Fixes: 99029be1c28 ("target/mips: Add implementation
of GINVT instruction")
Thanks,
Phil.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-26 4:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-18 13:18 [PATCH v2 1/8] Add CP0 MemoryMapID register implementation Aleksandar Rakic
2024-10-19 7:43 ` Aleksandar Rikalo
2024-10-26 4:58 ` Philippe Mathieu-Daudé
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).