git: 5df4deb384d3 - stable/14 - vtgpu: Fix the physical memory size

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Mon, 25 Sep 2023 12:01:41 UTC
The branch stable/14 has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=5df4deb384d3af12b10bc6de0788578d6a56e207

commit 5df4deb384d3af12b10bc6de0788578d6a56e207
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2023-09-21 10:50:29 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2023-09-25 12:01:28 +0000

    vtgpu: Fix the physical memory size
    
    Use the correct endian switching function when switching to a little
    endian 64-bit address. Even on a little-endian machine this will
    truncate the address to a 32-bit value.
    
    Sponsored by:   Arm Ltd
    
    (cherry picked from commit 4386935191c576fa62a52d52734e264fe8329a67)
---
 sys/dev/virtio/gpu/virtio_gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/virtio/gpu/virtio_gpu.c b/sys/dev/virtio/gpu/virtio_gpu.c
index 0472bc98b3ba..6209fe4beae1 100644
--- a/sys/dev/virtio/gpu/virtio_gpu.c
+++ b/sys/dev/virtio/gpu/virtio_gpu.c
@@ -565,7 +565,7 @@ vtgpu_attach_backing(struct vtgpu_softc *sc)
 	s.req.backing.resource_id = htole32(VTGPU_RESOURCE_ID);
 	s.req.backing.nr_entries = htole32(1);
 
-	s.req.mem[0].addr = htole32(sc->vtgpu_fb_info.fb_pbase);
+	s.req.mem[0].addr = htole64(sc->vtgpu_fb_info.fb_pbase);
 	s.req.mem[0].length = htole32(sc->vtgpu_fb_info.fb_size);
 
 	error = vtgpu_req_resp(sc, &s.req, sizeof(s.req), &s.resp,