Re: [RFC PATCH 12/25] accel/mshv: Add vCPU creation and execution loop

2025-06-06 Thread Nuno Das Neves
On 5/20/2025 6:50 AM, Paolo Bonzini wrote: > On 5/20/25 13:30, Magnus Kulke wrote: >> +    int ret; >> +    hv_message exit_msg = { 0 }; > > You probably don't want to fill 512 bytes on every vmentry.  Maybe pass > &exit_msg up from mshv_cpu_exec()? > >> +    /* >> + * Read cpu->exit

Re: [RFC PATCH 12/25] accel/mshv: Add vCPU creation and execution loop

2025-05-23 Thread Wei Liu
On Tue, May 20, 2025 at 03:54:57PM +0200, Paolo Bonzini wrote: > On 5/20/25 15:50, Paolo Bonzini wrote: > > You need support in the hypervisor for this: KVM and HVF both have it. > > > > There are two ways to do it > > Sorry - I left out the other way which is to pass something *into* > MSHV_RUN_

Re: [RFC PATCH 12/25] accel/mshv: Add vCPU creation and execution loop

2025-05-20 Thread Paolo Bonzini
On 5/20/25 15:50, Paolo Bonzini wrote: You need support in the hypervisor for this: KVM and HVF both have it. There are two ways to do it Sorry - I left out the other way which is to pass something *into* MSHV_RUN_VP since only half of it is currently used (I think). But that's more complic

Re: [RFC PATCH 12/25] accel/mshv: Add vCPU creation and execution loop

2025-05-20 Thread Paolo Bonzini
On 5/20/25 13:30, Magnus Kulke wrote: +int ret; +hv_message exit_msg = { 0 }; You probably don't want to fill 512 bytes on every vmentry. Maybe pass &exit_msg up from mshv_cpu_exec()? +/* + * Read cpu->exit_request before KVM_RUN reads run->immediate_exit. +

[RFC PATCH 12/25] accel/mshv: Add vCPU creation and execution loop

2025-05-20 Thread Magnus Kulke
Create MSHV vCPUs using MSHV_CREATE_VP and initialize their state. Register the MSHV CPU execution loop loop with the QEMU accelerator framework to enable guest code execution. The target/i386 functionality is still mostly stubbed out and will be populated in a later commit in this series. Signed