summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-11-01 11:12:50 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-11-01 11:12:50 -0500
commit43552994c468d37d1e0e81b9f759338dcdbc5cc0 (patch)
treeda1c12c4c47e2883d6252b1758c285596e9109df /hw
parent98c8a73b2e82eecac359b0b55a2d9d69f0a916ff (diff)
parentb55f546eefe79cb6e6b15ebb23f352a736bafc39 (diff)
downloadqemu-43552994c468d37d1e0e81b9f759338dcdbc5cc0.zip
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
* qemu-kvm/uq/master: (28 commits) update-linux-headers.sh: Handle new kernel uapi/ directories target-i386: kvm_cpu_fill_host: use GET_SUPPORTED_CPUID target-i386: cpu: make -cpu host/check/enforce code KVM-specific target-i386: make cpu_x86_fill_host() void Emulate qemu-kvms -no-kvm option Issue warning when deprecated -tdf option is used Issue warning when deprecated drive parameter boot=on|off is used Use global properties to emulate -no-kvm-pit-reinjection Issue warning when deprecated -no-kvm-pit is used Use machine options to emulate -no-kvm-irqchip cirrus_vga: allow configurable vram size target-i386: Add missing kvm cpuid feature name i386: cpu: add missing CPUID[EAX=7,ECX=0] flag names i386: kvm: filter CPUID leaf 7 based on GET_SUPPORTED_CPUID, too i386: kvm: reformat filter_features_for_kvm() code i386: kvm: filter CPUID feature words earlier, on cpu.c i386: kvm: mask cpuid_ext4_features bits earlier i386: kvm: mask cpuid_kvm_features earlier i386: kvm: x2apic is not supported without in-kernel irqchip i386: kvm: set CPUID_EXT_TSC_DEADLINE_TIMER on kvm_arch_get_supported_cpuid() ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/cirrus_vga.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index e4af2e9ded..9bef96e6d7 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -42,8 +42,6 @@
//#define DEBUG_CIRRUS
//#define DEBUG_BITBLT
-#define VGA_RAM_SIZE (8192 * 1024)
-
/***************************************
*
* definitions
@@ -2856,7 +2854,8 @@ static void cirrus_init_common(CirrusVGAState * s, int device_id, int is_pci,
/* I/O handler for LFB */
memory_region_init_io(&s->cirrus_linear_io, &cirrus_linear_io_ops, s,
- "cirrus-linear-io", VGA_RAM_SIZE);
+ "cirrus-linear-io", s->vga.vram_size_mb
+ * 1024 * 1024);
memory_region_set_flush_coalesced(&s->cirrus_linear_io);
/* I/O handler for LFB */
@@ -2899,7 +2898,6 @@ static int vga_initfn(ISADevice *dev)
ISACirrusVGAState *d = DO_UPCAST(ISACirrusVGAState, dev, dev);
VGACommonState *s = &d->cirrus_vga.vga;
- s->vram_size_mb = VGA_RAM_SIZE >> 20;
vga_common_init(s);
cirrus_init_common(&d->cirrus_vga, CIRRUS_ID_CLGD5430, 0,
isa_address_space(dev));
@@ -2912,6 +2910,12 @@ static int vga_initfn(ISADevice *dev)
return 0;
}
+static Property isa_vga_cirrus_properties[] = {
+ DEFINE_PROP_UINT32("vgamem_mb", struct ISACirrusVGAState,
+ cirrus_vga.vga.vram_size_mb, 8),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
static void isa_cirrus_vga_class_init(ObjectClass *klass, void *data)
{
ISADeviceClass *k = ISA_DEVICE_CLASS(klass);
@@ -2919,6 +2923,7 @@ static void isa_cirrus_vga_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_cirrus_vga;
k->init = vga_initfn;
+ dc->props = isa_vga_cirrus_properties;
}
static TypeInfo isa_cirrus_vga_info = {
@@ -2942,7 +2947,6 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev)
int16_t device_id = pc->device_id;
/* setup VGA */
- s->vga.vram_size_mb = VGA_RAM_SIZE >> 20;
vga_common_init(&s->vga);
cirrus_init_common(s, device_id, 1, pci_address_space(dev));
s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate,
@@ -2969,6 +2973,12 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev)
return 0;
}
+static Property pci_vga_cirrus_properties[] = {
+ DEFINE_PROP_UINT32("vgamem_mb", struct PCICirrusVGAState,
+ cirrus_vga.vga.vram_size_mb, 8),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
static void cirrus_vga_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
@@ -2982,6 +2992,7 @@ static void cirrus_vga_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_DISPLAY_VGA;
dc->desc = "Cirrus CLGD 54xx VGA";
dc->vmsd = &vmstate_pci_cirrus_vga;
+ dc->props = pci_vga_cirrus_properties;
}
static TypeInfo cirrus_vga_info = {