Skip to contentSkip to conversation

Audio Controller Passthrough to Windows HVM Guest

DISCUSSION Mr. Teo En Ming (Zhang Enming) 5 participants 11 messages Oct 21, 2009 – Oct 23, 2009

lore
Share & tools
lore
#0 lore raw

Hi

I have tried to passthrough the HD audio controller on the Intel DQ45CB motherboard using the following method but the audio device did not show up in Win XP domU.

Are the below commands correct and sufficient?

echo "8086 3a6e" > /sys/bus/pci/drivers/pci-stub/new_id echo "0000:00:1b.0" > /sys/bus/pci/devices/0000:00:1b.0/driver/unbind echo "0000:00:1b.0" > /sys/bus/pci/drivers/pci-stub/bind

rmmod snd_hda_intel

I am also trying to passthrough the nVidia GeForce 8400 GS PCI Express x16 graphics card and Firewire controller to Win XP domU at the same time.

VGA passthrough was successful but firewire and audio controller passthrough are not working.

Signature · 11 lines
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com
Email: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
Street: Bedok Reservoir Road
Republic of Singapore
#1 lore raw

Hi

Has anybody passed through audio controller to HVM guests before?

Signature · 13 lines
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com
Email: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
Street: Bedok Reservoir Road
Republic of Singapore

On Wed, Oct 21, 2009 at 10:42 PM, Mr. Teo En Ming (Zhang Enming)
Quoted 35 lines · <[email protected]> wrote:

Hi

I have tried to passthrough the HD audio controller on the Intel DQ45CB motherboard using the following method but the audio device did not show up in Win XP domU.

Are the below commands correct and sufficient?

echo "8086 3a6e" > /sys/bus/pci/drivers/pci-stub/new_id echo "0000:00:1b.0" > /sys/bus/pci/devices/0000:00:1b.0/driver/unbind echo "0000:00:1b.0" > /sys/bus/pci/drivers/pci-stub/bind

rmmod snd_hda_intel

I am also trying to passthrough the nVidia GeForce 8400 GS PCI Express x16 graphics card and Firewire controller to Win XP domU at the same time.

VGA passthrough was successful but firewire and audio controller passthrough are not working.

--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com
Email: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
Street: Bedok Reservoir Road
Republic of Singapore

#2 lore raw
Quoted 3 lines · Mr. Teo En Ming (Zhang Enming)

Hi

Has anybody passed through audio controller to HVM guests before?

I am not familiar with pci-stub, but with pciback this is what you would do:

rmmod snd_hda_intel
echo -n "0000:00:1b.0" > /sys/bus/pci/devices/0000:00:1b.0/driver/unbind echo -n "0000:00:1b.0" > /sys/bus/pci/drivers/pciback/new_slot echo -n "0000:00:1b.0" > /sys/bus/pci/drivers/pciback/bind

#3 lore raw

Seems to be roughly equivalent between pci-stub and pciback.

Wonders if there is any limitation with pci-stub.

Signature · 15 lines
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com
Email: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
Street: Bedok Reservoir Road
Republic of Singapore



On Thu, Oct 22, 2009 at 9:49 PM, Stefano Stabellini
Quoted 16 lines · <[email protected]> wrote:
Quoted 3 lines · Mr. Teo En Ming (Zhang Enming)

Hi

Has anybody passed through audio controller to HVM guests before?

I am not familiar with pci-stub, but with pciback this is what you would do:

rmmod snd_hda_intel
echo -n "0000:00:1b.0" > /sys/bus/pci/devices/0000:00:1b.0/driver/unbind echo -n "0000:00:1b.0" > /sys/bus/pci/drivers/pciback/new_slot echo -n "0000:00:1b.0" > /sys/bus/pci/drivers/pciback/bind

#4 lore raw
Quoted 3 lines · Mr. Teo En Ming (Zhang Enming)

Seems to be roughly equivalent between pci-stub and pciback.

Wonders if there is any limitation with pci-stub.

For HVM, there is none.

It would be helpful if you could get more data in the guest then just the 'disabled device', but I am quite ignorant of Windows XP and how to do that there.

Perhaps you can install FC11 as your HVM guest and see what kind of warnings/errors it shows up when you pass-through your audio + USB?

.. snip ..

Quoted 1 line
Quoted 1 line

I am not familiar with pci-stub, but with pciback this is what you

The same thing.

Quoted 15 lines
Quoted 10 lines

would do:

