All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Matt Wilson <msw@amazon.com>
Cc: xen-devel <xen-devel@lists.xen.org>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-users]  FreeBSD PVHVM call for testing
Date: Thu, 30 May 2013 10:31:43 +0100	[thread overview]
Message-ID: <1369906303.13087.60.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <20130529221036.GB20973@u109add4315675089e695.ant.amazon.com>

On Wed, 2013-05-29 at 15:10 -0700, Matt Wilson wrote:
> On Wed, May 29, 2013 at 06:25:56PM +0100, Ian Campbell wrote:
> > On Wed, 2013-05-29 at 19:03 +0200, Roger Pau Monné wrote:
> > > 
> > > Since I'm not able to reproduce the cpuid != acpi_id case, could you
> > > give it a try and report the results?
> > 
> > Konrad,
> > 
> > Might this same problem be related to the issue you saw doing PVHVM VCPU
> > hotplug which you mentioned the other day?
> >
> > In general for HVM I suppose there isn't a strict relationship between
> > the CPU number the kernel chooses for a CPU (which is somewhat
> > arbitrarily up to the kernel) and the hypervisors VCPU number (which is
> > exposed via the virtual APIC ID).
> 
> The CPU enumeration should follow the ACPI ID order in MADT (or
> MP-table), right?

You mean the guest's enumeration? I'd have thought that was entirely up
to the guest. Using the APIC ID might be a reasonable implementation but
there are surely others (e.g. collapsing sparse LAPIC IDs into
contiguous cpu ids, using the top bits for NUMA node, etc etc).

