Hi Craig,

 >AMD Features=0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!>
 AMD Features2=0x11f<LAHF,CMP,*SVM*,ExtAPIC,CR8,Prefetch>

Yes, the AMD processor you have support AMD-V or SVM and I got BHyVe
working on AMD processors with SVM Nested Page Table/RVI support,
equivalent of Intel Extended Page Table.

Oct 30 04:46:53 phenom kernel: CPU: AMD Phenom(tm) II X4 965 Processor
(3411.44-MHz K8-class CPU)

Oct 30 04:46:53 phenom kernel: Origin = "AuthenticAMD"  Id = 0x100f43
 Family = 10  Model = 4  Stepping = 3

Oct 30 04:46:53 phenom kernel:
Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>

Oct 30 04:46:53 phenom kernel: Features2=0x802009<SSE3,MON,CX16,POPCNT>

Oct 30 04:46:53 phenom kernel: AMD
Features=0xee500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3DNow!>

Oct 30 04:46:53 phenom kernel: AMD
Features2=0x37ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,SKINIT,WDT>


I am not sure if "AMD Athlon(tm) 64 X2 " support SVM NPT/RVI. Some of
earlier version SVM processor didn't support RVI.

Neel and Peter have created projects/bhyve_svm for submitting AMD patches
for BHyVe. It doesn't have complete patches yet, only vmcb related files.

Here is some relevant log:
vmm.ko related:
---------------------
.....
pci0:6:0:0: reprobing on driver added

pci7: driver added

amd_iommu_init: not implemented

vmm_ipi_init: installing ipi handler to interrupt vcpus at vector 254

SVM rev: 0x1 NASID:0x40

SVM Features:0xf<NP,LbrVirt,SVML,NRIPS>

AMD guest booting recent version of current:
-------------------------

GDB: no debug ports present

KDB: debugger backends: ddb

KDB: current backend: ddb

SMAP type=01 base=0000000000000000 len=00000000000a0000

SMAP type=01 base=0000000000100000 len=000000001ff00000

Table 'APIC' at 0xf0500

APIC: Found table at 0xf0500

APIC: Using the MADT enumerator.

MADT: Found CPU APIC ID 0 ACPI ID 0: enabled

SMP: Added CPU 0 (AP)

MADT: Found CPU APIC ID 1 ACPI ID 1: enabled

SMP: Added CPU 1 (AP)

Copyright (c) 1992-2013 The FreeBSD Project.

Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994

 The Regents of the University of California. All rights reserved.

FreeBSD is a registered trademark of The FreeBSD Foundation.

FreeBSD 10.0-CURRENT #2 r248677M: Sun Mar 24 19:27:46 UTC 2013

    root@phenom:/usr/obj/mnt/head/sys/GENERIC amd64

FreeBSD clang version 3.2 (tags/RELEASE_32/final 170710) 20121221

WARNING: WITNESS option enabled, expect reduced performance.

Preloaded elf kernel "/boot/kernel/kernel" at 0xffffffff8183f000.

Hypervisor: Origin = "BHyVBHyVBHyV"

Calibrating TSC clock ... TSC clock: 3598480367 Hz

CPU: AMD Phenom(tm) II X4 965 Processor (3598.48-MHz K8-class CPU)

  Origin = "AuthenticAMD"  Id = 0x100f43  Family = 0x10  Model = 0x4
 Stepping = 3


Features=0x783ab7f<FPU,VME,DE,PSE,TSC,MSR,PAE,CX8,APIC,SEP,PGE,CMOV,PAT,PSE36,MMX,FXSR,SSE,SSE2>

  Features2=0x80a02001<SSE3,CX16,x2APIC,POPCNT,HV>

  AMD
Features=0xee505880<<s7>,SYSCALL,<s12>,<s14>,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3DNow!>

  AMD
Features2=0x37ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,SKINIT,WDT>

  TSC: P-state invariant

L1 2MB data TLB: 0 entries, 128-way associative

L1 2MB instruction TLB: 5 entries, 0-way associative

