# zx::vcpu

## Summary

### Inheritance

Inherits from: [zx::object\< vcpu \>](https://fuchsia.dev/reference/cpp/class/zx/object)

| ### Constructors and Destructors ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu_1aafd81ca4cc6df0c82c4647e97115605e()` ||
| `https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu_1a02ec7475a6299feddb3bd771aeab72c0(zx_handle_t value)` ||
| `https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu_1a8b098d53d7398357cfb0dc16ade68f7d(https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object && h)` ||
| `https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu_1a96adb20d9a94c19cc2d85c04f0a3736f(https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu && other)` ||

| ### Public static attributes ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu_1a75b5dd40109ee9b5fcfe82d290ce607b = ZX_OBJ_TYPE_VCPU` | `constexpr zx_obj_type_t` |

| ### Public functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu_1a864887172bd70f0445ad1269c18d66a0(https://fuchsia.dev/reference/cpp/struct/zx-port-packet#structzx__port__packet *packet)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu_1a5afa6346570575913ba3f791f2aa45e3(uint32_t interrupt)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu_1ae9b7e6bcf17a6ab43215d06663186be9()` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu_1a6ad0a3514a4aea3459601c35d4b8b517(https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu && other)` | `https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu &` |
| `https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu_1a85d29e620e723d794fba215c1eef48ff(uint32_t kind, void *buf, size_t len)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu_1a539e47f7ff664385081e40eb2761b89f(uint32_t kind, const void *buf, size_t len)` | `zx_status_t` |

| ### Public static functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu_1a894ee454167a96675acf88e098a7e8d3(const https://fuchsia.dev/reference/cpp/class/zx/guest#classzx_1_1guest & guest, uint32_t options, zx_gpaddr_t entry, https://fuchsia.dev/reference/cpp/class/zx/vcpu#classzx_1_1vcpu *result)` | `zx_status_t` |

## Public static attributes

### TYPE

```c++
constexpr zx_obj_type_t TYPE = ZX_OBJ_TYPE_VCPU
```

## Public functions

### enter

```c++
zx_status_t enter(
  zx_port_packet_t *packet
)
```

### interrupt

```c++
zx_status_t interrupt(
  uint32_t interrupt
)
```

### kick

```c++
zx_status_t kick()
```

### operator=

```c++
vcpu & operator=(
  vcpu && other
)
```

### read_state

```c++
zx_status_t read_state(
  uint32_t kind,
  void *buf,
  size_t len
)
```

### vcpu

```c++
constexpr vcpu()=default
```

### vcpu

```c++
 vcpu(
  zx_handle_t value
)
```

### vcpu

```c++
 vcpu(
  handle && h
)
```

### vcpu

```c++
 vcpu(
  vcpu && other
)
```

### write_state

```c++
zx_status_t write_state(
  uint32_t kind,
  const void *buf,
  size_t len
)
```

## Public static functions

### create

```c++
zx_status_t create(
  const guest & guest,
  uint32_t options,
  zx_gpaddr_t entry,
  vcpu *result
)
```