From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Ross Lagerwall <ross.lagerwall@citrix.com>,
xen-devel@lists.xenproject.org
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Roger Pau Monné" <roger@xenproject.org>,
"Jason Andryuk" <jason.andryuk@amd.com>,
"Teddy Astie" <teddy.astie@vates.tech>
Subject: Re: [PATCH 2/5] x86/svm: Remove ioio_info_t type
Date: Tue, 29 Sep 2026 18:15:34 +0100 [thread overview]
Message-ID: <1d021cc5-a4d0-43a7-a179-4100229495f0@citrix.com> (raw)
In-Reply-To: <20260928140248.1543013-3-ross.lagerwall@citrix.com>
On 28/09/2026 3:02 pm, Ross Lagerwall wrote:
> diff --git a/xen/arch/x86/hvm/svm/nestedsvm.c b/xen/arch/x86/hvm/svm/nestedsvm.c
> index 65556136852b..13a2144fdba4 100644
> --- a/xen/arch/x86/hvm/svm/nestedsvm.c
> +++ b/xen/arch/x86/hvm/svm/nestedsvm.c
> @@ -823,18 +823,16 @@ nsvm_vmcb_guest_intercepts_msr(unsigned long *msr_bitmap,
> }
>
> static int
> -nsvm_vmcb_guest_intercepts_ioio(paddr_t iopm_pa, uint64_t exitinfo1)
> +nsvm_vmcb_guest_intercepts_ioio(paddr_t iopm_pa, struct vmcb_struct *vmcb)
> {
> unsigned long gfn = iopm_pa >> PAGE_SHIFT;
> unsigned long *io_bitmap;
> - ioio_info_t ioinfo;
> uint16_t port;
> unsigned int size;
> bool intercepted;
>
> - ioinfo.bytes = exitinfo1;
> - port = ioinfo.fields.port;
> - size = ioinfo.fields.sz32 ? 4 : ioinfo.fields.sz16 ? 2 : 1;
> + port = vmcb->ei.io.port;
> + size = vmcb->ei.io.bytes;
>
> switch ( port )
> {
> @@ -945,7 +943,7 @@ nsvm_vmcb_guest_intercepts_exitcode(struct vcpu *v,
> break;
> ns_vmcb = nv->nv_vvmcx;
> vmexits = nsvm_vmcb_guest_intercepts_ioio(ns_vmcb->_iopm_base_pa,
> - ns_vmcb->exitinfo1);
> + ns_vmcb);
Given the single caller here, I'd drop the iopm_pa parameter too, and
have nsvm_vmcb_guest_intercepts_ioio() read it out of the VMCB.
~Andrew
next prev parent reply other threads:[~2026-09-29 17:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 14:02 [PATCH 0/5] x86/svm: Cleanup types Ross Lagerwall
2026-09-28 14:02 ` [PATCH 1/5] x86/svm: Cleanup vintr_t type Ross Lagerwall
2026-09-28 23:58 ` Jason Andryuk
2026-09-29 16:05 ` Jan Beulich
2026-09-30 8:57 ` Ross Lagerwall
2026-09-28 14:02 ` [PATCH 2/5] x86/svm: Remove ioio_info_t type Ross Lagerwall
2026-09-28 23:58 ` Jason Andryuk
2026-09-29 17:15 ` Andrew Cooper [this message]
2026-09-28 14:02 ` [PATCH 3/5] x86/svm: Cleanup virt_ext_t type Ross Lagerwall
2026-09-28 23:59 ` Jason Andryuk
2026-09-30 6:34 ` Jan Beulich
2026-09-28 14:02 ` [PATCH 4/5] x86/svm: Use C99 types in VMCB struct Ross Lagerwall
2026-09-29 0:00 ` Jason Andryuk
2026-09-30 6:35 ` Jan Beulich
2026-09-28 14:02 ` [PATCH 5/5] x86/svm: Cleanup ns_hostflags type Ross Lagerwall
2026-09-29 0:02 ` Jason Andryuk
2026-09-30 6:37 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1d021cc5-a4d0-43a7-a179-4100229495f0@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jason.andryuk@amd.com \
--cc=jbeulich@suse.com \
--cc=roger@xenproject.org \
--cc=ross.lagerwall@citrix.com \
--cc=teddy.astie@vates.tech \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.