diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index 54ff05a..fb2c7da 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -1478,110 +1478,6 @@
   vam->result_ready = 1;
 }
 
-static void
-vl_api_virtio_pci_create_reply_t_handler (vl_api_virtio_pci_create_reply_t *
-					  mp)
-{
-  vat_main_t *vam = &vat_main;
-  i32 retval = ntohl (mp->retval);
-  if (vam->async_mode)
-    {
-      vam->async_errors += (retval < 0);
-    }
-  else
-    {
-      vam->retval = retval;
-      vam->sw_if_index = ntohl (mp->sw_if_index);
-      vam->result_ready = 1;
-    }
-}
-
-static void vl_api_virtio_pci_create_reply_t_handler_json
-  (vl_api_virtio_pci_create_reply_t * mp)
-{
-  vat_main_t *vam = &vat_main;
-  vat_json_node_t node;
-
-  vat_json_init_object (&node);
-  vat_json_object_add_int (&node, "retval", ntohl (mp->retval));
-  vat_json_object_add_uint (&node, "sw_if_index", ntohl (mp->sw_if_index));
-
-  vat_json_print (vam->ofp, &node);
-  vat_json_free (&node);
-
-  vam->retval = ntohl (mp->retval);
-  vam->result_ready = 1;
-
-}
-
-static void
-  vl_api_virtio_pci_create_v2_reply_t_handler
-  (vl_api_virtio_pci_create_v2_reply_t * mp)
-{
-  vat_main_t *vam = &vat_main;
-  i32 retval = ntohl (mp->retval);
-  if (vam->async_mode)
-    {
-      vam->async_errors += (retval < 0);
-    }
-  else
-    {
-      vam->retval = retval;
-      vam->sw_if_index = ntohl (mp->sw_if_index);
-      vam->result_ready = 1;
-    }
-}
-
-static void vl_api_virtio_pci_create_v2_reply_t_handler_json
-  (vl_api_virtio_pci_create_v2_reply_t * mp)
-{
-  vat_main_t *vam = &vat_main;
-  vat_json_node_t node;
-
-  vat_json_init_object (&node);
-  vat_json_object_add_int (&node, "retval", ntohl (mp->retval));
-  vat_json_object_add_uint (&node, "sw_if_index", ntohl (mp->sw_if_index));
-
-  vat_json_print (vam->ofp, &node);
-  vat_json_free (&node);
-
-  vam->retval = ntohl (mp->retval);
-  vam->result_ready = 1;
-}
-
-static void
-vl_api_virtio_pci_delete_reply_t_handler (vl_api_virtio_pci_delete_reply_t *
-					  mp)
-{
-  vat_main_t *vam = &vat_main;
-  i32 retval = ntohl (mp->retval);
-  if (vam->async_mode)
-    {
-      vam->async_errors += (retval < 0);
-    }
-  else
-    {
-      vam->retval = retval;
-      vam->result_ready = 1;
-    }
-}
-
-static void vl_api_virtio_pci_delete_reply_t_handler_json
-  (vl_api_virtio_pci_delete_reply_t * mp)
-{
-  vat_main_t *vam = &vat_main;
-  vat_json_node_t node;
-
-  vat_json_init_object (&node);
-  vat_json_object_add_int (&node, "retval", ntohl (mp->retval));
-
-  vat_json_print (vam->ofp, &node);
-  vat_json_free (&node);
-
-  vam->retval = ntohl (mp->retval);
-  vam->result_ready = 1;
-}
-
 static void vl_api_ip_address_details_t_handler
   (vl_api_ip_address_details_t * mp)
 {
@@ -1936,10 +1832,6 @@
 _(L2FIB_FLUSH_BD_REPLY, l2fib_flush_bd_reply)                           \
 _(L2_FLAGS_REPLY, l2_flags_reply)                                       \
 _(BRIDGE_FLAGS_REPLY, bridge_flags_reply)                               \
-_(VIRTIO_PCI_CREATE_REPLY, virtio_pci_create_reply)			\
-_(VIRTIO_PCI_CREATE_V2_REPLY, virtio_pci_create_v2_reply)		\
-_(VIRTIO_PCI_DELETE_REPLY, virtio_pci_delete_reply)			\
-_(SW_INTERFACE_VIRTIO_PCI_DETAILS, sw_interface_virtio_pci_details)     \
 _(IP_ROUTE_ADD_DEL_REPLY, ip_route_add_del_reply)			\
 _(IP_TABLE_ADD_DEL_REPLY, ip_table_add_del_reply)			\
 _(IP_TABLE_REPLACE_BEGIN_REPLY, ip_table_replace_begin_reply)           \
@@ -3700,116 +3592,6 @@
 }
 
 static int
-api_virtio_pci_create_v2 (vat_main_t * vam)
-{
-  unformat_input_t *i = vam->input;
-  vl_api_virtio_pci_create_v2_t *mp;
-  u8 mac_address[6];
-  u8 random_mac = 1;
-  u32 pci_addr = 0;
-  u64 features = (u64) ~ (0ULL);
-  u32 virtio_flags = 0;
-  int ret;
-
-  clib_memset (mac_address, 0, sizeof (mac_address));
-
-  /* Parse args required to build the message */
-  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
-    {
-      if (unformat (i, "hw-addr %U", unformat_ethernet_address, mac_address))
-	{
-	  random_mac = 0;
-	}
-      else if (unformat (i, "pci-addr %U", unformat_vlib_pci_addr, &pci_addr))
-	;
-      else if (unformat (i, "features 0x%llx", &features))
-	;
-      else if (unformat (i, "gso-enabled"))
-	virtio_flags |= VIRTIO_API_FLAG_GSO;
-      else if (unformat (i, "csum-offload-enabled"))
-	virtio_flags |= VIRTIO_API_FLAG_CSUM_OFFLOAD;
-      else if (unformat (i, "gro-coalesce"))
-	virtio_flags |= VIRTIO_API_FLAG_GRO_COALESCE;
-      else if (unformat (i, "packed"))
-	virtio_flags |= VIRTIO_API_FLAG_PACKED;
-      else if (unformat (i, "in-order"))
-	virtio_flags |= VIRTIO_API_FLAG_IN_ORDER;
-      else if (unformat (i, "buffering"))
-	virtio_flags |= VIRTIO_API_FLAG_BUFFERING;
-      else
-	break;
-    }
-
-  if (pci_addr == 0)
-    {
-      errmsg ("pci address must be non zero. ");
-      return -99;
-    }
-
-  /* Construct the API message */
-  M (VIRTIO_PCI_CREATE_V2, mp);
-
-  mp->use_random_mac = random_mac;
-
-  mp->pci_addr.domain = htons (((vlib_pci_addr_t) pci_addr).domain);
-  mp->pci_addr.bus = ((vlib_pci_addr_t) pci_addr).bus;
-  mp->pci_addr.slot = ((vlib_pci_addr_t) pci_addr).slot;
-  mp->pci_addr.function = ((vlib_pci_addr_t) pci_addr).function;
-
-  mp->features = clib_host_to_net_u64 (features);
-  mp->virtio_flags = clib_host_to_net_u32 (virtio_flags);
-
-  if (random_mac == 0)
-    clib_memcpy (mp->mac_address, mac_address, 6);
-
-  /* send it... */
-  S (mp);
-
-  /* Wait for a reply... */
-  W (ret);
-  return ret;
-}
-
-static int
-api_virtio_pci_delete (vat_main_t * vam)
-{
-  unformat_input_t *i = vam->input;
-  vl_api_virtio_pci_delete_t *mp;
-  u32 sw_if_index = ~0;
-  u8 sw_if_index_set = 0;
-  int ret;
-
-  /* Parse args required to build the message */
-  while (unformat_check_input (i) != UNFORMAT_END_OF_INPUT)
-    {
-      if (unformat (i, "%U", api_unformat_sw_if_index, vam, &sw_if_index))
-	sw_if_index_set = 1;
-      else if (unformat (i, "sw_if_index %d", &sw_if_index))
-	sw_if_index_set = 1;
-      else
-	break;
-    }
-
-  if (sw_if_index_set == 0)
-    {
-      errmsg ("missing vpp interface name. ");
-      return -99;
-    }
-
-  /* Construct the API message */
-  M (VIRTIO_PCI_DELETE, mp);
-
-  mp->sw_if_index = htonl (sw_if_index);
-
-  /* send it... */
-  S (mp);
-
-  /* Wait for a reply... */
-  W (ret);
-  return ret;
-}
-
-static int
 api_ip_table_add_del (vat_main_t * vam)
 {
   unformat_input_t *i = vam->input;
@@ -5966,96 +5748,6 @@
   return ret;
 }
 
