All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Fjellstrom <tfjellstrom@shaw.ca>
To: kvm@vger.kernel.org
Subject: Re: Status of pci passthrough work?
Date: Sat, 27 Sep 2008 09:40:36 -0600	[thread overview]
Message-ID: <200809270940.36755.tfjellstrom@shaw.ca> (raw)
In-Reply-To: <48DE2B1F.8010003@t-online.de>

On Saturday 27 September 2008, Jan C. Bernauer wrote:
> Hi,
>
>  I have about the same problem, so excuse me for hijacking this thread.
>
> My hardware consists of a 780g/SB700 Mainboard and a 4850e AMD CPU, and
> I'm interested in forwarding a DVB-C tuner card to the guest. Maybe
> some NICs later.
>
> I tried and 'sort of' got it working with Amit's kernel and userspace
> tools.
> First thing:
> The dvb-c card has an interesting memory mapping, as reported by
> lspci -v:
>         Memory at cfdff000 (32-bit, non-prefetchable) [size=512]
>
> Size 512 doesn't fly with a check in kvm_main.c:
> if (mem->memory_size & (PAGE_SIZE - 1))
>                 goto out;
>
> So I patched the userspace utilities to use 4096 instead.
>
> With that patch, the guest saw the card, the driver got loaded,
> and channel tuning works, but I get some i2c timeouts on the
> guest side, and the host side has errors like:
>
> ------------[ cut here ]------------
> Sep 22 02:28:54 [kernel] WARNING: at kernel/irq/manage.c:180
> enable_irq+0x3a/0x55()
> Sep 22 02:28:54 [kernel] Unbalanced enable for IRQ 20
> Sep 22 02:28:54 [kernel] Modules linked in: sha256_generic cbc dm_crypt
> crypto_blkcipher kvm_amd kvm bridge stp llc stv0297 budget_core dvb_core
> saa7146 ttpci_eepr\
> om ir_common k8temp i2c_core dm_snapshot dm_mirror dm_log scsi_wait_scan
> [last unloaded: budget_ci]
> Sep 22 02:28:54 [kernel] Pid: 5283, comm: qemu-system-x86 Tainted: G
>     W 2.6.27-rc5-11874-g19561b6 #11
> Sep 22 02:28:54 [kernel] Call Trace:
> Sep 22 02:28:54 [kernel]  [<ffffffff80238b04>] warn_slowpath+0xb4/0xdc
> Sep 22 02:28:54 [kernel]  [<ffffffff8026b099>]
> __alloc_pages_internal+0xde/0x419
> Sep 22 02:28:54 [kernel]  [<ffffffff802758d0>] get_user_pages+0x401/0x4ae
> Sep 22 02:28:54 [kernel]  [<ffffffff80349269>] __next_cpu+0x19/0x26
> Sep 22 02:28:54 [kernel]  [<ffffffff80230ce2>]
> find_busiest_group+0x315/0x7c3
> Sep 22 02:28:54 [kernel]  [<ffffffffa005de31>] gfn_to_hva+0x9/0x5d [kvm]
>                 - Last output repeated twice -
> Sep 22 02:28:54 [kernel]  [<ffffffffa005e01b>]
> kvm_read_guest_page+0x34/0x46 [kvm]
> Sep 22 02:28:54 [kernel]  [<ffffffffa005e06c>] kvm_read_guest+0x3f/0x7c
> [kvm]
> Sep 22 02:28:54 [kernel]  [<ffffffffa0068bfe>]
> paging64_walk_addr+0xe0/0x2c1 [kvm]
> Sep 22 02:28:54 [kernel]  [<ffffffff80260d59>] enable_irq+0x3a/0x55
> Sep 22 02:28:54 [kernel]  [<ffffffffa006df50>]
> kvm_notify_acked_irq+0x17/0x30 [kvm]
> Sep 22 02:28:54 [kernel]  [<ffffffffa00701c5>]
> kvm_ioapic_update_eoi+0x2f/0x6e [kvm]
> Sep 22 02:28:54 [kernel]  [<ffffffffa006f6da>]
> apic_mmio_write+0x24a/0x546 [kvm]
> Sep 22 02:28:54 [kernel]  [<ffffffffa006498d>]
> emulator_write_emulated_onepage+0xa1/0xf3 [kvm]
> Sep 22 02:28:54 [kernel]  [<ffffffff802206f8>]
> paravirt_patch_call+0x13/0x2b Sep 22 02:28:54 [kernel] 
> [<ffffffffa006c93e>]
> x86_emulate_insn+0x366a/0x41de [kvm]
> Sep 22 02:28:54 [kernel]  [<ffffffff802206fa>]
> paravirt_patch_call+0x15/0x2b Sep 22 02:28:54 [kernel] 
> [<ffffffffa005f90b>]
> kvm_get_cs_db_l_bits+0x22/0x3a [kvm]
> Sep 22 02:28:54 [kernel]  [<ffffffffa006167d>]
> emulate_instruction+0x198/0x25c [kvm]
> Sep 22 02:28:54 [kernel]  [<ffffffffa0067dfe>]
> kvm_mmu_page_fault+0x46/0x83 [kvm]
> Sep 22 02:28:54 [kernel]  [<ffffffffa00636a9>]
> kvm_arch_vcpu_ioctl_run+0x456/0x65c [kvm]
> Sep 22 02:28:54 [kernel]  [<ffffffff8024d605>] hrtimer_start+0x111/0x133
> Sep 22 02:28:54 [kernel]  [<ffffffffa005d451>] kvm_vcpu_ioctl+0xe0/0x459
> [kvm]
> Sep 22 02:28:54 [kernel]  [<ffffffffa005ee43>] kvm_vm_ioctl+0x203/0x21b
> [kvm]
> Sep 22 02:28:54 [kernel]  [<ffffffff802353b6>] finish_task_switch+0x2b/0xc4
> Sep 22 02:28:54 [kernel]  [<ffffffff8029e3b5>] vfs_ioctl+0x21/0x6c
> Sep 22 02:28:54 [kernel]  [<ffffffff8029e627>] do_vfs_ioctl+0x227/0x23d
> Sep 22 02:28:54 [kernel]  [<ffffffff8029e67a>] sys_ioctl+0x3d/0x5f
> Sep 22 02:28:54 [kernel]  [<ffffffff8020b45a>]
> system_call_fastpath+0x16/0x1b
> Sep 22 02:28:54 [kernel] ---[ end trace 7b8b990423985ddf ]---
> Sep 22 02:28:54 [kernel] ------------[ cut here ]------------
>
>
> Xen works with that card, but Xen has other problems, and kvm is much
> nicer :) So if you need a guinea pig with basic debugging knowledge, I'm
> your man.