rmmod snd_hda_intel
echo -n "0000:00:1b.0" > /sys/bus/pci/devices/0000:00:1b.0/driver/unbind echo -n "0000:00:1b.0" > /sys/bus/pci/drivers/pciback/new_slot echo -n "0000:00:1b.0" > /sys/bus/pci/drivers/pciback/bind

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#5 lore raw
In reply to Mr. Teo En Ming (Zhang Enming)

Pci-stub and pciback are equivalent for HVM guest. They both are used to "hide" the passthrough device from the device drivers in dom0 kernel.

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mr. Teo En Ming (Zhang Enming)
Sent: Thursday, October 22, 2009 7:11 AM
To: Stefano Stabellini
Cc: [email protected]
Subject: Re: [Xen-devel] Re: Audio Controller Passthrough to Windows HVM Guest

Seems to be roughly equivalent between pci-stub and pciback.

Wonders if there is any limitation with pci-stub.

Signature · 15 lines
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com
Email: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
Street: Bedok Reservoir Road
Republic of Singapore



On Thu, Oct 22, 2009 at 9:49 PM, Stefano Stabellini
Quoted 5 lines · <[email protected]> wrote:
Quoted 3 lines · Mr. Teo En Ming (Zhang Enming)

Hi

Has anybody passed through audio controller to HVM guests before?

Quoted 11 lines

I am not familiar with pci-stub, but with pciback this is what you would do:

rmmod snd_hda_intel
echo -n "0000:00:1b.0" > /sys/bus/pci/devices/0000:00:1b.0/driver/unbind echo -n "0000:00:1b.0" > /sys/bus/pci/drivers/pciback/new_slot echo -n "0000:00:1b.0" > /sys/bus/pci/drivers/pciback/bind

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#6 lore raw
In reply to Mr. Teo En Ming (Zhang Enming)

We successfully passed through audio controller to hvm guest before (with 2.6.18 dom0), but we didn't try it for a while.

Can you see any error messages in 'xm dmesg' or qemu log?

Regards,
Weidong

Quoted 46 lines · Mr. Teo En Ming (Zhang Enming)

Hi

Has anybody passed through audio controller to HVM guests before?

Quoted 22 lines · Mr. Teo En Ming (Zhang Enming)

Hi

I have tried to passthrough the HD audio controller on the Intel DQ45CB motherboard using the following method but the audio device did not show up in Win XP domU.

Are the below commands correct and sufficient?

echo "8086 3a6e" > /sys/bus/pci/drivers/pci-stub/new_id echo "0000:00:1b.0" > /sys/bus/pci/devices/0000:00:1b.0/driver/unbind echo "0000:00:1b.0" > /sys/bus/pci/drivers/pci-stub/bind

rmmod snd_hda_intel

I am also trying to passthrough the nVidia GeForce 8400 GS PCI Express x16 graphics card and Firewire controller to Win XP domU at the same time.

VGA passthrough was successful but firewire and audio controller passthrough are not working.

Quoted 12 lines

--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering) Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com
Email: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
Street: Bedok Reservoir Road
Republic of Singapore

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#7 lore raw

2.6.18 dom0 is conventional xen using pciback and not using pvops?

Signature · 11 lines
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com
Email: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
Street: Bedok Reservoir Road
Republic of Singapore
Quoted 56 lines · Weidong

We successfully passed through audio controller to hvm guest before (with 2.6.18 dom0), but we didn't try it for a while.

Can you see any error messages in 'xm dmesg' or qemu log?

Regards,
Weidong

Quoted 46 lines · Mr. Teo En Ming (Zhang Enming)

Hi

Has anybody passed through audio controller to HVM guests before?

Quoted 22 lines · Mr. Teo En Ming (Zhang Enming)

Hi

I have tried to passthrough the HD audio controller on the Intel DQ45CB motherboard using the following method but the audio device did not show up in Win XP domU.

Are the below commands correct and sufficient?

echo "8086 3a6e" > /sys/bus/pci/drivers/pci-stub/new_id echo "0000:00:1b.0" > /sys/bus/pci/devices/0000:00:1b.0/driver/unbind echo "0000:00:1b.0" > /sys/bus/pci/drivers/pci-stub/bind

rmmod snd_hda_intel

I am also trying to passthrough the nVidia GeForce 8400 GS PCI Express x16 graphics card and Firewire controller to Win XP domU at the same time.

VGA passthrough was successful but firewire and audio controller passthrough are not working.

Quoted 12 lines

--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering) Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com
Email: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
Street: Bedok Reservoir Road
Republic of Singapore

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#8 lore raw

I think it doesn't matter to use pciback or pci-stub to hide device. Seems we also tested it with pv-ops dom0. I can double check it.

