---
name: "libnvme_write_reg64-libnvme3"
section: "2"
platform: "linux"
package: "nvme-cli"
version: "3.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libnvme_write_reg64-libnvme3"
---

# libnvme\_write\_reg64-libnvme3(2)

Write a 64-bit controller register of a PCIe controller

## NAME

libnvme\_write\_reg64 - Write a 64-bit controller register of a PCIe controller

## SYNOPSIS

**int libnvme\_write\_reg64** **(struct libnvme\_transport\_handle \*hdl** *,* **\_\_u32 offset** *,* **\_\_u64 value** *,* **bool mmio32** *);*

## ARGUMENTS

- hdl

  Transport handle

- offset

  Offset of the register in bytes

- value

  Value to write

- mmio32

  Write the register as two 32-bit values, low half first. Some devices do not support 64-bit MMIO.

## DESCRIPTION

*offset* must be a multiple of 8. This should only be sent to controller handles, not to namespaces.

## RETURN

0 on success or a negative error code otherwise. -ENOTSUP indicates that the transport has no memory-mapped registers.
