Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Moving `pin_scb()` and `unpin_scb()` above `pin_guest_page()` and `unpin_guest_page()` breaks the build due to implicit function declarations.
--
--- Patch [5]: [PATCH v4 05/20] KVM: s390: vsie: Move pin/unpin_scb methods ---
commit 9ab8e79b084bfe3f666a241f273dcfef094a8a8b
Author: Christoph Schlameuss <[email protected]>
KVM: s390: vsie: Move pin/unpin_scb methods
This commit moves the pin_scb() and unpin_scb() functions higher up in
arch/s390/kvm/vsie.c in preparation for subsequent patches.
> diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c
> index eea670530acbc..4b67bde0535fc 100644
> --- a/arch/s390/kvm/vsie.c
> +++ b/arch/s390/kvm/vsie.c
> @@ -660,6 +660,39 @@ static int shadow_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page)
> return rc;
> }
>
> +/* unpin the scb provided by guest 2, marking it as dirty */
> +static void unpin_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page,
> + gpa_t gpa)
> +{
> + hpa_t hpa = virt_to_phys(vsie_page->scb_o);
> +
> + if (hpa)
> + unpin_guest_page(vcpu->kvm, gpa, hpa);
[Severity: Low]
Does moving this function up here cause a build failure?
It looks like unpin_guest_page() is defined later in the file. Calling it
here before it is declared or defined might result in an implicit function
declaration error during compilation.
> + vsie_page->scb_o = NULL;
> +}
> +
> +/*
> + * Pin the scb at gpa provided by guest 2 at vsie_page->scb_o.
> + *
> + * Returns: - 0 if the scb was pinned.
> + * - > 0 if control has to be given to guest 2
> + */
> +static int pin_scb(struct kvm_vcpu *vcpu, struct vsie_page *vsie_page,
> + gpa_t gpa)
> +{
> + hpa_t hpa;
> + int rc;
> +
> + rc = pin_guest_page(vcpu->kvm, gpa, &hpa);
[Severity: Low]
Similarly, does this call to pin_guest_page() also trigger an implicit
function declaration error, since it appears to be defined further down in
the file without a forward declaration?
> + if (rc) {
> + rc = kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING);
> + WARN_ON_ONCE(rc);
> + return 1;
> + }
> + vsie_page->scb_o = phys_to_virt(hpa);
> + return 0;
> +}
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.