-static void vl_api_sw_interface_virtio_pci_details_t_handler
-  (vl_api_sw_interface_virtio_pci_details_t * mp)
-{
-  vat_main_t *vam = &vat_main;
-
-  typedef union
-  {
-    struct
-    {
-      u16 domain;
-      u8 bus;
-      u8 slot:5;
-      u8 function:3;
-    };
-    u32 as_u32;
-  } pci_addr_t;
-  pci_addr_t addr;
-
-  addr.domain = ntohs (mp->pci_addr.domain);
-  addr.bus = mp->pci_addr.bus;
-  addr.slot = mp->pci_addr.slot;
-  addr.function = mp->pci_addr.function;
-
-  u8 *pci_addr = format (0, "%04x:%02x:%02x.%x", addr.domain, addr.bus,
-			 addr.slot, addr.function);
-
-  print (vam->ofp,
-	 "\n%-12s %-12d %-12d %-12d %-17U 0x%-08llx",
-	 pci_addr, ntohl (mp->sw_if_index),
-	 ntohs (mp->rx_ring_sz), ntohs (mp->tx_ring_sz),
-	 format_ethernet_address, mp->mac_addr,
-	 clib_net_to_host_u64 (mp->features));
-  vec_free (pci_addr);
-}
-
-static void vl_api_sw_interface_virtio_pci_details_t_handler_json
-  (vl_api_sw_interface_virtio_pci_details_t * mp)
-{
-  vat_main_t *vam = &vat_main;
-  vat_json_node_t *node = NULL;
-  vlib_pci_addr_t pci_addr;
-
-  if (VAT_JSON_ARRAY != vam->json_tree.type)
-    {
-      ASSERT (VAT_JSON_NONE == vam->json_tree.type);
-      vat_json_init_array (&vam->json_tree);
-    }
-  node = vat_json_array_add (&vam->json_tree);
-
-  pci_addr.domain = ntohs (mp->pci_addr.domain);
-  pci_addr.bus = mp->pci_addr.bus;
-  pci_addr.slot = mp->pci_addr.slot;
-  pci_addr.function = mp->pci_addr.function;
-
-  vat_json_init_object (node);
-  vat_json_object_add_uint (node, "pci-addr", pci_addr.as_u32);
-  vat_json_object_add_uint (node, "sw_if_index", ntohl (mp->sw_if_index));
-  vat_json_object_add_uint (node, "rx_ring_sz", ntohs (mp->rx_ring_sz));
-  vat_json_object_add_uint (node, "tx_ring_sz", ntohs (mp->tx_ring_sz));
-  vat_json_object_add_uint (node, "features",
-			    clib_net_to_host_u64 (mp->features));
-  vat_json_object_add_string_copy (node, "mac_addr",
-				   format (0, "%U", format_ethernet_address,
-					   &mp->mac_addr));
-}
-
-static int
-api_sw_interface_virtio_pci_dump (vat_main_t * vam)
-{
-  vl_api_sw_interface_virtio_pci_dump_t *mp;
-  vl_api_control_ping_t *mp_ping;
-  int ret;
-
-  print (vam->ofp,
-	 "\n%-12s %-12s %-12s %-12s %-17s %-08s",
-	 "pci_addr", "sw_if_index", "rx_ring_sz", "tx_ring_sz",
-	 "mac_addr", "features");
-
-  /* Get list of tap interfaces */
-  M (SW_INTERFACE_VIRTIO_PCI_DUMP, mp);
-  S (mp);
-
-  /* Use a control ping for synchronization */
-  MPING (CONTROL_PING, mp_ping);
-  S (mp_ping);
-
-  W (ret);
-  return ret;
-}
-
 static int
 api_l2_fib_clear_table (vat_main_t * vam)
 {
@@ -8312,11 +8004,6 @@
   "sw_if <intfc> | sw_if_index <id> [learn] [forward] [uu-flood] [flood] [arp-term] [disable]\n") \
 _(bridge_flags,                                                         \
   "bd_id <bridge-domain-id> [learn] [forward] [uu-flood] [flood] [arp-term] [disable]\n") \
-_(virtio_pci_create_v2,                                                    \
-  "pci-addr <pci-address> [use_random_mac | hw-addr <mac-addr>] [features <hex-value>] [gso-enabled [gro-coalesce] | csum-offload-enabled] [packed] [in-order] [buffering]") \
-_(virtio_pci_delete,                                                    \
-  "<vpp-if-name> | sw_if_index <id>")                                   \
-_(sw_interface_virtio_pci_dump, "")                                     \
 _(ip_table_add_del,                                                     \
   "table <n> [ipv6] [add | del]\n")                                     \
 _(ip_route_add_del,                                                     \
diff --git a/src/vnet/devices/virtio/virtio.h b/src/vnet/devices/virtio/virtio.h
index c149ce4..4899605 100644
--- a/src/vnet/devices/virtio/virtio.h
+++ b/src/vnet/devices/virtio/virtio.h
@@ -218,6 +218,7 @@
   vlib_log_class_t log_default;
 
   virtio_if_t *interfaces;
+  u16 msg_id_base;
 } virtio_main_t;
 
 extern virtio_main_t virtio_main;
diff --git a/src/vnet/devices/virtio/virtio_api.c b/src/vnet/devices/virtio/virtio_api.c
index 4d0b663..11514c7 100644
--- a/src/vnet/devices/virtio/virtio_api.c
+++ b/src/vnet/devices/virtio/virtio_api.c
@@ -26,30 +26,13 @@
 #include <vnet/devices/virtio/pci.h>
 #include <vlib/pci/pci_types_api.h>
 
-#include <vnet/vnet_msg_enum.h>
+#include <vnet/format_fns.h>
+#include <vnet/devices/virtio/virtio.api_enum.h>
+#include <vnet/devices/virtio/virtio.api_types.h>
 
-#define vl_typedefs		/* define message structures */
-#include <vnet/vnet_all_api_h.h>
-#undef vl_typedefs
-
-#define vl_endianfun		/* define message structures */
-#include <vnet/vnet_all_api_h.h>
-#undef vl_endianfun
-
-/* instantiate all the print functions we know about */
-#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
-#define vl_printfun
-#include <vnet/vnet_all_api_h.h>
-#undef vl_printfun
-
+#define REPLY_MSG_ID_BASE virtio_main.msg_id_base
 #include <vlibapi/api_helper_macros.h>
 
-#define foreach_virtio_pci_api_msg                        \
-_(VIRTIO_PCI_CREATE, virtio_pci_create)                   \
-_(VIRTIO_PCI_CREATE_V2, virtio_pci_create_v2)             \
-_(VIRTIO_PCI_DELETE, virtio_pci_delete)                   \
-_(SW_INTERFACE_VIRTIO_PCI_DUMP, sw_interface_virtio_pci_dump)
-
 /* It will be deprecated in 21.01 */
 static void
 vl_api_virtio_pci_create_t_handler (vl_api_virtio_pci_create_t * mp)
@@ -86,7 +69,7 @@
     return;;
 
   rmp = vl_msg_api_alloc (sizeof (*rmp));
-  rmp->_vl_msg_id = htons (VL_API_VIRTIO_PCI_CREATE_REPLY);
+  rmp->_vl_msg_id = htons (REPLY_MSG_ID_BASE + VL_API_VIRTIO_PCI_CREATE_REPLY);
   rmp->context = mp->context;
   rmp->retval = htonl (ap->rv);
   rmp->sw_if_index = htonl (ap->sw_if_index);
@@ -148,7 +131,8 @@
     return;;
 
   rmp = vl_msg_api_alloc (sizeof (*rmp));
-  rmp->_vl_msg_id = htons (VL_API_VIRTIO_PCI_CREATE_V2_REPLY);
+  rmp->_vl_msg_id =
+    htons (REPLY_MSG_ID_BASE + VL_API_VIRTIO_PCI_CREATE_V2_REPLY);
   rmp->context = mp->context;
   rmp->retval = htonl (ap->rv);
   rmp->sw_if_index = htonl (ap->sw_if_index);
@@ -187,7 +171,7 @@
     return;
 
   rmp = vl_msg_api_alloc (sizeof (*rmp));
-  rmp->_vl_msg_id = htons (VL_API_VIRTIO_PCI_DELETE_REPLY);
+  rmp->_vl_msg_id = htons (REPLY_MSG_ID_BASE + VL_API_VIRTIO_PCI_DELETE_REPLY);
   rmp->context = mp->context;
   rmp->retval = htonl (rv);
 
@@ -204,7 +188,8 @@
 
   clib_memset (mp, 0, sizeof (*mp));
 
-  mp->_vl_msg_id = htons (VL_API_SW_INTERFACE_VIRTIO_PCI_DETAILS);
+  mp->_vl_msg_id =
+    htons (REPLY_MSG_ID_BASE + VL_API_SW_INTERFACE_VIRTIO_PCI_DETAILS);
   pci_address_encode ((vlib_pci_addr_t *) & vif->pci_addr.as_u32,
 		      &mp->pci_addr);
   mp->sw_if_index = htonl (vif->sw_if_index);
@@ -241,37 +226,15 @@
   }
 }
 
-#define vl_msg_name_crc_list
-#include <vnet/vnet_all_api_h.h>
-#undef vl_msg_name_crc_list
-
-static void
-setup_message_id_table (api_main_t * am)
-{
-#define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id);
-  foreach_vl_msg_name_crc_virtio;
-#undef _
-}
+#include <vnet/devices/virtio/virtio.api.c>
 
 static clib_error_t *
 virtio_pci_api_hookup (vlib_main_t * vm)
 {
-  api_main_t *am = vlibapi_get_main ();
-
-#define _(N,n)                                                  \
-    vl_msg_api_set_handlers(VL_API_##N, #n,                     \
-                           vl_api_##n##_t_handler,              \
-                           vl_noop_handler,                     \
-                           vl_api_##n##_t_endian,               \
-                           vl_api_##n##_t_print,                \
-                           sizeof(vl_api_##n##_t), 1);
-  foreach_virtio_pci_api_msg;
-#undef _
-
   /*
    * Set up the (msg_name, crc, message-id) table
    */
-  setup_message_id_table (am);
+  REPLY_MSG_ID_BASE = setup_message_id_table ();
 
   return 0;
 }
diff --git a/src/vnet/vnet_all_api_h.h b/src/vnet/vnet_all_api_h.h
index ddb64ea..9978181 100644
--- a/src/vnet/vnet_all_api_h.h
+++ b/src/vnet/vnet_all_api_h.h
@@ -38,7 +38,6 @@
 #include <vnet/ip/ip.api.h>
 #include <vnet/session/session.api.h>
 #include <vnet/srmpls/sr_mpls.api.h>
-#include <vnet/devices/virtio/virtio.api.h>
 
 /*
  * fd.io coding-style-patch-verification: ON