L1 4KB data TLB: 182 entries, 215-way associative

L1 4KB instruction TLB: 219 entries, 52-way associative

L1 data cache: 0 kbytes, 128 bytes/line, 0 lines/tag, 0-way associative

L1 instruction cache: 0 kbytes, 253 bytes/line, 3 lines/tag, 0-way
associative

L2 2MB data TLB: 128 entries, 2-way associative

L2 2MB instruction TLB: 0 entries, 2-way associative

L2 4KB data TLB: 512 entries, 4-way associative

L2 4KB instruction TLB: 512 entries, 4-way associative

L2 unified cache: 512 kbytes, 64 bytes/line, 1 lines/tag, 16-way associative

real memory  = 536870912 (512 MB)

Physical memory chunk(s):

0x0000000000001000 - 0x000000000009bfff, 634880 bytes (155 pages)

0x0000000000100000 - 0x00000000001fffff, 1048576 bytes (256 pages)

0x0000000001864000 - 0x000000001f29ffff, 497270784 bytes (121404 pages)

avail memory = 472559616 (450 MB)

Event timer "LAPIC" quality 400

ACPI APIC Table: <BHYVE  BVMADT  >

INTR: Adding local APIC 1 as a target

FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs

FreeBSD/SMP: 1 package(s) x 2 core(s)

 cpu0 (BSP): APIC ID:  0

 cpu1 (AP): APIC ID:  1

x86bios:  IVT 0x000000-0x0004ff at 0xfffffe0000000000

x86bios: SSEG 0x001000-0x001fff at 0xffffff8000229000

x86bios:  ROM 0x0a0000-0x0fefff at 0xfffffe00000a0000

APIC: CPU 0 has ACPI ID 0

APIC: CPU 1 has ACPI ID 1

random device not loaded; using insecure entropy

ULE: setup cpu 0

ULE: setup cpu 1

ACPI: RSDP 0xf0400 00024 (v02 BHYVE )

ACPI: XSDT 0xf0480 00034 (v01 BHYVE  BVXSDT   00000001 INTL 20130214)

ACPI: APIC 0xf0500 00052 (v01 BHYVE  BVMADT   00000001 INTL 20130214)

ACPI: FACP 0xf0600 0010C (v05 BHYVE  BVFACP   00000001 INTL 20130214)

ACPI: DSDT 0xf0800 000F2 (v02 BHYVE  BVDSDT   00000001 INTL 20130214)

ACPI: FACS 0xf0780 00040

MADT: Found IO APIC ID 2, Interrupt 0 at 0xfec00000

ioapic0: Changing APIC ID to 2

ioapic0: Routing external 8259A's -> intpin 0

MADT: Interrupt override: source 9, irq 9

ioapic0: intpin 9 trigger: level

ioapic0: intpin 9 polarity: low

ioapic0 <Version 1.1> irqs 0-16 on motherboard

cpu0 BSP:

     ID: 0x00000000   VER: 0x00000011 LDR: 0x00000000 DFR: 0xffffffff

  lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff

  timer: 0x000100ef therm: 0x00010000 err: 0x000000f0

wlan: <802.11 Link Layer>

snd_unit_init() u=0x00ff8000 [512] d=0x00007c00 [32] c=0x000003ff [1024]

feeder_register: snd_unit=-1 snd_maxautovchans=16 latency=5
feeder_rate_min=1 feeder_rate_max=2016000 feeder_rate_round=25

nfslock: pseudo-device

null: <null device, zero device>

random: <entropy source, Software, Yarrow>

module_register_init: MOD_LOAD (vesa, 0xffffffff80c39920, 0) error 19

io: <I/O>

kbd: new array size 4

kbd1 at kbdmux0

mem: <memory>

hpt27xx: RocketRAID 27xx controller driver v1.0

hptrr: RocketRAID 17xx/2xxx SATA controller driver v1.2

acpi0: <BHYVE BVXSDT> on motherboard

ACPI: All ACPI Tables successfully acquired

ioapic0: routing intpin 9 (ISA IRQ 9) to lapic 0 vector 48

