Re: [PULL 55/63] kvm: handle KVM_EXIT_MEMORY_FAULT

2024-04-30 Thread Paolo Bonzini
On Fri, Apr 26, 2024 at 3:40 PM Peter Maydell wrote: > > +addr = memory_region_get_ram_ptr(mr) + section.offset_within_region; > > +rb = qemu_ram_block_from_host(addr, false, ); > > ...and this call to qemu_ram_block_from_host() will only initialize > offset if it does not fail (i.e.

Re: [PULL 55/63] kvm: handle KVM_EXIT_MEMORY_FAULT

2024-04-26 Thread Peter Maydell
On Tue, 23 Apr 2024 at 16:16, Paolo Bonzini wrote: > > From: Chao Peng > > Upon an KVM_EXIT_MEMORY_FAULT exit, userspace needs to do the memory > conversion on the RAMBlock to turn the memory into desired attribute, > switching between private and shared. > > Currently only

[PULL 55/63] kvm: handle KVM_EXIT_MEMORY_FAULT

2024-04-23 Thread Paolo Bonzini
From: Chao Peng Upon an KVM_EXIT_MEMORY_FAULT exit, userspace needs to do the memory conversion on the RAMBlock to turn the memory into desired attribute, switching between private and shared. Currently only KVM_MEMORY_EXIT_FLAG_PRIVATE in flags is valid when KVM_EXIT_MEMORY_FAULT happens.