public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Leendert van Doorn <leendert@paramecium.org>,
	"Kevin O'Connor" <kevin@koconnor.net>
Cc: "'Shan, Haitao'" <haitao.shan@intel.com>,
	"'Liu, Kechao'" <kechao.liu@intel.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH][v2] kvm-userspace: Load PCI option ROMs
Date: Sun, 04 Jan 2009 19:28:50 +0200	[thread overview]
Message-ID: <4960F1D2.4080600@redhat.com> (raw)
In-Reply-To: <010101c96e8f$a42d4a20$ec87de60$@org>

Leendert van Doorn wrote:
> Avi wrote:
>
>   
>> This is worrying as it will cause us to diverge from upstream bochs bios.
>>     
>
> Yep. I'll create a less invasive patch. I've been looking at SEABIOS which
> seems a much better alternative but the GPLv3 license worries me, especially
> when you have proprietary guests that calls back into it. 
>   

Surely, the BIOS call interface is a GPL boundary, just like the Linux 
syscall interface.  Kevin, is that not the case?  If it is a GPL 
interface, can you add an explicit exception to make it clear?


>> Can you elaborate?  Since we're running the card's bios again, won't it 
>> initialize correctly?
>>     
>
> The problem is that the device-assignment code doesn't update the cards
> BARs, it just emulates them and maps the guest BARs onto the correct host
> BARs. Unfortunately, the graphics card has undocumented interfaces for
> obtaining the memory regions (faster than a full PCI lookup) and they of
> course return the host mappings as opposed to the guest mappings.
>   

!@#$%^.

> My first attempt was to implement a state machine that would emulate these
> interfaces and rewrite them but this got pretty ugly pretty fast. 

No doubt.  And it wouldn't work for cards where we don't know about 
these interfaces, or where we directly assign the mmio regions that 
implement these interfaces.

> Ensuring
> the same mappings was much cleaner.
>   

With a switch, please.  Default behaviour should be to virtualize.

One way to implement it is to pass pci devfn -> BAR hints through the 
firmware interface.  This way you can choose which BARs to place where, 
and where to allow the default placement.

> Of course, my goal is to run unmodified BIOS/drivers. You could always
> change the drivers.
>
>   

Not Windows drivers.

> I'll clean things up and resubmit.
>   

Thanks.

-- 
error compiling committee.c: too many arguments to function


  reply	other threads:[~2009-01-04 17:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-29  3:51 [PATCH][v2] kvm-userspace: Load PCI option ROMs Liu, Kechao
2008-12-29  8:28 ` Avi Kivity
2008-12-29  9:36   ` Liu, Kechao
2008-12-29  9:49     ` Avi Kivity
2008-12-30  1:01       ` Shan, Haitao
2008-12-30 15:51         ` Avi Kivity
2008-12-31  2:06           ` Shan, Haitao
2008-12-31  9:28             ` Avi Kivity
2009-01-03  2:29               ` Shan, Haitao
2009-01-04  2:12               ` Shan, Haitao
2009-01-04  3:54                 ` Leendert van Doorn
2009-01-04  4:58                   ` Shan, Haitao
2009-01-04 10:26                   ` Avi Kivity
2009-01-04 17:12                     ` Leendert van Doorn
2009-01-04 17:28                       ` Avi Kivity [this message]
2009-01-04 17:29                         ` Avi Kivity
2009-01-04 17:54                         ` Leendert van Doorn
2009-01-04 19:51                           ` Avi Kivity
2009-01-04 18:03                         ` Kevin O'Connor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4960F1D2.4080600@redhat.com \
    --to=avi@redhat.com \
    --cc=haitao.shan@intel.com \
    --cc=kechao.liu@intel.com \
    --cc=kevin@koconnor.net \
    --cc=kvm@vger.kernel.org \
    --cc=leendert@paramecium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox