Re: [PATCH net-next V4 2/2] intel: ixgbevf: Support Windows hosts (Hyper-V)

2016-04-19 Thread Alexander Duyck
On Tue, Apr 19, 2016 at 1:12 PM, K. Y. Srinivasan  wrote:
> On Hyper-V, the VF/PF communication is a via software mediated path
> as opposed to the hardware mailbox. Make the necessary
> adjustments to support Hyper-V.
>
> Signed-off-by: K. Y. Srinivasan 
> ---
> V2: Addressed most of the comments from
> Alexander Duyck 
> and Rustad, Mark D .
>
> V3: Addressed additional comments from
> Alexander Duyck 
>
> V4: Addressed kbuild errors reported by:
> kbuild test robot 
>
>
>  drivers/net/ethernet/intel/ixgbevf/ixgbevf.h  |   12 ++
>  drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |   31 +++-
>  drivers/net/ethernet/intel/ixgbevf/mbx.c  |   12 ++
>  drivers/net/ethernet/intel/ixgbevf/vf.c   |  216 
> +
>  drivers/net/ethernet/intel/ixgbevf/vf.h   |2 +
>  5 files changed, 266 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h 
> b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
> index 5ac60ee..3296d27 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
> +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
> @@ -460,9 +460,13 @@ enum ixbgevf_state_t {
>
>  enum ixgbevf_boards {
> board_82599_vf,
> +   board_82599_vf_hv,
> board_X540_vf,
> +   board_X540_vf_hv,
> board_X550_vf,
> +   board_X550_vf_hv,
> board_X550EM_x_vf,
> +   board_X550EM_x_vf_hv,
>  };
>
>  enum ixgbevf_xcast_modes {
> @@ -477,6 +481,13 @@ extern const struct ixgbevf_info ixgbevf_X550_vf_info;
>  extern const struct ixgbevf_info ixgbevf_X550EM_x_vf_info;
>  extern const struct ixgbe_mbx_operations ixgbevf_mbx_ops;
>
> +
> +extern const struct ixgbevf_info ixgbevf_82599_vf_hv_info;
> +extern const struct ixgbevf_info ixgbevf_X540_vf_hv_info;
> +extern const struct ixgbevf_info ixgbevf_X550_vf_hv_info;
> +extern const struct ixgbevf_info ixgbevf_X550EM_x_vf_hv_info;
> +extern const struct ixgbe_mbx_operations ixgbevf_hv_mbx_ops;
> +
>  /* needed by ethtool.c */
>  extern const char ixgbevf_driver_name[];
>  extern const char ixgbevf_driver_version[];
> @@ -494,6 +505,7 @@ void ixgbevf_free_rx_resources(struct ixgbevf_ring *);
>  void ixgbevf_free_tx_resources(struct ixgbevf_ring *);
>  void ixgbevf_update_stats(struct ixgbevf_adapter *adapter);
>  int ethtool_ioctl(struct ifreq *ifr);
> +bool ixgbevf_on_hyperv(struct ixgbe_hw *hw);
>
>  extern void ixgbevf_write_eitr(struct ixgbevf_q_vector *q_vector);
>
> diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c 
> b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> index 007cbe0..c4bb480 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> @@ -62,10 +62,14 @@ static char ixgbevf_copyright[] =
> "Copyright (c) 2009 - 2015 Intel Corporation.";
>
>  static const struct ixgbevf_info *ixgbevf_info_tbl[] = {
> -   [board_82599_vf] = _82599_vf_info,
> -   [board_X540_vf]  = _X540_vf_info,
> -   [board_X550_vf]  = _X550_vf_info,
> -   [board_X550EM_x_vf] = _X550EM_x_vf_info,
> +   [board_82599_vf]= _82599_vf_info,
> +   [board_82599_vf_hv] = _82599_vf_hv_info,
> +   [board_X540_vf] = _X540_vf_info,
> +   [board_X540_vf_hv]  = _X540_vf_hv_info,
> +   [board_X550_vf] = _X550_vf_info,
> +   [board_X550_vf_hv]  = _X550_vf_hv_info,
> +   [board_X550EM_x_vf] = _X550EM_x_vf_info,
> +   [board_X550EM_x_vf_hv]  = _X550EM_x_vf_hv_info,
>  };
>
>  /* ixgbevf_pci_tbl - PCI Device ID Table
> @@ -78,9 +82,13 @@ static const struct ixgbevf_info *ixgbevf_info_tbl[] = {
>   */
>  static const struct pci_device_id ixgbevf_pci_tbl[] = {
> {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF), board_82599_vf },
> +   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF_HV), board_82599_vf_hv },
> {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF), board_X540_vf },
> +   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF_HV), board_X540_vf_hv },
> {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550_VF), board_X550_vf },
> +   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550_VF_HV), board_X550_vf_hv },
> {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_VF), board_X550EM_x_vf },
> +   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_VF_HV), 
> board_X550EM_x_vf_hv},
> /* required last entry */
> {0, }
>  };
> @@ -1795,7 +1803,10 @@ static void ixgbevf_configure_rx(struct 
> ixgbevf_adapter *adapter)
> ixgbevf_setup_vfmrqc(adapter);
>
> /* notify the PF of our intent to use this size of frame */
> -   ixgbevf_rlpml_set_vf(hw, netdev->mtu + ETH_HLEN + ETH_FCS_LEN);
> +   if (!ixgbevf_on_hyperv(hw))
> +   ixgbevf_rlpml_set_vf(hw, netdev->mtu + ETH_HLEN + 
> ETH_FCS_LEN);
> + 

