@@ -5343,9 +5343,9 @@ KVM_XEN_ATTR_TYPE_SHARED_INFO
5343
5343
32 vCPUs in the shared_info page, KVM does not automatically do so
5344
5344
and instead requires that KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO be used
5345
5345
explicitly even when the vcpu_info for a given vCPU resides at the
5346
- "default" location in the shared_info page. This is because KVM is
5347
- not aware of the Xen CPU id which is used as the index into the
5348
- vcpu_info[] array, so cannot know the correct default location.
5346
+ "default" location in the shared_info page. This is because KVM may
5347
+ not be aware of the Xen CPU id which is used as the index into the
5348
+ vcpu_info[] array, so may know the correct default location.
5349
5349
5350
5350
Note that the shared info page may be constantly written to by KVM;
5351
5351
it contains the event channel bitmap used to deliver interrupts to
@@ -5356,23 +5356,29 @@ KVM_XEN_ATTR_TYPE_SHARED_INFO
5356
5356
any vCPU has been running or any event channel interrupts can be
5357
5357
routed to the guest.
5358
5358
5359
+ Setting the gfn to KVM_XEN_INVALID_GFN will disable the shared info
5360
+ page.
5361
+
5359
5362
KVM_XEN_ATTR_TYPE_UPCALL_VECTOR
5360
5363
Sets the exception vector used to deliver Xen event channel upcalls.
5361
5364
This is the HVM-wide vector injected directly by the hypervisor
5362
5365
(not through the local APIC), typically configured by a guest via
5363
- HVM_PARAM_CALLBACK_IRQ.
5366
+ HVM_PARAM_CALLBACK_IRQ. This can be disabled again (e.g. for guest
5367
+ SHUTDOWN_soft_reset) by setting it to zero.
5364
5368
5365
5369
KVM_XEN_ATTR_TYPE_EVTCHN
5366
5370
This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates
5367
5371
support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It configures
5368
5372
an outbound port number for interception of EVTCHNOP_send requests
5369
- from the guest. A given sending port number may be directed back
5370
- to a specified vCPU (by APIC ID) / port / priority on the guest,
5371
- or to trigger events on an eventfd. The vCPU and priority can be
5372
- changed by setting KVM_XEN_EVTCHN_UPDATE in a subsequent call,
5373
- but other fields cannot change for a given sending port. A port
5374
- mapping is removed by using KVM_XEN_EVTCHN_DEASSIGN in the flags
5375
- field.
5373
+ from the guest. A given sending port number may be directed back to
5374
+ a specified vCPU (by APIC ID) / port / priority on the guest, or to
5375
+ trigger events on an eventfd. The vCPU and priority can be changed
5376
+ by setting KVM_XEN_EVTCHN_UPDATE in a subsequent call, but but other
5377
+ fields cannot change for a given sending port. A port mapping is
5378
+ removed by using KVM_XEN_EVTCHN_DEASSIGN in the flags field. Passing
5379
+ KVM_XEN_EVTCHN_RESET in the flags field removes all interception of
5380
+ outbound event channels. The values of the flags field are mutually
5381
+ exclusive and cannot be combined as a bitmask.
5376
5382
5377
5383
KVM_XEN_ATTR_TYPE_XEN_VERSION
5378
5384
This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates
@@ -5388,7 +5394,7 @@ KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG
5388
5394
support for KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG. It enables the
5389
5395
XEN_RUNSTATE_UPDATE flag which allows guest vCPUs to safely read
5390
5396
other vCPUs' vcpu_runstate_info. Xen guests enable this feature via
5391
- the VM_ASST_TYPE_runstate_update_flag of the HYPERVISOR_vm_assist
5397
+ the VMASST_TYPE_runstate_update_flag of the HYPERVISOR_vm_assist
5392
5398
hypercall.
5393
5399
5394
5400
4.127 KVM_XEN_HVM_GET_ATTR
@@ -5446,15 +5452,18 @@ KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO
5446
5452
As with the shared_info page for the VM, the corresponding page may be
5447
5453
dirtied at any time if event channel interrupt delivery is enabled, so
5448
5454
userspace should always assume that the page is dirty without relying
5449
- on dirty logging.
5455
+ on dirty logging. Setting the gpa to KVM_XEN_INVALID_GPA will disable
5456
+ the vcpu_info.
5450
5457
5451
5458
KVM_XEN_VCPU_ATTR_TYPE_VCPU_TIME_INFO
5452
5459
Sets the guest physical address of an additional pvclock structure
5453
5460
for a given vCPU. This is typically used for guest vsyscall support.
5461
+ Setting the gpa to KVM_XEN_INVALID_GPA will disable the structure.
5454
5462
5455
5463
KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR
5456
5464
Sets the guest physical address of the vcpu_runstate_info for a given
5457
5465
vCPU. This is how a Xen guest tracks CPU state such as steal time.
5466
+ Setting the gpa to KVM_XEN_INVALID_GPA will disable the runstate area.
5458
5467
5459
5468
KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_CURRENT
5460
5469
Sets the runstate (RUNSTATE_running/_runnable/_blocked/_offline) of
@@ -5487,15 +5496,17 @@ KVM_XEN_VCPU_ATTR_TYPE_TIMER
5487
5496
This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates
5488
5497
support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It sets the
5489
5498
event channel port/priority for the VIRQ_TIMER of the vCPU, as well
5490
- as allowing a pending timer to be saved/restored.
5499
+ as allowing a pending timer to be saved/restored. Setting the timer
5500
+ port to zero disables kernel handling of the singleshot timer.
5491
5501
5492
5502
KVM_XEN_VCPU_ATTR_TYPE_UPCALL_VECTOR
5493
5503
This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates
5494
5504
support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It sets the
5495
5505
per-vCPU local APIC upcall vector, configured by a Xen guest with
5496
5506
the HVMOP_set_evtchn_upcall_vector hypercall. This is typically
5497
5507
used by Windows guests, and is distinct from the HVM-wide upcall
5498
- vector configured with HVM_PARAM_CALLBACK_IRQ.
5508
+ vector configured with HVM_PARAM_CALLBACK_IRQ. It is disabled by
5509
+ setting the vector to zero.
5499
5510
5500
5511
5501
5512
4.129 KVM_XEN_VCPU_GET_ATTR
0 commit comments