[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Xen-devel] [PATCH] passthru: Fix pci bar remapping for passthru devices


  • To: Wei Wang2 <wei.wang2@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Kay, Allen M" <allen.m.kay@xxxxxxxxx>
  • Date: Mon, 20 Jul 2009 16:39:06 -0700
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Cc:
  • Delivery-date: Mon, 20 Jul 2009 16:39:37 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AcoJQv1sZXLApyMITzGVQempkHkO8QATbWmA
  • Thread-topic: [Xen-devel] [PATCH] passthru: Fix pci bar remapping for passthru devices

Hi Wei,

I thought the originally code already handles sizing of the BAR operations 
(writing all 1's and reading the size back). How did it work before? Did it 
work because we are relying on the a well behaved guest to restore the original 
value of the BAR after the sizing operation?

By reading the code, it is not obvious to me how does not doing r->addr = 
cfg_entry->data operation prevents calling of pt_bar_mapping_one() to create 
p2m mapping.

Allen

-----Original Message-----
From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
[mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Wei Wang2
Sent: Monday, July 20, 2009 7:04 AM
To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] passthru: Fix pci bar remapping for passthru 
devices

Hi, 
When guest code tries to get the block size of mmio, it will write all "1"s 
into pci bar register and then qemu will return all "0"s to the don't care 
bits in the emulated bar register to indicate the block size to guest code. 
In this case, we should not create p2m mapping in  pt_bar_reg_write() and
pt_exp_rom_bar_reg_write(). Attached patch fixes this issue, additional 
comment can be found in the patch.

Thanks,
Wei

Signed-off-by: Wei Wang <wei.wang2@xxxxxxx>
--
 AMD GmbH, Germany
 Operating System Research Center
 
 Legal Information:
 Advanced Micro Devices GmbH
 Karl-Hammerschmidt-Str. 34
 85609 Dornach b. München
 
 Geschäftsführer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
 Sitz: Dornach, Gemeinde Aschheim, Landkreis München
 Registergericht München, HRB Nr. 43632

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.