* Real estate shares fall on tax talks BEIJING, May 12 (Reuters) - Hong Kong shares ended higher on Wednesday, with tech shares leading gains on bargain hunting following a sell-off in the previous session, while a settlement between Chinese smartphone maker Xiaomi Corp and the U.S. government also lifted sentiment. ** At the close of trade, the Hang Seng index was up 217.23 points, or 0.78% at 28,231.04. The Hang Seng China Enterprises index rose 1.2% to 10,556.57. ** The sub-index of the Hang Seng tracking the IT sector rose 3.5% and the energy sector rose 0.7%. ** The financial sector ended 0.49% lower, while the property sector dipped 0.75%. ** The top gainer on the Hang Seng was Xiaomi Corp, which gained 6.1%, after the company and the U.S. Defense Department agreed to resolve their litigation. ** The top gainers among H-shares were Xiaomi Corp up 6.1%, followed by Alibaba Group Holding Ltd, up 6.07%, and JD.Com Inc, which rose 5.22%. ** The biggest H-shares percentage decliner was Longfor Group Holdings Ltd, down 3.48%, after Beijing held a meeting on Tuesday to discuss property tax to curb speculation in the housing market.