Re: [Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-07 Thread Takashi Iwai
At Mon, 07 Nov 2011 11:35:49 +0100, Gerd Hoffmann wrote: > > Hi, > > > We discuss Intel ICH/AC'97 (snd-intel8x0) here, but I hope that PCI SSID > > is same. > > Hmm, it's not, the ac97 emulation doesn't use the default qemu subsystem > id for some reason. Here is the entry: > > [root@fedora

Re: [Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-07 Thread Takashi Iwai
At Mon, 07 Nov 2011 10:25:24 +0100, Gerd Hoffmann wrote: > > Hi, > > > Agreed. If we can know the virtual device for KVM in a better way > > (e.g. any specific PCI SSID or such), we can narrow the condition more > > safely. > > PCI Subsystem ID 1af4:1100 is qemu/kvm (not only Intel HDA, most

Re: [Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-07 Thread Gerd Hoffmann
Hi, > We discuss Intel ICH/AC'97 (snd-intel8x0) here, but I hope that PCI SSID > is same. Hmm, it's not, the ac97 emulation doesn't use the default qemu subsystem id for some reason. Here is the entry: [root@fedora ~]# lspci -vns6 00:06.0 0401: 8086:2415 (rev 01) Subsystem: 8086:

Re: [Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-07 Thread Konstantin Ozerkov
On 07.11.11 12:25, Gerd Hoffmann wrote: Hi, Agreed. If we can know the virtual device for KVM in a better way (e.g. any specific PCI SSID or such), we can narrow the condition more safely. PCI Subsystem ID 1af4:1100 is qemu/kvm (not only Intel HDA, most other emulated pci devices have it t

Re: [Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-07 Thread Gerd Hoffmann
Hi, > Agreed. If we can know the virtual device for KVM in a better way > (e.g. any specific PCI SSID or such), we can narrow the condition more > safely. PCI Subsystem ID 1af4:1100 is qemu/kvm (not only Intel HDA, most other emulated pci devices have it too). Complete entry: 00:04.0 0403: 80

Re: [Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-06 Thread Denis V. Lunev
On 11/6/11 8:47 PM, Takashi Iwai wrote: At Sun, 06 Nov 2011 18:31:42 +0200, Avi Kivity wrote: On 11/06/2011 06:15 PM, Denis V. Lunev wrote: On 11/6/11 6:51 PM, Avi Kivity wrote: The recently merged 228cf79376f1 ("ALSA: intel8x0: Improve performance in virtual environment") is hacky and somewha

Re: [Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-06 Thread Denis V. Lunev
On 11/6/11 8:31 PM, Avi Kivity wrote: On 11/06/2011 06:15 PM, Denis V. Lunev wrote: On 11/6/11 6:51 PM, Avi Kivity wrote: The recently merged 228cf79376f1 ("ALSA: intel8x0: Improve performance in virtual environment") is hacky and somewhat wrong. First, the detection code + if (inside_v

Re: [Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-06 Thread Takashi Iwai
At Sun, 06 Nov 2011 18:31:42 +0200, Avi Kivity wrote: > > On 11/06/2011 06:15 PM, Denis V. Lunev wrote: > > On 11/6/11 6:51 PM, Avi Kivity wrote: > >> The recently merged 228cf79376f1 ("ALSA: intel8x0: Improve performance > >> in virtual environment") is hacky and somewhat wrong. > >> > >> First,

Re: [Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-06 Thread Takashi Iwai
At Sun, 6 Nov 2011 20:15:01 +0400, Denis V. Lunev wrote: > > On 11/6/11 6:51 PM, Avi Kivity wrote: > > The recently merged 228cf79376f1 ("ALSA: intel8x0: Improve performance > > in virtual environment") is hacky and somewhat wrong. > > > > First, the detection code > > > > + if (inside_vm<

Re: [Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-06 Thread Avi Kivity
On 11/06/2011 06:15 PM, Denis V. Lunev wrote: > On 11/6/11 6:51 PM, Avi Kivity wrote: >> The recently merged 228cf79376f1 ("ALSA: intel8x0: Improve performance >> in virtual environment") is hacky and somewhat wrong. >> >> First, the detection code >> >> + if (inside_vm< 0) { >> +

Re: [Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-06 Thread Denis V. Lunev
On 11/6/11 6:51 PM, Avi Kivity wrote: The recently merged 228cf79376f1 ("ALSA: intel8x0: Improve performance in virtual environment") is hacky and somewhat wrong. First, the detection code + if (inside_vm< 0) { + /* detect KVM and Parallels virtual environments */ +

[Qemu-devel] Wierd hack to sound/pci/intel8x0.c

2011-11-06 Thread Avi Kivity
The recently merged 228cf79376f1 ("ALSA: intel8x0: Improve performance in virtual environment") is hacky and somewhat wrong. First, the detection code + if (inside_vm < 0) { + /* detect KVM and Parallels virtual environments */ + inside_vm = kvm_para_available();