Giter Site home page Giter Site logo

Comments (3)

AnonymousII avatar AnonymousII commented on August 24, 2024

Update (fixed): After some further experiments I'm pretty sure to have fixed the problem:
In the EFER-Control Register the bit EFER_LMA = (1U << 10) (=Long Mode Active, see https://en.wikipedia.org/wiki/Control_register#EFER) needs to be set.

Obviously the old KVM version did not check for "Long Mode Active" to be set and was satisfied with "Long Mode Enable".
So Adding the following line of code to kvm-hello-world.c:setup_long_mode() obviously fixes the problem:
sregs->efer |= (1U << 10);//EFER_LMA

Would be cool if you could patch the code so that it works on the latest Ubuntu version in case others run into the same problem :)

Anyway I don't understand why there's two different flags "enable" and "active" for long mode:
Why would it make sense to enable but not activate long mode or to activate long mode without it being enabled? I'm a bit confused why there's two different control bits here... Can you maybe tell me why there's two "different" flags for long mode?

Kind regards,
Andreas

from kvm-hello-world.

justinc1 avatar justinc1 commented on August 24, 2024

The 64 bit code crashed on Fedora 27 too. The patch from @AnonymousII helped. I took liberty to send pull request (but it has wrong signed off header).

from kvm-hello-world.

dpw avatar dpw commented on August 24, 2024

Thanks. Sorry it took a while for me to merge the fix - I needed to reinstall a machine at home to test.

from kvm-hello-world.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.