Re: VGA pass through and AHCI emulation status

2011-07-08 Thread Alexander Graf

On 08.07.2011, at 10:25, Piwko, Maciej wrote:

 Hi,
 
 We are currently working on passing primary VGA to GOS and checking AHCI 
 emulation. Therefore we are facing problem with that tasks.
 My questions are:
 1. What is the status of VGA pass-through? Are there any known issues with 
 that? Are there any fixes/patches on the way?

Better don't hold your breath here.

 2. AHCI emulation works fine - but only in Linux GOS. Unfortunately we would 
 like to run it in FreeBSD. The controller is seen but no drive can be 
 detected. Therefore my question is: What is the status of this emulation? Are 
 there any known issues? Are there any patches/fixes on the way?

AHCI emulation works with all guests I've tested so far except for one BSD 
flavor. I guess it was FreeBSD then :). The FreeBSD driver does some very 
awkward things, loading the AHCI driver only if it detects an ICH IDE 
controller. I debugged it for about a day and then just gave up on it, as we do 
have some pretty skilled FreeBSD developers in the community and I was hoping 
they'd just take a look at it :).

If you're interested in getting AHCI to work with FreeBSD, I'd be more than 
happy to review your patches :).


Alex

PS: Device emulation mails should always go to qemu-devel, as that's the 
project developing them. The KVM list is mainly for KVM specific code (like 
device passthrough for now), but AHCI definitely belongs to the qemu category.

--
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


Re: VGA pass-through

2009-08-18 Thread nathan binkert
 Currently VGA pass-through is not supported in KVM. It needs much
 work to support it.

 Here's what I know of:

 - load the vga bios at 0xc
 - implement whatever main bios interfaces the vga vios expects
 - pass through the vga I/O ports

 I think it also needs:
  - map video RAM: 0xa - 0xb
  - remove Qemu VGA device emulation
  - reserve enough guest memory space for PCI BARs (most
 graphics cards has more than 256M memory, I didn't check
 how much guest memory kvm reserve for PCI BARs)

 In addition, some graphics cards are specific, such as pBAR
 must equal to vBAR. To my feeling, there are some tricks to
 make it work.

Hi All,

Out of curiosity, has any progress been made on this?  I tried to set
this up myself several months ago (KVM-84) with no luck as primary or
secondary.  No matter what I did, if I passed through a video card,
kvm wouldn't even enter the bios.  Presumably because of vga bios
issues.  I even hacked the nvidia driver on my host system to make
certain that the host didn't touch the card at all.

Thanks,

  Nate
--
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


RE: VGA pass-through

2009-08-18 Thread Han, Weidong
nathan binkert wrote:
 Currently VGA pass-through is not supported in KVM. It needs much
 work to support it.
 
 Here's what I know of:
 
 - load the vga bios at 0xc
 - implement whatever main bios interfaces the vga vios expects
 - pass through the vga I/O ports
 
 I think it also needs:
  - map video RAM: 0xa - 0xb
  - remove Qemu VGA device emulation
  - reserve enough guest memory space for PCI BARs (most
 graphics cards has more than 256M memory, I didn't check
 how much guest memory kvm reserve for PCI BARs)
 
 In addition, some graphics cards are specific, such as pBAR
 must equal to vBAR. To my feeling, there are some tricks to
 make it work.
 
 Hi All,
 
 Out of curiosity, has any progress been made on this?  I tried to set
 this up myself several months ago (KVM-84) with no luck as primary or
 secondary.  No matter what I did, if I passed through a video card,
 kvm wouldn't even enter the bios.  Presumably because of vga bios
 issues.  I even hacked the nvidia driver on my host system to make
 certain that the host didn't touch the card at all.
 

If you didn't do above changes, obviously it won't work directly.

We are working on VGA passthrough on Xen side now. KVM should be similiar. 
Basically we can reuse most of the code. We will post the code when we port it 
to KVM.

Regards,
Weidong

--
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


RE: VGA pass-through

2009-06-30 Thread Han, Weidong
Subash Kalbarga wrote:
 Hi
 
 I am using kvm-86 on 2.6.28 and I am able to pass through most of my
 PCI devices successfully. However, I do not see even the KVM BIOS
 output if I pass through my VGA adapter. I am doing -vga none,
 -nographic and -pcidevice host=xx:yy.z  
 
 
 Should I expect to see the kvm BIOS output?  Is VGA pass-through
 something that is expected to work? 

Currently VGA pass-through is not supported in KVM. It needs much work to 
support it.

Regards,
Weidong

 
 Thanks in advance.
 
 Subash

--
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


Re: VGA pass-through

