From: Paul Durrant <Paul.Durrant@citrix.com> To: Jan Beulich <JBeulich@suse.com> Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>, "Keir (Xen.org)" <email@example.com>, "firstname.lastname@example.org" <email@example.com> Subject: Re: [PATCH v2] x86/hvm/viridian: fix the TLB flush hypercall Date: Thu, 17 Mar 2016 08:14:43 +0000 [thread overview] Message-ID: <0c199cf513bd47a9b5cd1e085e354b95@AMSPEX02CL03.citrite.net> (raw) In-Reply-To: <56EA74CD02000078000DD96E@prv-mh.provo.novell.com> > -----Original Message----- > From: Jan Beulich [mailto:JBeulich@suse.com] > Sent: 17 March 2016 08:12 > To: Paul Durrant > Cc: Andrew Cooper; firstname.lastname@example.org; Keir (Xen.org) > Subject: RE: [PATCH v2] x86/hvm/viridian: fix the TLB flush hypercall > > >>> On 16.03.16 at 18:35, <Paul.Durrant@citrix.com> wrote: > >> From: Jan Beulich [mailto:JBeulich@suse.com] > >> Sent: 16 March 2016 15:36 > >> >>> On 16.03.16 at 15:21, <email@example.com> wrote: > >> > @@ -656,7 +647,9 @@ int viridian_hypercall(struct cpu_user_regs > *regs) > >> > * so we may unnecessarily IPI some CPUs. > >> > */ > >> > if ( !cpumask_empty(pcpu_mask) ) > >> > - flush_tlb_mask(pcpu_mask); > >> > + smp_send_event_check_mask(pcpu_mask); > >> > + > >> > + output.rep_complete = input.rep_count; > >> > >> Questions on this one remain: Why only for this hypercall? And > >> what does "repeat count" mean in this context? > >> > > > > It's only for this hypercall because it's the only 'rep' hypercall we > > implement. For non-rep hypercalls the spec states that the rep count and > > starting index in the input params must be zero. It does not state what the > > value of reps complete should be on output for non-rep hypercalls but I > think > > it's safe to assume that zero is correct. > > For rep hypercalls the spec says that on output "the reps complete field is > > the total number of reps complete and not relative to the rep start index. > > For example, if the caller specified a rep start index of 5, and a rep count > > of 10, the reps complete field would indicate 10 upon successful > completion". > > > > Section 12.4.3 of the spec defines the HvFlushVirtualAddressList hypercall > > as a rep hypercall and each rep refers to flush of a single guest VA range. > > Because we invalidate all VA ranges in one go clearly we complete all reps > > straight away :-) > > Ah, there's an address list associated with it. So if the flush > request was just for a single page, isn't a flush-all then pretty > heavy handed? > Yes, it is overkill, but it's probably still less expensive than waking up a de-scheduled vCPU to flush a single page and possibly still less expensive than an IPI to do the same. Paul > Jan _______________________________________________ Xen-devel mailing list Xenfirstname.lastname@example.org http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-03-17 8:15 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-03-16 14:21 Paul Durrant 2016-03-16 15:35 ` Jan Beulich 2016-03-16 17:35 ` Paul Durrant 2016-03-17 8:11 ` Jan Beulich 2016-03-17 8:14 ` Paul Durrant [this message] 2016-03-17 8:35 ` Jan Beulich 2016-03-17 10:30 ` Andrew Cooper
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=0c199cf513bd47a9b5cd1e085e354b95@AMSPEX02CL03.citrite.net \ --email@example.com \ --cc=Andrew.Cooper3@citrix.com \ --cc=JBeulich@suse.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [PATCH v2] x86/hvm/viridian: fix the TLB flush hypercall' \ /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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).