Hi, Paolo, On Sat, Jul 4, 2020 at 3:12 AM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: > > KVM has an interrupt MSR that is currently used for asynchronous page faults. It can be extended to general upcalls if useful. > > Paolo > Thanks! Are you talking about this MSR: MSR_KVM_ASYNC_PF_EN? I look at the document in the Documentation/virtual/kvm/msr.txt file and see this: MSR_KVM_ASYNC_PF_EN: 0x4b564d02 data: Bits 63-6 hold 64-byte aligned physical address of a 64 byte memory area which must be in guest RAM and must be zeroed....First 4 byte of 64 byte memory location will be written to by the hypervisor at the time of asynchronous page fault (APF) injection to indicate type of asynchronous page fault. Value of 1 means that the page referred to by the page fault is not present. Value 2 means that the page is now available. When you say "it can be extended to general upcalls", do you mean we use a value higher than 2 to represent a different reason, and the guest will take an action according to that value? Should the return value of the upcall be written in the 64-byte memory space, or how does the hypervisor know the return value of the upcall? -Jidong > Il sab 4 lug 2020, 11:09 Jidong Xiao <jidong.xiao@xxxxxxxxx> ha scritto: >> >> Hi, Paolo and all, >> >> Do KVM support upcalls, which enable the hypervisor to make requests >> to the guest? Or if I want to add one more upcall by myself, which >> part of the KVM code should I examine? I know Xen has implemented >> upcalls, but I can't find any documents about upcalls in KVM. >> >> Thank you! >> >> -Jidong >>