How did you manage to pull together those patches? They all seem so old, and 
won't likely apply cleanly to git head :(

> Best regards,
> Jan C. Bernauer
>

-- 
Thomas Fjellstrom
tfjellstrom@shaw.ca

  reply	other threads:[~2008-09-27 15:40 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-27  2:20 Status of pci passthrough work? Thomas Fjellstrom
2008-09-27  6:43 ` Han, Weidong
2008-09-27  7:12   ` Thomas Fjellstrom
2008-09-27  7:44     ` Han, Weidong
2008-09-27  7:57       ` Thomas Fjellstrom
2008-09-28  7:10         ` Amit Shah
2008-09-29  1:09           ` Thomas Fjellstrom
2008-10-03  6:30             ` Amit Shah
2008-12-15 14:40               ` xming
2008-09-27 12:46 ` Jan C. Bernauer
2008-09-27 15:40   ` Thomas Fjellstrom [this message]
2008-09-27 15:55     ` Jan C. Bernauer
2008-09-27 16:07       ` Thomas Fjellstrom
2008-09-27 18:01         ` Thomas Fjellstrom
2008-09-27 18:26           ` Jan C. Bernauer
2008-09-27 18:33             ` Thomas Fjellstrom
2008-09-27 18:40               ` Jan C. Bernauer
2008-09-27 18:44                 ` Thomas Fjellstrom
2008-09-28  4:39   ` Avi Kivity
2008-09-28  7:11     ` Amit Shah
     [not found] <194255114.431631229436171339.JavaMail.root@zmail02.collab.prod.int.phx2.redhat.com>
2008-12-16 14:07 ` Amit Shah
2008-12-16 14:38   ` xming
2008-12-16 14:40     ` Amit Shah
2009-05-14 17:08   ` Passera, Pablo R
2009-05-15 11:00     ` Amit Shah
2009-05-15 13:14       ` Passera, Pablo R
2009-05-15 13:38         ` Amit Shah
2009-05-29 17:41           ` Passera, Pablo R
2009-05-30  8:36             ` Amit Shah

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=200809270940.36755.tfjellstrom@shaw.ca \
    --to=tfjellstrom@shaw.ca \
    --cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.