msm8916-mainline / qhypstub

"hyp" firmware stub for Qualcomm MSM8916/MSM8939 that allows using EL2/KVM
GNU General Public License v2.0
67 stars 12 forks source link

Can you add support more chip set ? #6

Closed Saikatsaha1996 closed 2 years ago

Saikatsaha1996 commented 2 years ago

Msm 8937 && sdm 865 .. My bad.. i already enabled KVM but not get success 😞 Please help

stephan-gh commented 2 years ago

I think MSM8937 does not have separate hyp firmware like MSM8953 (see https://github.com/msm8916-mainline/qhypstub/issues/4).

SD865 is a lot newer and probably quite different, so while a similar approach might work for it I don't know how hard it would be to enable it there.

And remember, you need a device without (firmware) secure boot which is probably the most difficult part for all these newer devices. Sorry.

Saikatsaha1996 commented 2 years ago

@stephan-gh Is it true android 13 has full KVM support ? https://www.google.com/url?sa=t&source=web&rct=j&url=https://arstechnica.com/gadgets/2022/02/android-13-virtualization-hack-runs-windows-and-doom-in-a-vm-on-android/%3Famp%3D1&ved=2ahUKEwjaitu8mKX5AhVoZWwGHVqPAVsQFnoECDcQAQ&usg=AOvVaw2l2CmJua12exEus0EZorGg

https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.xda-developers.com/android-13-dp1-google-pixel-6-kvm-virtual-machine/amp/&ved=2ahUKEwjaitu8mKX5AhVoZWwGHVqPAVsQFnoECEwQAQ&usg=AOvVaw0LqGCYTnBv-OY6jchJVwsF

stephan-gh commented 2 years ago

I've read that as well but I haven't heard anything yet how Qualcomm has dealt (or is going to deal) with this. Maybe it will still be optional for a while giving Qualcomm some time.

Saikatsaha1996 commented 2 years ago

I've read that as well but I haven't heard anything yet how Qualcomm has dealt (or is going to deal) with this. Maybe it will still be optional for a while giving Qualcomm some time.

Yes meybe not available for QUALCOMM.. because Google pixel 6 processor is Tensor

Saikatsaha1996 commented 2 years ago

@stephan-gh i want help personally.. i found in my kernel to many KVM feature already enable.. kernel version 4.19 .. even hyp option also enable in default.. lineage os kernel android 12 .. UFIE run time support disabled.. can you share some time for me please?..

Please see all images and all options ..

IMG_20220815_012127

IMG_20220815_011951 IMG_20220815_012029

IMG_20220815_012459 IMG_20220815_012321 IMG_20220815_012303

stephan-gh commented 2 years ago

The kernel configuration is the second step. The important part is if the underlying firmware (usually proprietary) starts the kernel in EL2 (hypervisor level) instead of EL1 (kernel level). You can see if that happens or not in the kernel dmesg (e.g. All CPUs started at EL2 or something like that).

Saikatsaha1996 commented 2 years ago

The kernel configuration is the second step. The important part is if the underlying firmware (usually proprietary) starts the kernel in EL2 (hypervisor level) instead of EL1 (kernel level). You can see if that happens or not in the kernel dmesg (e.g. All CPUs started at EL2 or something like that).

How can I check can you please tell me ? Actually i am a noob about this project..

stephan-gh commented 2 years ago

Check the kernel log (dmesg).

Saikatsaha1996 commented 2 years ago

Check the kernel log (dmesg).

Actually i am not rooted showing dmesg: read kernel buffer failed: Function not implemented

Saikatsaha1996 commented 2 years ago

@stephan-gh i found in my device frimware i unpack it and found hyp.mbn frimware.. mey be it is hyp partition frimware?

Is it okay?

Screenshot_2022-08-27-00-39-18-678_ru zdevs zarchiver

stephan-gh commented 2 years ago

If this is the SD865 the following still applies:

SD865 is a lot newer and probably quite different, so while a similar approach might work for it I don't know how hard it would be to enable it there.

And remember, you need a device without (firmware) secure boot which is probably the most difficult part for all these newer devices. Sorry.

Saikatsaha1996 commented 2 years ago

If this is the SD865 the following still applies:

SD865 is a lot newer and probably quite different, so while a similar approach might work for it I don't know how hard it would be to enable it there. And remember, you need a device without (firmware) secure boot which is probably the most difficult part for all these newer devices. Sorry.

Yes this is sd865 and this is stock miui frimware

Saikatsaha1996 commented 2 years ago

@stephan-gh now I confirmed you in snapdragon 865 (sm8250) chipset have hyp partition.. I checked by ( fastboot erase hyp ) erasing done ! completed!

Saikatsaha1996 commented 2 years ago

@stephan-gh maximum sd 800 series chipset have hyperv partition by default..

Saikatsaha1996 commented 1 year ago

@stephan-gh dear still now i am waiting.. I have hyp partition in my device..

hicode002 commented 1 year ago

@stephan-gh dear still now i am waiting.. I have hyp partition in my device..

Do you succeed?Your miui device has no secure boot?Unbelievable!

Saikatsaha1996 commented 1 year ago

@stephan-gh dear still now i am waiting.. I have hyp partition in my device..

Do you succeed?Your miui device has no secure boot?Unbelievable!

I was by mistakely bricked my device.. Because i tried fastboot erase hyp erasing done 😃 Than i recover with EDL mode.. but i confirm that in my device has hyp partition

hicode002 commented 1 year ago

@stephan-gh dear still now i am waiting.. I have hyp partition in my device..

Do you succeed?Your miui device has no secure boot?Unbelievable!

I was by mistakely bricked my device.. Because i tried fastboot erase hyp erasing done 😃 Than i recover with EDL mode.. but i confirm that in my device has hyp partition

Oh,so although it has hyp,you can not use virtualization because of secure boot?

Only if you can write a lk2nd for this chip and find some bugs to replace the hyp in the RAM to jump to the EL2 when running

Saikatsaha1996 commented 1 year ago

@stephan-gh dear still now i am waiting.. I have hyp partition in my device..

Do you succeed?Your miui device has no secure boot?Unbelievable!

I was by mistakely bricked my device.. Because i tried fastboot erase hyp erasing done 😃 Than i recover with EDL mode.. but i confirm that in my device has hyp partition

Oh,so although it has hyp,you can not use virtualization because of secure boot?

Only if you can write a lk2nd for this chip and find some bugs to replace the hyp in the RAM to jump to the EL2 when running

Check my miui 13 stock firmware.. In my device firmware also you can see hyp.mbn

186975172-fc9a510d-0204-46af-b28b-3229ddc0cda8

hicode002 commented 1 year ago

yes , But this is useless,right? Because you can not flash your own hyp?  

最美的云 @.***

 

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年11月19日(星期六) 晚上8:00 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [msm8916-mainline/qhypstub] Can you add support more chip set ? (Issue #6)

@stephan-gh dear still now i am waiting.. I have hyp partition in my device..

Do you succeed?Your miui device has no secure boot?Unbelievable!

I was by mistakely bricked my device.. Because i tried fastboot erase hyp erasing done 😃 Than i recover with EDL mode.. but i confirm that in my device has hyp partition

Oh,so although it has hyp,you can not use virtualization because of secure boot?

Only if you can write a lk2nd for this chip and find some bugs to replace the hyp in the RAM to jump to the EL2 when running

Check my miui 13 stock firmware.. In my device firmware also you can see hyp.mbn

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

Saikatsaha1996 commented 1 year ago

yes , But this is useless,right? Because you can not flash your own hyp?   最美的云 @.   ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年11月19日(星期六) 晚上8:00 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [msm8916-mainline/qhypstub] Can you add support more chip set ? (Issue #6) @stephan-gh dear still now i am waiting.. I have hyp partition in my device.. Do you succeed?Your miui device has no secure boot?Unbelievable! I was by mistakely bricked my device.. Because i tried fastboot erase hyp erasing done Than i recover with EDL mode.. but i confirm that in my device has hyp partition Oh,so although it has hyp,you can not use virtualization because of secure boot? Only if you can write a lk2nd for this chip and find some bugs to replace the hyp in the RAM to jump to the EL2 when running Check my miui 13 stock firmware.. In my device firmware also you can see hyp.mbn — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>

I really don't know about it.. because i am confused mey be not possible or posible.. 🥺

hicode002 commented 1 year ago

yes , But this is useless,right? Because you can not flash your own hyp?   最美的云 @.   ------------------ 原始邮件 ------------------ 发件人: @.**>; 发送时间: 2022年11月19日(星期六) 晚上8:00 收件人: @.**>; 抄送: @.**>; @.**>; 主题: Re: [msm8916-mainline/qhypstub] Can you add support more chip set ? (Issue #6) @stephan-gh dear still now i am waiting.. I have hyp partition in my device.. Do you succeed?Your miui device has no secure boot?Unbelievable! I was by mistakely bricked my device.. Because i tried fastboot erase hyp erasing done Than i recover with EDL mode.. but i confirm that in my device has hyp partition Oh,so although it has hyp,you can not use virtualization because of secure boot? Only if you can write a lk2nd for this chip and find some bugs to replace the hyp in the RAM to jump to the EL2 when running Check my miui 13 stock firmware.. In my device firmware also you can see hyp.mbn — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>

I really don't know about it.. because i am confused mey be not possible or posible.. 🥺

I have same ideas at first,but then I give up because it's too difficult,because qualcomm has improved its security greatly since these years ,I think if you want to achieve it,you can try other chips such as Huawei Hisilicon,because it is new and can be hacked easily.

Saikatsaha1996 commented 1 year ago

yes , But this is useless,right? Because you can not flash your own hyp?   最美的云 @.   ------------------ 原始邮件 ------------------ 发件人: @.**>; 发送时间: 2022年11月19日(星期六) 晚上8:00 收件人: @.**>; 抄送: @.**>; @.**>; 主题: Re: [msm8916-mainline/qhypstub] Can you add support more chip set ? (Issue #6) @stephan-gh dear still now i am waiting.. I have hyp partition in my device.. Do you succeed?Your miui device has no secure boot?Unbelievable! I was by mistakely bricked my device.. Because i tried fastboot erase hyp erasing done Than i recover with EDL mode.. but i confirm that in my device has hyp partition Oh,so although it has hyp,you can not use virtualization because of secure boot? Only if you can write a lk2nd for this chip and find some bugs to replace the hyp in the RAM to jump to the EL2 when running Check my miui 13 stock firmware.. In my device firmware also you can see hyp.mbn — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>

I really don't know about it.. because i am confused mey be not possible or posible.. 🥺

I have same ideas at first,but then I give up because it's too difficult,because qualcomm has improved its security greatly since these years ,I think if you want to achieve it,you can try other chips such as Huawei Hisilicon,because it is new and can be hacked easily.

Dear i was think i move to tensor but performance not good.. Now only better chipset Dimensity is my fast preference & Qualcomm.. But honestly i never used MTK chipset..

hicode002 commented 1 year ago

in fact mtk has no new documentaries open for us ,so unlocking the botloader of mtk devices is very difficult , why we can see the unlocking guide is because some security research has shown some bugs,so we have a tool to achieve it.

But for newer chips of mtk, they have fixed this bug.

hicode002 commented 1 year ago

@Saikatsaha1996

Saikatsaha1996 commented 1 year ago

in fact mtk has no new documentaries open for us ,so unlocking the botloader of mtk devices is very difficult , why we can see the unlocking guide is because some security research has shown some bugs,so we have a tool to achieve it.

But for newer chips of mtk, they have fixed this bug.

But i am really impressed with MTK Dimensity chipset..

hicode002 commented 1 year ago

Yes.

But sometimes I feel unfair and upset because I have spent so much money buying a phone or tablet with good performance chips ,but it can only run android instead of linux or windows Arm64   

最美的云 @.***

 

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年11月19日(星期六) 晚上8:22 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [msm8916-mainline/qhypstub] Can you add support more chip set ? (Issue #6)

in fact mtk has no new documentaries open for us ,so unlocking the botloader of mtk devices is very difficult , why we can see the unlocking guide is because some security research has shown some bugs,so we have a tool to achieve it.

But for newer chips of mtk, they have fixed this bug.

But i am really impressed with MTK Dimensity chipset..

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

Saikatsaha1996 commented 1 year ago

Yes. But sometimes I feel unfair and upset because I have spent so much money buying a phone or tablet with good performance chips ,but it can only run android instead of linux or windows Arm64    最美的云 @.   ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年11月19日(星期六) 晚上8:22 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [msm8916-mainline/qhypstub] Can you add support more chip set ? (Issue #6) in fact mtk has no new documentaries open for us ,so unlocking the botloader of mtk devices is very difficult , why we can see the unlocking guide is because some security research has shown some bugs,so we have a tool to achieve it. But for newer chips of mtk, they have fixed this bug. But i am really impressed with MTK Dimensity chipset.. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>

If you have c c++ knowledge you can add your Android device kernel to mainline.. than you can boot into linux

Saikatsaha1996 commented 1 year ago

If this is the SD865 the following still applies:

SD865 is a lot newer and probably quite different, so while a similar approach might work for it I don't know how hard it would be to enable it there. And remember, you need a device without (firmware) secure boot which is probably the most difficult part for all these newer devices. Sorry.

@stephan-gh sir please check

In my device kernel tree i have hyp memory data & even i have hyp partition in my device.. My kernel version 5.4 and i saw in my kernel have option Qualcomm virtual machine support available but it is disabled.. can it possible to run KVM hardware support?

https://github.com/pjgowtham/android_kernel_oneplus_sm8350/blob/ffa3efd23c005672bff907f71a619dfd9cf82aec/arch/arm64/boot/dts/vendor/qcom/lahaina.dtsi#L402

https://github.com/pjgowtham/android_kernel_oneplus_sm8350/blob/ffa3efd23c005672bff907f71a619dfd9cf82aec/arch/arm64/boot/dts/vendor/qcom/lahaina.dtsi#L307

IMG_20230519_004830 IMG_20230519_004816

Saikatsaha1996 commented 1 year ago

We have inbuilt hypervisor support for newer Snapdragon SoC ?

IMG_20230624_084240

hicode002 commented 1 year ago

我们为较新的骁龙 SoC 提供了内置的虚拟机管理程序支持?

IMG_20230624_084240

Yes but I don't know how to configure it.

Saikatsaha1996 commented 1 year ago

https://developer.arm.com/documentation/100942/0100/AArch64-virtualization?lang=en

whitepaper_0.pdf https://github.com/quic/gunyah-hypervisor.git

Okay so Qualcomm released there hypervisor support fast in Snapdragon 888 platform 😁

hicode002 commented 1 year ago

Wooww just rooted stock device.. all cpu started at EL1...

Chipset sm8350 has inbuilt hypervisor IMG_20230803_171533

Dmsg text

dmesg.txt

Well.But you need to find the documantation about qualcomm hypervisor.I think they are open.

Saikatsaha1996 commented 1 year ago

Wooww just rooted stock device.. all cpu started at EL1... Chipset sm8350 has inbuilt hypervisor IMG_20230803_171533 Dmsg text dmesg.txt

Well.But you need to find the documantation about qualcomm hypervisor.I think they are open.

Yes i got it..

https://github.com/quic/gunyah-hypervisor.git