Re: [PATCH net-next V4 2/2] intel: ixgbevf: Support Windows hosts (Hyper-V)

2016-04-19 Thread Alexander Duyck
On Tue, Apr 19, 2016 at 1:12 PM, K. Y. Srinivasan  wrote:
> On Hyper-V, the VF/PF communication is a via software mediated path
> as opposed to the hardware mailbox. Make the necessary
> adjustments to support Hyper-V.
>
> Signed-off-by: K. Y. Srinivasan 
> ---
> V2: Addressed most of the comments from
> Alexander Duyck 
> and Rustad, Mark D .
>
> V3: Addressed additional comments from
> Alexander Duyck 
>
> V4: Addressed kbuild errors reported by:
> kbuild test robot 
>
>
>  drivers/net/ethernet/intel/ixgbevf/ixgbevf.h  |   12 ++
>  drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |   31 +++-
>  drivers/net/ethernet/intel/ixgbevf/mbx.c  |   12 ++
>  drivers/net/ethernet/intel/ixgbevf/vf.c   |  216 
> +
>  drivers/net/ethernet/intel/ixgbevf/vf.h   |2 +
>  5 files changed, 266 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h 
> b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
> index 5ac60ee..3296d27 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
> +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
> @@ -460,9 +460,13 @@ enum ixbgevf_state_t {
>
>  enum ixgbevf_boards {
> board_82599_vf,
> +   board_82599_vf_hv,
> board_X540_vf,
> +   board_X540_vf_hv,
> board_X550_vf,
> +   board_X550_vf_hv,
> board_X550EM_x_vf,
> +   board_X550EM_x_vf_hv,
>  };
>
>  enum ixgbevf_xcast_modes {
> @@ -477,6 +481,13 @@ extern const struct ixgbevf_info ixgbevf_X550_vf_info;
>  extern const struct ixgbevf_info ixgbevf_X550EM_x_vf_info;
>  extern const struct ixgbe_mbx_operations ixgbevf_mbx_ops;
>
> +
> +extern const struct ixgbevf_info ixgbevf_82599_vf_hv_info;
> +extern const struct ixgbevf_info ixgbevf_X540_vf_hv_info;
> +extern const struct ixgbevf_info ixgbevf_X550_vf_hv_info;
> +extern const struct ixgbevf_info ixgbevf_X550EM_x_vf_hv_info;
> +extern const struct ixgbe_mbx_operations ixgbevf_hv_mbx_ops;
> +
>  /* needed by ethtool.c */
>  extern const char ixgbevf_driver_name[];
>  extern const char ixgbevf_driver_version[];
> @@ -494,6 +505,7 @@ void ixgbevf_free_rx_resources(struct ixgbevf_ring *);
>  void ixgbevf_free_tx_resources(struct ixgbevf_ring *);
>  void ixgbevf_update_stats(struct ixgbevf_adapter *adapter);
>  int ethtool_ioctl(struct ifreq *ifr);
> +bool ixgbevf_on_hyperv(struct ixgbe_hw *hw);
>
>  extern void ixgbevf_write_eitr(struct ixgbevf_q_vector *q_vector);
>
> diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c 
> b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> index 007cbe0..c4bb480 100644
> --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> @@ -62,10 +62,14 @@ static char ixgbevf_copyright[] =
> "Copyright (c) 2009 - 2015 Intel Corporation.";
>
>  static const struct ixgbevf_info *ixgbevf_info_tbl[] = {
> -   [board_82599_vf] = _82599_vf_info,
> -   [board_X540_vf]  = _X540_vf_info,
> -   [board_X550_vf]  = _X550_vf_info,
> -   [board_X550EM_x_vf] = _X550EM_x_vf_info,
> +   [board_82599_vf]= _82599_vf_info,
> +   [board_82599_vf_hv] = _82599_vf_hv_info,
> +   [board_X540_vf] = _X540_vf_info,
> +   [board_X540_vf_hv]  = _X540_vf_hv_info,
> +   [board_X550_vf] = _X550_vf_info,
> +   [board_X550_vf_hv]  = _X550_vf_hv_info,
> +   [board_X550EM_x_vf] = _X550EM_x_vf_info,
> +   [board_X550EM_x_vf_hv]  = _X550EM_x_vf_hv_info,
>  };
>
>  /* ixgbevf_pci_tbl - PCI Device ID Table
> @@ -78,9 +82,13 @@ static const struct ixgbevf_info *ixgbevf_info_tbl[] = {
>   */
>  static const struct pci_device_id ixgbevf_pci_tbl[] = {
> {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF), board_82599_vf },
> +   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF_HV), board_82599_vf_hv },
> {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF), board_X540_vf },
> +   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF_HV), board_X540_vf_hv },
> {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550_VF), board_X550_vf },
> +   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550_VF_HV), board_X550_vf_hv },
> {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_VF), board_X550EM_x_vf },
> +   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_VF_HV), 
> board_X550EM_x_vf_hv},
> /* required last entry */
> {0, }
>  };
> @@ -1795,7 +1803,10 @@ static void ixgbevf_configure_rx(struct 
> ixgbevf_adapter *adapter)
> ixgbevf_setup_vfmrqc(adapter);
>
> /* notify the PF of our intent to use this size of frame */
> -   ixgbevf_rlpml_set_vf(hw, netdev->mtu + ETH_HLEN + ETH_FCS_LEN);
> +   if (!ixgbevf_on_hyperv(hw))
> +   ixgbevf_rlpml_set_vf(hw, netdev->mtu + ETH_HLEN + 
> ETH_FCS_LEN);
> +   else
> +   ixgbevf_hv_rlpml_set_vf(hw, netdev->mtu + ETH_HLEN + 
> ETH_FCS_LEN);
>
> /* Setup the HW Rx Head 

[PATCH net-next V4 2/2] intel: ixgbevf: Support Windows hosts (Hyper-V)

2016-04-19 Thread K. Y. Srinivasan
On Hyper-V, the VF/PF communication is a via software mediated path
as opposed to the hardware mailbox. Make the necessary
adjustments to support Hyper-V.

Signed-off-by: K. Y. Srinivasan 
---
V2: Addressed most of the comments from
Alexander Duyck 
and Rustad, Mark D .

V3: Addressed additional comments from
Alexander Duyck 

V4: Addressed kbuild errors reported by:
kbuild test robot 


 drivers/net/ethernet/intel/ixgbevf/ixgbevf.h  |   12 ++
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |   31 +++-
 drivers/net/ethernet/intel/ixgbevf/mbx.c  |   12 ++
 drivers/net/ethernet/intel/ixgbevf/vf.c   |  216 +
 drivers/net/ethernet/intel/ixgbevf/vf.h   |2 +
 5 files changed, 266 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h 
b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
index 5ac60ee..3296d27 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
@@ -460,9 +460,13 @@ enum ixbgevf_state_t {
 
 enum ixgbevf_boards {
board_82599_vf,
+   board_82599_vf_hv,
board_X540_vf,
+   board_X540_vf_hv,
board_X550_vf,
+   board_X550_vf_hv,
board_X550EM_x_vf,
+   board_X550EM_x_vf_hv,
 };
 
 enum ixgbevf_xcast_modes {
@@ -477,6 +481,13 @@ extern const struct ixgbevf_info ixgbevf_X550_vf_info;
 extern const struct ixgbevf_info ixgbevf_X550EM_x_vf_info;
 extern const struct ixgbe_mbx_operations ixgbevf_mbx_ops;
 
+
+extern const struct ixgbevf_info ixgbevf_82599_vf_hv_info;
+extern const struct ixgbevf_info ixgbevf_X540_vf_hv_info;
+extern const struct ixgbevf_info ixgbevf_X550_vf_hv_info;
+extern const struct ixgbevf_info ixgbevf_X550EM_x_vf_hv_info;
+extern const struct ixgbe_mbx_operations ixgbevf_hv_mbx_ops;
+
 /* needed by ethtool.c */
 extern const char ixgbevf_driver_name[];
 extern const char ixgbevf_driver_version[];
