Re: [PATCH v1 1/5] KVM: arm64: Enable ring-based dirty memory tracking

2022-08-29 Thread Paolo Bonzini
Il ven 26 ago 2022, 17:50 Marc Zyngier ha scritto: > userspace has no choice. It cannot order on its own the reads that the > kernel will do to *other* rings. > > The problem isn't on CPU0 The problem is that CPU1 does observe > inconsistent data on arm64, and I don't think this difference in >

Re: [PATCH v5 3/7] KVM: selftests: Automatically do init_ucall() for non-barebones VMs

2022-08-29 Thread Andrew Jones
On Thu, Aug 25, 2022 at 11:25:18PM +, Sean Christopherson wrote: > Do init_ucall() automatically during VM creation to kill two (three?) > birds with one stone. > > First, initializing ucall immediately after VM creations allows forcing > aarch64's MMIO ucall address to immediately follow

Re: [PATCH v5 07/13] KVM: selftests: Change ____vm_create() to take struct kvm_vm_mem_params

2022-08-29 Thread Andrew Jones
On Tue, Aug 23, 2022 at 11:47:21PM +, Ricardo Koller wrote: > The vm_create() helpers are hardcoded to place most page types (code, > page-tables, stacks, etc) in the same memslot #0, and always backed with > anonymous 4K. There are a couple of issues with that. First, tests willing > to >

Re: [PATCH v5 7/7] KVM: selftests: Add ucall pool based implementation

2022-08-29 Thread Andrew Jones
On Thu, Aug 25, 2022 at 11:25:22PM +, Sean Christopherson wrote: > From: Peter Gonda > > To play nice with guests whose stack memory is encrypted, e.g. AMD SEV, > introduce a new "ucall pool" implementation that passes the ucall struct > via dedicated memory (which can be mapped shared,

Re: [PATCH v5 5/7] KVM: selftests: Make arm64's MMIO ucall multi-VM friendly

2022-08-29 Thread Andrew Jones
On Thu, Aug 25, 2022 at 11:25:20PM +, Sean Christopherson wrote: > Fix a mostly-theoretical bug where ARM's ucall MMIO setup could result in > different VMs stomping on each other by cloberring the global pointer. > > Fix the most obvious issue by saving the MMIO gpa into the VM. > > A more

Re: [PATCH v5 6/7] KVM: selftest: Drop now-unnecessary ucall_uninit()

2022-08-29 Thread Andrew Jones
On Thu, Aug 25, 2022 at 11:25:21PM +, Sean Christopherson wrote: > Drop ucall_uninit() and ucall_arch_uninit() now that ARM doesn't modify > the host's copy of ucall_exit_mmio_addr, i.e. now that there's no need to > reset the pointer before potentially creating a new VM. The few calls to >

Re: [PATCH v5 08/13] KVM: selftests: Use the right memslot for code, page-tables, and data allocations

2022-08-29 Thread Andrew Jones
On Tue, Aug 23, 2022 at 11:47:22PM +, Ricardo Koller wrote: > The previous commit added support for callers of vm_create() to specify > what memslots to use for code, page-tables, and data allocations. Change > them accordingly: > > - stacks, code, and exception tables use the code