Skip to content

Commit e767793

Browse files
committed
KVM: Document KVM_GET_LAPIC, KVM_SET_LAPIC ioctl
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
1 parent 4dd1b49 commit e767793

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

‎Documentation/virtual/kvm/api.txt‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,6 +1291,38 @@ Returns the tsc frequency of the guest. The unit of the return value is
12911291
KHz. If the host has unstable tsc this ioctl returns -EIO instead as an
12921292
error.
12931293

1294+
4.56 KVM_GET_LAPIC
1295+
1296+
Capability: KVM_CAP_IRQCHIP
1297+
Architectures: x86
1298+
Type: vcpu ioctl
1299+
Parameters: struct kvm_lapic_state (out)
1300+
Returns: 0 on success, -1 on error
1301+
1302+
#define KVM_APIC_REG_SIZE 0x400
1303+
struct kvm_lapic_state {
1304+
char regs[KVM_APIC_REG_SIZE];
1305+
};
1306+
1307+
Reads the Local APIC registers and copies them into the input argument. The
1308+
data format and layout are the same as documented in the architecture manual.
1309+
1310+
4.57 KVM_SET_LAPIC
1311+
1312+
Capability: KVM_CAP_IRQCHIP
1313+
Architectures: x86
1314+
Type: vcpu ioctl
1315+
Parameters: struct kvm_lapic_state (in)
1316+
Returns: 0 on success, -1 on error
1317+
1318+
#define KVM_APIC_REG_SIZE 0x400
1319+
struct kvm_lapic_state {
1320+
char regs[KVM_APIC_REG_SIZE];
1321+
};
1322+
1323+
Copies the input argument into the the Local APIC registers. The data format
1324+
and layout are the same as documented in the architecture manual.
1325+
12941326
5. The kvm_run structure
12951327

12961328
Application code obtains a pointer to the kvm_run structure by

0 commit comments

Comments
 (0)