pls post the qemu log (/var/log/xen/qemu-dm-xxx.log) and output of 'xm demsg'.

Regards,
Weidong

Quoted 61 lines · Mr. Teo En Ming (Zhang Enming)

2.6.18 dom0 is conventional xen using pciback and not using pvops?

Quoted 56 lines · Weidong

We successfully passed through audio controller to hvm guest before (with 2.6.18 dom0), but we didn't try it for a while.

Can you see any error messages in 'xm dmesg' or qemu log?

Regards,
Weidong

Quoted 47 lines · Mr. Teo En Ming (Zhang Enming)

Hi

Has anybody passed through audio controller to HVM guests before?

Quoted 23 lines · Mr. Teo En Ming (Zhang Enming)

Hi

I have tried to passthrough the HD audio controller on the Intel DQ45CB motherboard using the following method but the audio device did not show up in Win XP domU.

Are the below commands correct and sufficient?

echo "8086 3a6e" > /sys/bus/pci/drivers/pci-stub/new_id echo "0000:00:1b.0" > /sys/bus/pci/devices/0000:00:1b.0/driver/unbind echo "0000:00:1b.0" > /sys/bus/pci/drivers/pci-stub/bind

rmmod snd_hda_intel

I am also trying to passthrough the nVidia GeForce 8400 GS PCI Express x16 graphics card and Firewire controller to Win XP domU at the same time.

VGA passthrough was successful but firewire and audio controller passthrough are not working.

Quoted 12 lines

--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering) Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com
Email: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
Street: Bedok Reservoir Road
Republic of Singapore

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#9 lore raw

Hi,

I have successfully passed through the HD audio controller on the Intel Desktop Board DQ45CB to Windows XP Home HVM guest.

The reason it did not work earlier was because I had forgotten to specifiy the BDF of the audio controller in the Windows XP HVM configuration file. So the audio controller detection did not pop up in Windows.

After specifying the BDF of the audio controller in the HVM config, I downloaded the SoundMAX audio driver from the official Intel website and installed it. After a reboot, I finally have sound in my Windows XP virtual machine.

I will post more details later on.

Signature · 11 lines
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com
Email: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
Street: Bedok Reservoir Road
Republic of Singapore
Quoted 71 lines · Weidong

I think it doesn't matter to use pciback or pci-stub to hide device. Seems we also tested it with pv-ops dom0. I can double check it.

pls post the qemu log (/var/log/xen/qemu-dm-xxx.log) and output of 'xm demsg'.

Regards,
Weidong

Quoted 61 lines · Mr. Teo En Ming (Zhang Enming)

2.6.18 dom0 is conventional xen using pciback and not using pvops?

Quoted 56 lines · Weidong

We successfully passed through audio controller to hvm guest before (with 2.6.18 dom0), but we didn't try it for a while.

Can you see any error messages in 'xm dmesg' or qemu log?

Regards,
Weidong

Quoted 47 lines · Mr. Teo En Ming (Zhang Enming)

Hi

Has anybody passed through audio controller to HVM guests before?

Quoted 23 lines · Mr. Teo En Ming (Zhang Enming)

Hi

I have tried to passthrough the HD audio controller on the Intel DQ45CB motherboard using the following method but the audio device did not show up in Win XP domU.

Are the below commands correct and sufficient?

echo "8086 3a6e" > /sys/bus/pci/drivers/pci-stub/new_id echo "0000:00:1b.0" > /sys/bus/pci/devices/0000:00:1b.0/driver/unbind echo "0000:00:1b.0" > /sys/bus/pci/drivers/pci-stub/bind

rmmod snd_hda_intel

I am also trying to passthrough the nVidia GeForce 8400 GS PCI Express x16 graphics card and Firewire controller to Win XP domU at the same time.

VGA passthrough was successful but firewire and audio controller passthrough are not working.

Quoted 12 lines

--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering) Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com
Email: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
Street: Bedok Reservoir Road
Republic of Singapore

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#10 lore raw

This is my Windows XP Home HVM configuration:

#import os, re
#arch = os.uname()[4]
#if re.search('64', arch):
# arch_libdir = 'lib64'
#else:
# arch_libdir = 'lib'

kernel = "/usr/lib/xen/boot/hvmloader"
builder='hvm'
memory = 3072

# Should be at least 2KB per MB of domain memory, plus a few MB per vcpu. #shadow_memory = 8
name = "winxphome32"
vif = [ 'bridge=eth0' ]
acpi = 1
apic = 1
disk = [ 'phy:/dev/virtualmachines/winxphome32,hda,w', 'phy:/dev/sr0,hdc:cdrom,r' ]

