On 2012-03-08 18:00, Alex Williamson wrote: > On Thu, 2012-03-08 at 11:10 +0100, Jan Kiszka wrote: >> Enable the new KVM feature that allows legacy interrupt sharing for >> PCI-2.3-compliant devices. This requires to synchronize any guest >> change of the INTx mask bit to the kernel. >> >> The feature is controlled by the property 'share_intx' and is off by >> default for now. >> >> Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx> >> --- >> hw/device-assignment.c | 25 +++++++++++++++++++++++++ >> hw/device-assignment.h | 10 ++++++---- >> qemu-kvm.c | 9 +++++++++ >> qemu-kvm.h | 2 ++ >> 4 files changed, 42 insertions(+), 4 deletions(-) >> >> diff --git a/hw/device-assignment.c b/hw/device-assignment.c >> index a5f1abb..b7cabd4 100644 >> --- a/hw/device-assignment.c >> +++ b/hw/device-assignment.c >> @@ -782,6 +782,13 @@ static int assign_device(AssignedDevice *dev) >> "cause host memory corruption if the device issues DMA write " >> "requests!\n"); >> } >> + if (dev->features & ASSIGNED_DEVICE_SHARE_INTX_MASK) { >> + assigned_dev_data.flags |= KVM_DEV_ASSIGN_PCI_2_3; >> + >> + /* hide host-side INTx masking from the guest */ >> + dev->emulate_config_read[PCI_COMMAND + 1] |= >> + PCI_COMMAND_INTX_DISABLE >> 8; >> + } > > I think this also needs a kvm_has_intx_set_mask() check or else we're > emulating pci2.3 intx disable support without actually backing it. Hmm... true. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html