leiqzhang / leiqzhang.github.com

leiqzhang-pages
0 stars 0 forks source link

AHCI + IDE TRIM #3

Closed leiqzhang closed 11 years ago

leiqzhang commented 11 years ago

./x86_64-softmmu/qemu-system-x86_64 -enable-kvm -name ovirt -m 1024 -boot d -drive file=/pkgs/imgs/win7.qcow2,cache=none,format=qcow2,if=none,id=drive0 -device virtio-blk-pci,drive=drive0,bootindex=1 -device ahci,id=ahci0 -drive if=none,file=/pkgs/imgs/data.img,cache=none,format=raw,id=drive1,discard=on -device ide-hd,bus=ahci0.0,drive=drive1 -vnc :0 -monitor stdio -net tap,ifname=tap0,downscript=no -net nic -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device usb-tablet,id=input0

leiqzhang commented 11 years ago

IDE with default machien type "-M pc" also support trim

leiqzhang commented 11 years ago

-M pc

不同的Machine Type区别在于compat_props不同,在init machine前会使用compat_props覆盖启动VM时传递的属性。对于pc-0.15来说,会强制将discard_granularity均设置为零