>   The local APIC ID (returned by cpuid
> EAX=0000_0001h => EBX bits 31:24) shouldn't be used for
> enumeration. Under Xen, the LAPIC ID is hardcoded to vCPU idx * 2:
> 
> void hvm_cpuid(unsigned int input, unsigned int *eax, unsigned int *ebx,
> [...]
>      case 0x1:
>          /* Fix up VLAPIC details. */
>          *ebx &= 0x00FFFFFFu;
>          *ebx |= (v->vcpu_id * 2) << 24;
> [...]
>      case 0xb:
>          /* Fix the x2APIC identifier. */
>          *edx = v->vcpu_id * 2;
>          break;
> 
> This isn't the way it works on some of our EC2 instances.  On our high
> performance instance types, we provide x2APIC IDs that distinguish
> threads, cores and sockets to provide the guest OS with CPU topology
> information. The OS and applications can use CPUID EAX=0000_000Bh,
> ECX=level (HT=0, Core=1, Socket=2) => EAX bits 4:0 to determine the
> topology.

Hrm, that does beg the question of how an HVM guest is supposed to
determine what Xen's idea of the VCPU number is for a given CPU.

I can't see anything which reverses that * 2 on the vcpu_op path and I
don't suppose you implemented the inverse of your scheme.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2013-05-30  9:31 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <519131D8.9010307@citrix.com>
2013-05-13 18:52 ` FreeBSD PVHVM call for testing Michael Sierchio
     [not found] ` <CAHu1Y73xuFqAQL99rTJL0_LGFNsdafcDd0sTpyg9DYjAgmf_jQ@mail.gmail.com>
2013-05-13 18:59   ` Colin Percival
     [not found]   ` <51913821.4040104@freebsd.org>
2013-05-13 19:08     ` Michael Sierchio
     [not found]     ` <CAHu1Y727R0KW-MfrfNf1_jjuZhCTq+8=dJidNmRZ29i2iKPQ+w@mail.gmail.com>
2013-05-13 19:13       ` Colin Percival
2013-05-14  9:19 ` George Dunlap
     [not found] ` <CAFLBxZZ1eNf2UoHf1NvWd_cfomSChr0LDYyfFcXpYROg8RNC8Q@mail.gmail.com>
2013-05-14 15:56   ` Dario Faggioli
2013-05-16 18:55 ` Colin Percival
     [not found] ` <51952BAE.6010609@freebsd.org>
2013-05-17  0:43   ` Roger Pau Monné
     [not found]   ` <51957D42.9060801@citrix.com>
2013-05-17  3:07     ` Colin Percival
     [not found]     ` <51959ED9.6040405@freebsd.org>
2013-05-18  9:50       ` Roger Pau Monné
     [not found]       ` <51974EC9.9030204@citrix.com>
2013-05-18 15:44         ` Colin Percival
     [not found]         ` <5197A1EA.2040404@freebsd.org>
2013-05-22 11:45           ` Roger Pau Monné
     [not found]           ` <519CAFC7.1070908@citrix.com>
2013-05-22 20:03             ` Colin Percival
     [not found]             ` <519D24A9.3050407@freebsd.org>
2013-05-23  9:06               ` Roger Pau Monné
     [not found]               ` <519DDC0A.9000201@citrix.com>
2013-05-23 19:09                 ` Colin Percival
     [not found]                 ` <519E6958.6020606@freebsd.org>
2013-05-24 10:11                   ` Roger Pau Monné
     [not found]                   ` <519F3CD0.5090405@citrix.com>
2013-05-28 16:15                     ` Roger Pau Monné
     [not found]                     ` <51A4D804.9050208@citrix.com>
2013-05-28 19:18                       ` Matt Wilson
     [not found]                       ` <20130528191855.GA13736@u109add4315675089e695.ant.amazon.com>
2013-05-28 21:33                         ` Colin Percival
     [not found]                         ` <51A5229F.80205@freebsd.org>
2013-05-29 17:03                           ` Roger Pau Monné
     [not found]                           ` <51A634EC.7050805@citrix.com>
2013-05-29 17:22                             ` Matt Wilson
2013-05-29 17:25                             ` [Xen-users] " Ian Campbell
2013-05-29 18:24                               ` Konrad Rzeszutek Wilk
2013-05-30  9:26                                 ` Ian Campbell
2013-05-29 22:10                               ` Matt Wilson
2013-05-30  9:31                                 ` Ian Campbell [this message]
2013-05-30 17:16                                   ` Matt Wilson
2013-05-31  8:21                                     ` HVM CPU enumeration, mapping to VCPU ID (Was: Re: [Xen-users] FreeBSD PVHVM call for testing) Ian Campbell
2013-05-31 18:53                                       ` Matt Wilson
2013-06-03 14:44                                         ` Konrad Rzeszutek Wilk
2013-06-03 15:57                                           ` Matt Wilson
2013-06-03 17:33                                             ` Konrad Rzeszutek Wilk
2013-06-03 18:23                                               ` Matt Wilson
2013-06-04 14:22                                                 ` Konrad Rzeszutek Wilk
2013-06-05 16:15                                                   ` Matt Wilson
2013-06-05 19:10                                                     ` Konrad Rzeszutek Wilk
2013-08-09 13:54                                                   ` Konrad Rzeszutek Wilk
     [not found]                             ` <20130529172201.GA20973@u109add4315675089e695.ant.amazon.com>
2013-05-29 17:45                               ` FreeBSD PVHVM call for testing Roger Pau Monné
     [not found]                               ` <51A63EB3.5090007@citrix.com>
2013-05-29 20:58                                 ` Colin Percival
     [not found]                                 ` <51A66C13.7060203@freebsd.org>
2013-05-29 22:19                                   ` Matt Wilson
     [not found]                                   ` <20130529221920.GC20973@u109add4315675089e695.ant.amazon.com>
2013-05-30  1:10                                     ` Colin Percival
2013-05-21 17:40 ` Konrad Rzeszutek Wilk
2013-05-22 11:41   ` Roger Pau Monné
     [not found]   ` <519CAECE.9040706@citrix.com>
2013-05-22 12:21     ` Konrad Rzeszutek Wilk
2013-05-22 15:27 ` Yuriy Kohut
2013-05-23 12:57 ` Jeroen van der Ham
2013-05-23 13:20 ` Jeroen van der Ham
     [not found] ` <647F6650-AEED-4784-8A45-98324860EE0A@dckd.nl>
2013-05-23 13:30   ` Roger Pau Monné
     [not found]   ` <519E1A0C.3070609@citrix.com>
2013-05-24 22:27     ` Craig Rodrigues
     [not found]     ` <CAG=rPVeWnTdhXucg-KRjgSRLfTCz5bRNdkTGQX7ug2Bu2qJkiQ@mail.gmail.com>
2013-05-28 15:21       ` Outback Dingo
     [not found]       ` <CAKYr3zyu-zppwsy9RDOGXj+cc1Xt76hzwB0S1LnfZnhCLpxL=g@mail.gmail.com>
2013-05-28 22:05         ` Craig Rodrigues
2013-05-28 22:43           ` Outback Dingo
     [not found]           ` <CAKYr3zwbdtw4s+jUMNQJCc1P3S=T_b1k2M_QK8=FQKieDa7Uhg@mail.gmail.com>
2013-05-28 23:09             ` Craig Rodrigues
     [not found]             ` <CAG=rPVeZKSbWRd0egjZpvJghUsK6rXVr+wwL-u7LAoeKMNpozQ@mail.gmail.com>
2013-05-28 23:20               ` Outback Dingo
     [not found]               ` <CAKYr3zzqgii5G8xw2yQtgxEXaa38Ww4hibxMcCCVCtJZ7PGgew@mail.gmail.com>
2013-05-29 17:07                 ` Justin T. Gibbs
     [not found] ` <616EE8A8-78BA-46E6-90AA-4A22160289DF@dckd.nl>
2013-05-23 13:02   ` Outback Dingo
2013-05-23 13:33   ` Roger Pau Monné
     [not found]   ` <519E1AA6.2060808@citrix.com>
2013-05-23 15:02     ` Outback Dingo
2013-05-23 16:30     ` Outback Dingo
     [not found]     ` <CAKYr3zyB-9FOUwAgbq19rMNoxb5XEzHP5Wa0RiiGYJ_XcG7VbA@mail.gmail.com>
2013-05-23 16:48       ` Sergey Kandaurov
2013-05-23 16:48       ` Roger Pau Monné
     [not found]       ` <519E4850.1090305@citrix.com>
2013-05-23 17:02         ` Outback Dingo
     [not found]         ` <CAKYr3zxJMdhMCu-A0epLekLw+sLAWjSUR7UB7jHo0zfG_QfaRQ@mail.gmail.com>
2013-05-23 17:22           ` Jeroen van der Ham
     [not found]           ` <0BBCBA0B-F4A6-4775-A172-D051D9363665@dckd.nl>
2013-05-23 17:29             ` Outback Dingo
2013-05-23 17:41 ` Roger Pau Monné
2013-05-23 23:24 ` Outback Dingo
     [not found] ` <7C420745-BAC0-4BD0-AB60-E3BC7F8BA2A7@onapp.com>
2013-05-24  8:34   ` Yuriy Kohut
     [not found] ` <519E54DE.5090304@citrix.com>
2013-05-24 14:14   ` Konrad Rzeszutek Wilk
     [not found]   ` <20130524141400.GB3900@phenom.dumpdata.com>
2013-05-24 14:16     ` Outback Dingo
2013-05-24 14:21     ` Roger Pau Monné
2013-05-24 22:21     ` Craig Rodrigues
     [not found]     ` <CAG=rPVfoyHOzN5qZPn9YAfR2QPnLxBMVJBLv2abg7CMtdPWHJA@mail.gmail.com>
2013-05-28 13:42       ` Konrad Rzeszutek Wilk
2013-05-30  8:50   ` Jeroen van der Ham
     [not found]   ` <6B8B9354-AF52-4081-B67B-04565D1BCE99@dckd.nl>
2013-05-30  9:04     ` Roger Pau Monné
     [not found]     ` <51A71616.4060508@citrix.com>
2013-05-30  9:15       ` Jeroen van der Ham
     [not found]       ` <ED94B614-A210-4D0B-A60B-8022C30BB0F1@dckd.nl>
2013-05-30 14:56         ` Outback Dingo
     [not found]         ` <CAKYr3zxo0-BOBQuJk_qY2=kbxnMyMR7gffEzoVL+YuTmj-Trdg@mail.gmail.com>
2013-05-30 15:10           ` Jeroen van der Ham
2013-06-10 14:48   ` Roger Pau Monné
     [not found]   ` <51B5E730.6070007@citrix.com>
2013-06-10 15:09     ` Outback Dingo
     [not found]     ` <CAKYr3zxhqvpaL-G0L9220zbRY7D_ZQ+9DZ4MKKGiKtsWvPw3RA@mail.gmail.com>
2013-06-10 15:16       ` Roger Pau Monné
2013-06-13 17:20     ` Roger Pau Monné
     [not found]     ` <51B9FF53.2020901@citrix.com>
2013-06-19 11:13       ` Jeroen van der Ham
     [not found]       ` <2C70BC9B-5964-498F-AAE2-E5024160E3E5@dckd.nl>
2013-06-19 11:34         ` Roger Pau Monné
     [not found]         ` <51C1972B.50703@citrix.com>
2013-06-19 12:16           ` Jeroen van der Ham
     [not found]           ` <C4BE5FBE-DF19-404F-B478-0F33D716454F@dckd.nl>
2013-06-19 12:20             ` Roger Pau Monné
     [not found]             ` <51C1A223.6030305@citrix.com>
2013-06-19 12:33               ` Jeroen van der Ham
     [not found]               ` <6E99C9B2-E28D-4793-81C2-97440AC5AD0E@dckd.nl>
2013-06-19 12:44                 ` Roger Pau Monné
     [not found]                 ` <51C1A7AA.2010307@citrix.com>
2013-06-19 16:07                   ` Jeroen van der Ham
     [not found]                   ` <B6D2239B-86D0-4B1B-A357-63F6E5A18284@dckd.nl>
2013-06-19 16:15                     ` Justin T. Gibbs
     [not found]                     ` <BB38EA9B-54E4-43CD-AF49-7B480DC50BFF@freebsd.org>
2013-06-19 16:50                       ` Jeroen van der Ham
     [not found]                       ` <546D0358-4F92-4E8C-AED0-94FC5D36086F@dckd.nl>
2013-06-19 16:52                         ` Justin T. Gibbs
     [not found]                         ` <E8150505-ECA0-4CB6-B777-A41334B8B903@FreeBSD.org>
2013-06-19 20:03                           ` Jeroen van der Ham
2013-06-20  9:20       ` Jeroen van der Ham
     [not found]       ` <54560214-F170-426E-BDF9-2295D8B8E982@dckd.nl>
2013-06-20  9:33         ` Roger Pau Monné
     [not found]         ` <51C2CC63.9070505@citrix.com>
2013-06-20  9:37           ` Jeroen van der Ham
2013-07-22  7:18       ` Jeroen van der Ham
     [not found]       ` <4A595D02-7B79-4C6C-9356-55FA9E45EDDC@dckd.nl>
2013-07-22  8:29         ` Roger Pau Monné
     [not found]         ` <51ECED83.9020905@citrix.com>
2013-07-22  8:40           ` Jeroen van der Ham
     [not found]           ` <A1FE7DDA-7C0D-4456-A754-65CBCA81232D@dckd.nl>
2013-07-22 10:40             ` Roger Pau Monné
2013-07-22 16:23             ` Jeroen van der Ham
2013-10-11  9:42 ` Eggert, Lars
     [not found] ` <7BE1E0BE-C4E8-4706-8751-23A30D733A94@netapp.com>
2013-10-11 13:56   ` Roger Pau Monné

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=1369906303.13087.60.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=msw@amazon.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xen.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.