atrtc0: <AT realtime clock> port 0x70-0x71,0x72-0x77 irq 8 on acpi0

atrtc0: registered as a time-of-day clock (resolution 1000000us, adjustment
0.500000000s)

ioapic0: routing intpin 8 (ISA IRQ 8) to lapic 0 vector 49

Event timer "RTC" frequency 32768 Hz quality 0

ACPI timer: 1/45 1/18 1/17 1/17 1/17 1/16 1/17 1/16 1/17 1/17 -> 10

Timecounter "ACPI-fast" frequency 3579545 Hz quality 900

acpi_timer0: <32-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0

pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0

pcib0: decoding 4 range 0-0xcf7

pcib0: decoding 4 range 0xd00-0xffff

pcib0: could not get PCI interrupt routing table for \_SB_.PCI0 -
AE_NOT_FOUND

pci0: <ACPI PCI bus> on pcib0

pci0: domain=0, physical bus=0

found-> vendor=0x1275, dev=0x1275, revid=0x00

domain=0, bus=0, slot=0, func=0

 class=06-00-00, hdrtype=0x01, mfdev=0

cmdreg=0x0007, statreg=0x0010, cachelnsz=0 (dwords)

 lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)

found-> vendor=0x1af4, dev=0x1000, revid=0x00

 domain=0, bus=0, slot=1, func=0

class=02-00-00, hdrtype=0x00, mfdev=0

 cmdreg=0x0007, statreg=0x0010, cachelnsz=0 (dwords)

lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)

 MSI-X supports 3 messages in map 0x14

map[10]: type I/O Port, range 32, base 0x2000, size  5, enabled

pcib0: allocated type 4 (0x2000-0x201f) for rid 10 of pci0:0:1:0

map[14]: type Memory, range 32, base 0xc0000000, size 13, enabled

found-> vendor=0x1af4, dev=0x1001, revid=0x00

domain=0, bus=0, slot=2, func=0

 class=01-00-00, hdrtype=0x00, mfdev=0

cmdreg=0x0007, statreg=0x0010, cachelnsz=0 (dwords)

 lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)

MSI-X supports 2 messages in map 0x14

 map[10]: type I/O Port, range 32, base 0x2040, size  6, enabled

pcib0: allocated type 4 (0x2040-0x207f) for rid 10 of pci0:0:2:0

 map[14]: type Memory, range 32, base 0xc0002000, size 13, enabled

found-> vendor=0x131f, dev=0x2000, revid=0x00

 domain=0, bus=0, slot=31, func=0

class=07-00-00, hdrtype=0x00, mfdev=0

 cmdreg=0x0007, statreg=0x0000, cachelnsz=0 (dwords)

lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)

 intpin=a, irq=4

map[10]: type I/O Port, range 32, base 0x3f8, size  3, enabled

pcib0: allocated type 4 (0x3f8-0x3ff) for rid 10 of pci0:0:31:0

pcib0: no PRT entry for 0.31.INTA

virtio_pci0: <VirtIO PCI Network adapter> port 0x2000-0x201f mem
0xc0000000-0xc0001fff at device 1.0 on pci0

vtnet0: <VirtIO Networking Adapter> on virtio_pci0

virtio_pci0: host features: 0x18020 <Status,MrgRxBuf,MacAddress>

virtio_pci0: negotiated features: 0x18020 <Status,MrgRxBuf,MacAddress>

virtio_pci0: virtqueue 1 (vtnet0 transmit) requested indirect descriptors
but not negotiated

vtnet0: bpf attached

vtnet0: Ethernet address: 00:a0:98:a8:28:2f

virtio_pci0: attempting to allocate 3 MSI-X vectors (3 supported)

msi: routing MSI-X IRQ 256 to local APIC 0 vector 50

msi: routing MSI-X IRQ 257 to local APIC 0 vector 51

msi: routing MSI-X IRQ 258 to local APIC 0 vector 52

virtio_pci0: using IRQs 256-258 for MSI-X

virtio_pci0: using per VQ MSIX interrupts

