On 04/07/20 11:53, Jidong Xiao wrote: > > I look at the document in the Documentation/virtual/kvm/msr.txt file > and see this: There is also MSR_KVM_ASYNC_PF_INT. You could add another field after "token", which would be the reason of the upcall (0 would be the "page ready notification" that is already in place). Paolo > 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?