lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53DF81C3.7050302@redhat.com>
Date:	Mon, 04 Aug 2014 14:51:15 +0200
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Wanpeng Li <wanpeng.li@...ux.intel.com>,
	Jan Kiszka <jan.kiszka@...mens.com>
CC:	Marcelo Tosatti <mtosatti@...hat.com>,
	Gleb Natapov <gleb@...nel.org>, Bandan Das <bsd@...hat.com>,
	Zhang Yang <yang.z.zhang@...el.com>, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] KVM: nVMX: fix acknowledge interrupt on exit when
 APICv is in use

Il 01/08/2014 10:12, Wanpeng Li ha scritto:
> +int kvm_lapic_ack_apicv(struct kvm_vcpu *vcpu)
> +{
> +	struct kvm_lapic *apic = vcpu->arch.apic;
> +	int vec;
> +
> +	vec = kvm_apic_has_interrupt(vcpu);
> +
> +	if (vec == -1)
> +		return vec;
> +
> +	apic_set_vector(vec, apic->regs + APIC_ISR);
> +	apic_update_ppr(apic);
> +	apic_clear_vector(vec, apic->regs + APIC_IRR);
> +
> +	return vec;
> +}
> +EXPORT_SYMBOL_GPL(kvm_lapic_ack_apicv);

I would prefer reusing kvm_get_apic_interrupt here (by modifying
kvm_cpu_get_interrupt, apic_set_isr and apic_clear_irr) as I had
sketched in the previous version of the patches.

There is no reason for kvm_cpu_get_interrupt to return -1 if virtual
interrupt delivery is enabled.

Paolo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