2009-06-30 Thread Avi Kivity

On 06/30/2009 09:16 AM, Han, Weidong wrote:

Subash Kalbarga wrote:
   

Hi

I am using kvm-86 on 2.6.28 and I am able to pass through most of my
PCI devices successfully. However, I do not see even the KVM BIOS
output if I pass through my VGA adapter. I am doing -vga none,
-nographic and -pcidevice host=xx:yy.z


Should I expect to see the kvm BIOS output?  Is VGA pass-through
something that is expected to work?
 


Currently VGA pass-through is not supported in KVM. It needs much work to 
support it.

   


What does it need?

Here's what I know of:

- load the vga bios at 0xc
- implement whatever main bios interfaces the vga vios expects
- pass through the vga I/O ports

Anything else?

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
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


RE: VGA pass-through

2009-06-30 Thread Han, Weidong
Avi Kivity wrote:
 On 06/30/2009 09:16 AM, Han, Weidong wrote:
 Subash Kalbarga wrote:
 
 Hi
 
 I am using kvm-86 on 2.6.28 and I am able to pass through most of my
 PCI devices successfully. However, I do not see even the KVM BIOS
 output if I pass through my VGA adapter. I am doing -vga none,
 -nographic and -pcidevice host=xx:yy.z
 
 
 Should I expect to see the kvm BIOS output?  Is VGA pass-through
 something that is expected to work?
 
 
 Currently VGA pass-through is not supported in KVM. It needs much
 work to support it. 
 
 
 
 What does it need?
 
 Here's what I know of:
 
 - load the vga bios at 0xc
 - implement whatever main bios interfaces the vga vios expects
 - pass through the vga I/O ports
 
 Anything else?

I think it also needs:
  - map video RAM: 0xa - 0xb
  - remove Qemu VGA device emulation
  - reserve enough guest memory space for PCI BARs (most graphics cards has 
more than 256M memory, I didn't check how much guest memory kvm reserve for PCI 
BARs) 
  
In addition, some graphics cards are specific, such as pBAR must equal to vBAR. 
To my feeling, there are some tricks to make it work.

Regards,
Weidong
--
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


Re: VGA pass-through

2009-06-30 Thread Michael Tokarev

Han, Weidong wrote:
[]

Currently VGA pass-through is not supported in KVM. It needs much
work to support it. 


What does it need?

Here's what I know of:

- load the vga bios at 0xc
- implement whatever main bios interfaces the vga vios expects
- pass through the vga I/O ports

Anything else?


