[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems
From: |
Ani Sinha |
Subject: |
Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems |
Date: |
Tue, 19 Sep 2023 09:53:28 +0530 |
On Tue, Sep 19, 2023 at 9:20 AM Ani Sinha <anisinha@redhat.com> wrote:
>
> On Mon, Sep 18, 2023 at 9:28 PM David Hildenbrand <david@redhat.com> wrote:
> >
> > On 18.09.23 17:56, Ani Sinha wrote:
> > > On Mon, Sep 18, 2023 at 8:59 PM David Hildenbrand <david@redhat.com>
> > > wrote:
> > >>
> > >> On 18.09.23 17:22, Ani Sinha wrote:
> > >>> On Mon, Sep 18, 2023 at 7:25 PM Ani Sinha <anisinha@redhat.com> wrote:
> > >>>>
> > >>>> 32-bit systems do not have a reserved memory for hole64 but they may
> > >>>> have a
> > >>>> reserved memory space for memory hotplug. Since, hole64 starts after
> > >>>> the
> > >>>> reserved hotplug memory, the unaligned hole64 start address gives us
> > >>>> the
> > >>>> end address for this memory hotplug region that the processor may use.
> > >>>> Fix this. This ensures that the physical address space bound checking
> > >>>> works
> > >>>> correctly for 32-bit systems as well.
> > >>>
> > >>> This patch breaks some unit tests. I am not sure why it did not catch
> > >>> it when I tested it before sending.
> > >>> Will have to resend after fixing the tests.
> > >>
> > >> Probably because they supply more memory than the system can actually
> > >> handle? (e.g., -m 4g on 32bit)?
> > >
> > > cxl tests are failing for example.
> > >
> > > $ ./qemu-system-i386 -display none -machine q35,cxl=on
> > > qemu-system-i386: Address space limit 0xffffffff < 0x1000fffff
> > > phys-bits too low (32)
>
> also another thing is:
>
> ./qemu-system-i386 -machine pc -m 128
> works but ...
>
> $ ./qemu-system-i386 -machine pc -m 128,slots=3,maxmem=1G
> qemu-system-i386: Address space limit 0xffffffff < 0x1f7ffffff
> phys-bits too low (32)
>
> or
>
> $ ./qemu-system-i386 -machine pc-i440fx-8.2 -accel kvm -m
> 128,slots=3,maxmem=1G
> qemu-system-i386: Address space limit 0xffffffff < 0x1f7ffffff
> phys-bits too low (32)
>
> but of course after the compat knob older pc machines work fine using
> the old logic :
>
> $ ./qemu-system-i386 -machine pc-i440fx-8.1 -accel kvm -m
> 128,slots=3,maxmem=1G
> VNC server running on ::1:5900
> ^Cqemu-system-i386: terminating on signal 2
I dpn't know if we always need to do this but this code adds 1 GiB per
slot for device memory :
if (pcmc->enforce_aligned_dimm) {
/* size device region assuming 1G page max alignment per slot */
size += (1 * GiB) * machine->ram_slots;
}
For a 32-bit machine that is a lot of memory consumed in just alignment.
- [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems, Ani Sinha, 2023/09/18
- Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems, Michael S. Tsirkin, 2023/09/18
- Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems, Ani Sinha, 2023/09/18
- Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems, David Hildenbrand, 2023/09/18
- Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems, Ani Sinha, 2023/09/18
- Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems, David Hildenbrand, 2023/09/18
- Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems, Ani Sinha, 2023/09/18
- Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems,
Ani Sinha <=
- Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems, Ani Sinha, 2023/09/19
- Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems, David Hildenbrand, 2023/09/19
- Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems, Ani Sinha, 2023/09/19
- Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems, Gerd Hoffmann, 2023/09/19
- Re: [PATCH] hw/i386/pc: fix max_used_gpa for 32-bit systems, Ani Sinha, 2023/09/19