qemu: change pci mem address of the pc arch (v2)
cover qemu: change pci mem address of the pc arch (v2)
Diffrence from v1 - remove the changes from the vbe bios:
the vbe bios does not have to be compiled with physical address of LBF instead it can read that memory address from the bochs bios.
PATCH 1/1 qemu: change the pc pci mapping to start from 0xc0000000
This is needed in order to allocate more memory to pci devices
One side effect of this is that non-pea guests cant see more than 3giga of ram anymore.
(vbe really sstart at 0xc0000000, pci start right after that)
--- hw/pc.c | 6 +- hw/vga_int.h | 2 +- hw/vmware_vga.c | 4 +- ...ge-pci-mem-address-to-start-at-0xc0000000.patch | 79 ++++++++++++++++++++ pc-bios/bios-pq/series | 1 + 5 files changed, 86 insertions(+), 6 deletions(-) create mode 100644 pc-bios/bios-pq/0011-bios-change-pci-mem-address-to-start-at-0xc0000000.patch
hw/pc.c +3 -3
@@ -771,9 +771,9 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,BlockDriverState *hd[MAX_IDE_BUS *MAX_IDE_DEVS ];BlockDriverState *fd[MAX_FD ]; -if (ram_size >=0xe0000000 ) { - above_4g_mem_size = ram_size -0xe0000000 ; - below_4g_mem_size =0xe0000000 ; +if (ram_size >=0xc0000000 ) { + above_4g_mem_size = ram_size -0xc0000000 ; + below_4g_mem_size =0xc0000000 ; }else { below_4g_mem_size = ram_size; }
hw/vga_int.h +1 -1
@@ -59,7 +59,7 @@#define VBE_DISPI_LFB_ENABLED 0x40#define VBE_DISPI_NOCLEARMEM 0x80 -#define VBE_DISPI_LFB_PHYSICAL_ADDRESS 0xE0000000 +#define VBE_DISPI_LFB_PHYSICAL_ADDRESS 0xC0000000#ifdef CONFIG_BOCHS_VBE
hw/vmware_vga.c +2 -2
@@ -118,14 +118,14 @@ struct pci_vmsvga_state_s {# define SVGA_IO_BASE SVGA_LEGACY_BASE_PORT# define SVGA_IO_MUL 1# define SVGA_FIFO_SIZE 0x10000 -# define SVGA_MEM_BASE 0xe0000000 +# define SVGA_MEM_BASE 0xc0000000# define SVGA_PCI_DEVICE_ID PCI_DEVICE_ID_VMWARE_SVGA2#else # define SVGA_ID SVGA_ID_1# define SVGA_IO_BASE SVGA_LEGACY_BASE_PORT# define SVGA_IO_MUL 4# define SVGA_FIFO_SIZE 0x10000 -# define SVGA_MEM_BASE 0xe0000000 +# define SVGA_MEM_BASE 0xc0000000# define SVGA_PCI_DEVICE_ID PCI_DEVICE_ID_VMWARE_SVGA#endif
pc-bios/bios-pq/0011-bios-change-pci-mem-address-to-start-at-0xc0000000.patch new file +79 -0
79 lines not on this page · raw message
pc-bios/bios-pq/series +1 -0
@@ -1,4 +1,5 @@ 0001_bx-qemu.patch +0011-bios-change-pci-mem-address-to-start-at-0xc0000000.patch 0002_kvm-bios-update-smbios-table-to-report-memory-above-4g.patch 0003_kvm-bios-generate-mptable-unconditionally.patch 0004_kvm-bios-resolve-memory-device-roll-over-reporting--issues-with-32g-guests.patch
Signature · 1 line
1.6.1
Re: [Qemu-devel] [PATCH] qemu: change the pc pci mapping to start from 0xc0000000
pc-bios/bios-pq/0011-bios-change-pci-mem-address-to-start-at-0xc0000000.patch
Quoted 70 lines · Izik Eidus
This is needed in order to allocate more memory to pci devices
One side effect of this is that non-pea guests cant see more than 3giga of ram anymore.
(vbe really sstart at
0xc0000000, pci start right after that)Signed-off-by Izik Eidus <[email protected]>--- hw/pc.c | 6 +- hw/vga_int.h | 2 +- hw/vmware_vga.c | 4 +- ...ge-pci-mem-address-to-start-at-0xc0000000.patch | 79 ++++++++++++++++++++ pc-bios/bios-pq/series | 1 + 5 files changed, 86 insertions(+), 6 deletions(-) create mode 100644 pc-bios/bios-pq/0011-bios-change-pci-mem-address-to-start-at-0xc0000000.patchhw/pc.c +3
-3@@ -771,9 +771,9 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,BlockDriverState *hd[MAX_IDE_BUS *MAX_IDE_DEVS ];BlockDriverState *fd[MAX_FD ]; -if (ram_size >=0xe0000000 ) { - above_4g_mem_size = ram_size -0xe0000000 ; - below_4g_mem_size =0xe0000000 ; +if (ram_size >=0xc0000000 ) { + above_4g_mem_size = ram_size -0xc0000000 ; + below_4g_mem_size =0xc0000000 ; }else { below_4g_mem_size = ram_size; }hw/vga_int.h +1
-1@@ -59,7 +59,7 @@#define VBE_DISPI_LFB_ENABLED 0x40#define VBE_DISPI_NOCLEARMEM 0x80 -#define VBE_DISPI_LFB_PHYSICAL_ADDRESS 0xE0000000 +#define VBE_DISPI_LFB_PHYSICAL_ADDRESS 0xC0000000#ifdef CONFIG_BOCHS_VBE hw/vmware_vga.c +2
-2@@ -118,14 +118,14 @@ struct pci_vmsvga_state_s {# define SVGA_IO_BASE SVGA_LEGACY_BASE_PORT# define SVGA_IO_MUL 1# define SVGA_FIFO_SIZE 0x10000 -# define SVGA_MEM_BASE 0xe0000000 +# define SVGA_MEM_BASE 0xc0000000# define SVGA_PCI_DEVICE_ID PCI_DEVICE_ID_VMWARE_SVGA2#else # define SVGA_ID SVGA_ID_1# define SVGA_IO_BASE SVGA_LEGACY_BASE_PORT# define SVGA_IO_MUL 4# define SVGA_FIFO_SIZE 0x10000 -# define SVGA_MEM_BASE 0xe0000000 +# define SVGA_MEM_BASE 0xc0000000# define SVGA_PCI_DEVICE_ID PCI_DEVICE_ID_VMWARE_SVGA#endif pc-bios/bios-pq/0011-bios-change-pci-mem-address-to-start-at-0xc0000000.patch +0
-0
Can you please split this into a separate patch and CC bochs-devel?
Regards,
Anthony Liguori
Re: [Qemu-devel] [PATCH] qemu: change the pc pci mapping to start from 0xc0000000
Quoted 11 lines · Anthony Liguori
Quoted 2 lines · Izik Eidus
This is needed in order to allocate more memory to pci devices
Can you please split this into a separate patch and CC bochs-devel?
Regards,
Anthony Liguori
Sure, but first i am waiting for answer from Volker, about the possibility that we have to change the mapping in the vga bios anyway (due to the fact that qemu can run without pci)