I think it also needs:
  - map video RAM: 0xa - 0xb
  - remove Qemu VGA device emulation
  - reserve enough guest memory space for PCI BARs (most graphics cards has more than 256M memory, I didn't check how much guest memory kvm reserve for PCI BARs) 
  
In addition, some graphics cards are specific, such as pBAR must equal to vBAR. To my feeling, there are some tricks to make it work.


That all seems to be necessary for console support, i.e., so that
the guest bios etc will know this device as primary display or
whatever it is called.

But how about using it as a secondary video card?  Like, I can
plug another add-on vga card into a free PCI slot and tell X to
use that one instead of default card.  Can kvm work like this?

Thanks.

/mjt
--
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


RE: VGA pass-through

2009-06-30 Thread Han, Weidong
Michael Tokarev wrote:
 Han, Weidong wrote:
 []
 Currently VGA pass-through is not supported in KVM. It needs much
 work to support it. 
 
 What does it need?
 
 Here's what I know of:
 
 - load the vga bios at 0xc
 - implement whatever main bios interfaces the vga vios expects
 - pass through the vga I/O ports
 
 Anything else?
 
 I think it also needs:
   - map video RAM: 0xa - 0xb
   - remove Qemu VGA device emulation
   - reserve enough guest memory space for PCI BARs (most graphics
 cards has more than 256M memory, I didn't check how much guest
 memory kvm reserve for PCI BARs)  
 
 In addition, some graphics cards are specific, such as pBAR must
 equal to vBAR. To my feeling, there are some tricks to make it work. 
 
 That all seems to be necessary for console support, i.e., so that
 the guest bios etc will know this device as primary display or
 whatever it is called.
 
 But how about using it as a secondary video card?  Like, I can
 plug another add-on vga card into a free PCI slot and tell X to
 use that one instead of default card.  Can kvm work like this?

secondary means secondary video card in host, and will be primary in guest, 
right? As long as it's primary in guest, I think you still need most of above 
changes. 

Regards,
Weidong

 
 Thanks.
 
 /mjt

--
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


Re: VGA pass-through

2009-06-30 Thread Michael Tokarev

Han, Weidong wrote:

Michael Tokarev wrote:

[]

But how about using it as a secondary video card?  Like, I can
plug another add-on vga card into a free PCI slot and tell X to
use that one instead of default card.  Can kvm work like this?


secondary means secondary video card in host, and will be primary in guest, right? As long as it's primary in guest, I think you still need most of above changes. 


No, I mean secondary on guest - no matter if it's secondary or
primary on host.  So that we'll have qemu-emulated VGA as primary
and a hardware-based secondary on *guest*.

How much useful it is - it's another question.  For instance, I've
no idea how windows guest will be able to use such secondary vga
card on guest.

/mjt
--
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


RE: VGA pass-through

2009-06-30 Thread Han, Weidong
Michael Tokarev wrote:
 Han, Weidong wrote:
 Michael Tokarev wrote:
 []
 But how about using it as a secondary video card?  Like, I can
 plug another add-on vga card into a free PCI slot and tell X to
 use that one instead of default card.  Can kvm work like this?
 
 secondary means secondary video card in host, and will be
 primary in guest, right? As long as it's primary in guest, I think
 you still need most of above changes.  
 
 No, I mean secondary on guest - no matter if it's secondary or
 primary on host.  So that we'll have qemu-emulated VGA as primary
 and a hardware-based secondary on *guest*.
 

Oh, for secondary in guest, it may needn't above changes. You can try it 
without any change.

 How much useful it is - it's another question.  For instance, I've
 no idea how windows guest will be able to use such secondary vga
 card on guest.
 

I don't know. Is there any interesting usage of this secondary VGA in guest?

Regards,
Weidong--
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


Re: VGA pass-through

2009-06-30 Thread Michael Tokarev

Han, Weidong wrote:

Michael Tokarev wrote:

Han, Weidong wrote:

Michael Tokarev wrote:

[]

But how about using it as a secondary video card?  Like, I can
plug another add-on vga card into a free PCI slot and tell X to
use that one instead of default card.  Can kvm work like this?

secondary means secondary video card in host, and will be
primary in guest, right? As long as it's primary in guest, I think
you still need most of above changes.  

No, I mean secondary on guest - no matter if it's secondary or
primary on host.  So that we'll have qemu-emulated VGA as primary
and a hardware-based secondary on *guest*.


Oh, for secondary in guest, it may needn't above changes. You can try it 
without any change.


I can't: ENOHARDWARE.


How much useful it is - it's another question.  For instance, I've
no idea how windows guest will be able to use such secondary vga
card on guest.


I don't know. Is there any interesting usage of this secondary VGA in guest?


I *guess* windows can be told to use non-primary display.  But I've no
idea how.

Also, it certainly supports multi-display configuration somehow.  Running
most stuff on secondary should be possible.

/mjt
--
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


RE: VGA pass-through

2009-06-30 Thread Subash Kalbarga
Thanks for all the replies.


I do have the extra hardware, but I am right now not able to put both
together on the guest (i.e. I have to use -vga none while passing
through the nvidia card that I have) because the VGA I am trying to pass
through has an option rom and hw/device-assignment.c complains about not
having enough option ROM space if both VGAs are included.

I should be able to try something out after some fussing in this
particular area


Thanks
Subash

-Original Message-
From: Michael Tokarev [mailto:m...@tls.msk.ru] 
Sent: Tuesday, June 30, 2009 9:34 AM
To: Han, Weidong
Cc: 'Avi Kivity'; Subash Kalbarga; 'kvm@vger.kernel.org'
Subject: Re: VGA pass-through

Han, Weidong wrote:
 Michael Tokarev wrote:
 Han, Weidong wrote:
 Michael Tokarev wrote:
 []
 But how about using it as a secondary video card?  Like, I can 
 plug another add-on vga card into a free PCI slot and tell X to use

 that one instead of default card.  Can kvm work like this?
 secondary means secondary video card in host, and will be 
 primary in guest, right? As long as it's primary in guest, I think

 you still need most of above changes.
 No, I mean secondary on guest - no matter if it's secondary or 
 primary on host.  So that we'll have qemu-emulated VGA as primary and

 a hardware-based secondary on *guest*.
 
 Oh, for secondary in guest, it may needn't above changes. You can
try it without any change.

I can't: ENOHARDWARE.

 How much useful it is - it's another question.  For instance, I've no

 idea how windows guest will be able to use such secondary vga card 
 on guest.
 
 I don't know. Is there any interesting usage of this secondary VGA in
guest?

I *guess* windows can be told to use non-primary display.  But I've no
idea how.

Also, it certainly supports multi-display configuration somehow.
Running most stuff on secondary should be possible.

/mjt
--
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