virtio_pci1: <VirtIO PCI Block adapter> port 0x2040-0x207f mem
0xc0002000-0xc0003fff at device 2.0 on pci0

vtblk0: <VirtIO Block Adapter> on virtio_pci1

virtio_pci1: host features: 0x10000004 <RingIndirect,MaxNumSegs>

virtio_pci1: negotiated features: 0x10000004 <RingIndirect,MaxNumSegs>

virtio_pci1: attempting to allocate 2 MSI-X vectors (2 supported)

msi: routing MSI-X IRQ 259 to local APIC 0 vector 53

msi: routing MSI-X IRQ 260 to local APIC 0 vector 54

virtio_pci1: using IRQs 259-260 for MSI-X

virtio_pci1: using per VQ MSIX interrupts

vtblk0: 16384MB (33554432 512 byte sectors)

uart2: <16550 or compatible> port 0x3f8-0x3ff irq 4 at device 31.0 on pci0

ioapic0: routing intpin 4 (ISA IRQ 4) to lapic 0 vector 55

uart2: fast interrupt

uart2: console (9600,n,8,1)

acpi0: wakeup code va 0xffffff80002b4000 pa 0x4000

Device configuration finished.

procfs registered

lapic: Divisor 2, Frequency 1797863662 Hz

Timecounters tick every 10.000 msec

vlan: initialized, using hash tables with chaining

tcp_init: net.inet.tcp.tcbhashsize auto tuned to 4096

lo0: bpf attached

hpt27xx: no controller detected.

hptrr: no controller detected.

GEOM: new disk vtbd0

SMP: AP CPU #1 Launched!

cpu1 AP:

     ID: 0x01000000   VER: 0x00000011 LDR: 0x00000000 DFR: 0xffffffff

  lint0: 0x00010700 lint1: 0x00000400 TPR: 0x00000000 SVR: 0x000001ff

  timer: 0x000100ef therm: 0x00010000 err: 0x000000f0

ioapic0: routing intpin 9 (ISA IRQ 9) to lapic 1 vector 48

msi: Assigning MSI-X IRQ 257 to local APIC 1 vector 49

msi: Assigning MSI-X IRQ 259 to local APIC 1 vector 50

TSC timecounter discards lower 1 bit(s)

Timecounter "TSC-low" frequency 1799240183 Hz quality -100

WARNING: WITNESS option enabled, expect reduced performance.

g_handleattr: vtbd0 bio_length 24 len 28 -> EFAULT

g_handleattr: vtbd0 bio_length 24 len 28 -> EFAULT

g_handleattr: vtbd0 bio_length 24 len 28 -> EFAULT

g_handleattr: vtbd0 bio_length 24 len 28 -> EFAULT

g_handleattr: vtbd0 bio_length 24 len 28 -> EFAULT

g_handleattr: vtbd0 bio_length 24 len 28 -> EFAULT

g_handleattr: vtbd0 bio_length 24 len 28 -> EFAULT

g_handleattr: vtbd0 bio_length 24 len 28 -> EFAULT

Trying to mount root from ufs:/dev/gpt/gprootfs [rw]...

WARNING: / was not properly dismounted

start_init: trying /sbin/init

debug.witness.watch: 1 -> 0

Setting hostuuid: 6b60e354-82db-11e2-8af6-00a0980cc175.

Setting hostid: 0x085ad664.

No suitable dump device was found.

Entropy harvesting: interrupts ethernet point_to_point kickstart.

Starting file system checks:

/dev/gpt/gprootfs: 27125 files, 241278 used, 3816876 free (3372 frags,
476688 blocks, 0.1% fragmentation)

g_handleattr: vtbd0 bio_length 24 len 28 -> EFAULT

g_handleattr: vtbd0 bio_length 24 len 28 -> EFAULT

g_handleattr: vtbd0 bio_length 24 len 28 -> EFAULT

Mounting local file systems:.

debug.witness.watch: 0 -> 0

Writing entropy file:.

Setting hostname: bhyve-svm.

Starting Network: lo0 vtnet0.

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384

