From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] pci-assign: Use PCI-2.3-based shared legacy interrupts Date: Tue, 09 Nov 2010 15:55:00 +0100 Message-ID: <4CD960C4.8020506@siemens.com> References: <4CD7DE3B.3020602@siemens.com> <20101109144256.GA24525@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , kvm , Alex Williamson To: "Michael S. Tsirkin" Return-path: Received: from goliath.siemens.de ([192.35.17.28]:15701 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751223Ab0KIOzS (ORCPT ); Tue, 9 Nov 2010 09:55:18 -0500 In-Reply-To: <20101109144256.GA24525@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Am 09.11.2010 15:42, Michael S. Tsirkin wrote: > On Mon, Nov 08, 2010 at 12:25:47PM +0100, Jan Kiszka wrote: >> @@ -417,6 +423,17 @@ static void assigned_dev_pci_write_config(PCIDevice *d, uint32_t address, >> >> if (address == 0x4) { >> pci_default_write_config(d, address, val, len); >> + pci_dev->intx_masked = val & PCI_COMMAND_INTX_DISABLE; >> +#ifdef KVM_CAP_PCI_2_3 >> + memset(&assigned_dev_data, 0, sizeof(assigned_dev_data)); >> + assigned_dev_data.assigned_dev_id = >> + calc_assigned_dev_id(pci_dev->h_segnr, pci_dev->h_busnr, >> + pci_dev->h_devfn); >> + if (pci_dev->intx_masked) { >> + assigned_dev_data.flags = KVM_DEV_ASSIGN_MASK_INTX; >> + } >> + kvm_assign_set_intx_mask(kvm_context, &assigned_dev_data); >> +#endif >> /* Continue to program the card */ >> } >> >> @@ -494,6 +511,10 @@ do_log: >> else if (address == 6) >> val &= ~0x10; >> } >> + if (address == PCI_COMMAND) { > > Could also be a single-byte write into the high byte > of this word. Yes, will fix. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux