Re: AMD passthru on bhyve_svm branch

2014-06-07 Thread Peter Grehan

Hi Clint,


I'm not sure if this is supposed to be fully functional yet

  ...

# dmesg | grep iommu
amd_iommu_init: not implemented


 The IOMMU isn't yet functional on AMD. Looks like a bug in bhyve that 
it doesn't error out if the IOMMU isn't located and ppt devices have 
been configured.


later,

Peter.
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


AMD passthru on bhyve_svm branch

2014-06-07 Thread Clint Armstrong
I'm not sure if this is supposed to be fully functional yet, but it
appears to be partially working so there may be a fix for my issue.

I'm running bhyve_svm r267218. One reason to think it's not supposed
to be working yet is I still get this logged during boot:

# dmesg | grep iommu
amd_iommu_init: not implemented

But trying it anyway it appears to almost work. The device shows up
during the boot process, but it hangs 20-30 seconds before giving
"polling failed". I'm having trouble finding out if this is supposed
to work yet or if AMD passthru is not yet fully implemented. Thanks.

# pciconf -vl | grep -A 4 pci0:1:0:0
ppt0@pci0:1:0:0:class=0x010700 card=0x30201000 chip=0x00721000
rev=0x03 hdr=0x00
vendor = 'LSI Logic / Symbios Logic'
device = 'SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon]'
class  = mass storage
subclass   = SAS

# grep pptdevs /boot/loader.conf
pptdevs="1/0/0"

# bhyveload -m 4G -d FreeBSD-10.0-RELEASE-amd64-bootonly.iso -c stdio vm
[...]

# bhyve -c 2 -m 4G -A -H -P -s 0:0,hostbridge -s 1:0,passthru,1/0/0 -s
2:0,lpc -s 3:0,virtio-blk,FreeBSD-10.0-RELEASE-amd64-bootonly.iso -l
com1,stdio vm
[...]
mps0:  port 0x2000-0x20ff mem
0xc000-0xc0003fff,0xc004-0xc007 irq 18 at device 1.0 on
pci0
mps0: Firmware: 15.00.00.00, Driver: 16.00.00.00-fbsd
mps0: IOCCapabilities:
1285c
mps0: polling failed
mps0: Calling Reinit from mps_request_polled
mps0: Reinitializing controller,


Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x8
fault code  = supervisor write data, page not present
instruction pointer = 0x20:0x805d7ed7
stack pointer   = 0x28:0x817f6260
frame pointer   = 0x28:0x817f62a0
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 0 (swapper)
trap number = 12
panic: page fault
cpuid = 0
KDB: stack backtrace:
#0 0x808e7dd0 at kdb_backtrace+0x60
#1 0x808af8b5 at panic+0x155
#2 0x80c8e692 at trap_fatal+0x3a2
#3 0x80c8e969 at trap_pfault+0x2c9
#4 0x80c8e0f6 at trap+0x5e6
#5 0x80c75392 at calltrap+0x8
#6 0x805cb9a9 at mps_reinit+0xf9
#7 0x805cefbb at mps_request_polled+0xab
#8 0x805ced43 at mps_update_events+0x133
#9 0x805cd3a3 at mps_iocfacts_allocate+0x1383
#10 0x805cd76c at mps_attach+0x28c
#11 0x805d5d36 at mps_pci_attach+0x196
#12 0x808df242 at device_attach+0x3a2
#13 0x808e031d at bus_generic_attach+0x2d
#14 0x8035e1ff at acpi_pci_attach+0x15f
#15 0x808df242 at device_attach+0x3a2
#16 0x808e031d at bus_generic_attach+0x2d
#17 0x8036024d at acpi_pcib_attach+0x23d
Uptime: 1s
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: Bheve: Slow linux syscalls on AMD

2014-06-07 Thread Peter Grehan

So the question remains:
 Why is it taking so long on the AMD platform.


 I believe this is now fixed with r267217 - please test out and let us 
know how it goes.


later,

Peter.

___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: interrupt storm on ahci

2014-06-07 Thread Steve Wills
On Sat, Jun 07, 2014 at 02:53:05PM -0700, Neel Natu wrote:
> Hi Steve,
> 
> On Sat, Jun 7, 2014 at 2:28 PM, Peter Grehan  wrote:
> > Hi Steve,
> >
> >
> >> I'm running a FreeBSD guest in bhyve on a FreeBSD host. Both are running
> >> FreeBSD CURRENT, r266947. I've gotten this message about 12 times since
> >> boot:
> >>
> >> interrupt storm detected on "irq268:"; throttling interrupt source
> >>
> >> vmstat -i shows:
> >>
> >> irq268: ahci1  236514222839
> >>
> >> ahci1 is the second disk connected to the system:
> >>
> >> ahci1:  mem 0xc0002400-0xc00027ff irq 18
> >> at device 4.0 on pci0
> >>
> >> The VM itself runs poudriere and was building a bunch of packages. At the
> >> moment, the VM seems to be in a rather odd state. The poudriere jails are
> >> running, but not doing anything. Ideas?
> >
> >
> >  Is this an 8.* host ? I don't believe AHCI has MSI support on that version,
> > and AHCI legacy interrupts haven't had a huge amount of testing under load.
> >
> >  If it is 8.*, I'd recommend using virtio-blk for the block device until we
> > can work out what's going wrong.
> >

Both the host and guest are running FreeBSD CURRENT r266947.

> The KTR trace would be useful to figure out what's happening.
> 
> To do that you can compile the host kernel and vmm.ko with the
> following options:
> options KTR
> options KTR_MASK=(KTR_GEN)
> options KTR_ENTRIES=(4*1024*1024)
> 
> And when you see the interrupt storm message in the guest you can execute:
> sudo ktrdump -cto /tmp/ktrdump.out

Ok, I'll work on getting that added to the host.

Thanks,
Steve
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: interrupt storm on ahci

2014-06-07 Thread Peter Grehan

He mentioned that both the host and guest are recent -CURRENT


 Doh, was fixated on seeing "irq" in the dmesg :)

later,

Peter.


___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: interrupt storm on ahci

2014-06-07 Thread Allan Jude
On 2014-06-07 17:28, Peter Grehan wrote:
> Hi Steve,
> 
>> I'm running a FreeBSD guest in bhyve on a FreeBSD host. Both are running
>> FreeBSD CURRENT, r266947. I've gotten this message about 12 times
>> since boot:
>>
>> interrupt storm detected on "irq268:"; throttling interrupt source
>>
>> vmstat -i shows:
>>
>> irq268: ahci1  236514222839
>>
>> ahci1 is the second disk connected to the system:
>>
>> ahci1:  mem 0xc0002400-0xc00027ff irq
>> 18 at device 4.0 on pci0
>>
>> The VM itself runs poudriere and was building a bunch of packages. At the
>> moment, the VM seems to be in a rather odd state. The poudriere jails are
>> running, but not doing anything. Ideas?
> 
>  Is this an 8.* host ? I don't believe AHCI has MSI support on that
> version, and AHCI legacy interrupts haven't had a huge amount of testing
> under load.
> 
>  If it is 8.*, I'd recommend using virtio-blk for the block device until
> we can work out what's going wrong.
> 
> later,
> 
> Peter.
> 
> ___
> freebsd-virtualization@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to
> "freebsd-virtualization-unsubscr...@freebsd.org"

He mentioned that both the host and guest are recent -CURRENT

-- 
Allan Jude
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: interrupt storm on ahci

2014-06-07 Thread Neel Natu
Hi Steve,

On Sat, Jun 7, 2014 at 2:28 PM, Peter Grehan  wrote:
> Hi Steve,
>
>
>> I'm running a FreeBSD guest in bhyve on a FreeBSD host. Both are running
>> FreeBSD CURRENT, r266947. I've gotten this message about 12 times since
>> boot:
>>
>> interrupt storm detected on "irq268:"; throttling interrupt source
>>
>> vmstat -i shows:
>>
>> irq268: ahci1  236514222839
>>
>> ahci1 is the second disk connected to the system:
>>
>> ahci1:  mem 0xc0002400-0xc00027ff irq 18
>> at device 4.0 on pci0
>>
>> The VM itself runs poudriere and was building a bunch of packages. At the
>> moment, the VM seems to be in a rather odd state. The poudriere jails are
>> running, but not doing anything. Ideas?
>
>
>  Is this an 8.* host ? I don't believe AHCI has MSI support on that version,
> and AHCI legacy interrupts haven't had a huge amount of testing under load.
>
>  If it is 8.*, I'd recommend using virtio-blk for the block device until we
> can work out what's going wrong.
>

The KTR trace would be useful to figure out what's happening.

To do that you can compile the host kernel and vmm.ko with the
following options:
options KTR
options KTR_MASK=(KTR_GEN)
options KTR_ENTRIES=(4*1024*1024)

And when you see the interrupt storm message in the guest you can execute:
sudo ktrdump -cto /tmp/ktrdump.out

best
Neel

> later,
>
> Peter.
>
>
> ___
> freebsd-virtualization@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
> To unsubscribe, send any mail to
> "freebsd-virtualization-unsubscr...@freebsd.org"
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: interrupt storm on ahci

2014-06-07 Thread Peter Grehan

Hi Steve,


I'm running a FreeBSD guest in bhyve on a FreeBSD host. Both are running
FreeBSD CURRENT, r266947. I've gotten this message about 12 times since boot:

interrupt storm detected on "irq268:"; throttling interrupt source

vmstat -i shows:

irq268: ahci1  236514222839

ahci1 is the second disk connected to the system:

ahci1:  mem 0xc0002400-0xc00027ff irq 18 at 
device 4.0 on pci0

The VM itself runs poudriere and was building a bunch of packages. At the
moment, the VM seems to be in a rather odd state. The poudriere jails are
running, but not doing anything. Ideas?


 Is this an 8.* host ? I don't believe AHCI has MSI support on that 
version, and AHCI legacy interrupts haven't had a huge amount of testing 
under load.


 If it is 8.*, I'd recommend using virtio-blk for the block device 
until we can work out what's going wrong.


later,

Peter.

___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


interrupt storm on ahci

2014-06-07 Thread Steve Wills
Hi,

I'm running a FreeBSD guest in bhyve on a FreeBSD host. Both are running
FreeBSD CURRENT, r266947. I've gotten this message about 12 times since boot:

interrupt storm detected on "irq268:"; throttling interrupt source

vmstat -i shows:

irq268: ahci1  236514222839

ahci1 is the second disk connected to the system:

ahci1:  mem 0xc0002400-0xc00027ff irq 18 at 
device 4.0 on pci0

The VM itself runs poudriere and was building a bunch of packages. At the
moment, the VM seems to be in a rather odd state. The poudriere jails are
running, but not doing anything. Ideas?

Thanks,
Steve
___
freebsd-virtualization@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"