@@ -494,6 +505,7 @@ void ixgbevf_free_rx_resources(struct ixgbevf_ring *);
 void ixgbevf_free_tx_resources(struct ixgbevf_ring *);
 void ixgbevf_update_stats(struct ixgbevf_adapter *adapter);
 int ethtool_ioctl(struct ifreq *ifr);
+bool ixgbevf_on_hyperv(struct ixgbe_hw *hw);
 
 extern void ixgbevf_write_eitr(struct ixgbevf_q_vector *q_vector);
 
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c 
b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 007cbe0..c4bb480 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -62,10 +62,14 @@ static char ixgbevf_copyright[] =
"Copyright (c) 2009 - 2015 Intel Corporation.";
 
 static const struct ixgbevf_info *ixgbevf_info_tbl[] = {
-   [board_82599_vf] = _82599_vf_info,
-   [board_X540_vf]  = _X540_vf_info,
-   [board_X550_vf]  = _X550_vf_info,
-   [board_X550EM_x_vf] = _X550EM_x_vf_info,
+   [board_82599_vf]= _82599_vf_info,
+   [board_82599_vf_hv] = _82599_vf_hv_info,
+   [board_X540_vf] = _X540_vf_info,
+   [board_X540_vf_hv]  = _X540_vf_hv_info,
+   [board_X550_vf] = _X550_vf_info,
+   [board_X550_vf_hv]  = _X550_vf_hv_info,
+   [board_X550EM_x_vf] = _X550EM_x_vf_info,
+   [board_X550EM_x_vf_hv]  = _X550EM_x_vf_hv_info,
 };
 
 /* ixgbevf_pci_tbl - PCI Device ID Table
@@ -78,9 +82,13 @@ static const struct ixgbevf_info *ixgbevf_info_tbl[] = {
  */
 static const struct pci_device_id ixgbevf_pci_tbl[] = {
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF), board_82599_vf },
+   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF_HV), board_82599_vf_hv },
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF), board_X540_vf },
+   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF_HV), board_X540_vf_hv },
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550_VF), board_X550_vf },
+   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550_VF_HV), board_X550_vf_hv },
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_VF), board_X550EM_x_vf },
+   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_VF_HV), board_X550EM_x_vf_hv},
/* required last entry */
{0, }
 };
