Commit ece32a75 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

Merge tag 'kvmarm-fixes-5.17-4' of...

Merge tag 'kvmarm-fixes-5.17-4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD

KVM/arm64 fixes for 5.17, take #4

- Correctly synchronise PMR and co on PSCI CPU_SUSPEND

- Skip tests that depend on GICv3 when the HW isn't available
parents 1a715810 456f89e0
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -46,8 +46,7 @@ static unsigned long kvm_psci_vcpu_suspend(struct kvm_vcpu *vcpu)
	 * specification (ARM DEN 0022A). This means all suspend states
	 * for KVM will preserve the register state.
	 */
	kvm_vcpu_halt(vcpu);
	kvm_clear_request(KVM_REQ_UNHALT, vcpu);
	kvm_vcpu_wfi(vcpu);

	return PSCI_RET_SUCCESS;
}
+6 −1
Original line number Diff line number Diff line
@@ -366,6 +366,7 @@ static struct kvm_vm *test_vm_create(void)
{
	struct kvm_vm *vm;
	unsigned int i;
	int ret;
	int nr_vcpus = test_args.nr_vcpus;

	vm = vm_create_default_with_vcpus(nr_vcpus, 0, 0, guest_code, NULL);
@@ -382,7 +383,11 @@ static struct kvm_vm *test_vm_create(void)

	ucall_init(vm, NULL);
	test_init_timer_irq(vm);
	vgic_v3_setup(vm, nr_vcpus, 64, GICD_BASE_GPA, GICR_BASE_GPA);
	ret = vgic_v3_setup(vm, nr_vcpus, 64, GICD_BASE_GPA, GICR_BASE_GPA);
	if (ret < 0) {
		print_skip("Failed to create vgic-v3");
		exit(KSFT_SKIP);
	}

	/* Make all the test's cmdline args visible to the guest */
	sync_global_to_guest(vm, test_args);
+4 −0
Original line number Diff line number Diff line
@@ -761,6 +761,10 @@ static void test_vgic(uint32_t nr_irqs, bool level_sensitive, bool eoi_split)

	gic_fd = vgic_v3_setup(vm, 1, nr_irqs,
			GICD_BASE_GPA, GICR_BASE_GPA);
	if (gic_fd < 0) {
		print_skip("Failed to create vgic-v3, skipping");
		exit(KSFT_SKIP);
	}

	vm_install_exception_handler(vm, VECTOR_IRQ_CURRENT,
		guest_irq_handlers[args.eoi_split][args.level_sensitive]);
+3 −1
Original line number Diff line number Diff line
@@ -52,7 +52,9 @@ int vgic_v3_setup(struct kvm_vm *vm, unsigned int nr_vcpus, uint32_t nr_irqs,
			nr_vcpus, nr_vcpus_created);

	/* Distributor setup */
	gic_fd = kvm_create_device(vm, KVM_DEV_TYPE_ARM_VGIC_V3, false);
	if (_kvm_create_device(vm, KVM_DEV_TYPE_ARM_VGIC_V3,
			       false, &gic_fd) != 0)
		return -1;

	kvm_device_access(gic_fd, KVM_DEV_ARM_VGIC_GRP_NR_IRQS,
			0, &nr_irqs, true);