Re: PCI pass-through: guest can't map memory

2009-01-11 Thread Harald Braumann
On Sun, 11 Jan 2009 12:35:12 +0800
Sheng Yang yas...@gmail.com wrote:

 On Sun, Jan 11, 2009 at 01:12:42AM +0100, Harald Braumann wrote:
  Hi!
  
  (please CC me, as I'm not subscribed)
  
  I try to give the guest (Windows XP) direct access to one of the
  graphics adaptors. 
  [...]
 
 Hi Harry
 
 I think we at least have one issue here: currently we can't support
 graphics card assignment... Graphics card is more complex than others
 due to video bios we must support. So it's not mature now (for both
 KVM and Xen). Please wait for our future releases(though I have no
 idea when it would be supported, maybe several monthes or
 longer... :( ).

Hi,

thanks for the reply. I've found this on that matter:
http://thread.gmane.org/gmane.comp.emulators.kvm.devel/26785/focus=26971
(device-assignment code doesn't update the cards BAR). Is that the
problem, you're talking about? Or is there something else that's still
missing? So I know what to look for in the changelogs.

Cheers,
harry

PS: I've applied Leendert's patch, but it didn't help


signature.asc
Description: PGP signature


Re: PCI pass-through: guest can't map memory

2009-01-11 Thread Sheng Yang
On Sunday 11 January 2009 21:59:15 Harald Braumann wrote:
 On Sun, 11 Jan 2009 12:35:12 +0800

 Sheng Yang yas...@gmail.com wrote:
  On Sun, Jan 11, 2009 at 01:12:42AM +0100, Harald Braumann wrote:
   Hi!
  
   (please CC me, as I'm not subscribed)
  
   I try to give the guest (Windows XP) direct access to one of the
   graphics adaptors.
   [...]
 
  Hi Harry
 
  I think we at least have one issue here: currently we can't support
  graphics card assignment... Graphics card is more complex than others
  due to video bios we must support. So it's not mature now (for both
  KVM and Xen). Please wait for our future releases(though I have no
  idea when it would be supported, maybe several monthes or
  longer... :( ).

 Hi,

 thanks for the reply. I've found this on that matter:
 http://thread.gmane.org/gmane.comp.emulators.kvm.devel/26785/focus=26971
 (device-assignment code doesn't update the cards BAR). Is that the
 problem, you're talking about? Or is there something else that's still
 missing? So I know what to look for in the changelogs.

Hi Harry

The thread is talking about option ROM, which offer extra function on some PCI 
card, but not video BIOS which is basic component for the graphics card... 
Currently we are using emulated Cirrus 54xx by default, as well as it's video 
BIOS. Device assignment's video BIOS support would still miss in a period... 
We would say explicit that we have supported graphics card after we enable it. 
:)

-- 
regards
Yang, Sheng
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


PCI pass-through: guest can't map memory

2009-01-10 Thread Harald Braumann
Hi!

(please CC me, as I'm not subscribed)

I try to give the guest (Windows XP) direct access to one of the
graphics adaptors. However, the driver in the guest always complains:
Unable to map required address ranges for graphics card.

Any idea what the problem could be? Attached is a kvm log with
DEVICE_ASSIGNMENT_DEBUG = 1.

This is kvm-82 on AMD64 with kernel 2.6.28.

lspci of the graphics adaptor:
02:00.0 VGA compatible controller: ATI Technologies Inc Radeon HD 3870 (prog-if 
00 [VGA controller])
Subsystem: PC Partner Limited Device e620
Flags: bus master, fast devsel, latency 0, IRQ 1278
Memory at c000 (64-bit, prefetchable) [size=256M]
Memory at fdfe (64-bit, non-prefetchable) [size=64K]
I/O ports at ee00 [size=256]
Expansion ROM at fdf0 [disabled] [size=128K]
Capabilities: [50] Power Management version 3
Capabilities: [58] Express Legacy Endpoint, MSI 00
Capabilities: [a0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 
Enable+
Capabilities: [100] Vendor Specific Information ?

syslog:
Jan 11 00:48:33 schmafu kernel: [ 8195.816067] kvm: guest NX capability removed
Jan 11 00:48:33 schmafu kernel: [ 8195.881523] pci :02:00.0: PCI INT A - 
GSI 18 (level, low) - IRQ 18
Jan 11 00:48:33 schmafu kernel: [ 8195.885445] kvm: guest NX capability removed
Jan 11 00:48:33 schmafu kernel: [ 8196.119376] pci :02:00.0: irq 1278 for 
MSI/MSI-X

Resources as seen in the guest:
Memory Address: 0xE000-0xFEBF
Memory Address: 0xF201-0xF201
I/O Port:   0xC300-0xC3FF
IRQ:10

Cheers,
harry
init_assigned_device: Registering real physical device 02:00.0 (bus=2 dev=0 func=0)
get_real_device: region 0 size 268435456 start 0xc000 type 4608 resource_fd 15
get_real_device: region 2 size 65536 start 0xfdfe type 512 resource_fd 16
get_real_device: region 4 size 256 start 0xee00 type 256 resource_fd 0
assigned_dev_pci_read_config: (5.0): address= val=0x1002 len=2
assigned_dev_pci_read_config: (5.0): address=0002 val=0x9501 len=2
assigned_dev_pci_read_config: (5.0): address= val=0x1002 len=2
assigned_dev_pci_read_config: (5.0): address=0002 val=0x9501 len=2
assigned_dev_pci_read_config: (5.0): address= val=0x1002 len=2
assigned_dev_pci_read_config: (5.0): address=0002 val=0x9501 len=2
assigned_dev_pci_read_config: (5.0): address=000a val=0x0300 len=2
assigned_dev_pci_read_config: (5.0): address= val=0x1002 len=2
assigned_dev_pci_read_config: (5.0): address=0002 val=0x9501 len=2
assigned_dev_pci_write_config: (5.0): address=0010 val=0x len=4
assigned_dev_pci_read_config: (5.0): address=0010 val=0xf008 len=4
assigned_dev_pci_read_config: (5.0): address=0010 val=0xf008 len=4
assigned_dev_pci_write_config: (5.0): address=0010 val=0x9000 len=4
assigned_dev_iomem_map: e_phys=9000 r_virt=0x65b83000 type=8 len=1000 region_num=0 
assigned_dev_pci_read_config: (5.0): address=0004 val=0x0403 len=2
assigned_dev_pci_write_config: (5.0): address=0004 val=0x0403 len=2
assigned_dev_pci_write_config: NON BAR (5.0): address=0004 val=0x0403 len=2
assigned_dev_pci_write_config: (5.0): address=0014 val=0x len=4
assigned_dev_pci_read_config: (5.0): address=0014 val=0x len=4
assigned_dev_pci_write_config: (5.0): address=0018 val=0x len=4
assigned_dev_pci_read_config: (5.0): address=0018 val=0x len=4
assigned_dev_pci_read_config: (5.0): address=0018 val=0x len=4
assigned_dev_pci_write_config: (5.0): address=0018 val=0xf201 len=4
assigned_dev_iomem_map: e_phys=f201 r_virt=0x65b73000 type=0 len=0001 region_num=2 
assigned_dev_pci_read_config: (5.0): address=0004 val=0x0403 len=2
assigned_dev_pci_write_config: (5.0): address=0004 val=0x0403 len=2
assigned_dev_pci_write_config: NON BAR (5.0): address=0004 val=0x0403 len=2
assigned_dev_pci_write_config: (5.0): address=001c val=0x len=4
assigned_dev_pci_read_config: (5.0): address=001c val=0x len=4
assigned_dev_pci_write_config: (5.0): address=0020 val=0x len=4
assigned_dev_pci_read_config: (5.0): address=0020 val=0xff01 len=4
assigned_dev_pci_read_config: (5.0): address=0020 val=0xff01 len=4
assigned_dev_pci_write_config: (5.0): address=0020 val=0xc300 len=4
assigned_dev_ioport_map: e_phys=0xc300 r_baseport=ee00 type=0x1 len=256 region_num=4 
assigned_dev_pci_read_config: (5.0): address=0004 val=0x0403 len=2
assigned_dev_pci_write_config: (5.0): address=0004 val=0x0403 len=2
assigned_dev_pci_write_config: NON BAR (5.0): address=0004 val=0x0403 len=2
assigned_dev_pci_write_config: (5.0): address=0024 val=0x len=4
assigned_dev_pci_read_config: (5.0): address=0024 val=0x len=4
assigned_dev_pci_write_config: (5.0): address=0030 val=0x len=4
assigned_dev_pci_write_config: NON BAR (5.0): address=0030 val=0x len=4