[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 10/13] vpci/header: reset the command register when adding devices
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
- Date: Thu, 10 Feb 2022 13:56:46 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=EoexHjlOaY9F7iVbP1Pg9SayF11zkzAFwoN8Gzo86KI=; b=hsLT7puvPs2ypzNko+fgJ46oIViPNYtQ993hlPigjpkO+uqG7n15XUYRAaLhmn3n2x/RYQlob1SMBRauCdYxNlOnS2iE2I9mNpgRWyYvYUngt8wOvVEIMpGVnp3fIAwFOiTJWTcgi3tNjdVYplTzPNefA/OLQKX3KTzST1VmPgZX8WX7GJ2cdj5O3EC8JVOmELCn6opYdwgmAfxDorGuzCm9xntA4BIEoOcKR7Os8/UnzmdLcTCpCHnEuJyyJ4IRanhLrJ5YtHwEXvi0TOIXyAfi0gTkKEKuk0fWqh3Fng+Dg4t02YbwzpWCtZ97AARfBDnjSVCgudKclVU3h0P2ag==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LsRibKuBw4NG5htbv2bVsLhf/kuYGy+yeOqieJhqrmOCcWoaXZacsjl3bz6zJSF+2jd1p4vZCi1B3DuUvTjKb/QwIpOiK+XlmPgkqZaMACmZITun5OAsIOd2DLrqqkTeJ/fyRlKFh7vGsTn6lhneXSXIWEVetOb6SyIiYpt3aNwzXi1NuX4Jujq/hbGgpmw/dXI0SD/VWqA3IEs3pxMQLy2ulk0MDPMBHU0f552k2hCtrzVZ3rjM9ZWGrQiJj3mzbPC+XO3uekSnDMAy9P1ZLzJ8jIJgV/9V7XL+9NrT5mRfKRQpAc+POxvVzQMw10jKVhS4EJosrCuRnNJu86GZRg==
- Cc: "julien@xxxxxxx" <julien@xxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Artem Mygaiev <Artem_Mygaiev@xxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, "paul@xxxxxxx" <paul@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
- Delivery-date: Thu, 10 Feb 2022 13:57:09 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYGZFg3nazYSvfA0G+yHTbxcxX2ayDdFgAgAAB6wCABD+NgIAAQmgAgAAT4YCAAAOjAIAAAPCAgAAXGICAAAPHAIAEnAeAgAALrICAAAWzgA==
- Thread-topic: [PATCH v6 10/13] vpci/header: reset the command register when adding devices
On 10.02.22 15:36, Jan Beulich wrote:
> On 10.02.2022 13:54, Oleksandr Andrushchenko wrote:
>> On 07.02.22 16:31, Jan Beulich wrote:
>>> On 07.02.2022 15:17, Oleksandr Andrushchenko wrote:
>>> But: What's still missing here then is the separation of guest and host
>>> views. When we set INTx behind the guest's back, it shouldn't observe the
>>> bit set. Or is this meant to be another (big) TODO?
>> Why not? This seems to be when a guest tries to both enable MSI/MSI-X
>> and INTx which is a wrong combination. Let's pretend to be a really
>> smart PCI device which partially rejects such PCI_COMMAND write,
>> so guest still sees the register consistent wrt INTx bit. Namely it remains
>> set.
> I'm afraid this wouldn't be "smart", but "buggy". I'm not aware of
> the spec leaving room for such behavior. And our emulation should
> give the guest a spec-compliant view of the device.
This means we need to emulate PCI_COMMAND for guests in terms
we need to maintain their state just like we do for BARs (header->guest_reg)
So, we will need header->guest_cmd to hold the state
>
> Jan
>
>
Thank you,
Oleksandr
|