From: KY Srinivasan <firstname.lastname@example.org> To: KY Srinivasan <email@example.com>, Stefano Stabellini <firstname.lastname@example.org>, "H. Peter Anvin" <email@example.com> Cc: "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, Jan Beulich <JBeulich@suse.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com>, "firstname.lastname@example.org" <email@example.com> Subject: RE: [PATCH 2/3] X86: Add a check to catch Xen emulation of Hyper-V Date: Fri, 1 Feb 2013 19:34:26 +0000 [thread overview] Message-ID: <00b29e4bf7ce4d5dab76582e72171b9d@SN2PR03MB061.namprd03.prod.outlook.com> (raw) In-Reply-To: <eef612ac273744d29e9ae38f289cdfa3@SN2PR03MB061.namprd03.prod.outlook.com> > -----Original Message----- > From: devel [mailto:firstname.lastname@example.org] On Behalf Of KY > Srinivasan > Sent: Friday, February 01, 2013 10:11 AM > To: Stefano Stabellini; H. Peter Anvin > Cc: email@example.com; firstname.lastname@example.org; email@example.com; > firstname.lastname@example.org; email@example.com; firstname.lastname@example.org; Jan Beulich; > email@example.com; firstname.lastname@example.org; email@example.com > Subject: RE: [PATCH 2/3] X86: Add a check to catch Xen emulation of Hyper-V > > > > > -----Original Message----- > > From: Stefano Stabellini [mailto:firstname.lastname@example.org] > > Sent: Friday, February 01, 2013 8:20 AM > > To: H. Peter Anvin > > Cc: Jan Beulich; KY Srinivasan; email@example.com; firstname.lastname@example.org; > > email@example.com; firstname.lastname@example.org; email@example.com; > > firstname.lastname@example.org; email@example.com; > > firstname.lastname@example.org; email@example.com > > Subject: Re: [PATCH 2/3] X86: Add a check to catch Xen emulation of Hyper-V > > > > On Thu, 31 Jan 2013, H. Peter Anvin wrote: > > > On 01/30/2013 12:53 AM, Jan Beulich wrote: > > > > > > > > I'm not convinced that's the right approach - any hypervisor > > > > could do similar emulation, and hence you either want to make > > > > sure you run on Hyper-V (by excluding all others), or you > > > > tolerate using the emulation (which may require syncing up with > > > > the other guest implementations so that shared resources don't > > > > get used by two parties). > > > > > > > > I also wonder whether using the Hyper-V emulation (where > > > > useful, there might not be anything right now, but this may > > > > change going forward) when no Xen support is configured > > > > wouldn't be better than not using anything... > > > > > > > > > > I'm confused about "the right approach" here is. As far as I > > > understand, this only can affect a Xen guest where HyperV guest support > > > is enabled but not Xen support, and only because Xen emulates HyperV but > > > does so incorrectly. > > > > > > This is a Xen bug, and as such it makes sense to reject Xen > > > specifically. If another hypervisor emulates HyperV and does so > > > correctly there seems to be no reason to reject it. > > > > I don't think so. > > > > AFAIK originally there were features exported as flags and Xen doesn't > > turn on the flags that correspond to features that are not implemented. > > The problem here is that Hyper-V is about to introduce a feature without > > a flag that is not implemented by Xen (see "X86: Deliver Hyper-V > > interrupts on a separate IDT vector"). > > K.Y. please confirm if I got this right. > > I am not sure I can agree with you here. There are two discriminating factors > here: (a) Hypervisor check and (b) Feature check. Not every feature of the > hypervisor can be surfaced as feature bit and furthermore, just because a > feature > bit is turned on, it does not necessarily mean that the feature is to be used. For > instance, > let us say that Windows guests begin to use the "partition counter" and Xen > chooses > to implement that to better support Windows. This does not mean that while > hosting > Linux on Xen, you want to plug in a clock source based on the emulated > "partition counter". This is what would happen in the code we have today. > > Other Hypervisors emulating Hyper-V do not have this problem and Xen would > not either > if the emulation bit is selectively turned on (only while running Windows) or if > Xen were allowed > to check first ahead of Hyper-V (unconditionally) in the hypervisor detection > code. As Peter pointed out, we > have this problem because of the unique situation with Xen. > > In any event, I am not going to further argue this issue; this last round of patches I > sent out, > fixes the issue for Xen. Jan wants me to make this check more general. While I > don't think > we need to do that, I will see if I can do it. I am checking to see if MSFT > guarantees that Hyper-V > would initialize the unused CPUID space to 0. If this is the case, I will implement > the check > Jan has suggested; if not, we have to live with the Xen specific check that I > currently have. I checked with the Hyper-V guys and I am told that there is no guarantee that Hyper-V would not use some other range in the CPUID space in the future. So, I will keep the Xen specific check that I had in this version. I will add the appropriate compilation switches to take care of the "dead code" and resubmit the patches. Regards, K. Y > > > > > If I were the Microsoft engineer implementing this feature, no matter > > what Xen does or does not, I would also make sure that there is a > > corresponding flag for it, because in my experience they avoid future > > headaches. > > I wonder what happens if you run Linux with Hyper-V support on an old > > Hyper-V host that doesn't support vector injection. > > > > To answer your specific question, this feature of being able to distribute vmbus > interrupt load across all VCPUs in the guest is a win8 and beyond feature. On prior > hosts, all interrupts will be delivered on the boot CPU. VMBUS, as part of > connecting with > the hosts determines host supported protocol version and decides how it wants > to > program the hypervisor with regards to interrupt delivery. Even though we might > setup > an IDT entry for delivering the hypervisor interrupt, if the host is a pre-win8 host, > the vmbus > driver will program the hypervisor to deliver the interrupt on the boot CPU via a > legacy interrupt > vector. > > Regards, > > K. Y > > _______________________________________________ > devel mailing list > firstname.lastname@example.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/devel >
next prev parent reply other threads:[~2013-02-01 19:36 UTC|newest] Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-01-30 0:51 [PATCH 0/3] X86: Deliver Hyper-V interrupts on a seperate IDT vector K. Y. Srinivasan 2013-01-30 0:51 ` [PATCH 1/3] x86: Hyper-V: register clocksource only if its advertised K. Y. Srinivasan 2013-01-30 0:51 ` [PATCH 2/3] X86: Add a check to catch Xen emulation of Hyper-V K. Y. Srinivasan 2013-01-30 8:53 ` Jan Beulich 2013-01-30 18:12 ` KY Srinivasan 2013-01-30 18:19 ` H. Peter Anvin 2013-01-31 7:37 ` Jan Beulich 2013-01-31 14:46 ` KY Srinivasan 2013-01-31 15:53 ` KY Srinivasan 2013-01-31 16:45 ` Jan Beulich 2013-01-31 18:29 ` H. Peter Anvin 2013-01-31 21:41 ` H. Peter Anvin 2013-02-01 13:19 ` Stefano Stabellini 2013-02-01 15:10 ` KY Srinivasan 2013-02-01 19:34 ` KY Srinivasan [this message] 2013-01-30 0:51 ` [PATCH 3/3] X86: Handle Hyper-V vmbus interrupts as special hypervisor interrupts K. Y. Srinivasan 2013-01-30 8:58 ` Jan Beulich 2013-01-31 14:55 ` KY Srinivasan 2013-02-04 1:21 [PATCH 0/3] X86: Deliver Hyper-V interrupts on a seperate IDT vector K. Y. Srinivasan 2013-02-04 1:22 ` [PATCH 1/3] x86: Hyper-V: register clocksource only if its advertised K. Y. Srinivasan 2013-02-04 1:22 ` [PATCH 2/3] X86: Add a check to catch Xen emulation of Hyper-V K. Y. Srinivasan 2013-04-17 7:06 ` Michael S. Tsirkin 2013-04-17 13:20 ` KY Srinivasan 2013-04-17 12:48 ` Michael S. Tsirkin 2013-04-17 14:12 ` KY Srinivasan 2013-04-17 13:25 ` Michael S. Tsirkin 2013-04-17 14:34 ` KY Srinivasan 2013-04-17 13:48 ` Michael S. Tsirkin 2013-04-17 15:31 ` KY Srinivasan 2013-04-17 15:50 ` Jan Beulich 2013-04-17 16:28 ` KY Srinivasan 2013-04-18 7:48 ` Michael S. Tsirkin 2013-04-18 13:23 ` KY Srinivasan 2013-04-18 13:30 ` KY Srinivasan 2013-04-17 13:52 ` Jan Beulich 2013-04-17 13:01 ` Michael S. Tsirkin 2013-04-17 13:11 ` Michael S. Tsirkin 2013-04-17 14:09 ` Jan Beulich 2013-04-17 15:17 ` H. Peter Anvin
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=00b29e4bf7ce4d5dab76582e72171b9d@SN2PR03MB061.namprd03.prod.outlook.com \ --email@example.com \ --cc=JBeulich@suse.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='RE: [PATCH 2/3] X86: Add a check to catch Xen emulation of Hyper-V' \ /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).