[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v8 09/13] vpci/header: emulate PCI_COMMAND register for guests


  • To: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 21 Jul 2023 15:40:32 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; 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=06usSbsssSaieiqulC9C6s+2i5pIJ9QUgxJTZwMYGv4=; b=iZWA7GUasRlpIoz8/7DEQqjU/p9frPtDCaDURQNpywopRmqTFfvIv07/x0KmygdWdRoCM6Tfgsn7/qJIlRB2b6DSPy3hGGOrHe7Q0W2I+/764xnCtDV9GIC2ZxvYAckkaOBkuokuVB40HsoruTPU6WN2EvIcZqQyCQrSP3WH6jWc3kbsDXXRTBwZeIxXwNbjNP90MfCO4HftIAeNNn1E17Hg40txjg2Ptn7SkX4AP3GAdYtX5KAxzAQQZ/C9gHG4G0HdIE6toqVDSzfY2b9XFEs76gf5NM1+cjqEGBL60Hx8HHPeg2aQ/NEopmJsF4+xucsu4tMRoorKt/kVLh4AOg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g/lmunof5c6llPo9CTQQQbm84SxSBGuNqWJPnmyRtC2DKqgI0zcEOKHeSiYO0ybFcBnP+mT6y6rHYNBztr4gYlIq4bExWzdLycqz1hqNmkSzAyaI/bFbUcdxcjXLCuKsScckE290ReCNot1TCiM+aaR8uD3AG0Uqsy2SIPE6wNc8Oe5sOErldKhpYgbPycpreVRsOR1/WhXZ9WUujkovFM91uzFTGfvaLLqJzrna61ji4alDQjldlu5ECBF6wD3AMswIDTRDk9yJpD4RpzhNQaFSJiFM12E7rkMI7K6gqiKGpBtHw50KrsGS8JmAJyTL89E78kwGhROqR/Q7a7eoPA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Delivery-date: Fri, 21 Jul 2023 13:41:01 +0000
  • Ironport-data: A9a23:AkySYqjSpAH9Wci8+T9e09OzX161pBEKZh0ujC45NGQN5FlHY01je htvWjiDP/vcajD3eo1ybIyxoE0GusXUm9Q2G1c9/ns9FC4b9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsx+qyr0N8klgZmP6sT4wWHzyB94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTuuTLp6HKnueFL1yDwyjaMKVBktubD12i+ tQaKzQDTS2Hgt6O+62FE/Bin+99E8nkadZ3VnFIlVk1DN4AaLWaGeDv2oUd2z09wMdTAfzZe swVLyJ1awjNaAFOPVFRD48imOCvhT/0dDgwRFC9/PJrpTSMilIvluS8WDbWUoXiqcF9hEGXq 3iA523kKhobKMae2XyO9XfEaurnxHqlCN1CS+TpnhJsqEyQwzFNCzEubHuqhPbmjnHhfdh/C mVBr0LCqoB3riRHVOLVYRq8p3KVuw8GbPBZGeY69QKlx7Ld5kCSAW1sZi5MbpkqudE7QRQu1 0SVhJX5CDp3qrqXRHmBsLCOoluaHiwYLnQLYyMeeiID78P+u4E4jh/JTdFLHba8i5v+HjSY/ tyRhC03hrFWiNFR0ay+pArDm2j0+smPSRMp7ALKWG7j9hl+eIOue42v7x7c8OpEK4GaCFKGu RDohvSj0QzHNrnV/ATlfQnHNOjBCyqtWNEEvWNSIg==
  • Ironport-hdrordr: A9a23:I2YF1a9sV6mXhAUOMltuk+AcI+orL9Y04lQ7vn2ZKSY5TiX4rb HKoB1/73XJYVkqN03I9ervBEDiewK/yXcW2+ks1N6ZNWGLhILBFupfBODZsl7d8kPFl9K01c 1bAtJD4N+bNykGsS4tijPIb+rJw7O8gd+Vbf+19QYIcenzAZsQlzuQDGygYypLbTgDP7UVPr yG6PFKojKxEE5nFfhSVhE+Lo7+T8SgruOeXSI7
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, Jul 21, 2023 at 03:32:27PM +0200, Roger Pau Monné wrote:
> On Thu, Jul 20, 2023 at 12:32:33AM +0000, Volodymyr Babchuk wrote:
> > From: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
> > +    /*
> > +     * According to "PCI LOCAL BUS SPECIFICATION, REV. 3.0", section "6.2.2
> > +     * Device Control" the reset state of the command register is
> > +     * typically all 0's, so this is used as initial value for the guests.
> > +     */
> > +    ASSERT(header->guest_cmd == 0);
> 
> Hm, while that would be the expectation, shouldn't the command register
> reflect the current state of the hardware?
> 
> I think you want to check 'cmd' so it's sane, and complain otherwise but
> propagate the value to the guest view.

In fact asserting that header->guest_cmd == 0 is pointless, as the
structure has just been allocated and zeroed.  We do not assert that
the other fields are also zeroed.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.