@@ -1795,7 +1803,10 @@ static void ixgbevf_configure_rx(struct ixgbevf_adapter 
*adapter)
ixgbevf_setup_vfmrqc(adapter);
 
/* notify the PF of our intent to use this size of frame */
-   ixgbevf_rlpml_set_vf(hw, netdev->mtu + ETH_HLEN + ETH_FCS_LEN);
+   if (!ixgbevf_on_hyperv(hw))
+   ixgbevf_rlpml_set_vf(hw, netdev->mtu + ETH_HLEN + ETH_FCS_LEN);
+   else
+   ixgbevf_hv_rlpml_set_vf(hw, netdev->mtu + ETH_HLEN + 
ETH_FCS_LEN);
 
/* Setup the HW Rx Head and Tail Descriptor Pointers and
 * the Base and Length of the Rx Descriptor Ring
@@ -2056,7 +2067,10 @@ static void ixgbevf_negotiate_api(struct 

[PATCH net-next V4 2/2] intel: ixgbevf: Support Windows hosts (Hyper-V)

2016-04-19 Thread K. Y. Srinivasan
On Hyper-V, the VF/PF communication is a via software mediated path
as opposed to the hardware mailbox. Make the necessary
adjustments to support Hyper-V.

Signed-off-by: K. Y. Srinivasan 
---
V2: Addressed most of the comments from
Alexander Duyck 
and Rustad, Mark D .

V3: Addressed additional comments from
Alexander Duyck 

V4: Addressed kbuild errors reported by:
kbuild test robot 


 drivers/net/ethernet/intel/ixgbevf/ixgbevf.h  |   12 ++
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |   31 +++-
 drivers/net/ethernet/intel/ixgbevf/mbx.c  |   12 ++
 drivers/net/ethernet/intel/ixgbevf/vf.c   |  216 +
 drivers/net/ethernet/intel/ixgbevf/vf.h   |2 +
 5 files changed, 266 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h 
b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
index 5ac60ee..3296d27 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
@@ -460,9 +460,13 @@ enum ixbgevf_state_t {
 
 enum ixgbevf_boards {
board_82599_vf,
+   board_82599_vf_hv,
board_X540_vf,
+   board_X540_vf_hv,
board_X550_vf,
+   board_X550_vf_hv,
board_X550EM_x_vf,
+   board_X550EM_x_vf_hv,
 };
 
 enum ixgbevf_xcast_modes {
@@ -477,6 +481,13 @@ extern const struct ixgbevf_info ixgbevf_X550_vf_info;
 extern const struct ixgbevf_info ixgbevf_X550EM_x_vf_info;
 extern const struct ixgbe_mbx_operations ixgbevf_mbx_ops;
 
+
+extern const struct ixgbevf_info ixgbevf_82599_vf_hv_info;
+extern const struct ixgbevf_info ixgbevf_X540_vf_hv_info;
+extern const struct ixgbevf_info ixgbevf_X550_vf_hv_info;
+extern const struct ixgbevf_info ixgbevf_X550EM_x_vf_hv_info;
+extern const struct ixgbe_mbx_operations ixgbevf_hv_mbx_ops;
+
 /* needed by ethtool.c */
 extern const char ixgbevf_driver_name[];
 extern const char ixgbevf_driver_version[];
