* [PATCH v4 0/3] hw/arm/sbsa-ref: sort out graphics a bit
@ 2023-05-24 11:14 Marcin Juszkiewicz
2023-05-24 11:14 ` [PATCH 1/3] hw/arm: Use MachineClass->default_nic in the sbsa-ref machine Marcin Juszkiewicz
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Marcin Juszkiewicz @ 2023-05-24 11:14 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Leif Lindholm, Peter Maydell, Thomas Huth,
Paolo Bonzini, Marcin Juszkiewicz
Thomas Huth gave me some hints on how to improve sbsa-ref configuration
when it comes to graphics.
With this patchset we are able to start sbsa-ref if qemu is build with
"--without-default-devices" argument given to configure script.
Changes since v3:
- add Bochs display to pci_vga_init() list
- use pci_vga_init() to initialize graphics in sbsa-ref as this allows
to run with other vga cards as well
Marcin Juszkiewicz (2):
Add Bochs to list of vga_interfaces
hw/arm/sbsa-ref: set default display to Bochs
Thomas Huth (1):
hw/arm: Use MachineClass->default_nic in the sbsa-ref machine
hw/arm/sbsa-ref.c | 9 ++++++---
hw/pci/pci.c | 2 ++
include/sysemu/sysemu.h | 2 +-
softmmu/vl.c | 6 ++++++
4 files changed, 15 insertions(+), 4 deletions(-)
--
2.40.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] hw/arm: Use MachineClass->default_nic in the sbsa-ref machine
2023-05-24 11:14 [PATCH v4 0/3] hw/arm/sbsa-ref: sort out graphics a bit Marcin Juszkiewicz
@ 2023-05-24 11:14 ` Marcin Juszkiewicz
2023-05-24 11:14 ` [PATCH v4 2/3] Add Bochs to list of vga_interfaces Marcin Juszkiewicz
2023-05-24 11:14 ` [PATCH v4 3/3] hw/arm/sbsa-ref: set default display to Bochs Marcin Juszkiewicz
2 siblings, 0 replies; 7+ messages in thread
From: Marcin Juszkiewicz @ 2023-05-24 11:14 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Leif Lindholm, Peter Maydell, Thomas Huth,
Paolo Bonzini, Marcin Juszkiewicz
From: Thomas Huth <thuth@redhat.com>
Mark the default NIC via the new MachineClass->default_nic setting
so that the machine-defaults code in vl.c can decide whether the
default NIC is usable or not (for example when compiling with the
"--without-default-devices" configure switch).
Signed-off-by: Thomas Huth <thuth@redhat.com>
Tested-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
hw/arm/sbsa-ref.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 792371fdce..9c3e670ec6 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -596,6 +596,7 @@ static void create_pcie(SBSAMachineState *sms)
hwaddr size_mmio_high = sbsa_ref_memmap[SBSA_PCIE_MMIO_HIGH].size;
hwaddr base_pio = sbsa_ref_memmap[SBSA_PCIE_PIO].base;
int irq = sbsa_ref_irqmap[SBSA_PCIE];
+ MachineClass *mc = MACHINE_GET_CLASS(sms);
MemoryRegion *mmio_alias, *mmio_alias_high, *mmio_reg;
MemoryRegion *ecam_alias, *ecam_reg;
DeviceState *dev;
@@ -641,7 +642,7 @@ static void create_pcie(SBSAMachineState *sms)
NICInfo *nd = &nd_table[i];
if (!nd->model) {
- nd->model = g_strdup("e1000e");
+ nd->model = g_strdup(mc->default_nic);
}
pci_nic_init_nofail(nd, pci->bus, nd->model, NULL);
@@ -858,6 +859,7 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
mc->minimum_page_bits = 12;
mc->block_default_type = IF_IDE;
mc->no_cdrom = 1;
+ mc->default_nic = "e1000e";
mc->default_ram_size = 1 * GiB;
mc->default_ram_id = "sbsa-ref.ram";
mc->default_cpus = 4;
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v4 2/3] Add Bochs to list of vga_interfaces
2023-05-24 11:14 [PATCH v4 0/3] hw/arm/sbsa-ref: sort out graphics a bit Marcin Juszkiewicz
2023-05-24 11:14 ` [PATCH 1/3] hw/arm: Use MachineClass->default_nic in the sbsa-ref machine Marcin Juszkiewicz
@ 2023-05-24 11:14 ` Marcin Juszkiewicz
2023-05-24 11:47 ` Thomas Huth
2023-05-25 10:15 ` Peter Maydell
2023-05-24 11:14 ` [PATCH v4 3/3] hw/arm/sbsa-ref: set default display to Bochs Marcin Juszkiewicz
2 siblings, 2 replies; 7+ messages in thread
From: Marcin Juszkiewicz @ 2023-05-24 11:14 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Leif Lindholm, Peter Maydell, Thomas Huth,
Paolo Bonzini, Marcin Juszkiewicz
arm/sbsa-ref uses Bochs-display graphics card and without it being
present in vga_interfaces "-vga none" argument handling cannot be added.
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
hw/pci/pci.c | 2 ++
include/sysemu/sysemu.h | 2 +-
softmmu/vl.c | 6 ++++++
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 1cc7c89036..edac76ea15 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1937,6 +1937,8 @@ PCIDevice *pci_vga_init(PCIBus *bus)
return pci_create_simple(bus, -1, "vmware-svga");
case VGA_VIRTIO:
return pci_create_simple(bus, -1, "virtio-vga");
+ case VGA_BOCHS:
+ return pci_create_simple(bus, -1, "bochs-display");
case VGA_NONE:
default: /* Other non-PCI types. Checking for unsupported types is already
done in vl.c. */
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 25be2a692e..9713a1b470 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -29,7 +29,7 @@ extern int autostart;
typedef enum {
VGA_NONE, VGA_STD, VGA_CIRRUS, VGA_VMWARE, VGA_XENFB, VGA_QXL,
- VGA_TCX, VGA_CG3, VGA_DEVICE, VGA_VIRTIO,
+ VGA_TCX, VGA_CG3, VGA_DEVICE, VGA_VIRTIO, VGA_BOCHS,
VGA_TYPE_MAX,
} VGAInterfaceType;
diff --git a/softmmu/vl.c b/softmmu/vl.c
index b0b96f67fa..07e6030875 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -216,6 +216,7 @@ static struct {
{ .driver = "ati-vga", .flag = &default_vga },
{ .driver = "vhost-user-vga", .flag = &default_vga },
{ .driver = "virtio-vga-gl", .flag = &default_vga },
+ { .driver = "bochs-display", .flag = &default_vga },
};
static QemuOptsList qemu_rtc_opts = {
@@ -935,6 +936,11 @@ static const VGAInterfaceInfo vga_interfaces[VGA_TYPE_MAX] = {
.name = "CG3 framebuffer",
.class_names = { "cgthree" },
},
+ [VGA_BOCHS] = {
+ .opt_name = "bochs-display",
+ .name = "Bochs framebuffer",
+ .class_names = { "bochs-display" },
+ },
#ifdef CONFIG_XEN_BACKEND
[VGA_XENFB] = {
.opt_name = "xenfb",
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v4 3/3] hw/arm/sbsa-ref: set default display to Bochs
2023-05-24 11:14 [PATCH v4 0/3] hw/arm/sbsa-ref: sort out graphics a bit Marcin Juszkiewicz
2023-05-24 11:14 ` [PATCH 1/3] hw/arm: Use MachineClass->default_nic in the sbsa-ref machine Marcin Juszkiewicz
2023-05-24 11:14 ` [PATCH v4 2/3] Add Bochs to list of vga_interfaces Marcin Juszkiewicz
@ 2023-05-24 11:14 ` Marcin Juszkiewicz
2023-05-24 11:48 ` Thomas Huth
2 siblings, 1 reply; 7+ messages in thread
From: Marcin Juszkiewicz @ 2023-05-24 11:14 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-arm, Leif Lindholm, Peter Maydell, Thomas Huth,
Paolo Bonzini, Marcin Juszkiewicz
This way we can use pci_vga_init() and have Bochs by default while still
have an option to run with other VGA cards.
Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
hw/arm/sbsa-ref.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 9c3e670ec6..ed7ed00b3d 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -647,9 +647,9 @@ static void create_pcie(SBSAMachineState *sms)
pci_nic_init_nofail(nd, pci->bus, nd->model, NULL);
}
- }
- pci_create_simple(pci->bus, -1, "bochs-display");
+ pci_vga_init(pci->bus);
+ }
create_smmu(sms, pci->bus);
}
@@ -863,6 +863,7 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
mc->default_ram_size = 1 * GiB;
mc->default_ram_id = "sbsa-ref.ram";
mc->default_cpus = 4;
+ mc->default_display = "bochs-display";
mc->possible_cpu_arch_ids = sbsa_ref_possible_cpu_arch_ids;
mc->cpu_index_to_instance_props = sbsa_ref_cpu_index_to_props;
mc->get_default_cpu_node_id = sbsa_ref_get_default_cpu_node_id;
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v4 2/3] Add Bochs to list of vga_interfaces
2023-05-24 11:14 ` [PATCH v4 2/3] Add Bochs to list of vga_interfaces Marcin Juszkiewicz
@ 2023-05-24 11:47 ` Thomas Huth
2023-05-25 10:15 ` Peter Maydell
1 sibling, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2023-05-24 11:47 UTC (permalink / raw)
To: Marcin Juszkiewicz, qemu-devel
Cc: qemu-arm, Leif Lindholm, Peter Maydell, Paolo Bonzini
On 24/05/2023 13.14, Marcin Juszkiewicz wrote:
> arm/sbsa-ref uses Bochs-display graphics card and without it being
> present in vga_interfaces "-vga none" argument handling cannot be added.
>
> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> ---
> hw/pci/pci.c | 2 ++
> include/sysemu/sysemu.h | 2 +-
> softmmu/vl.c | 6 ++++++
> 3 files changed, 9 insertions(+), 1 deletion(-)
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4 3/3] hw/arm/sbsa-ref: set default display to Bochs
2023-05-24 11:14 ` [PATCH v4 3/3] hw/arm/sbsa-ref: set default display to Bochs Marcin Juszkiewicz
@ 2023-05-24 11:48 ` Thomas Huth
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2023-05-24 11:48 UTC (permalink / raw)
To: Marcin Juszkiewicz, qemu-devel
Cc: qemu-arm, Leif Lindholm, Peter Maydell, Paolo Bonzini
On 24/05/2023 13.14, Marcin Juszkiewicz wrote:
> This way we can use pci_vga_init() and have Bochs by default while still
> have an option to run with other VGA cards.
>
> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> ---
> hw/arm/sbsa-ref.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
> index 9c3e670ec6..ed7ed00b3d 100644
> --- a/hw/arm/sbsa-ref.c
> +++ b/hw/arm/sbsa-ref.c
> @@ -647,9 +647,9 @@ static void create_pcie(SBSAMachineState *sms)
>
> pci_nic_init_nofail(nd, pci->bus, nd->model, NULL);
> }
> - }
>
> - pci_create_simple(pci->bus, -1, "bochs-display");
> + pci_vga_init(pci->bus);
> + }
>
> create_smmu(sms, pci->bus);
> }
> @@ -863,6 +863,7 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
> mc->default_ram_size = 1 * GiB;
> mc->default_ram_id = "sbsa-ref.ram";
> mc->default_cpus = 4;
> + mc->default_display = "bochs-display";
> mc->possible_cpu_arch_ids = sbsa_ref_possible_cpu_arch_ids;
> mc->cpu_index_to_instance_props = sbsa_ref_cpu_index_to_props;
> mc->get_default_cpu_node_id = sbsa_ref_get_default_cpu_node_id;
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4 2/3] Add Bochs to list of vga_interfaces
2023-05-24 11:14 ` [PATCH v4 2/3] Add Bochs to list of vga_interfaces Marcin Juszkiewicz
2023-05-24 11:47 ` Thomas Huth
@ 2023-05-25 10:15 ` Peter Maydell
1 sibling, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2023-05-25 10:15 UTC (permalink / raw)
To: marcin.juszkiewicz
Cc: qemu-devel, qemu-arm, Leif Lindholm, Thomas Huth, Paolo Bonzini
On Wed, 24 May 2023 at 12:14, Marcin Juszkiewicz
<marcin.juszkiewicz@linaro.org> wrote:
>
> arm/sbsa-ref uses Bochs-display graphics card and without it being
> present in vga_interfaces "-vga none" argument handling cannot be added.
>
> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> ---
> hw/pci/pci.c | 2 ++
> include/sysemu/sysemu.h | 2 +-
> softmmu/vl.c | 6 ++++++
> 3 files changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index 1cc7c89036..edac76ea15 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -1937,6 +1937,8 @@ PCIDevice *pci_vga_init(PCIBus *bus)
> return pci_create_simple(bus, -1, "vmware-svga");
> case VGA_VIRTIO:
> return pci_create_simple(bus, -1, "virtio-vga");
> + case VGA_BOCHS:
> + return pci_create_simple(bus, -1, "bochs-display");
> case VGA_NONE:
> default: /* Other non-PCI types. Checking for unsupported types is already
> done in vl.c. */
> diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
> index 25be2a692e..9713a1b470 100644
> --- a/include/sysemu/sysemu.h
> +++ b/include/sysemu/sysemu.h
> @@ -29,7 +29,7 @@ extern int autostart;
>
> typedef enum {
> VGA_NONE, VGA_STD, VGA_CIRRUS, VGA_VMWARE, VGA_XENFB, VGA_QXL,
> - VGA_TCX, VGA_CG3, VGA_DEVICE, VGA_VIRTIO,
> + VGA_TCX, VGA_CG3, VGA_DEVICE, VGA_VIRTIO, VGA_BOCHS,
> VGA_TYPE_MAX,
> } VGAInterfaceType;
Is it really right that we want to add more support to this
legacy-command-line-option interface? We don't list every
graphics device we support here...
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-05-25 10:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-24 11:14 [PATCH v4 0/3] hw/arm/sbsa-ref: sort out graphics a bit Marcin Juszkiewicz
2023-05-24 11:14 ` [PATCH 1/3] hw/arm: Use MachineClass->default_nic in the sbsa-ref machine Marcin Juszkiewicz
2023-05-24 11:14 ` [PATCH v4 2/3] Add Bochs to list of vga_interfaces Marcin Juszkiewicz
2023-05-24 11:47 ` Thomas Huth
2023-05-25 10:15 ` Peter Maydell
2023-05-24 11:14 ` [PATCH v4 3/3] hw/arm/sbsa-ref: set default display to Bochs Marcin Juszkiewicz
2023-05-24 11:48 ` Thomas Huth
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).