@@ -5343,9 +5343,9 @@ KVM_XEN_ATTR_TYPE_SHARED_INFO
53435343 32 vCPUs in the shared_info page, KVM does not automatically do so
53445344 and instead requires that KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO be used
53455345 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.
53495349
53505350 Note that the shared info page may be constantly written to by KVM;
53515351 it contains the event channel bitmap used to deliver interrupts to
@@ -5356,23 +5356,29 @@ KVM_XEN_ATTR_TYPE_SHARED_INFO
53565356 any vCPU has been running or any event channel interrupts can be
53575357 routed to the guest.
53585358
5359+ Setting the gfn to KVM_XEN_INVALID_GFN will disable the shared info
5360+ page.
5361+
53595362KVM_XEN_ATTR_TYPE_UPCALL_VECTOR
53605363 Sets the exception vector used to deliver Xen event channel upcalls.
53615364 This is the HVM-wide vector injected directly by the hypervisor
53625365 (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.
53645368
53655369KVM_XEN_ATTR_TYPE_EVTCHN
53665370 This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates
53675371 support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It configures
53685372 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.
53765382
53775383KVM_XEN_ATTR_TYPE_XEN_VERSION
53785384 This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates
@@ -5388,7 +5394,7 @@ KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG
53885394 support for KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG. It enables the
53895395 XEN_RUNSTATE_UPDATE flag which allows guest vCPUs to safely read
53905396 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
53925398 hypercall.
53935399
539454004.127 KVM_XEN_HVM_GET_ATTR
@@ -5446,15 +5452,18 @@ KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO
54465452 As with the shared_info page for the VM, the corresponding page may be
54475453 dirtied at any time if event channel interrupt delivery is enabled, so
54485454 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.
54505457
54515458KVM_XEN_VCPU_ATTR_TYPE_VCPU_TIME_INFO
54525459 Sets the guest physical address of an additional pvclock structure
54535460 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.
54545462
54555463KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR
54565464 Sets the guest physical address of the vcpu_runstate_info for a given
54575465 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.
54585467
54595468KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_CURRENT
54605469 Sets the runstate (RUNSTATE_running/_runnable/_blocked/_offline) of
@@ -5487,15 +5496,17 @@ KVM_XEN_VCPU_ATTR_TYPE_TIMER
54875496 This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates
54885497 support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It sets the
54895498 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.
54915501
54925502KVM_XEN_VCPU_ATTR_TYPE_UPCALL_VECTOR
54935503 This attribute is available when the KVM_CAP_XEN_HVM ioctl indicates
54945504 support for KVM_XEN_HVM_CONFIG_EVTCHN_SEND features. It sets the
54955505 per-vCPU local APIC upcall vector, configured by a Xen guest with
54965506 the HVMOP_set_evtchn_upcall_vector hypercall. This is typically
54975507 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.
54995510
55005511
550155124.129 KVM_XEN_VCPU_GET_ATTR
@@ -6577,11 +6588,6 @@ Please note that the kernel is allowed to use the kvm_run structure as the
65776588primary storage for certain register types. Therefore, the kernel may use the
65786589values in kvm_run even if the corresponding bit in kvm_dirty_regs is not set.
65796590
6580- ::
6581-
6582- };
6583-
6584-
65856591
658665926. Capabilities that can be enabled on vCPUs
65876593============================================
0 commit comments