/* For Td guest TDVMCALL_IO is invoked to write I/O port. */
UINT16 EFIAPI IoWrite16(IN UINTN Port, IN UINT16 Value)
/* For Td guest TDVMCALL_IO is invoked to write I/O port. */
UINT16 EFIAPI IoWrite16(IN UINTN Port, IN UINT16 Value)
{
  BOOLEAN  Flag;
  ASSERT ((Port & 1) == 0);
  Flag = FilterBeforeIoWrite (FilterWidth16, Port, &Value);
  if (Flag) {
    if (IsTdxGuest ()) {
      TdIoWrite16 (Port, Value);
    } else {
      _ReadWriteBarrier ();
      _outpw ((UINT16)Port, Value);
      _ReadWriteBarrier ();
    }
  }
  FilterAfterIoWrite (FilterWidth16, Port, &Value);
  return Value;
}