mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-04 01:57:59 +00:00
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull a couple of KVM fixes from Avi Kivity: "One is an adjustment for an irq layer change that affected device assignment, the other a one-liner ppc fix." * git://git.kernel.org/pub/scm/virt/kvm/kvm: powerpc/kvm: Fix "PR" KVM implementation of H_CEDE KVM: Fix device assignment threaded irq handler
This commit is contained in:
commit
e7654c1e49
@ -241,6 +241,7 @@ int kvmppc_h_pr(struct kvm_vcpu *vcpu, unsigned long cmd)
|
|||||||
case H_PUT_TCE:
|
case H_PUT_TCE:
|
||||||
return kvmppc_h_pr_put_tce(vcpu);
|
return kvmppc_h_pr_put_tce(vcpu);
|
||||||
case H_CEDE:
|
case H_CEDE:
|
||||||
|
vcpu->arch.shared->msr |= MSR_EE;
|
||||||
kvm_vcpu_block(vcpu);
|
kvm_vcpu_block(vcpu);
|
||||||
clear_bit(KVM_REQ_UNHALT, &vcpu->requests);
|
clear_bit(KVM_REQ_UNHALT, &vcpu->requests);
|
||||||
vcpu->stat.halt_wakeup++;
|
vcpu->stat.halt_wakeup++;
|
||||||
|
@ -334,6 +334,11 @@ static int assigned_device_enable_host_intx(struct kvm *kvm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __KVM_HAVE_MSI
|
#ifdef __KVM_HAVE_MSI
|
||||||
|
static irqreturn_t kvm_assigned_dev_msi(int irq, void *dev_id)
|
||||||
|
{
|
||||||
|
return IRQ_WAKE_THREAD;
|
||||||
|
}
|
||||||
|
|
||||||
static int assigned_device_enable_host_msi(struct kvm *kvm,
|
static int assigned_device_enable_host_msi(struct kvm *kvm,
|
||||||
struct kvm_assigned_dev_kernel *dev)
|
struct kvm_assigned_dev_kernel *dev)
|
||||||
{
|
{
|
||||||
@ -346,7 +351,7 @@ static int assigned_device_enable_host_msi(struct kvm *kvm,
|
|||||||
}
|
}
|
||||||
|
|
||||||
dev->host_irq = dev->dev->irq;
|
dev->host_irq = dev->dev->irq;
|
||||||
if (request_threaded_irq(dev->host_irq, NULL,
|
if (request_threaded_irq(dev->host_irq, kvm_assigned_dev_msi,
|
||||||
kvm_assigned_dev_thread_msi, 0,
|
kvm_assigned_dev_thread_msi, 0,
|
||||||
dev->irq_name, dev)) {
|
dev->irq_name, dev)) {
|
||||||
pci_disable_msi(dev->dev);
|
pci_disable_msi(dev->dev);
|
||||||
@ -358,6 +363,11 @@ static int assigned_device_enable_host_msi(struct kvm *kvm,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __KVM_HAVE_MSIX
|
#ifdef __KVM_HAVE_MSIX
|
||||||
|
static irqreturn_t kvm_assigned_dev_msix(int irq, void *dev_id)
|
||||||
|
{
|
||||||
|
return IRQ_WAKE_THREAD;
|
||||||
|
}
|
||||||
|
|
||||||
static int assigned_device_enable_host_msix(struct kvm *kvm,
|
static int assigned_device_enable_host_msix(struct kvm *kvm,
|
||||||
struct kvm_assigned_dev_kernel *dev)
|
struct kvm_assigned_dev_kernel *dev)
|
||||||
{
|
{
|
||||||
@ -374,7 +384,8 @@ static int assigned_device_enable_host_msix(struct kvm *kvm,
|
|||||||
|
|
||||||
for (i = 0; i < dev->entries_nr; i++) {
|
for (i = 0; i < dev->entries_nr; i++) {
|
||||||
r = request_threaded_irq(dev->host_msix_entries[i].vector,
|
r = request_threaded_irq(dev->host_msix_entries[i].vector,
|
||||||
NULL, kvm_assigned_dev_thread_msix,
|
kvm_assigned_dev_msix,
|
||||||
|
kvm_assigned_dev_thread_msix,
|
||||||
0, dev->irq_name, dev);
|
0, dev->irq_name, dev);
|
||||||
if (r)
|
if (r)
|
||||||
goto err;
|
goto err;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user