#device_model = '/usr/' + arch_libdir + '/xen/bin/qemu-dm' #device_model = '/usr/' + 'lib' + '/xen/bin/qemu-dm' device_model = 'qemu-dm'

#-----------------------------------------------------------------------------

# boot on floppy (a), hard disk (c) or CD-ROM (d)
# default: hard disk, cd-rom, floppy
boot="cd"
sdl=0
vnc=1
vnclisten="192.168.1.2"
vncdisplay=1
vncunused=1
vncconsole=0
vncpasswd=''

#serial='pty'
#usbdevice='tablet'

# onboard
#pci = [ '00:02.0' ]
# nVidia Geforce 8400 GS & firewire controller & HD audio controller
pci = [ '01:00.0','02:01.0','00:1b.0' ]
vcpus=2
# No passthrough
#gfx_passthru=0
# onboard
#gfx_passthru=1
# nvidia
gfx_passthru=2

# Can only pass through one usb device at a time
usb=1
# USB Unity Green Mouse
#usbdevice = 'host:1bcf:0007'
# USB A1pro Black Mouse
usbdevice = 'host:15d9:0a41'
# USB Keyboard
#usbdevice = 'host:0603:00f2'
# USB Sony IC Recorder
#usbdevice = 'host:054c:0271'
# USB Lexmark X1270 Color Printer
#usbdevice = 'host:043d:00ff'
# USB Lexmark X1270 Photo Scanner
#usbdevice = 'host:043d:007d'
# USB Lexmark X1270 Generic Hub
#usbdevice = 'host:043d:007a'

Signature · 15 lines
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical
Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com
Email: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
Street: Bedok Reservoir Road
Republic of Singapore



On Fri, Oct 23, 2009 at 10:30 PM, Mr. Teo En Ming (Zhang Enming)
Quoted 105 lines · <[email protected]> wrote:

Hi,

I have successfully passed through the HD audio controller on the Intel Desktop Board DQ45CB to Windows XP Home HVM guest.

The reason it did not work earlier was because I had forgotten to specifiy the BDF of the audio controller in the Windows XP HVM configuration file. So the audio controller detection did not pop up in Windows.

After specifying the BDF of the audio controller in the HVM config, I downloaded the SoundMAX audio driver from the official Intel website and installed it. After a reboot, I finally have sound in my Windows XP virtual machine.

I will post more details later on.

--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering)
Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com
Email: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
Street: Bedok Reservoir Road
Republic of Singapore

Quoted 71 lines · Weidong

I think it doesn't matter to use pciback or pci-stub to hide device. Seems we also tested it with pv-ops dom0. I can double check it.

pls post the qemu log (/var/log/xen/qemu-dm-xxx.log) and output of 'xm demsg'.

Regards,
Weidong

Quoted 61 lines · Mr. Teo En Ming (Zhang Enming)

2.6.18 dom0 is conventional xen using pciback and not using pvops?

Quoted 56 lines · Weidong

We successfully passed through audio controller to hvm guest before (with 2.6.18 dom0), but we didn't try it for a while.

Can you see any error messages in 'xm dmesg' or qemu log?

Regards,
Weidong

Quoted 47 lines · Mr. Teo En Ming (Zhang Enming)

Hi

Has anybody passed through audio controller to HVM guests before?

Quoted 23 lines · Mr. Teo En Ming (Zhang Enming)

Hi

I have tried to passthrough the HD audio controller on the Intel DQ45CB motherboard using the following method but the audio device did not show up in Win XP domU.

Are the below commands correct and sufficient?

echo "8086 3a6e" > /sys/bus/pci/drivers/pci-stub/new_id echo "0000:00:1b.0" > /sys/bus/pci/devices/0000:00:1b.0/driver/unbind echo "0000:00:1b.0" > /sys/bus/pci/drivers/pci-stub/bind

rmmod snd_hda_intel

I am also trying to passthrough the nVidia GeForce 8400 GS PCI Express x16 graphics card and Firewire controller to Win XP domU at the same time.

VGA passthrough was successful but firewire and audio controller passthrough are not working.

Quoted 12 lines

--
Mr. Teo En Ming (Zhang Enming) Dip(Mechatronics) BEng(Hons)(Mechanical Engineering) Alma Maters:
(1) Singapore Polytechnic
(2) National University of Singapore
Blog URL: http://teo-en-ming-aka-zhang-enming.blogspot.com
Email: [email protected]
MSN: [email protected]
Mobile Phone: +65-9648-9798
Street: Bedok Reservoir Road
Republic of Singapore

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel