[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC][PATCH 5/6] Support "bootonceindex" property for virti
From: |
Janne Huttunen |
Subject: |
[Qemu-devel] [RFC][PATCH 5/6] Support "bootonceindex" property for virtio-net interfaces. |
Date: |
Tue, 14 Mar 2017 14:50:12 +0200 |
Signed-off-by: Janne Huttunen <address@hidden>
---
hw/net/virtio-net.c | 3 +++
hw/virtio/virtio-pci.c | 2 ++
include/net/net.h | 1 +
3 files changed, 6 insertions(+)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index c321680..928b60b 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -2016,6 +2016,9 @@ static void virtio_net_instance_init(Object *obj)
device_add_bootindex_property(obj, &n->nic_conf.bootindex,
"bootindex", "/address@hidden",
DEVICE(n), NULL);
+ device_add_bootonceindex_property(obj, &n->nic_conf.bootonceindex,
+ "bootonceindex", "/address@hidden",
+ DEVICE(n), NULL);
}
static void virtio_net_pre_save(void *opaque)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 5ce42af..abfa5bd 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -2322,6 +2322,8 @@ static void virtio_net_pci_instance_init(Object *obj)
TYPE_VIRTIO_NET);
object_property_add_alias(obj, "bootindex", OBJECT(&dev->vdev),
"bootindex", &error_abort);
+ object_property_add_alias(obj, "bootonceindex", OBJECT(&dev->vdev),
+ "bootonceindex", &error_abort);
}
static const TypeInfo virtio_net_pci_info = {
diff --git a/include/net/net.h b/include/net/net.h
index 99b28d5..de98b883 100644
--- a/include/net/net.h
+++ b/include/net/net.h
@@ -36,6 +36,7 @@ typedef struct NICConf {
MACAddr macaddr;
NICPeers peers;
int32_t bootindex;
+ int32_t bootonceindex;
} NICConf;
#define DEFINE_NIC_PROPERTIES(_state, _conf) \
--
2.7.4
- [Qemu-devel] [RFC][PATCH 0/6] "bootonceindex" property, Janne Huttunen, 2017/03/14
- [Qemu-devel] [RFC][PATCH 5/6] Support "bootonceindex" property for virtio-net interfaces.,
Janne Huttunen <=
- [Qemu-devel] [RFC][PATCH 4/6] Clear the boot once list after it has been used., Janne Huttunen, 2017/03/14
- [Qemu-devel] [RFC][PATCH 1/6] Re-factor bootdevice list handling, pt1., Janne Huttunen, 2017/03/14
- Re: [Qemu-devel] [RFC][PATCH 0/6] "bootonceindex" property, Gerd Hoffmann, 2017/03/14
- Re: [Qemu-devel] [RFC][PATCH 0/6] "bootonceindex" property, Janne Huttunen, 2017/03/15
- Re: [Qemu-devel] [RFC][PATCH 0/6] "bootonceindex" property, Gerd Hoffmann, 2017/03/15
- Re: [Qemu-devel] [RFC][PATCH 0/6] "bootonceindex" property, Janne Huttunen, 2017/03/16
- Re: [Qemu-devel] [RFC][PATCH 0/6] "bootonceindex" property, Gerd Hoffmann, 2017/03/16
- Re: [Qemu-devel] [RFC][PATCH 0/6] "bootonceindex" property, Eric Blake, 2017/03/21
- Re: [Qemu-devel] [RFC][PATCH 0/6] "bootonceindex" property, Markus Armbruster, 2017/03/22
- Re: [Qemu-devel] [RFC][PATCH 0/6] "bootonceindex" property, Paolo Bonzini, 2017/03/21