options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>

 inet6 ::1 prefixlen 128

inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2

 inet 127.0.0.1 netmask 0xff000000

nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

vtnet0: flags=8902<BROADCAST,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500

options=80028<VLAN_MTU,JUMBO_MTU,LINKSTATE>

 ether 00:a0:98:a8:28:2f

nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

 media: Ethernet 1000baseT <full-duplex>

status: active

debug.witness.watch: 0 -> 0

Starting devd.

debug.witness.watch: 0 -> 0

debug.witness.watch: 0 -> 0

Starting Network: vtnet0.

vtnet0: flags=8902<BROADCAST,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500

options=80028<VLAN_MTU,JUMBO_MTU,LINKSTATE>

 ether 00:a0:98:a8:28:2f

nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

 media: Ethernet 1000baseT <full-duplex>

status: active

debug.witness.watch: 0 -> 0

debug.witness.watch: 0 -> 0

debug.witness.watch: 0 -> 0

debug.witness.watch: 0 -> 0

add net ::ffff:0.0.0.0: gateway ::1

add net ::0.0.0.0: gateway ::1

add net fe80::: gateway ::1

add net ff02::: gateway ::1

debug.witness.watch: 0 -> 0

Creating and/or trimming log files.

Starting syslogd.

realpath: /dev/dumpdev: No such file or directory

/etc/rc: WARNING: Dump device does no exist.  Savecore not run.

ELF ldconfig path: /lib /usr/lib /usr/lib/compat

32-bit compatibility ldconfig path: /usr/lib32

Clearing /tmp (X related).

Updating motd:.

Performing sanity check on sshd configuration.

Starting sshd.

Starting cron.

debug.witness.watch: 0 -> 0

Starting background file system checks in 60 seconds.


Sat Apr 13 21:35:56 UTC 2013

Apr 13 21:35:56 bhyve-svm getty[749]: open /dev/ttyu0: No such file or
directory

Apr 13 21:35:56 bhyve-svm getty[

FreeBSD/amd64 (bhyve-svm) (ttyu2)


login:
...
root@bhyve-svm:~ # uname -a

FreeBSD bhyve-svm 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r248677M: Sun Mar 24
19:27:46 UTC 2013     root@phenom:/usr/obj/mnt/head/sys/GENERIC  amd64

root@bhyve-svm:~ #





  *From:* Craig Rodrigues <rodr...@freebsd.org>
> *Date:* April 13, 2013, 1:19:13 PM PDT
> *To:* freebsd-virtualization@freebsd.org
> *Subject:* *AMD and BHyve?*
>
>   Hi,
>
> I recently updated one of my home machines
> to FreeBSD-10/amd64.  Here is what I have:
>
> FreeBSD 10.0-CURRENT #0 r249181: Sat Apr  6 03:07:32 UTC 2013
>    rodr...@dibbler.crodrigues.org:/usr/obj/opt2/branches/head/sys/GENERIC
> amd64
> FreeBSD clang version 3.2 (tags/RELEASE_32/final 170710) 20121221
> WARNING: WITNESS option enabled, expect reduced performance.
> CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4800+ (2511.48-MHz K8-class
> CPU)
>  Origin = "AuthenticAMD"  Id = 0x60fb1  Family = 0xf  Model = 0x6b
> Stepping =
> 1
>
>
> Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,C
> MOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
>  Features2=0x2001<SSE3,CX16>
>  AMD Features=0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!>
>  AMD Features2=0x11f<LAHF,CMP,SVM,ExtAPIC,CR8,Prefetch>
>
>
>
> Will this CPU work with BHyve when the AMD support
> is fully committed?  Right now when I try to load vmm.ko
> I get:
>
> kldload vmm.ko
> amd_iommu_init: not implemented
> amdv_init: not implemented
> amdv_cleanup: not implemented
> module_register_init: MOD_LOAD (vmm, 0xffffffff81c893b0, 0) error 6
>
> Thanks.
>
> --
> Craig
> _______________________________________________
> 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"

Reply via email to