On 2023/11/30 17:00, Jan Beulich wrote: > On 30.11.2023 07:44, Chen, Jiqian wrote: >> On 2023/11/28 23:14, Jan Beulich wrote: >>> On 24.11.2023 11:41, Jiqian Chen wrote: >>>> --- a/xen/arch/x86/hvm/hypercall.c >>>> +++ b/xen/arch/x86/hvm/hypercall.c >>>> @@ -74,6 +74,8 @@ long hvm_physdev_op(int cmd, >>>> XEN_GUEST_HANDLE_PARAM(void) arg) >>>> { >>>> case PHYSDEVOP_map_pirq: >>>> case PHYSDEVOP_unmap_pirq: >>>> + if (is_hardware_domain(currd)) >>>> + break; >>>> case PHYSDEVOP_eoi: >>>> case PHYSDEVOP_irq_status_query: >>>> case PHYSDEVOP_get_free_pirq: >>> >>> If you wouldn't go the route suggested by Roger, I think you will need >>> to deny self-mapping requests here. >> Do you mean below? >> if (arg.domid == DOMID_SELF) >> return; > > That's part of it, yes. You'd also need to check for the actual domain ID of > the caller domain. I will add more check in next version.
> >>> Also note that both here and in patch 1 you will want to adjust a number >>> of style violations. >> Could you please descript in detail? This will greatly assist me in making >> modifications in the next version. Thank you! > > Well, in the code above you're missing blanks inside the if(). Please see > ./CODING_STYLE. Thank you very much! I will check and modify all my patches to meet the Xen code style in next version. > > Jan -- Best regards, Jiqian Chen.