From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: VT-d regression issue Date: Thu, 22 Jul 2010 14:25:03 +0300 Message-ID: <20100722112503.GB25915@redhat.com> References: <20100722082122.GE27177@redhat.com> <20100722085209.GF27177@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "kvm@vger.kernel.org" To: "Hao, Xudong" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:61680 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755554Ab0GVLZI (ORCPT ); Thu, 22 Jul 2010 07:25:08 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Jul 22, 2010 at 07:11:34PM +0800, Hao, Xudong wrote: > Gleb, > This patch does not work either, qemu stoped @ Starting Seabios. > And this one? diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 2bba22f..b7e7dc0 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -238,9 +238,10 @@ static void assigned_dev_iomem_map_slow(PCIDevice *pci_dev, int region_num, DEBUG("%s", "slow map\n"); if (region_num == PCI_ROM_SLOT) m = cpu_register_io_memory(slow_bar_read, NULL, region); - else + else { m = cpu_register_io_memory(slow_bar_read, slow_bar_write, region); - cpu_register_physical_memory(e_phys, e_size, m); + cpu_register_physical_memory(e_phys, e_size, m); + } /* MSI-X MMIO page */ if ((e_size > 0) && @@ -272,7 +273,8 @@ static void assigned_dev_iomem_map(PCIDevice *pci_dev, int region_num, if (region_num == PCI_ROM_SLOT) flags |= IO_MEM_ROM; - cpu_register_physical_memory(e_phys, e_size, region->memory_index | flags); + if (region_num != PCI_ROM_SLOT) + cpu_register_physical_memory(e_phys, e_size, region->memory_index | flags); /* deal with MSI-X MMIO page */ if (real_region->base_addr <= r_dev->msix_table_addr && -- Gleb.