diff mbox series

[1/3] hw/arm/virt: Add virt-2.12 machine type

Message ID 1512745328-5109-2-git-send-email-peter.maydell@linaro.org
State Accepted
Headers show
Series hw/arm/virt: Add another UART | expand

Commit Message

Peter Maydell Dec. 8, 2017, 3:02 p.m. UTC
Add virt-2.12 machine type.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

---
 include/hw/compat.h |  3 +++
 hw/arm/virt.c       | 19 +++++++++++++++++--
 2 files changed, 20 insertions(+), 2 deletions(-)

-- 
2.7.4

Comments

Andrew Jones Dec. 12, 2017, 2:39 p.m. UTC | #1
On Fri, Dec 08, 2017 at 03:02:06PM +0000, Peter Maydell wrote:
> Add virt-2.12 machine type.

> 

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

> ---

>  include/hw/compat.h |  3 +++

>  hw/arm/virt.c       | 19 +++++++++++++++++--

>  2 files changed, 20 insertions(+), 2 deletions(-)



Reviewed-by: Andrew Jones <drjones@redhat.com>


> 

> diff --git a/include/hw/compat.h b/include/hw/compat.h

> index cf389b4..263de97 100644

> --- a/include/hw/compat.h

> +++ b/include/hw/compat.h

> @@ -1,6 +1,9 @@

>  #ifndef HW_COMPAT_H

>  #define HW_COMPAT_H

>  

> +#define HW_COMPAT_2_11 \

> +    /* empty */

> +

>  #define HW_COMPAT_2_10 \

>      {\

>          .driver   = "virtio-mouse-device",\

> diff --git a/hw/arm/virt.c b/hw/arm/virt.c

> index 151592b..543f9bd 100644

> --- a/hw/arm/virt.c

> +++ b/hw/arm/virt.c

> @@ -1618,7 +1618,7 @@ static void machvirt_machine_init(void)

>  }

>  type_init(machvirt_machine_init);

>  

> -static void virt_2_11_instance_init(Object *obj)

> +static void virt_2_12_instance_init(Object *obj)

>  {

>      VirtMachineState *vms = VIRT_MACHINE(obj);

>      VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);

> @@ -1678,10 +1678,25 @@ static void virt_2_11_instance_init(Object *obj)

>      vms->irqmap = a15irqmap;

>  }

>  

> +static void virt_machine_2_12_options(MachineClass *mc)

> +{

> +}

> +DEFINE_VIRT_MACHINE_AS_LATEST(2, 12)

> +

> +#define VIRT_COMPAT_2_11 \

> +    HW_COMPAT_2_11

> +

> +static void virt_2_11_instance_init(Object *obj)

> +{

> +    virt_2_12_instance_init(obj);

> +}

> +

>  static void virt_machine_2_11_options(MachineClass *mc)

>  {

> +    virt_machine_2_12_options(mc);

> +    SET_MACHINE_COMPAT(mc, VIRT_COMPAT_2_11);

>  }

> -DEFINE_VIRT_MACHINE_AS_LATEST(2, 11)

> +DEFINE_VIRT_MACHINE(2, 11)

>  

>  #define VIRT_COMPAT_2_10 \

>      HW_COMPAT_2_10

> -- 

> 2.7.4

> 

>
Peter Maydell Jan. 15, 2018, noon UTC | #2
On 12 December 2017 at 14:39, Andrew Jones <drjones@redhat.com> wrote:
> On Fri, Dec 08, 2017 at 03:02:06PM +0000, Peter Maydell wrote:

>> Add virt-2.12 machine type.

>>

>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

>> ---

>>  include/hw/compat.h |  3 +++

>>  hw/arm/virt.c       | 19 +++++++++++++++++--

>>  2 files changed, 20 insertions(+), 2 deletions(-)

>

>

> Reviewed-by: Andrew Jones <drjones@redhat.com>


Thanks. The rest of this series has issues but I'm going
to apply this patch to target-arm.next (minus the compat.h
change which has already gone into master via another commit).

thanks
-- PMM
diff mbox series

Patch

diff --git a/include/hw/compat.h b/include/hw/compat.h
index cf389b4..263de97 100644
--- a/include/hw/compat.h
+++ b/include/hw/compat.h
@@ -1,6 +1,9 @@ 
 #ifndef HW_COMPAT_H
 #define HW_COMPAT_H
 
+#define HW_COMPAT_2_11 \
+    /* empty */
+
 #define HW_COMPAT_2_10 \
     {\
         .driver   = "virtio-mouse-device",\
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 151592b..543f9bd 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1618,7 +1618,7 @@  static void machvirt_machine_init(void)
 }
 type_init(machvirt_machine_init);
 
-static void virt_2_11_instance_init(Object *obj)
+static void virt_2_12_instance_init(Object *obj)
 {
     VirtMachineState *vms = VIRT_MACHINE(obj);
     VirtMachineClass *vmc = VIRT_MACHINE_GET_CLASS(vms);
@@ -1678,10 +1678,25 @@  static void virt_2_11_instance_init(Object *obj)
     vms->irqmap = a15irqmap;
 }
 
+static void virt_machine_2_12_options(MachineClass *mc)
+{
+}
+DEFINE_VIRT_MACHINE_AS_LATEST(2, 12)
+
+#define VIRT_COMPAT_2_11 \
+    HW_COMPAT_2_11
+
+static void virt_2_11_instance_init(Object *obj)
+{
+    virt_2_12_instance_init(obj);
+}
+
 static void virt_machine_2_11_options(MachineClass *mc)
 {
+    virt_machine_2_12_options(mc);
+    SET_MACHINE_COMPAT(mc, VIRT_COMPAT_2_11);
 }
-DEFINE_VIRT_MACHINE_AS_LATEST(2, 11)
+DEFINE_VIRT_MACHINE(2, 11)
 
 #define VIRT_COMPAT_2_10 \
     HW_COMPAT_2_10