diff options
| author | Peter Grehan <grehan@FreeBSD.org> | 2014-09-09 04:11:54 +0000 |
|---|---|---|
| committer | Peter Grehan <grehan@FreeBSD.org> | 2014-09-09 04:11:54 +0000 |
| commit | e18f344b9b6da81bf5eb2f5aadd7e93ef304549d (patch) | |
| tree | 906db88903fe0716a545e08b9d9c87314f1d2233 /usr.sbin | |
| parent | 72d33245f53ab0208def5efe635dc868690dff88 (diff) | |
Notes
Diffstat (limited to 'usr.sbin')
| -rw-r--r-- | usr.sbin/bhyve/pci_virtio_block.c | 1 | ||||
| -rw-r--r-- | usr.sbin/bhyve/pci_virtio_net.c | 1 | ||||
| -rw-r--r-- | usr.sbin/bhyve/pci_virtio_rnd.c | 1 | ||||
| -rw-r--r-- | usr.sbin/bhyve/virtio.c | 3 | ||||
| -rw-r--r-- | usr.sbin/bhyve/virtio.h | 2 |
5 files changed, 8 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/pci_virtio_block.c b/usr.sbin/bhyve/pci_virtio_block.c index cf1c65557015d..394b116b3028e 100644 --- a/usr.sbin/bhyve/pci_virtio_block.c +++ b/usr.sbin/bhyve/pci_virtio_block.c @@ -133,6 +133,7 @@ static struct virtio_consts vtblk_vi_consts = { pci_vtblk_notify, /* device-wide qnotify */ pci_vtblk_cfgread, /* read PCI config */ pci_vtblk_cfgwrite, /* write PCI config */ + NULL, /* apply negotiated features */ VTBLK_S_HOSTCAPS, /* our capabilities */ }; diff --git a/usr.sbin/bhyve/pci_virtio_net.c b/usr.sbin/bhyve/pci_virtio_net.c index c3b8690bb6e01..c9ab972fa443b 100644 --- a/usr.sbin/bhyve/pci_virtio_net.c +++ b/usr.sbin/bhyve/pci_virtio_net.c @@ -160,6 +160,7 @@ static struct virtio_consts vtnet_vi_consts = { NULL, /* device-wide qnotify -- not used */ pci_vtnet_cfgread, /* read PCI config */ pci_vtnet_cfgwrite, /* write PCI config */ + NULL, /* apply negotiated features */ VTNET_S_HOSTCAPS, /* our capabilities */ }; diff --git a/usr.sbin/bhyve/pci_virtio_rnd.c b/usr.sbin/bhyve/pci_virtio_rnd.c index 4d531834cbe2d..0a31080114c00 100644 --- a/usr.sbin/bhyve/pci_virtio_rnd.c +++ b/usr.sbin/bhyve/pci_virtio_rnd.c @@ -80,6 +80,7 @@ static struct virtio_consts vtrnd_vi_consts = { pci_vtrnd_notify, /* device-wide qnotify */ NULL, /* read virtio config */ NULL, /* write virtio config */ + NULL, /* apply negotiated features */ 0, /* our capabilities */ }; diff --git a/usr.sbin/bhyve/virtio.c b/usr.sbin/bhyve/virtio.c index 2f04b90ab44fe..19c0d4710d281 100644 --- a/usr.sbin/bhyve/virtio.c +++ b/usr.sbin/bhyve/virtio.c @@ -698,6 +698,9 @@ bad: switch (offset) { case VTCFG_R_GUESTCAP: vs->vs_negotiated_caps = value & vc->vc_hv_caps; + if (vc->vc_apply_features) + (*vc->vc_apply_features)(DEV_SOFTC(vs), + vs->vs_negotiated_caps); break; case VTCFG_R_PFN: if (vs->vs_curq >= vc->vc_nvq) diff --git a/usr.sbin/bhyve/virtio.h b/usr.sbin/bhyve/virtio.h index 1f29dfa8ef734..6f655f3f79800 100644 --- a/usr.sbin/bhyve/virtio.h +++ b/usr.sbin/bhyve/virtio.h @@ -352,6 +352,8 @@ struct virtio_consts { /* called to read config regs */ int (*vc_cfgwrite)(void *, int, int, uint32_t); /* called to write config regs */ + void (*vc_apply_features)(void *, uint64_t); + /* called to apply negotiated features */ uint64_t vc_hv_caps; /* hypervisor-provided capabilities */ }; |