@@ -494,6 +505,7 @@ void ixgbevf_free_rx_resources(struct ixgbevf_ring *);
 void ixgbevf_free_tx_resources(struct ixgbevf_ring *);
 void ixgbevf_update_stats(struct ixgbevf_adapter *adapter);
 int ethtool_ioctl(struct ifreq *ifr);
+bool ixgbevf_on_hyperv(struct ixgbe_hw *hw);
 
 extern void ixgbevf_write_eitr(struct ixgbevf_q_vector *q_vector);
 
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c 
b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 007cbe0..c4bb480 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -62,10 +62,14 @@ static char ixgbevf_copyright[] =
"Copyright (c) 2009 - 2015 Intel Corporation.";
 
 static const struct ixgbevf_info *ixgbevf_info_tbl[] = {
-   [board_82599_vf] = _82599_vf_info,
-   [board_X540_vf]  = _X540_vf_info,
-   [board_X550_vf]  = _X550_vf_info,
-   [board_X550EM_x_vf] = _X550EM_x_vf_info,
+   [board_82599_vf]= _82599_vf_info,
+   [board_82599_vf_hv] = _82599_vf_hv_info,
+   [board_X540_vf] = _X540_vf_info,
+   [board_X540_vf_hv]  = _X540_vf_hv_info,
+   [board_X550_vf] = _X550_vf_info,
+   [board_X550_vf_hv]  = _X550_vf_hv_info,
+   [board_X550EM_x_vf] = _X550EM_x_vf_info,
+   [board_X550EM_x_vf_hv]  = _X550EM_x_vf_hv_info,
 };
 
 /* ixgbevf_pci_tbl - PCI Device ID Table
@@ -78,9 +82,13 @@ static const struct ixgbevf_info *ixgbevf_info_tbl[] = {
  */
 static const struct pci_device_id ixgbevf_pci_tbl[] = {
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF), board_82599_vf },
+   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF_HV), board_82599_vf_hv },
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF), board_X540_vf },
+   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF_HV), board_X540_vf_hv },
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550_VF), board_X550_vf },
+   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550_VF_HV), board_X550_vf_hv },
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_VF), board_X550EM_x_vf },
+   {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X550EM_X_VF_HV), board_X550EM_x_vf_hv},
/* required last entry */
{0, }
 };
@@ -1795,7 +1803,10 @@ static void ixgbevf_configure_rx(struct ixgbevf_adapter 
*adapter)
ixgbevf_setup_vfmrqc(adapter);
 
/* notify the PF of our intent to use this size of frame */
-   ixgbevf_rlpml_set_vf(hw, netdev->mtu + ETH_HLEN + ETH_FCS_LEN);
+   if (!ixgbevf_on_hyperv(hw))
+   ixgbevf_rlpml_set_vf(hw, netdev->mtu + ETH_HLEN + ETH_FCS_LEN);
+   else
+   ixgbevf_hv_rlpml_set_vf(hw, netdev->mtu + ETH_HLEN + 
ETH_FCS_LEN);
 
/* Setup the HW Rx Head and Tail Descriptor Pointers and
 * the Base and Length of the Rx Descriptor Ring
@@ -2056,7 +2067,10 @@ static void ixgbevf_negotiate_api(struct ixgbevf_adapter 
*adapter)
spin_lock_bh(>mbx_lock);
 
while (api[idx] != ixgbe_mbox_api_unknown) {
-